mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +08:00
点击NAT label和状态灯即可重测NAT
This commit is contained in:
2
Netch/Forms/MainForm.Designer.cs
generated
2
Netch/Forms/MainForm.Designer.cs
generated
@@ -605,6 +605,7 @@ namespace Netch.Forms
|
||||
this.NatTypeStatusLabel.Size = new System.Drawing.Size(36, 17);
|
||||
this.NatTypeStatusLabel.Text = "NAT:";
|
||||
this.NatTypeStatusLabel.TextAlign = System.Drawing.ContentAlignment.BottomLeft;
|
||||
this.NatTypeStatusLabel.Click += new System.EventHandler(this.NatTypeStatusLabel_Click);
|
||||
//
|
||||
// NatTypeStatusLightLabel
|
||||
//
|
||||
@@ -616,6 +617,7 @@ namespace Netch.Forms
|
||||
this.NatTypeStatusLightLabel.Size = new System.Drawing.Size(18, 21);
|
||||
this.NatTypeStatusLightLabel.Text = "⬤";
|
||||
this.NatTypeStatusLightLabel.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
|
||||
this.NatTypeStatusLightLabel.Click += new System.EventHandler(this.NatTypeStatusLabel_Click);
|
||||
//
|
||||
// ControlButton
|
||||
//
|
||||
|
||||
@@ -441,5 +441,14 @@ namespace Netch.Forms
|
||||
if (!_comboBoxInitialized) return;
|
||||
Global.Settings.ServerComboBoxSelectedIndex = ServerComboBox.SelectedIndex;
|
||||
}
|
||||
|
||||
private void NatTypeStatusLabel_Click(object sender, EventArgs e)
|
||||
{
|
||||
//一个不太优雅的🔒
|
||||
if (_state == State.Started && NatTypeStatusLabel.ToString().Contains("["))
|
||||
{
|
||||
_mainController.RetryNatTest();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user