private void setupButtonItem_Click(object sender, EventArgs e) { using (var uSettings = new UserSettings()) { uSettings.WizardFinished += uSettings_WizardFinished; uSettings.ShowDialog(); } }
private void SetProgramType(bool start = true) { mysql = new SQLMethods(Settings.Default.MySQLHost, Settings.Default.MySQLPort, Settings.Default.MySQLUsername, Settings.Default.MySQLPassword); if (Settings.Default.raEnabled) { startServerButtonItem.Enabled = false; stopServerButtonItem.Enabled = false; backupDBButtonItem.Enabled = false; restoreDBButtonItem.Enabled = false; compileButtonItem.Enabled = false; if (Settings.Default.raHost == String.Empty || Settings.Default.raPort == 0 || Settings.Default.raUsername == String.Empty || Settings.Default.raPassword == String.Empty || Settings.Default.MySQLHost == String.Empty || Settings.Default.MySQLPort == 0 || Settings.Default.MySQLUsername == String.Empty || Settings.Default.MySQLPassword == String.Empty) { using (var uSettings = new UserSettings()) { uSettings.WizardFinished += uSettings_WizardFinished; uSettings.ShowDialog(); } } else { if (start) SetupRAConnection(); refreshValuesTimer.Enabled = true; } } else { backupDBButtonItem.Enabled = true; restoreDBButtonItem.Enabled = true; startServerButtonItem.Enabled = true; stopServerButtonItem.Enabled = false; compileButtonItem.Enabled = true; if (Settings.Default.trinityFolder == String.Empty || Settings.Default.MySQLHost == String.Empty || Settings.Default.MySQLPort == 0 || Settings.Default.MySQLUsername == String.Empty || Settings.Default.MySQLPassword == String.Empty) { using (var uSettings = new UserSettings()) { uSettings.WizardFinished += uSettings_WizardFinished; uSettings.ShowDialog(); } } else { refreshValuesTimer.Enabled = true; } } }