mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +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)
|
private void LoadProfile(int index)
|
||||||
{
|
{
|
||||||
var p = Global.Settings.Profiles[index];
|
var p = Global.Settings.Profiles[index];
|
||||||
ProfileNameText.Text = p.ModeRemark;
|
ProfileNameText.Text = p.ProfileName;
|
||||||
|
ModeComboBox.ResetCompletionList();
|
||||||
|
|
||||||
if (p.IsDummy)
|
if (p.IsDummy)
|
||||||
throw new Exception("Profile not found.");
|
throw new Exception("Profile not found.");
|
||||||
@@ -160,9 +161,6 @@ namespace Netch.Forms
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset Mode ComboBox Items
|
|
||||||
ModeComboBox.Text = string.Empty;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
LoadProfile(index);
|
LoadProfile(index);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace Netch.Forms
|
|||||||
BindTextBox<ushort>(RedirectorTextBox,
|
BindTextBox<ushort>(RedirectorTextBox,
|
||||||
s => CheckPort("RedirectorTCP", s, Global.Settings.RedirectorTCPPort),
|
s => CheckPort("RedirectorTCP", s, Global.Settings.RedirectorTCPPort),
|
||||||
s => Global.Settings.RedirectorTCPPort = s,
|
s => Global.Settings.RedirectorTCPPort = s,
|
||||||
Global.Settings.HTTPLocalPort);
|
Global.Settings.RedirectorTCPPort);
|
||||||
BindCheckBox(AllowDevicesCheckBox,
|
BindCheckBox(AllowDevicesCheckBox,
|
||||||
c => Global.Settings.LocalAddress = AllowDevicesCheckBox.Checked ? "0.0.0.0" : "127.0.0.1",
|
c => Global.Settings.LocalAddress = AllowDevicesCheckBox.Checked ? "0.0.0.0" : "127.0.0.1",
|
||||||
Global.Settings.LocalAddress switch
|
Global.Settings.LocalAddress switch
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace System.Windows.Forms
|
|||||||
|
|
||||||
private bool IsOriginalItems => Items.Count == AutoFillTag.Length;
|
private bool IsOriginalItems => Items.Count == AutoFillTag.Length;
|
||||||
|
|
||||||
private void ResetCompletionList()
|
public void ResetCompletionList()
|
||||||
{
|
{
|
||||||
Keyword = null;
|
Keyword = null;
|
||||||
try
|
try
|
||||||
|
|||||||
Reference in New Issue
Block a user