Remove unused code

This commit is contained in:
Connection Refused
2020-01-22 16:37:26 +08:00
parent b2297c55d6
commit 75dd0f60fe
2 changed files with 10 additions and 17 deletions

View File

@@ -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;

View File

@@ -369,8 +369,9 @@ namespace Netch
ptr = new IntPtr(ptr.ToInt32() + Marshal.SizeOf(typeof(MIB_IFROW)));
}
}
catch (Exception ex)
catch (Exception)
{
// 跳过
}
finally
{