diff --git a/shadowsocks-csharp/Controller/UpdateChecker.cs b/shadowsocks-csharp/Controller/UpdateChecker.cs index f5ed3fe..73726a0 100755 --- a/shadowsocks-csharp/Controller/UpdateChecker.cs +++ b/shadowsocks-csharp/Controller/UpdateChecker.cs @@ -21,7 +21,7 @@ public class UpdateChecker public const string Name = "ShadowsocksR"; public const string Copyright = "Copyright © BreakWa11 2017. Fork from Shadowsocks by clowwindy"; - public const string Version = "4.6.1"; + public const string Version = "4.7.0"; #if !_DOTNET_4_0 public const string NetVer = "2.0"; #elif !_CONSOLE diff --git a/shadowsocks-csharp/Program.cs b/shadowsocks-csharp/Program.cs index 2a39225..75df2c4 100755 --- a/shadowsocks-csharp/Program.cs +++ b/shadowsocks-csharp/Program.cs @@ -65,16 +65,18 @@ static void Main(string[] args) { if (try_times >= 5) return; - InputPassword dlg = new InputPassword(); - if (dlg.ShowDialog() == DialogResult.OK) - Configuration.SetPassword(dlg.password); - else - return; + using (InputPassword dlg = new InputPassword()) + { + if (dlg.ShowDialog() == DialogResult.OK) + Configuration.SetPassword(dlg.password); + else + return; + } try_times += 1; } #endif _controller = new ShadowsocksController(); - + HostMap.Instance().LoadHostFile(); #if !_CONSOLE _viewController = new MenuViewController(_controller); #endif