From 08e7de224ba38ff39fb829329206fd2dd0c945a7 Mon Sep 17 00:00:00 2001 From: Damir Ainullin Date: Sun, 17 Feb 2019 16:30:39 +0300 Subject: [PATCH 1/2] Fixed condition for useProxy --- shadowsocks-csharp/View/ProxyForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadowsocks-csharp/View/ProxyForm.cs b/shadowsocks-csharp/View/ProxyForm.cs index be7cddbe..88e711a1 100644 --- a/shadowsocks-csharp/View/ProxyForm.cs +++ b/shadowsocks-csharp/View/ProxyForm.cs @@ -60,7 +60,7 @@ namespace Shadowsocks.View private void OKButton_Click(object sender, EventArgs e) { - if (_modifiedProxyConfig.useProxy=UseProxyCheckBox.Checked) + if (_modifiedProxyConfig.useProxy == UseProxyCheckBox.Checked) { if (!int.TryParse(ProxyPortTextBox.Text, out _modifiedProxyConfig.proxyPort)) { From 7a6230f53dc24ab5367915b19eaa5dc0871816e2 Mon Sep 17 00:00:00 2001 From: Damir Ainullin Date: Sun, 17 Feb 2019 18:21:03 +0300 Subject: [PATCH 2/2] Fix for appropriate logic of the original design --- shadowsocks-csharp/View/ProxyForm.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shadowsocks-csharp/View/ProxyForm.cs b/shadowsocks-csharp/View/ProxyForm.cs index 88e711a1..f306c906 100644 --- a/shadowsocks-csharp/View/ProxyForm.cs +++ b/shadowsocks-csharp/View/ProxyForm.cs @@ -59,8 +59,8 @@ namespace Shadowsocks.View private void OKButton_Click(object sender, EventArgs e) { - - if (_modifiedProxyConfig.useProxy == UseProxyCheckBox.Checked) + _modifiedProxyConfig.useProxy = UseProxyCheckBox.Checked; + if (_modifiedProxyConfig.useProxy) { if (!int.TryParse(ProxyPortTextBox.Text, out _modifiedProxyConfig.proxyPort)) {