From 2b4b6cba07abcf03b5abed8ac6f37c32a85bf483 Mon Sep 17 00:00:00 2001 From: Syrone Wong Date: Wed, 17 Aug 2016 15:56:00 +0800 Subject: [PATCH] Minor ConfigForm changes - add event handler for KeyDown - drop unused code, we don't support table and rc4 now Signed-off-by: Syrone Wong --- shadowsocks-csharp/View/ConfigForm.Designer.cs | 4 ++-- shadowsocks-csharp/View/ConfigForm.cs | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/shadowsocks-csharp/View/ConfigForm.Designer.cs b/shadowsocks-csharp/View/ConfigForm.Designer.cs index e6a15915..fcfd2fc0 100755 --- a/shadowsocks-csharp/View/ConfigForm.Designer.cs +++ b/shadowsocks-csharp/View/ConfigForm.Designer.cs @@ -176,8 +176,8 @@ this.PasswordTextBox.Name = "PasswordTextBox"; this.PasswordTextBox.Size = new System.Drawing.Size(160, 21); this.PasswordTextBox.TabIndex = 2; - this.PasswordTextBox.WordWrap = false; this.PasswordTextBox.UseSystemPasswordChar = true; + this.PasswordTextBox.WordWrap = false; // // EncryptionLabel // @@ -216,7 +216,6 @@ this.EncryptionSelect.Name = "EncryptionSelect"; this.EncryptionSelect.Size = new System.Drawing.Size(160, 20); this.EncryptionSelect.TabIndex = 3; - this.EncryptionSelect.SelectedIndexChanged += new System.EventHandler(this.EncryptionSelect_SelectedIndexChanged); // // OneTimeAuth // @@ -480,6 +479,7 @@ this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.ConfigForm_FormClosed); this.Load += new System.EventHandler(this.ConfigForm_Load); this.Shown += new System.EventHandler(this.ConfigForm_Shown); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ConfigForm_KeyDown); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); this.ServerGroupBox.ResumeLayout(false); diff --git a/shadowsocks-csharp/View/ConfigForm.cs b/shadowsocks-csharp/View/ConfigForm.cs index ba4509b6..6bf861aa 100755 --- a/shadowsocks-csharp/View/ConfigForm.cs +++ b/shadowsocks-csharp/View/ConfigForm.cs @@ -325,18 +325,5 @@ namespace Shadowsocks.View MoveConfigItem(+1); // +1 means move forward } } - - private void EncryptionSelect_SelectedIndexChanged(object sender, EventArgs e) - { - if (EncryptionSelect.Text == "rc4" || EncryptionSelect.Text == "table") - { - OneTimeAuth.Enabled = false; - OneTimeAuth.Checked = false; - } - else - { - OneTimeAuth.Enabled = true; - } - } } }