Updated documentation
This commit is contained in:
@@ -8,33 +8,6 @@ namespace PluginManager.Others
|
||||
{
|
||||
public class Console_Utilities
|
||||
{
|
||||
const char _block = '■';
|
||||
const string _back = "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
|
||||
const string _twirl = "-\\|/";
|
||||
public static void WriteProgressBar(int percent, bool update = false)
|
||||
{
|
||||
if (update)
|
||||
Console.Write(_back);
|
||||
Console.Write("[");
|
||||
var p = (int)((percent / 10f) + .5f);
|
||||
for (var i = 0; i < 10; ++i)
|
||||
{
|
||||
if (i >= p)
|
||||
Console.Write(' ');
|
||||
else
|
||||
Console.Write(_block);
|
||||
}
|
||||
Console.Write("] {0,3:##0}%", percent);
|
||||
|
||||
if (percent == 100)
|
||||
Console.WriteLine();
|
||||
}
|
||||
public static void WriteProgress(int progress, bool update = false)
|
||||
{
|
||||
if (update)
|
||||
Console.Write("\b");
|
||||
Console.Write(_twirl[progress % _twirl.Length]);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A way to create a table based on input data
|
||||
|
||||
Reference in New Issue
Block a user