public applicationSettings() {
			windowPositions = new serializableDictionary<string, Point>();
			windowSizes = new serializableDictionary<string, Size>();
			columnSizes = new serializableDictionary<string, int>();
			proxySettings = new proxySettings();
			enableLogging = true;
			showToolBar = true;
			statisticRequestDocument = "Default.ashx";
			updateChannelIndex = 1;
			checkForUpdatesAtStartup = true;
		}
 public applicationSettings()
 {
     windowPositions          = new serializableDictionary <string, Point>();
     windowSizes              = new serializableDictionary <string, Size>();
     columnSizes              = new serializableDictionary <string, int>();
     proxySettings            = new proxySettings();
     enableLogging            = true;
     showToolBar              = true;
     statisticRequestDocument = "Default.ashx";
     updateChannelIndex       = 1;
     checkForUpdatesAtStartup = true;
 }
		private void btnSaveSettings_Click(object sender, System.EventArgs e) {
			var newProxySettings = new proxySettings {
			                                         	Server = txtServer.Text,
			                                         	Port = int.Parse(txtPort.Text),
			                                         	Username = txtUsername.Text,
			                                         	Password = txtPassword.Text,
			                                         	proxyMode =
			                                         		rbSystemProxy.Checked
			                                         			? proxyModes.useSystemDefaults
			                                         			: proxyModes.useCustomSettings
			                                         };

			if (rbNoAuth.Checked)
				newProxySettings.Authentication = proxyAuthentication.None;
			else if (rbWinAuth.Checked)
				newProxySettings.Authentication = proxyAuthentication.NetworkCredentials;
			else if (rbCustomAuth.Checked)
				newProxySettings.Authentication = proxyAuthentication.Custom;

			Result = newProxySettings;
			DialogResult = DialogResult.OK;
			Close();
		}
		private void btnProxySettings_Click(object sender, EventArgs e) {
			if(Session.showDialog<proxySettingsDialog>(this)== DialogResult.OK) {
				_cachedProxySettings = (proxySettings)Session.dialogResultCache[typeof (proxySettingsDialog)];
			}
		}