mirror of
https://github.com/netchx/netch.git
synced 2026-04-03 19:35:10 +08:00
fix: SettingForm load RedriectorTCP value wrong
fix: Start Profile ModeComboBox.Text and ProfileNameText.Text wrong
This commit is contained in:
@@ -79,7 +79,8 @@ namespace Netch.Forms
|
||||
private void LoadProfile(int index)
|
||||
{
|
||||
var p = Global.Settings.Profiles[index];
|
||||
ProfileNameText.Text = p.ModeRemark;
|
||||
ProfileNameText.Text = p.ProfileName;
|
||||
ModeComboBox.ResetCompletionList();
|
||||
|
||||
if (p.IsDummy)
|
||||
throw new Exception("Profile not found.");
|
||||
@@ -160,9 +161,6 @@ namespace Netch.Forms
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset Mode ComboBox Items
|
||||
ModeComboBox.Text = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
LoadProfile(index);
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Netch.Forms
|
||||
BindTextBox<ushort>(RedirectorTextBox,
|
||||
s => CheckPort("RedirectorTCP", s, Global.Settings.RedirectorTCPPort),
|
||||
s => Global.Settings.RedirectorTCPPort = s,
|
||||
Global.Settings.HTTPLocalPort);
|
||||
Global.Settings.RedirectorTCPPort);
|
||||
BindCheckBox(AllowDevicesCheckBox,
|
||||
c => Global.Settings.LocalAddress = AllowDevicesCheckBox.Checked ? "0.0.0.0" : "127.0.0.1",
|
||||
Global.Settings.LocalAddress switch
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace System.Windows.Forms
|
||||
|
||||
private bool IsOriginalItems => Items.Count == AutoFillTag.Length;
|
||||
|
||||
private void ResetCompletionList()
|
||||
public void ResetCompletionList()
|
||||
{
|
||||
Keyword = null;
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user