提交功能

This commit is contained in:
Bob.Song
2026-02-08 16:58:32 +08:00
commit 9dd1e6c278
67 changed files with 4588 additions and 0 deletions

27
Utils.cs Normal file
View File

@@ -0,0 +1,27 @@
namespace ACBuildService;
public class Utils
{
public static string GetFileSizeTitle(long length)
{
if (length < 1024)
{
return length + "B";
}
length /= 1024;
if (length < 1024)
{
return (length * 100 / 100) + "KB";
}
length /= 1024;
if (length < 1024)
{
return (length * 100 / 100.0f) + "MB";
}
return ((length / 1024 * 100) / 100.0f) + "GB";
}
}