From 8f6a3eaf5d9d178dd82f705193868d464aca4350 Mon Sep 17 00:00:00 2001 From: X Date: Mon, 1 May 2017 13:01:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=83=AD=E9=94=AE=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=B3=A8=E5=86=8C=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/StartupHotkeyReg.cs | 79 ++++++++++++++++ shadowsocks-csharp/Data/zh_CN.txt | 1 + shadowsocks-csharp/Model/HotKeyConfig.cs | 2 + shadowsocks-csharp/Program.cs | 1 + shadowsocks-csharp/View/HotkeySettingsForm.cs | 4 + .../View/HotkeySettingsForm.designer.cs | 90 +++++++++++++------ .../View/HotkeySettingsForm.resx | 54 ----------- shadowsocks-csharp/shadowsocks-csharp.csproj | 1 + 8 files changed, 150 insertions(+), 82 deletions(-) create mode 100644 shadowsocks-csharp/Controller/StartupHotkeyReg.cs diff --git a/shadowsocks-csharp/Controller/StartupHotkeyReg.cs b/shadowsocks-csharp/Controller/StartupHotkeyReg.cs new file mode 100644 index 00000000..38da4e03 --- /dev/null +++ b/shadowsocks-csharp/Controller/StartupHotkeyReg.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using GlobalHotKey; +using Shadowsocks.Controller.Hotkeys; +using Shadowsocks.Model; + +namespace Shadowsocks.Controller +{ + static class StartupHotkeyReg + { + public static Dictionary hotKeyDic; + public static void Init() + { + if (Configuration.Load().hotkey == null || !Configuration.Load().hotkey.RegAllAtStartup) + return; + try + { + InitDic(); + Reg(); + } + catch (Exception e) + { + Logging.Error(e); + } + } + private static void InitDic() + { + hotKeyDic = new Dictionary(); + var _hotKeyConf = Configuration.Load().hotkey; + + if (!_hotKeyConf.SwitchSystemProxy.IsNullOrEmpty()) + { + hotKeyDic.Add(HotKeys.Str2HotKey(_hotKeyConf.SwitchSystemProxy) + , HotkeyCallbacks.GetCallback("SwitchSystemProxyCallback") as HotKeys.HotKeyCallBackHandler); + } + + if (!_hotKeyConf.SwitchSystemProxyMode.IsNullOrEmpty()) + { + hotKeyDic.Add(HotKeys.Str2HotKey(_hotKeyConf.SwitchSystemProxyMode) + , HotkeyCallbacks.GetCallback("SwitchProxyModeCallback") as HotKeys.HotKeyCallBackHandler); + } + + if (!_hotKeyConf.SwitchAllowLan.IsNullOrEmpty()) + { + hotKeyDic.Add(HotKeys.Str2HotKey(_hotKeyConf.SwitchAllowLan) + , HotkeyCallbacks.GetCallback("SwitchAllowLanCallback") as HotKeys.HotKeyCallBackHandler); + } + + if (!_hotKeyConf.ShowLogs.IsNullOrEmpty()) + { + hotKeyDic.Add(HotKeys.Str2HotKey(_hotKeyConf.ShowLogs) + , HotkeyCallbacks.GetCallback("ShowLogsCallback") as HotKeys.HotKeyCallBackHandler); + } + + if (!_hotKeyConf.ServerMoveUp.IsNullOrEmpty()) + { + hotKeyDic.Add(HotKeys.Str2HotKey(_hotKeyConf.ServerMoveUp) + , HotkeyCallbacks.GetCallback("ServerMoveUpCallback") as HotKeys.HotKeyCallBackHandler); + } + + if (!_hotKeyConf.ServerMoveDown.IsNullOrEmpty()) + { + hotKeyDic.Add(HotKeys.Str2HotKey(_hotKeyConf.ServerMoveDown) + , HotkeyCallbacks.GetCallback("ServerMoveDownCallback") as HotKeys.HotKeyCallBackHandler); + } + } + + private static void Reg() + { + foreach (var v in hotKeyDic) + { + HotKeys.Regist(v.Key, v.Value); + } + } + } +} diff --git a/shadowsocks-csharp/Data/zh_CN.txt b/shadowsocks-csharp/Data/zh_CN.txt index 9ae2e66b..b12738b9 100644 --- a/shadowsocks-csharp/Data/zh_CN.txt +++ b/shadowsocks-csharp/Data/zh_CN.txt @@ -101,6 +101,7 @@ Show Logs=显示日志 Switch to prev server=切换上个服务器 Switch to next server=切换下个服务器 Reg All=注册全部热键 +Reg All At Startup=启动时注册热键 # Messages diff --git a/shadowsocks-csharp/Model/HotKeyConfig.cs b/shadowsocks-csharp/Model/HotKeyConfig.cs index 8aaf3051..c5510f17 100644 --- a/shadowsocks-csharp/Model/HotKeyConfig.cs +++ b/shadowsocks-csharp/Model/HotKeyConfig.cs @@ -17,6 +17,7 @@ namespace Shadowsocks.Model public string ShowLogs; public string ServerMoveUp; public string ServerMoveDown; + public bool RegAllAtStartup; public HotkeyConfig() { @@ -26,6 +27,7 @@ namespace Shadowsocks.Model ShowLogs = ""; ServerMoveUp = ""; ServerMoveDown = ""; + RegAllAtStartup = false; } } } \ No newline at end of file diff --git a/shadowsocks-csharp/Program.cs b/shadowsocks-csharp/Program.cs index eadbe348..0042d07f 100755 --- a/shadowsocks-csharp/Program.cs +++ b/shadowsocks-csharp/Program.cs @@ -83,6 +83,7 @@ namespace Shadowsocks MenuController = new MenuViewController(MainController); HotKeys.Init(MainController); MainController.Start(); + StartupHotkeyReg.Init(); Application.Run(); } } diff --git a/shadowsocks-csharp/View/HotkeySettingsForm.cs b/shadowsocks-csharp/View/HotkeySettingsForm.cs index 85c90b49..4fc2f6c5 100644 --- a/shadowsocks-csharp/View/HotkeySettingsForm.cs +++ b/shadowsocks-csharp/View/HotkeySettingsForm.cs @@ -58,6 +58,7 @@ namespace Shadowsocks.View ShowLogsTextBox.Text = config.ShowLogs; ServerMoveUpTextBox.Text = config.ServerMoveUp; ServerMoveDownTextBox.Text = config.ServerMoveDown; + RegAllAtStartupCheckbox.Checked = config.RegAllAtStartup; } private void UpdateTexts() @@ -69,10 +70,12 @@ namespace Shadowsocks.View ShowLogsLabel.Text = I18N.GetString("Show Logs"); ServerMoveUpLabel.Text = I18N.GetString("Switch to prev server"); ServerMoveDownLabel.Text = I18N.GetString("Switch to next server"); + RegAllAtStartupLabel.Text = I18N.GetString("Reg All At Startup"); btnOK.Text = I18N.GetString("OK"); btnCancel.Text = I18N.GetString("Cancel"); btnRegisterAll.Text = I18N.GetString("Reg All"); Text = I18N.GetString("Edit Hotkeys..."); + } /// @@ -241,6 +244,7 @@ namespace Shadowsocks.View _modifiedConfig.ShowLogs = ShowLogsTextBox.Text; _modifiedConfig.ServerMoveUp = ServerMoveUpTextBox.Text; _modifiedConfig.ServerMoveDown = ServerMoveDownTextBox.Text; + _modifiedConfig.RegAllAtStartup = RegAllAtStartupCheckbox.Checked; _controller.SaveHotkeyConfig(_modifiedConfig); } diff --git a/shadowsocks-csharp/View/HotkeySettingsForm.designer.cs b/shadowsocks-csharp/View/HotkeySettingsForm.designer.cs index da745ad4..4dea0853 100644 --- a/shadowsocks-csharp/View/HotkeySettingsForm.designer.cs +++ b/shadowsocks-csharp/View/HotkeySettingsForm.designer.cs @@ -45,6 +45,8 @@ this.ShowLogsTextBox = new System.Windows.Forms.TextBox(); this.ServerMoveUpTextBox = new System.Windows.Forms.TextBox(); this.ServerMoveDownTextBox = new System.Windows.Forms.TextBox(); + this.RegAllAtStartupCheckbox = new System.Windows.Forms.CheckBox(); + this.RegAllAtStartupLabel = new System.Windows.Forms.Label(); flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); flowLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); @@ -57,7 +59,7 @@ flowLayoutPanel1.Controls.Add(this.btnCancel); flowLayoutPanel1.Controls.Add(this.btnRegisterAll); flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.BottomUp; - flowLayoutPanel1.Location = new System.Drawing.Point(0, 205); + flowLayoutPanel1.Location = new System.Drawing.Point(0, 204); flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); flowLayoutPanel1.Name = "flowLayoutPanel1"; flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 0, 16, 0); @@ -100,34 +102,39 @@ // // tableLayoutPanel1 // - this.tableLayoutPanel1.ColumnCount = 2; + this.tableLayoutPanel1.ColumnCount = 5; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 740F)); this.tableLayoutPanel1.Controls.Add(this.SwitchSystemProxyLabel, 0, 0); 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.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.Controls.Add(this.ServerMoveDownLabel, 0, 5); + this.tableLayoutPanel1.Controls.Add(flowLayoutPanel1, 0, 7); + this.tableLayoutPanel1.Controls.Add(this.RegAllAtStartupCheckbox, 1, 6); + this.tableLayoutPanel1.Controls.Add(this.RegAllAtStartupLabel, 0, 6); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - 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.RowCount = 8; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16725F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16726F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16726F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16726F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.7784F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.38949F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 14.16309F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); - 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; // @@ -138,7 +145,7 @@ 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, 34); + this.SwitchSystemProxyLabel.Size = new System.Drawing.Size(147, 29); this.SwitchSystemProxyLabel.TabIndex = 0; this.SwitchSystemProxyLabel.Text = "Enable System Proxy"; this.SwitchSystemProxyLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -147,10 +154,10 @@ // this.SwitchProxyModeLabel.AutoSize = true; this.SwitchProxyModeLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.SwitchProxyModeLabel.Location = new System.Drawing.Point(8, 34); + this.SwitchProxyModeLabel.Location = new System.Drawing.Point(8, 29); 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.Size = new System.Drawing.Size(189, 29); this.SwitchProxyModeLabel.TabIndex = 1; this.SwitchProxyModeLabel.Text = "Switch System Proxy Mode"; this.SwitchProxyModeLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -159,10 +166,10 @@ // this.SwitchAllowLanLabel.AutoSize = true; this.SwitchAllowLanLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.SwitchAllowLanLabel.Location = new System.Drawing.Point(33, 68); + this.SwitchAllowLanLabel.Location = new System.Drawing.Point(33, 58); this.SwitchAllowLanLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.SwitchAllowLanLabel.Name = "SwitchAllowLanLabel"; - this.SwitchAllowLanLabel.Size = new System.Drawing.Size(164, 34); + this.SwitchAllowLanLabel.Size = new System.Drawing.Size(164, 29); this.SwitchAllowLanLabel.TabIndex = 3; this.SwitchAllowLanLabel.Text = "Allow Clients from LAN"; this.SwitchAllowLanLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -171,10 +178,10 @@ // this.ShowLogsLabel.AutoSize = true; this.ShowLogsLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.ShowLogsLabel.Location = new System.Drawing.Point(107, 102); + this.ShowLogsLabel.Location = new System.Drawing.Point(107, 87); this.ShowLogsLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.ShowLogsLabel.Name = "ShowLogsLabel"; - this.ShowLogsLabel.Size = new System.Drawing.Size(90, 34); + this.ShowLogsLabel.Size = new System.Drawing.Size(90, 29); this.ShowLogsLabel.TabIndex = 4; this.ShowLogsLabel.Text = "Show Logs..."; this.ShowLogsLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -183,10 +190,10 @@ // this.ServerMoveUpLabel.AutoSize = true; this.ServerMoveUpLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.ServerMoveUpLabel.Location = new System.Drawing.Point(128, 136); + this.ServerMoveUpLabel.Location = new System.Drawing.Point(128, 116); this.ServerMoveUpLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.ServerMoveUpLabel.Name = "ServerMoveUpLabel"; - this.ServerMoveUpLabel.Size = new System.Drawing.Size(69, 35); + this.ServerMoveUpLabel.Size = new System.Drawing.Size(69, 30); this.ServerMoveUpLabel.TabIndex = 4; this.ServerMoveUpLabel.Text = "Move up"; this.ServerMoveUpLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -195,10 +202,10 @@ // this.ServerMoveDownLabel.AutoSize = true; this.ServerMoveDownLabel.Dock = System.Windows.Forms.DockStyle.Right; - this.ServerMoveDownLabel.Location = new System.Drawing.Point(106, 171); + this.ServerMoveDownLabel.Location = new System.Drawing.Point(106, 146); this.ServerMoveDownLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); this.ServerMoveDownLabel.Name = "ServerMoveDownLabel"; - this.ServerMoveDownLabel.Size = new System.Drawing.Size(91, 34); + this.ServerMoveDownLabel.Size = new System.Drawing.Size(91, 29); this.ServerMoveDownLabel.TabIndex = 4; this.ServerMoveDownLabel.Text = "Move Down"; this.ServerMoveDownLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -219,7 +226,7 @@ // SwitchProxyModeTextBox // this.SwitchProxyModeTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.SwitchProxyModeTextBox.Location = new System.Drawing.Point(208, 37); + this.SwitchProxyModeTextBox.Location = new System.Drawing.Point(208, 32); this.SwitchProxyModeTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.SwitchProxyModeTextBox.Name = "SwitchProxyModeTextBox"; this.SwitchProxyModeTextBox.ReadOnly = true; @@ -232,7 +239,7 @@ // SwitchAllowLanTextBox // this.SwitchAllowLanTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.SwitchAllowLanTextBox.Location = new System.Drawing.Point(208, 71); + this.SwitchAllowLanTextBox.Location = new System.Drawing.Point(208, 61); this.SwitchAllowLanTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.SwitchAllowLanTextBox.Name = "SwitchAllowLanTextBox"; this.SwitchAllowLanTextBox.ReadOnly = true; @@ -245,7 +252,7 @@ // ShowLogsTextBox // this.ShowLogsTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ShowLogsTextBox.Location = new System.Drawing.Point(208, 105); + this.ShowLogsTextBox.Location = new System.Drawing.Point(208, 90); this.ShowLogsTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.ShowLogsTextBox.Name = "ShowLogsTextBox"; this.ShowLogsTextBox.ReadOnly = true; @@ -258,7 +265,7 @@ // ServerMoveUpTextBox // this.ServerMoveUpTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ServerMoveUpTextBox.Location = new System.Drawing.Point(208, 139); + this.ServerMoveUpTextBox.Location = new System.Drawing.Point(208, 119); this.ServerMoveUpTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.ServerMoveUpTextBox.Name = "ServerMoveUpTextBox"; this.ServerMoveUpTextBox.ReadOnly = true; @@ -271,7 +278,7 @@ // ServerMoveDownTextBox // this.ServerMoveDownTextBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.ServerMoveDownTextBox.Location = new System.Drawing.Point(208, 174); + this.ServerMoveDownTextBox.Location = new System.Drawing.Point(208, 149); this.ServerMoveDownTextBox.Margin = new System.Windows.Forms.Padding(3, 3, 16, 3); this.ServerMoveDownTextBox.Name = "ServerMoveDownTextBox"; this.ServerMoveDownTextBox.ReadOnly = true; @@ -281,6 +288,31 @@ this.ServerMoveDownTextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.HotkeyDown); this.ServerMoveDownTextBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.HotkeyUp); // + // RegAllAtStartupCheckbox + // + this.RegAllAtStartupCheckbox.AutoSize = true; + this.RegAllAtStartupCheckbox.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RegAllAtStartupCheckbox.Font = new System.Drawing.Font("微软雅黑", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.RegAllAtStartupCheckbox.Location = new System.Drawing.Point(208, 183); + this.RegAllAtStartupCheckbox.Margin = new System.Windows.Forms.Padding(3, 8, 0, 8); + this.RegAllAtStartupCheckbox.Name = "RegAllAtStartupCheckbox"; + this.RegAllAtStartupCheckbox.Size = new System.Drawing.Size(15, 13); + this.RegAllAtStartupCheckbox.TabIndex = 14; + this.RegAllAtStartupCheckbox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RegAllAtStartupCheckbox.UseVisualStyleBackColor = true; + // + // RegAllAtStartupLabel + // + this.RegAllAtStartupLabel.AutoSize = true; + this.RegAllAtStartupLabel.Dock = System.Windows.Forms.DockStyle.Right; + this.RegAllAtStartupLabel.Location = new System.Drawing.Point(68, 175); + this.RegAllAtStartupLabel.Margin = new System.Windows.Forms.Padding(8, 0, 8, 0); + this.RegAllAtStartupLabel.Name = "RegAllAtStartupLabel"; + this.RegAllAtStartupLabel.Size = new System.Drawing.Size(129, 29); + this.RegAllAtStartupLabel.TabIndex = 15; + this.RegAllAtStartupLabel.Text = "Reg All At Startup"; + this.RegAllAtStartupLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // HotkeySettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); @@ -319,5 +351,7 @@ private System.Windows.Forms.TextBox ServerMoveDownTextBox; private System.Windows.Forms.Button btnRegisterAll; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.CheckBox RegAllAtStartupCheckbox; + private System.Windows.Forms.Label RegAllAtStartupLabel; } } \ No newline at end of file diff --git a/shadowsocks-csharp/View/HotkeySettingsForm.resx b/shadowsocks-csharp/View/HotkeySettingsForm.resx index a0949f08..28ecf11b 100644 --- a/shadowsocks-csharp/View/HotkeySettingsForm.resx +++ b/shadowsocks-csharp/View/HotkeySettingsForm.resx @@ -120,58 +120,4 @@ False - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/shadowsocks-csharp/shadowsocks-csharp.csproj b/shadowsocks-csharp/shadowsocks-csharp.csproj index 4f354890..e08c3160 100644 --- a/shadowsocks-csharp/shadowsocks-csharp.csproj +++ b/shadowsocks-csharp/shadowsocks-csharp.csproj @@ -96,6 +96,7 @@ +