示例#1
0
 private void ApplyToForm(TempProxySettings state)
 {
     cbUseProxy.Checked = state.m_cbUseProxy;
     txtHost.Text       = state.m_txtHost;
     nudPort.Value      = state.m_nudPort;
     txtUser.Text       = state.m_txtUser;
     txtPassword.Text   = state.m_txtPassword;
 }
示例#2
0
 private void Save()
 {
     settings.UseProxy      = cbUseProxy.Checked;
     settings.ProxyAddress  = txtHost.Text;
     settings.ProxyPort     = (int)nudPort.Value;
     settings.ProxyUsername = txtUser.Text;
     //Helpers.SettingsHelper.StoreProxyPassword(settings, txtPassword.Text);
     initState = new TempProxySettings(settings);
 }
示例#3
0
 private bool Changes(TempProxySettings state)
 {
     try
     {
         var changed = cbUseProxy.Checked != state.m_cbUseProxy ||
                       txtHost.Text != state.m_txtHost ||
                       nudPort.Value != state.m_nudPort ||
                       txtUser.Text != state.m_txtUser ||
                       txtPassword.Text != state.m_txtPassword;
         m_lastValueOfChanges = changed;
         return(changed);
     }
     catch (NullReferenceException)
     {
         return(m_lastValueOfChanges);
     }
 }
示例#4
0
 private void LoadSettings(Settings settings)
 {
     initState = new TempProxySettings(settings);
     ApplyToForm(initState);
 }