This commit is contained in:
Razmoth
2023-01-06 22:33:59 +04:00
parent a3cf868dfb
commit 2b31232b30
178 changed files with 5213 additions and 23780 deletions

View File

@@ -3,19 +3,26 @@ namespace AssetStudio
{
public static class Progress
{
public static bool Silent = false;
public static IProgress<int> Default = new Progress<int>();
private static int preValue;
public static void Reset()
{
preValue = 0;
Default.Report(0);
if (!Silent)
{
preValue = 0;
Default.Report(0);
}
}
public static void Report(int current, int total)
{
var value = (int)(current * 100f / total);
Report(value);
if (!Silent)
{
var value = (int)(current * 100f / total);
Report(value);
}
}
private static void Report(int value)