mirror of
https://github.com/netchx/netch.git
synced 2026-04-01 19:15:09 +08:00
Remove unused code
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -369,8 +369,9 @@ namespace Netch
|
||||
ptr = new IntPtr(ptr.ToInt32() + Marshal.SizeOf(typeof(MIB_IFROW)));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
catch (Exception)
|
||||
{
|
||||
// 跳过
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user