diff --git a/Netch/Forms/MainForm.cs b/Netch/Forms/MainForm.cs index 55df2f9f..ebf87628 100644 --- a/Netch/Forms/MainForm.cs +++ b/Netch/Forms/MainForm.cs @@ -768,12 +768,8 @@ namespace Netch.Forms MainController = new MainController(); if (MainController.Start(server, mode)) { - //if (mode.Type == 0) - if (false) - { - UsedBandwidthLabel.Visible = UploadSpeedLabel.Visible = DownloadSpeedLabel.Visible = true; - MainController.pNFController.OnBandwidthUpdated += OnBandwidthUpdated; - } + // UsedBandwidthLabel.Visible = UploadSpeedLabel.Visible = DownloadSpeedLabel.Visible = true; + // MainController.pNFController.OnBandwidthUpdated += OnBandwidthUpdated; ControlButton.Enabled = true; ControlButton.Text = Utils.i18N.Translate("Stop"); @@ -848,16 +844,12 @@ namespace Netch.Forms MainController.Stop(); - //if (mode.Type == 0) - if (false) - { - LastUploadBandwidth = 0; - LastDownloadBandwidth = 0; - UploadSpeedLabel.Text = "↑: 0 KB/s"; - DownloadSpeedLabel.Text = "↓: 0 KB/s"; - UsedBandwidthLabel.Text = $"{Utils.i18N.Translate("Used")}{Utils.i18N.Translate(": ")}0 KB"; - UsedBandwidthLabel.Visible = UploadSpeedLabel.Visible = DownloadSpeedLabel.Visible = false; - } + // LastUploadBandwidth = 0; + // LastDownloadBandwidth = 0; + // UploadSpeedLabel.Text = "↑: 0 KB/s"; + // DownloadSpeedLabel.Text = "↓: 0 KB/s"; + // UsedBandwidthLabel.Text = $"{Utils.i18N.Translate("Used")}{Utils.i18N.Translate(": ")}0 KB"; + // UsedBandwidthLabel.Visible = UploadSpeedLabel.Visible = DownloadSpeedLabel.Visible = false; ControlButton.Enabled = true; ProfileGroupBox.Enabled = true; diff --git a/Netch/Win32Native.cs b/Netch/Win32Native.cs index bf2688d7..4338fc1b 100644 --- a/Netch/Win32Native.cs +++ b/Netch/Win32Native.cs @@ -369,8 +369,9 @@ namespace Netch ptr = new IntPtr(ptr.ToInt32() + Marshal.SizeOf(typeof(MIB_IFROW))); } } - catch (Exception ex) + catch (Exception) { + // 跳过 } finally {