private void m_serverExplorer_DBSelected(object sender, DBTreeEventArgs e) { generateXMLOutputToolStripMenuItem.Enabled = true; databaseSnapshotToolStripMenuItem.Enabled = true; selectedDatabaseToolStripMenuItem.Enabled = true; selectedDatabasesToolStripMenuItem.Enabled = true; xMLSnapshotAndDatabaseToolStripMenuItem.Enabled = true; btnGenXml.Enabled = true; int Index = e.DBTreeNode.Tag == null ? -1 : (int)e.DBTreeNode.Tag; if (Index == 0 && e.DBTreeNode.SelectedForCompare && m_xmlSnapShotFile1 == null) { m_currentCompareDBTreeNode1 = e.DBTreeNode; this.toolStripStatusLabel1.Text = "Source DB: " + e.DBTreeNode.Server + "\\" + e.DBTreeNode.Text; } else if (Index == 1 && e.DBTreeNode.SelectedForCompare && m_xmlSnapShotFile2 == null) { m_currentCompareDBTreeNode2 = e.DBTreeNode; this.toolStripStatusLabel2.Text = "Target DB: " + e.DBTreeNode.Server + "\\" + e.DBTreeNode.Text; } else if (Index == 0 && e.DBTreeNode.SelectedForCompare && m_xmlSnapShotFile1 != null) // hmmm... { m_currentCompareDBTreeNode2 = e.DBTreeNode; this.toolStripStatusLabel2.Text = "Target DB: " + e.DBTreeNode.Server + "\\" + e.DBTreeNode.Text; } m_currentSelectedDBTreeNode = e.DBTreeNode; }
private void m_serverExplorer_SchemaGenerationStarted(object sender, DBTreeEventArgs e) { string work = "Processing [" + e.DBTreeNode.FullDBPath + "]..."; if (e.DBTreeNode.Tag == null) { this.toolStripStatusLabel2.Text = string.Empty; this.toolStripStatusLabel1.Text = work; } else if ((int)e.DBTreeNode.Tag == 0) { this.toolStripStatusLabel1.Text = work; } else if ((int)e.DBTreeNode.Tag == 1) { this.toolStripStatusLabel2.Text = work; } _runningDualSchemas++; this.timer1.Enabled = true; this.progressIndicator.Visible = true; }
private void m_serverExplorer_DBUnSelected(object sender, DBTreeEventArgs e) { int Index = e.DBTreeNode.Tag == null ? -1 : (int)e.DBTreeNode.Tag; if (Index == 0 && m_xmlSnapShotFile1 == null) { selectedDatabasesToolStripMenuItem.Enabled = false; m_currentCompareDBTreeNode1 = null; m_currentSelectedDBTreeNode = null; this.toolStripStatusLabel1.Text = ""; } else if (Index == 1 && m_xmlSnapShotFile2 == null) { selectedDatabasesToolStripMenuItem.Enabled = false; m_currentCompareDBTreeNode2 = null; m_currentSelectedDBTreeNode = null; this.toolStripStatusLabel2.Text = ""; } else if (Index == 0 && m_xmlSnapShotFile1 != null) // hmmm... { selectedDatabasesToolStripMenuItem.Enabled = false; m_currentCompareDBTreeNode2 = null; m_currentSelectedDBTreeNode = null; this.toolStripStatusLabel2.Text = ""; } if (m_currentCompareDBTreeNode1 == null && m_currentCompareDBTreeNode2 == null) { databaseSnapshotToolStripMenuItem.Enabled = false; selectedDatabaseToolStripMenuItem.Enabled = false; xMLSnapshotAndDatabaseToolStripMenuItem.Enabled = false; m_serverExplorer.ClearSelected(SQLServerExplorer.SelectedTypes.DBs); } }
private void m_serverExplorer_SchemaGenerated(object sender, DBTreeEventArgs e) { if ((e.DBTreeNode == null) || (e.DBTreeNode.Tag == null)) { string work = "Finished Processing Schema: " + e.DBTreeNode.FullDBPath; this.toolStripStatusLabel2.Text = string.Empty; this.toolStripStatusLabel1.Text = work; _runningDualSchemas--; } else if ( (int)e.DBTreeNode.Tag == 0 ) { string work = "Finished Processing Schema: " + e.DBTreeNode.FullDBPath; this.toolStripStatusLabel1.Text = work; _runningDualSchemas--; } else if ((int)e.DBTreeNode.Tag == 1) { string work = "Finished Processing Schema: " + e.DBTreeNode.FullDBPath; this.toolStripStatusLabel2.Text = work; _runningDualSchemas--; } disableProgressIndicator(); }