private void btnChangeDir_Click(object sender, EventArgs e) { using (SelectPLSQLSpecDir form = new SelectPLSQLSpecDir()) { form.BackendApplication = BackendApplication; form.FrontendApplication = FrontendApplication; if (form.ShowDialog() == DialogResult.OK) { tbSpecFilePath.Text = ConfigurationManager.AppSettings[BackendApplication.Name + "PLSQLSpecDirectory"]; EnableDisableButtons(); } } }
private void procedurePage_ParentChanged(object sender, EventArgs e) { if (procedurePage.Parent == tabControl) { if (procedurePage.Tag as string != "Loaded") { if (string.IsNullOrEmpty(ConfigurationManager.AppSettings[BackendApplication.Name + "PLSQLSpecDirectory"])) { using (SelectPLSQLSpecDir form = new SelectPLSQLSpecDir()) { form.BackendApplication = BackendApplication; form.FrontendApplication = FrontendApplication; if (form.ShowDialog() == DialogResult.Cancel) { // When cancelling dialog then don't continue SwitchPage(targetPage); } } } if (newAction) { Action.Query = null; Action.StoredProcedure = new StoredProcedure(); } else { Action.StoredProcedure = modelService.GetInitializedDomainObject <StoredProcedure>(Action.StoredProcedure.Id); } storedProcedureControl.BackendApplication = BackendApplication; storedProcedureControl.createNewProcedure = newAction; storedProcedureControl.Load(Action.StoredProcedure, this.IsEditable, schema); if (IsEditable && !newAction) { storedProcedureControl.UpdateExistingProcedure(); } procedurePage.Tag = "Loaded"; } EnableDisableBtn(); ShowMissingSPMessage(); } }
private void btnStart_Click(object sender, EventArgs e) { if (cbCheckStoredProcedures.Checked) { // Check directory if (!SelectPLSQLSpecDir.IsValidSpecDirectory(tbSpecFilePath.Text)) { SelectPLSQLSpecDir.ShowNotValidDirectory(); EnableDisableButtons(); return; } } try { // Disable Start and Close buttons btnStart.Enabled = false; btnClose.Enabled = false; gbChecks.Enabled = false; // Start the timer for Check CheckStartTime = DateTime.Now; AnalyzeIssueTree issueTree = analyzeService.Check(BackendApplication.Id, FrontendApplication.Id, cbCheckStoredProcedures.Checked, tbSpecFilePath.Text, cbCheckSQLQueries.Checked, tbDatabaseConnection.Text, cbCheckAllMaps.Checked, cbCheckAllDialogs.Checked, CheckCallback); ShowIssueList showIssueForm = new ShowIssueList(issueTree); showIssueForm.Show(); } finally { btnStart.Enabled = true; btnClose.Enabled = true; gbChecks.Enabled = true; gbProgress.Visible = false; } }
private void EnableDisableButtons() { btnStart.Enabled = false; if (cbCheckStoredProcedures.Checked) { if (SelectPLSQLSpecDir.IsValidSpecDirectory(tbSpecFilePath.Text)) { btnStart.Enabled = true; } } else if (cbCheckSQLQueries.Checked || cbCheckAllMaps.Checked || cbCheckAllDialogs.Checked) { btnStart.Enabled = true; } }