/// <summary> /// Initializes controls /// </summary> private void Initialize() { try { PasswordForm passwordForm = new PasswordForm(); DialogResult result = passwordForm.ShowDialog(); if (result != DialogResult.OK) { this.Close(); } } catch (Exception) { this.Close(); } try { mExporter = new ICSDataExporter(); mExporter.Initialize(); mExporter.OnDataExportEvent += new ICSDataExporter.DataExportHandler(HandleDataExportEvent); //prompt to set database connection info DBInfoForm dbInfoForm = new DBInfoForm(); dbInfoForm.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Failed to load configuration data." + Environment.NewLine + "Error: " + ex.Message, "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); this.Close(); } }
private void CheckSecurityPassword() { PasswordForm passwordForm = new PasswordForm(); passwordForm.ShowDialog(); }