diff --git a/v2rayN/v2rayN/Tool/Utils.cs b/v2rayN/v2rayN/Tool/Utils.cs index c2d26ea9..10932cf5 100644 --- a/v2rayN/v2rayN/Tool/Utils.cs +++ b/v2rayN/v2rayN/Tool/Utils.cs @@ -371,19 +371,19 @@ namespace v2rayN long TBs = GBs / factor; if (TBs > 0) { - result = TBs + (GBs % factor / (factor + 0.0)); + result = TBs + ((GBs % factor) / (factor + 0.0)); unit = "TB"; return; } - result = GBs + (MBs % factor / (factor + 0.0)); + result = GBs + ((MBs % factor) / (factor + 0.0)); unit = "GB"; return; } - result = MBs + (KBs % factor / (factor + 0.0)); + result = MBs + ((KBs % factor) / (factor + 0.0)); unit = "MB"; return; } - result = KBs + (amount % factor / (factor + 0.0)); + result = KBs + ((amount % factor) / (factor + 0.0)); unit = "KB"; return; } diff --git a/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs b/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs index a0278cbe..c18c8e3c 100644 --- a/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs +++ b/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs @@ -1424,7 +1424,7 @@ namespace v2rayN.ViewModels { MyAppExit(false); } - }; + } (new UpdateHandle()).CheckUpdateGuiN(_config, _updateUI, _config.guiItem.checkPreReleaseUpdate); } @@ -1453,7 +1453,7 @@ namespace v2rayN.ViewModels File.Delete(fileName); } } - }; + } (new UpdateHandle()).CheckUpdateCore(type, _config, _updateUI, _config.guiItem.checkPreReleaseUpdate); } @@ -1660,7 +1660,7 @@ namespace v2rayN.ViewModels //Application.Current.MainWindow.ShowInTaskbar = false; //IntPtr windowHandle = new WindowInteropHelper(Application.Current.MainWindow).Handle; //Utils.RegWriteValue(Global.MyRegPath, Utils.WindowHwndKey, Convert.ToString((long)windowHandle)); - }; + } Global.ShowInTaskbar = bl; }