OneDrive Backup

OneDrive Backup
This commit is contained in:
2023-07-28 22:36:06 +07:00
parent e1c6e91a0a
commit d70d81ebdf
244 changed files with 75229 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
namespace onedrive_backup.Shared
{
public static class ViewHelpers
{
public static string GetSpeedDisplayText(int? speedKbSec)
{
if (speedKbSec == null)
{
return "0 KB/s";
}
if (speedKbSec < 1024)
{
return $"{speedKbSec} KB/s";
}
else if (speedKbSec < 1024 * 1024)
{
return $"{speedKbSec / 1024} MB/s";
}
else
{
return $"{speedKbSec / (1024 * 1024)} GB/s";
}
}
}
}