mirror of
https://github.com/stokebob/bnhtrade.git
synced 2026-03-21 07:17:15 +00:00
Export amazon settlement report fix
This commit is contained in:
35
src/bnhtrade.Core/UI/Console/Update.cs
Normal file
35
src/bnhtrade.Core/UI/Console/Update.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace bnhtrade.Core.UI.Console
|
||||
{
|
||||
public class Update
|
||||
{
|
||||
public void WriteLine(string consoleText, Boolean newLine = true)
|
||||
{
|
||||
if (newLine)
|
||||
{
|
||||
System.Console.WriteLine("[" + DateTime.Now.ToString("HH:mm:ss") + "] " + consoleText);
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Console.Write("\r[" + DateTime.Now.ToString("HH:mm:ss") + "] " + consoleText);
|
||||
}
|
||||
}
|
||||
public void Wait(string consoleMessage, int waitSeconds)
|
||||
{
|
||||
do
|
||||
{
|
||||
System.Console.Write("\r[--------] " + consoleMessage, string.Format("{0:00}", waitSeconds));
|
||||
System.Threading.Thread.Sleep(1000);
|
||||
waitSeconds = waitSeconds - 1;
|
||||
} while (waitSeconds > 0);
|
||||
System.Console.Write("\r");
|
||||
System.Console.Write(new String(' ', System.Console.BufferWidth - 1));
|
||||
System.Console.Write("\r");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user