diff --git a/shadowsocks-csharp/Data/cn.txt b/shadowsocks-csharp/Data/cn.txt index 23893ceb..4a736e8a 100644 --- a/shadowsocks-csharp/Data/cn.txt +++ b/shadowsocks-csharp/Data/cn.txt @@ -91,8 +91,7 @@ Please input PAC Url=请输入 PAC 网址 # HotkeySettings Form Switch system proxy=切换系统代理状态 -Switch to PAC mode=切换到PAC模式 -Switch to Global mode=切换到全局模式 +Switch system proxy mode=切换系统代理模式 Switch share over LAN=切换局域网共享 Show Logs=显示日志 Switch to prev server=切换上个服务器 diff --git a/shadowsocks-csharp/Data/zh_tw.txt b/shadowsocks-csharp/Data/zh_tw.txt index 96d0f89c..97b58ccb 100644 --- a/shadowsocks-csharp/Data/zh_tw.txt +++ b/shadowsocks-csharp/Data/zh_tw.txt @@ -90,13 +90,12 @@ Please input PAC Url=請輸入 PAC 網址 # HotkeySettings Form -Switch system proxy=切换系統代理狀態 -Switch to PAC mode=切换為PAC模式 -Switch to Global mode=切换為全局模式 -Switch share over LAN=切换區域網路共享 +Switch system proxy=切換系統代理狀態 +Switch system proxy mode=切換系統代理模式 +Switch share over LAN=切換區域網路共享 Show Logs=顯示日誌 -Switch to prev server=切换上個伺服器 -Switch to next server=切换下個伺服器 +Switch to prev server=切換上個伺服器 +Switch to next server=切換下個伺服器 Reg All=註冊全部捷徑鍵 # Messages diff --git a/shadowsocks-csharp/Model/HotKeyConfig.cs b/shadowsocks-csharp/Model/HotKeyConfig.cs index 2e1d122c..8aaf3051 100644 --- a/shadowsocks-csharp/Model/HotKeyConfig.cs +++ b/shadowsocks-csharp/Model/HotKeyConfig.cs @@ -12,8 +12,7 @@ namespace Shadowsocks.Model public class HotkeyConfig { public string SwitchSystemProxy; - public string ChangeToPac; - public string ChangeToGlobal; + public string SwitchSystemProxyMode; public string SwitchAllowLan; public string ShowLogs; public string ServerMoveUp; @@ -22,8 +21,7 @@ namespace Shadowsocks.Model public HotkeyConfig() { SwitchSystemProxy = ""; - ChangeToPac = ""; - ChangeToGlobal = ""; + SwitchSystemProxyMode = ""; SwitchAllowLan = ""; ShowLogs = ""; ServerMoveUp = ""; diff --git a/shadowsocks-csharp/View/HotkeySettingsForm.cs b/shadowsocks-csharp/View/HotkeySettingsForm.cs index bdd2beb3..69225dc6 100644 --- a/shadowsocks-csharp/View/HotkeySettingsForm.cs +++ b/shadowsocks-csharp/View/HotkeySettingsForm.cs @@ -24,8 +24,8 @@ namespace Shadowsocks.View private IEnumerable _allTextBoxes; - private static Label _lb = null; - private static HotKeys.HotKeyCallBackHandler _callBack = null; + private Label _lb = null; + private HotKeys.HotKeyCallBackHandler _callBack = null; public HotkeySettingsForm(ShadowsocksController controller) { @@ -57,8 +57,7 @@ namespace Shadowsocks.View private void LoadConfiguration(HotkeyConfig config) { SwitchSystemProxyTextBox.Text = config.SwitchSystemProxy; - ChangeToPacTextBox.Text = config.ChangeToPac; - ChangeToGlobalTextBox.Text = config.ChangeToGlobal; + SwitchProxyModeTextBox.Text = config.SwitchSystemProxyMode; SwitchAllowLanTextBox.Text = config.SwitchAllowLan; ShowLogsTextBox.Text = config.ShowLogs; ServerMoveUpTextBox.Text = config.ServerMoveUp; @@ -69,8 +68,7 @@ namespace Shadowsocks.View { // I18N stuff SwitchSystemProxyLabel.Text = I18N.GetString("Switch system proxy"); - ChangeToPacLabel.Text = I18N.GetString("Switch to PAC mode"); - ChangeToGlobalLabel.Text = I18N.GetString("Switch to Global mode"); + SwitchProxyModeLabel.Text = I18N.GetString("Switch system proxy mode"); SwitchAllowLanLabel.Text = I18N.GetString("Switch share over LAN"); ShowLogsLabel.Text = I18N.GetString("Show Logs"); ServerMoveUpLabel.Text = I18N.GetString("Switch to prev server"); @@ -237,8 +235,7 @@ namespace Shadowsocks.View private void SaveConfig() { _modifiedConfig.SwitchSystemProxy = SwitchSystemProxyTextBox.Text; - _modifiedConfig.ChangeToPac = ChangeToPacTextBox.Text; - _modifiedConfig.ChangeToGlobal = ChangeToGlobalTextBox.Text; + _modifiedConfig.SwitchSystemProxyMode = SwitchProxyModeTextBox.Text; _modifiedConfig.SwitchAllowLan = SwitchAllowLanTextBox.Text; _modifiedConfig.ShowLogs = ShowLogsTextBox.Text; _modifiedConfig.ServerMoveUp = ServerMoveUpTextBox.Text; @@ -254,18 +251,12 @@ namespace Shadowsocks.View _controller.ToggleEnable(!enabled); } - private void ChangeToPacCallback() + private void SwitchProxyModeCallback() { - bool enabled = _controller.GetConfigurationCopy().enabled; - if (enabled == false) return; - _controller.ToggleGlobal(false); - } - - private void ChangeToGlobalCallback() - { - bool enabled = _controller.GetConfigurationCopy().enabled; - if (enabled == false) return; - _controller.ToggleGlobal(true); + var config = _controller.GetConfigurationCopy(); + if (config.enabled == false) return; + var currStatus = config.global; + _controller.ToggleGlobal(!currStatus); } private void SwitchAllowLanCallback() diff --git a/shadowsocks-csharp/View/HotkeySettingsForm.designer.cs b/shadowsocks-csharp/View/HotkeySettingsForm.designer.cs index b2b854f7..da745ad4 100644 --- a/shadowsocks-csharp/View/HotkeySettingsForm.designer.cs +++ b/shadowsocks-csharp/View/HotkeySettingsForm.designer.cs @@ -34,15 +34,13 @@ this.btnRegisterAll = new System.Windows.Forms.Button(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.SwitchSystemProxyLabel = new System.Windows.Forms.Label(); - this.ChangeToPacLabel = new System.Windows.Forms.Label(); - this.ChangeToGlobalLabel = new System.Windows.Forms.Label(); + this.SwitchProxyModeLabel = new System.Windows.Forms.Label(); this.SwitchAllowLanLabel = new System.Windows.Forms.Label(); this.ShowLogsLabel = new System.Windows.Forms.Label(); this.ServerMoveUpLabel = new System.Windows.Forms.Label(); this.ServerMoveDownLabel = new System.Windows.Forms.Label(); this.SwitchSystemProxyTextBox = new System.Windows.Forms.TextBox(); - this.ChangeToPacTextBox = new System.Windows.Forms.TextBox(); - this.ChangeToGlobalTextBox = new System.Windows.Forms.TextBox(); + this.SwitchProxyModeTextBox = new System.Windows.Forms.TextBox(); this.SwitchAllowLanTextBox = new System.Windows.Forms.TextBox(); this.ShowLogsTextBox = new System.Windows.Forms.TextBox(); this.ServerMoveUpTextBox = new System.Windows.Forms.TextBox(); @@ -59,18 +57,18 @@ flowLayoutPanel1.Controls.Add(this.btnCancel); flowLayoutPanel1.Controls.Add(this.btnRegisterAll); flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.BottomUp; - flowLayoutPanel1.Location = new System.Drawing.Point(0, 227); + flowLayoutPanel1.Location = new System.Drawing.Point(0, 205); flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); flowLayoutPanel1.Name = "flowLayoutPanel1"; flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 0, 16, 0); flowLayoutPanel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - flowLayoutPanel1.Size = new System.Drawing.Size(475, 44); + flowLayoutPanel1.Size = new System.Drawing.Size(475, 43); flowLayoutPanel1.TabIndex = 6; // // btnOK // this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; - this.btnOK.Location = new System.Drawing.Point(333, 10); + this.btnOK.Location = new System.Drawing.Point(333, 9); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(123, 31); this.btnOK.TabIndex = 0; @@ -81,7 +79,7 @@ // btnCancel // this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(204, 10); + this.btnCancel.Location = new System.Drawing.Point(204, 9); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(123, 31); this.btnCancel.TabIndex = 1; @@ -92,7 +90,7 @@ // btnRegisterAll // this.btnRegisterAll.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnRegisterAll.Location = new System.Drawing.Point(75, 10); + this.btnRegisterAll.Location = new System.Drawing.Point(75, 9); this.btnRegisterAll.Name = "btnRegisterAll"; this.btnRegisterAll.Size = new System.Drawing.Size(123, 31); this.btnRegisterAll.TabIndex = 2; @@ -106,79 +104,65 @@ this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.Controls.Add(this.SwitchSystemProxyLabel, 0, 0); - this.tableLayoutPanel1.Controls.Add(this.ChangeToPacLabel, 0, 1); - this.tableLayoutPanel1.Controls.Add(this.ChangeToGlobalLabel, 0, 2); - this.tableLayoutPanel1.Controls.Add(this.SwitchAllowLanLabel, 0, 3); - this.tableLayoutPanel1.Controls.Add(this.ShowLogsLabel, 0, 4); - this.tableLayoutPanel1.Controls.Add(this.ServerMoveUpLabel, 0, 5); - this.tableLayoutPanel1.Controls.Add(this.ServerMoveDownLabel, 0, 6); - this.tableLayoutPanel1.Controls.Add(flowLayoutPanel1, 0, 7); + this.tableLayoutPanel1.Controls.Add(this.SwitchProxyModeLabel, 0, 1); + this.tableLayoutPanel1.Controls.Add(this.SwitchAllowLanLabel, 0, 2); + this.tableLayoutPanel1.Controls.Add(this.ShowLogsLabel, 0, 3); + this.tableLayoutPanel1.Controls.Add(this.ServerMoveUpLabel, 0, 4); + this.tableLayoutPanel1.Controls.Add(this.ServerMoveDownLabel, 0, 5); + this.tableLayoutPanel1.Controls.Add(flowLayoutPanel1, 0, 6); this.tableLayoutPanel1.Controls.Add(this.SwitchSystemProxyTextBox, 1, 0); - this.tableLayoutPanel1.Controls.Add(this.ChangeToPacTextBox, 1, 1); - this.tableLayoutPanel1.Controls.Add(this.ChangeToGlobalTextBox, 1, 2); - this.tableLayoutPanel1.Controls.Add(this.SwitchAllowLanTextBox, 1, 3); - this.tableLayoutPanel1.Controls.Add(this.ShowLogsTextBox, 1, 4); - this.tableLayoutPanel1.Controls.Add(this.ServerMoveUpTextBox, 1, 5); - this.tableLayoutPanel1.Controls.Add(this.ServerMoveDownTextBox, 1, 6); + this.tableLayoutPanel1.Controls.Add(this.SwitchProxyModeTextBox, 1, 1); + this.tableLayoutPanel1.Controls.Add(this.SwitchAllowLanTextBox, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.ShowLogsTextBox, 1, 3); + this.tableLayoutPanel1.Controls.Add(this.ServerMoveUpTextBox, 1, 4); + this.tableLayoutPanel1.Controls.Add(this.ServerMoveDownTextBox, 1, 5); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.RowCount = 8; - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16667F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16667F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16667F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16667F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16667F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.77778F)); - this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.38889F)); + this.tableLayoutPanel1.RowCount = 7; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.50485F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.50485F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.50485F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.50485F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 17.21683F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 16.76375F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(475, 271); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(491, 248); this.tableLayoutPanel1.TabIndex = 0; // // SwitchSystemProxyLabel // this.SwitchSystemProxyLabel.AutoSize = true; this.SwitchSystemProxyLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.SwitchSystemProxyLabel.Location = new System.Drawing.Point(25, 0); + this.SwitchSystemProxyLabel.Location = new System.Drawing.Point(50, 0); this.SwitchSystemProxyLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.SwitchSystemProxyLabel.Name = "SwitchSystemProxyLabel"; - this.SwitchSystemProxyLabel.Size = new System.Drawing.Size(147, 32); + this.SwitchSystemProxyLabel.Size = new System.Drawing.Size(147, 34); this.SwitchSystemProxyLabel.TabIndex = 0; this.SwitchSystemProxyLabel.Text = "Enable System Proxy"; this.SwitchSystemProxyLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // ChangeToPacLabel - // - this.ChangeToPacLabel.AutoSize = true; - this.ChangeToPacLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.ChangeToPacLabel.Location = new System.Drawing.Point(135, 32); - this.ChangeToPacLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); - this.ChangeToPacLabel.Name = "ChangeToPacLabel"; - this.ChangeToPacLabel.Size = new System.Drawing.Size(37, 32); - this.ChangeToPacLabel.TabIndex = 1; - this.ChangeToPacLabel.Text = "PAC"; - this.ChangeToPacLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // ChangeToGlobalLabel - // - this.ChangeToGlobalLabel.AutoSize = true; - this.ChangeToGlobalLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.ChangeToGlobalLabel.Location = new System.Drawing.Point(119, 64); - this.ChangeToGlobalLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); - this.ChangeToGlobalLabel.Name = "ChangeToGlobalLabel"; - this.ChangeToGlobalLabel.Size = new System.Drawing.Size(53, 32); - this.ChangeToGlobalLabel.TabIndex = 2; - this.ChangeToGlobalLabel.Text = "Global"; - this.ChangeToGlobalLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // SwitchProxyModeLabel + // + this.SwitchProxyModeLabel.AutoSize = true; + this.SwitchProxyModeLabel.Dock = System.Windows.Forms.DockStyle.Right; + this.SwitchProxyModeLabel.Location = new System.Drawing.Point(8, 34); + this.SwitchProxyModeLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); + this.SwitchProxyModeLabel.Name = "SwitchProxyModeLabel"; + this.SwitchProxyModeLabel.Size = new System.Drawing.Size(189, 34); + this.SwitchProxyModeLabel.TabIndex = 1; + this.SwitchProxyModeLabel.Text = "Switch System Proxy Mode"; + this.SwitchProxyModeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // SwitchAllowLanLabel // this.SwitchAllowLanLabel.AutoSize = true; this.SwitchAllowLanLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.SwitchAllowLanLabel.Location = new System.Drawing.Point(8, 96); + this.SwitchAllowLanLabel.Location = new System.Drawing.Point(33, 68); this.SwitchAllowLanLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.SwitchAllowLanLabel.Name = "SwitchAllowLanLabel"; - this.SwitchAllowLanLabel.Size = new System.Drawing.Size(164, 32); + this.SwitchAllowLanLabel.Size = new System.Drawing.Size(164, 34); this.SwitchAllowLanLabel.TabIndex = 3; this.SwitchAllowLanLabel.Text = "Allow Clients from LAN"; this.SwitchAllowLanLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -187,10 +171,10 @@ // this.ShowLogsLabel.AutoSize = true; this.ShowLogsLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.ShowLogsLabel.Location = new System.Drawing.Point(82, 128); + this.ShowLogsLabel.Location = new System.Drawing.Point(107, 102); this.ShowLogsLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.ShowLogsLabel.Name = "ShowLogsLabel"; - this.ShowLogsLabel.Size = new System.Drawing.Size(90, 32); + this.ShowLogsLabel.Size = new System.Drawing.Size(90, 34); this.ShowLogsLabel.TabIndex = 4; this.ShowLogsLabel.Text = "Show Logs..."; this.ShowLogsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -199,10 +183,10 @@ // this.ServerMoveUpLabel.AutoSize = true; this.ServerMoveUpLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.ServerMoveUpLabel.Location = new System.Drawing.Point(103, 160); + this.ServerMoveUpLabel.Location = new System.Drawing.Point(128, 136); this.ServerMoveUpLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.ServerMoveUpLabel.Name = "ServerMoveUpLabel"; - this.ServerMoveUpLabel.Size = new System.Drawing.Size(69, 34); + this.ServerMoveUpLabel.Size = new System.Drawing.Size(69, 35); this.ServerMoveUpLabel.TabIndex = 4; this.ServerMoveUpLabel.Text = "Move up"; this.ServerMoveUpLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -211,10 +195,10 @@ // this.ServerMoveDownLabel.AutoSize = true; this.ServerMoveDownLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.ServerMoveDownLabel.Location = new System.Drawing.Point(81, 194); + this.ServerMoveDownLabel.Location = new System.Drawing.Point(106, 171); this.ServerMoveDownLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.ServerMoveDownLabel.Name = "ServerMoveDownLabel"; - this.ServerMoveDownLabel.Size = new System.Drawing.Size(91, 33); + this.ServerMoveDownLabel.Size = new System.Drawing.Size(91, 34); this.ServerMoveDownLabel.TabIndex = 4; this.ServerMoveDownLabel.Text = "Move Down"; this.ServerMoveDownLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -222,7 +206,7 @@ // SwitchSystemProxyTextBox // this.SwitchSystemProxyTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.SwitchSystemProxyTextBox.Location = new System.Drawing.Point(183, 3); + this.SwitchSystemProxyTextBox.Location = new System.Drawing.Point(208, 3); this.SwitchSystemProxyTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.SwitchSystemProxyTextBox.Name = "SwitchSystemProxyTextBox"; this.SwitchSystemProxyTextBox.ReadOnly = true; @@ -232,36 +216,23 @@ this.SwitchSystemProxyTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.HotkeyDown); this.SwitchSystemProxyTextBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.HotkeyUp); // - // ChangeToPacTextBox - // - this.ChangeToPacTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ChangeToPacTextBox.Location = new System.Drawing.Point(183, 35); - this.ChangeToPacTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); - this.ChangeToPacTextBox.Name = "ChangeToPacTextBox"; - this.ChangeToPacTextBox.ReadOnly = true; - this.ChangeToPacTextBox.Size = new System.Drawing.Size(276, 25); - this.ChangeToPacTextBox.TabIndex = 8; - this.ChangeToPacTextBox.TextChanged += new System.EventHandler(this.TextBox_TextChanged); - this.ChangeToPacTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.HotkeyDown); - this.ChangeToPacTextBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.HotkeyUp); - // - // ChangeToGlobalTextBox - // - this.ChangeToGlobalTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ChangeToGlobalTextBox.Location = new System.Drawing.Point(183, 67); - this.ChangeToGlobalTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); - this.ChangeToGlobalTextBox.Name = "ChangeToGlobalTextBox"; - this.ChangeToGlobalTextBox.ReadOnly = true; - this.ChangeToGlobalTextBox.Size = new System.Drawing.Size(276, 25); - this.ChangeToGlobalTextBox.TabIndex = 9; - this.ChangeToGlobalTextBox.TextChanged += new System.EventHandler(this.TextBox_TextChanged); - this.ChangeToGlobalTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.HotkeyDown); - this.ChangeToGlobalTextBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.HotkeyUp); + // SwitchProxyModeTextBox + // + this.SwitchProxyModeTextBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.SwitchProxyModeTextBox.Location = new System.Drawing.Point(208, 37); + this.SwitchProxyModeTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); + this.SwitchProxyModeTextBox.Name = "SwitchProxyModeTextBox"; + this.SwitchProxyModeTextBox.ReadOnly = true; + this.SwitchProxyModeTextBox.Size = new System.Drawing.Size(276, 25); + this.SwitchProxyModeTextBox.TabIndex = 8; + this.SwitchProxyModeTextBox.TextChanged += new System.EventHandler(this.TextBox_TextChanged); + this.SwitchProxyModeTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.HotkeyDown); + this.SwitchProxyModeTextBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.HotkeyUp); // // SwitchAllowLanTextBox // this.SwitchAllowLanTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.SwitchAllowLanTextBox.Location = new System.Drawing.Point(183, 99); + this.SwitchAllowLanTextBox.Location = new System.Drawing.Point(208, 71); this.SwitchAllowLanTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.SwitchAllowLanTextBox.Name = "SwitchAllowLanTextBox"; this.SwitchAllowLanTextBox.ReadOnly = true; @@ -274,7 +245,7 @@ // ShowLogsTextBox // this.ShowLogsTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ShowLogsTextBox.Location = new System.Drawing.Point(183, 131); + this.ShowLogsTextBox.Location = new System.Drawing.Point(208, 105); this.ShowLogsTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.ShowLogsTextBox.Name = "ShowLogsTextBox"; this.ShowLogsTextBox.ReadOnly = true; @@ -287,7 +258,7 @@ // ServerMoveUpTextBox // this.ServerMoveUpTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ServerMoveUpTextBox.Location = new System.Drawing.Point(183, 163); + this.ServerMoveUpTextBox.Location = new System.Drawing.Point(208, 139); this.ServerMoveUpTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.ServerMoveUpTextBox.Name = "ServerMoveUpTextBox"; this.ServerMoveUpTextBox.ReadOnly = true; @@ -300,7 +271,7 @@ // ServerMoveDownTextBox // this.ServerMoveDownTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ServerMoveDownTextBox.Location = new System.Drawing.Point(183, 197); + this.ServerMoveDownTextBox.Location = new System.Drawing.Point(208, 174); this.ServerMoveDownTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.ServerMoveDownTextBox.Name = "ServerMoveDownTextBox"; this.ServerMoveDownTextBox.ReadOnly = true; @@ -314,7 +285,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; - this.ClientSize = new System.Drawing.Size(475, 271); + this.ClientSize = new System.Drawing.Size(491, 248); this.Controls.Add(this.tableLayoutPanel1); this.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); @@ -333,8 +304,7 @@ #endregion private System.Windows.Forms.Label SwitchSystemProxyLabel; - private System.Windows.Forms.Label ChangeToPacLabel; - private System.Windows.Forms.Label ChangeToGlobalLabel; + private System.Windows.Forms.Label SwitchProxyModeLabel; private System.Windows.Forms.Label SwitchAllowLanLabel; private System.Windows.Forms.Label ShowLogsLabel; private System.Windows.Forms.Label ServerMoveUpLabel; @@ -343,8 +313,7 @@ private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.TextBox ShowLogsTextBox; private System.Windows.Forms.TextBox SwitchAllowLanTextBox; - private System.Windows.Forms.TextBox ChangeToGlobalTextBox; - private System.Windows.Forms.TextBox ChangeToPacTextBox; + private System.Windows.Forms.TextBox SwitchProxyModeTextBox; private System.Windows.Forms.TextBox SwitchSystemProxyTextBox; private System.Windows.Forms.TextBox ServerMoveUpTextBox; private System.Windows.Forms.TextBox ServerMoveDownTextBox; diff --git a/shadowsocks-csharp/View/HotkeySettingsForm.resx b/shadowsocks-csharp/View/HotkeySettingsForm.resx index f5b19983..a0949f08 100644 --- a/shadowsocks-csharp/View/HotkeySettingsForm.resx +++ b/shadowsocks-csharp/View/HotkeySettingsForm.resx @@ -129,10 +129,7 @@ True - - True - - + True @@ -150,10 +147,7 @@ True - - True - - + True