mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[SimpleSort, Logger] Even more versitile output
This commit is contained in:
@@ -242,7 +242,10 @@ namespace SabreTools.Helper
|
||||
{
|
||||
for (int i = line; i < Console.WindowHeight; i++)
|
||||
{
|
||||
Log(" ", i, 0);
|
||||
// http://stackoverflow.com/questions/8946808/can-console-clear-be-used-to-only-clear-a-line-instead-of-whole-console
|
||||
Console.SetCursorPosition(0, Console.CursorTop);
|
||||
Console.Write(new string(' ', Console.WindowWidth));
|
||||
Console.SetCursorPosition(0, i);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -360,7 +360,7 @@ namespace SabreTools
|
||||
bool success = true;
|
||||
|
||||
// Get the full path of the input for movement purposes
|
||||
string percentage = Math.Round((100 * ((double)index / total)), 2, MidpointRounding.AwayFromZero).ToString();
|
||||
string percentage = (index == 0 ? "0.00" : Math.Round((100 * ((double)index / total)), 2, MidpointRounding.AwayFromZero).ToString());
|
||||
string statement = percentage + "% - " + input;
|
||||
_logger.ClearBeneath(_cursorTop + 1);
|
||||
_logger.Log(statement, _cursorTop, 0);
|
||||
|
||||
Reference in New Issue
Block a user