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; }
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); }
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); } }
private void LoadSettings(Settings settings) { initState = new TempProxySettings(settings); ApplyToForm(initState); }