small fix
This commit is contained in:
parent
4e4db7daa8
commit
b634166051
|
@ -30,7 +30,7 @@ namespace ProgressBarLib
|
||||||
|
|
||||||
_msgList.Clear();
|
_msgList.Clear();
|
||||||
}
|
}
|
||||||
|
ClearCurrentConsoleLine();
|
||||||
Console.Write("\r" + _mainMsg);
|
Console.Write("\r" + _mainMsg);
|
||||||
Thread.Sleep(500);
|
Thread.Sleep(500);
|
||||||
}
|
}
|
||||||
|
@ -111,5 +111,13 @@ namespace ProgressBarLib
|
||||||
|
|
||||||
return progStr;
|
return progStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void ClearCurrentConsoleLine()
|
||||||
|
{
|
||||||
|
var currentLineCursor = Console.CursorTop;
|
||||||
|
Console.SetCursorPosition(0, Console.CursorTop);
|
||||||
|
Console.Write(new string(' ', Console.WindowWidth));
|
||||||
|
Console.SetCursorPosition(0, currentLineCursor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue