Exemplo n.º 1
0
		private void SettingsButton_Click(object sender, System.EventArgs e)
		{
			HideMenuPanel(mainMenuPanel);
			if (reconnectTimer.Enabled)
				return;

			FormSettings dialog = new FormSettings(settings, null);
			try
			{
				if (dialog.ShowDialog() == DialogResult.OK)
				{
					configSettings.Set("Start Proxy Automatically on Launch", (bool)settings["autoStart"].Value);
					configSettings.Set("Run External App after Proxy Startup", (bool)settings["runExternalApp"].Value);
					configSettings.Set("External Application", (string)settings["externalApp"].Value);
					configSettings.Set("Reconnect after Power-on", (bool)settings["autoReconnect"].Value);
					configSettings.Set("Power-on Reconnect Delay", (int)settings["reconnectDelay"].Value);
					configSource.Save();
				}
			}
			finally
			{
				dialog.Dispose();
			}
		}
Exemplo n.º 2
0
		public bool ShowSettingsDialog(IExtension sender, Settings settings, SettingsValidator validator)
		{
			FormSettings settingsDialog = new FormSettings(settings, validator);
			try
			{
				return settingsDialog.ShowDialog() == DialogResult.OK;
			}
			finally
			{
				settingsDialog.Dispose();
			}
		}