From 9439fc617a48ee23edee0cba8711bf02c92d4306 Mon Sep 17 00:00:00 2001 From: celeron533 Date: Tue, 17 Apr 2018 21:24:19 +0800 Subject: [PATCH] Config form UI updates * Add tooltips * Translations --- shadowsocks-csharp/Data/ja.txt | 3 +- shadowsocks-csharp/Data/zh_CN.txt | 3 +- shadowsocks-csharp/Data/zh_TW.txt | 3 +- .../View/ConfigForm.Designer.cs | 12 +++- shadowsocks-csharp/View/ConfigForm.cs | 3 +- shadowsocks-csharp/View/ConfigForm.resx | 64 +++---------------- 6 files changed, 25 insertions(+), 63 deletions(-) diff --git a/shadowsocks-csharp/Data/ja.txt b/shadowsocks-csharp/Data/ja.txt index f41ec4c9..a2426735 100644 --- a/shadowsocks-csharp/Data/ja.txt +++ b/shadowsocks-csharp/Data/ja.txt @@ -51,8 +51,9 @@ Server Port=サーバーポート Password=パスワード Show Password=パスワードを表示する Encryption=暗号化 -Plugin=プラグイン +Plugin Program=プラグインプログラム Plugin Options=プラグインのオプション +Plugin Arguments=プラグインの引数 Proxy Port=プロキシポート Remarks=付記 Timeout(Sec)=タイムアウト (秒) diff --git a/shadowsocks-csharp/Data/zh_CN.txt b/shadowsocks-csharp/Data/zh_CN.txt index aac4f668..48511750 100644 --- a/shadowsocks-csharp/Data/zh_CN.txt +++ b/shadowsocks-csharp/Data/zh_CN.txt @@ -51,8 +51,9 @@ Server Port=服务器端口 Password=密码 Show Password=显示密码 Encryption=加密 -Plugin=插件 +Plugin Program=插件程序 Plugin Options=插件选项 +Plugin Arguments=插件参数 Proxy Port=代理端口 Remarks=备注 Timeout(Sec)=超时(秒) diff --git a/shadowsocks-csharp/Data/zh_TW.txt b/shadowsocks-csharp/Data/zh_TW.txt index 963dac80..d0d29c95 100644 --- a/shadowsocks-csharp/Data/zh_TW.txt +++ b/shadowsocks-csharp/Data/zh_TW.txt @@ -51,8 +51,9 @@ Server Port=伺服器連接埠 Password=密碼 Show Password=顯示密碼 Encryption=加密 -Plugin=外掛程式 +Plugin Program=外掛程式 Plugin Options=外掛程式選項 +Plugin Arguments=外掛程式參數 Proxy Port=Proxy 連接埠 Remarks=註解 Timeout(Sec)=逾時 (秒) diff --git a/shadowsocks-csharp/View/ConfigForm.Designer.cs b/shadowsocks-csharp/View/ConfigForm.Designer.cs index ff168d3b..5b694bc4 100755 --- a/shadowsocks-csharp/View/ConfigForm.Designer.cs +++ b/shadowsocks-csharp/View/ConfigForm.Designer.cs @@ -28,6 +28,7 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.PluginOptionsLabel = new System.Windows.Forms.Label(); this.PluginTextBox = new System.Windows.Forms.TextBox(); @@ -65,6 +66,7 @@ this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel(); this.DuplicateButton = new System.Windows.Forms.Button(); + this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.tableLayoutPanel1.SuspendLayout(); this.ServerGroupBox.SuspendLayout(); this.tableLayoutPanel2.SuspendLayout(); @@ -128,6 +130,7 @@ this.PluginOptionsLabel.Size = new System.Drawing.Size(89, 12); this.PluginOptionsLabel.TabIndex = 6; this.PluginOptionsLabel.Text = "Plugin Options"; + this.toolTip1.SetToolTip(this.PluginOptionsLabel, "Environment variables"); // // PluginTextBox // @@ -278,11 +281,11 @@ // this.PluginLabel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.PluginLabel.AutoSize = true; - this.PluginLabel.Location = new System.Drawing.Point(66, 139); + this.PluginLabel.Location = new System.Drawing.Point(18, 139); this.PluginLabel.Name = "PluginLabel"; - this.PluginLabel.Size = new System.Drawing.Size(41, 12); + this.PluginLabel.Size = new System.Drawing.Size(89, 12); this.PluginLabel.TabIndex = 5; - this.PluginLabel.Text = "Plugin"; + this.PluginLabel.Text = "Plugin Program"; // // PluginOptionsTextBox // @@ -337,6 +340,8 @@ this.PluginArgumentsLabel.Size = new System.Drawing.Size(101, 12); this.PluginArgumentsLabel.TabIndex = 7; this.PluginArgumentsLabel.Text = "Plugin Arguments"; + this.toolTip1.SetToolTip(this.PluginArgumentsLabel, "Not SIP003 standard. Used as CLI arguments.\r\nMandatory:\r\n%SS_LOCAL_HOST%, %SS_LOC" + + "SL_PORT%, %SS_REMOTE_HOST%, %SS_REMOTE_PORT%\r\nOptional:\r\n%SS_PLUGIN_OPTIONS%"); // // panel2 // @@ -660,6 +665,7 @@ private System.Windows.Forms.TextBox PasswordTextBox; private System.Windows.Forms.TextBox PluginArgumentsTextBox; private System.Windows.Forms.Label PluginArgumentsLabel; + private System.Windows.Forms.ToolTip toolTip1; } } diff --git a/shadowsocks-csharp/View/ConfigForm.cs b/shadowsocks-csharp/View/ConfigForm.cs index f2b5849e..09e2551e 100755 --- a/shadowsocks-csharp/View/ConfigForm.cs +++ b/shadowsocks-csharp/View/ConfigForm.cs @@ -48,8 +48,9 @@ namespace Shadowsocks.View PasswordLabel.Text = I18N.GetString("Password"); ShowPasswdCheckBox.Text = I18N.GetString("Show Password"); EncryptionLabel.Text = I18N.GetString("Encryption"); - PluginLabel.Text = I18N.GetString("Plugin"); + PluginLabel.Text = I18N.GetString("Plugin Program"); PluginOptionsLabel.Text = I18N.GetString("Plugin Options"); + PluginArgumentsLabel.Text = I18N.GetString("Plugin Arguments"); ProxyPortLabel.Text = I18N.GetString("Proxy Port"); RemarksLabel.Text = I18N.GetString("Remarks"); TimeoutLabel.Text = I18N.GetString("Timeout(Sec)"); diff --git a/shadowsocks-csharp/View/ConfigForm.resx b/shadowsocks-csharp/View/ConfigForm.resx index 0e2cad4c..3dcd3115 100755 --- a/shadowsocks-csharp/View/ConfigForm.resx +++ b/shadowsocks-csharp/View/ConfigForm.resx @@ -123,6 +123,9 @@ True + + 17, 17 + True @@ -174,66 +177,12 @@ True - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True + + 17, 17 True - - True - - - True - True @@ -297,6 +246,9 @@ True + + True + True