set port number if not zero

This commit is contained in:
renzhn
2015-08-27 19:38:07 +08:00
parent 2f7b5dd041
commit d9b9e02412

View File

@@ -111,7 +111,9 @@ namespace Wox
cbEnableProxy.Unchecked += (o, e) => DisableProxy(); cbEnableProxy.Unchecked += (o, e) => DisableProxy();
cbEnableProxy.IsChecked = UserSettingStorage.Instance.ProxyEnabled; cbEnableProxy.IsChecked = UserSettingStorage.Instance.ProxyEnabled;
tbProxyServer.Text = UserSettingStorage.Instance.ProxyServer; tbProxyServer.Text = UserSettingStorage.Instance.ProxyServer;
tbProxyPort.Text = UserSettingStorage.Instance.ProxyPort.ToString(); if (UserSettingStorage.Instance.ProxyPort != 0) {
tbProxyPort.Text = UserSettingStorage.Instance.ProxyPort.ToString();
}
tbProxyUserName.Text = UserSettingStorage.Instance.ProxyUserName; tbProxyUserName.Text = UserSettingStorage.Instance.ProxyUserName;
tbProxyPassword.Password = UserSettingStorage.Instance.ProxyPassword; tbProxyPassword.Password = UserSettingStorage.Instance.ProxyPassword;
if (UserSettingStorage.Instance.ProxyEnabled) if (UserSettingStorage.Instance.ProxyEnabled)