From bfadb181c4c4cacd2a34dffe115b8765b2c1e8c4 Mon Sep 17 00:00:00 2001 From: ChsBuffer <33744752+chsbuffer@users.noreply.github.com> Date: Tue, 27 Oct 2020 12:14:10 +0800 Subject: [PATCH] fix: SettingForm TUNTAPDNS value init fix: show starting tun2socks after setup route table fix: a typo --- Netch/Controllers/TUNTAPController.cs | 2 ++ Netch/Forms/SettingForm.Designer.cs | 2 +- Netch/Forms/SettingForm.cs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Netch/Controllers/TUNTAPController.cs b/Netch/Controllers/TUNTAPController.cs index 54cc66ba..44aba0c7 100644 --- a/Netch/Controllers/TUNTAPController.cs +++ b/Netch/Controllers/TUNTAPController.cs @@ -68,6 +68,8 @@ namespace Netch.Controllers SetupRouteTable(); + Global.MainForm.StatusText(i18N.TranslateFormat("Starting {0}", Name)); + string dns; if (Global.Settings.TUNTAP.UseCustomDNS) { diff --git a/Netch/Forms/SettingForm.Designer.cs b/Netch/Forms/SettingForm.Designer.cs index da564bb9..835fda09 100644 --- a/Netch/Forms/SettingForm.Designer.cs +++ b/Netch/Forms/SettingForm.Designer.cs @@ -927,7 +927,7 @@ namespace Netch.Forms this.Name = "SettingForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Settings"; - this.Load += new System.EventHandler(this.SettingForm2_Load); + this.Load += new System.EventHandler(this.SettingForm_Load); this.TabControl.ResumeLayout(false); this.GeneralTabPage.ResumeLayout(false); this.GeneralTabPage.PerformLayout(); diff --git a/Netch/Forms/SettingForm.cs b/Netch/Forms/SettingForm.cs index de606314..4ac9d412 100644 --- a/Netch/Forms/SettingForm.cs +++ b/Netch/Forms/SettingForm.cs @@ -20,8 +20,9 @@ namespace Netch.Forms } - private void SettingForm2_Load(object sender, EventArgs e) + private void SettingForm_Load(object sender, EventArgs e) { + TUNTAPUseCustomDNSCheckBox_CheckedChanged(null, null); Task.Run(() => BeginInvoke(new Action(() => UseFakeDNSCheckBox.Visible = Global.Flags.SupportFakeDns))); }