Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 4
0
 private void LoadSettings(Settings settings)
 {
     initState = new TempProxySettings(settings);
     ApplyToForm(initState);
 }