This commit is contained in:
Aigio Liu
2022-06-28 17:01:21 +08:00
parent d66245c689
commit 6fb255c428
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -178,7 +178,7 @@ namespace System.Application.UI
var nativeHeapFreeSize = memoryInfo.AvailMem;
var usedMemInBytes = nativeHeapSize - nativeHeapFreeSize;
var usedMemInPercentage = usedMemInBytes * 100M / nativeHeapSize;
b.Append($"{IOPath.GetDisplayFileSizeString((float)usedMemInBytes)} ({usedMemInPercentage:0.00}%)");
b.Append($"{IOPath.GetDisplayFileSizeString(usedMemInBytes)} ({usedMemInPercentage:0.00}%)");
#else
b.Append(IOPath.GetDisplayFileSizeString(Environment.WorkingSet));
#endif
@@ -156,7 +156,7 @@ namespace System.Application.UI.ViewModels
Task.Run(async () =>
{
var length = IOPath.GetDirectorySize(dirPath);
var lenString = IOPath.GetDisplayFileSizeString((float)length);
var lenString = IOPath.GetDisplayFileSizeString(length);
await MainThread2.InvokeOnMainThreadAsync(() =>
{
action(lenString);