// Configuration Dialog... private void LoadConfigurationDialog() { string s = string.Empty; ConfigForm configDialog = new ConfigForm(); // Copy the current settings into the Configuration form... configDialog.appSettings = appSettings; configDialog.StartPosition = FormStartPosition.CenterParent; if (configDialog.ShowDialog(this) == DialogResult.OK) s = "OK"; else s = "Cancel"; // Copy settings... appSettings = configDialog.appSettings; configDialog.Dispose(); }
private void InitControls() { if (!ValidateAppSettings(appSettings)) { ConfigForm configFormDialog = new ConfigForm(); // Copy the current settings into the Configuration form... configFormDialog.appSettings = appSettings; configFormDialog.StartPosition = FormStartPosition.CenterParent; configFormDialog.Text = "Push Application Setup"; if (configFormDialog.ShowDialog(this) == DialogResult.Cancel) { // If we get here, exit the application imeadiatly... this.Close(); return; } // Copy settings... appSettings = configFormDialog.appSettings; configFormDialog.Dispose(); } // Build the Ignore File regular expression pattern... ignorePattern = BuildIgnorePattern(); // Init Controls... lblStatus1_1.Text = string.Empty; lblStatus1_2.Text = string.Empty; lblStatus2_2.Text = string.Empty; lblStatus1_1.Visible = false; lblStatus1_2.Visible = false; lblStatus2_2.Visible = false; toolStripProgressBar.Visible = false; toolStripLblProgress.Visible = false; // Update the form properties to the last used... UpdateControls(); }