Пример #1
0
 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);
     }
 }
Пример #2
0
        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;
        }
Пример #3
0
 private void m_serverExplorer_SchemaCompared(object sender, SchemaGeneratedEventArgs e)
 {
     string work = "Finished Processing Schema.";
     _runningCompare = false;
     m_currentCompareDBTreeNode1 = null;
     m_currentCompareDBTreeNode2 = null;
     m_xmlSnapShotFile1 = null;
     m_xmlSnapShotFile2 = null;
     foreach (Document doc in dockPanel.Documents)
     {
         if (typeof(XMLDoc).IsInstanceOfType(doc))
         {
             ((XMLDoc)doc).IsSelectedCompare = false;
         }
     }
     this.toolStripStatusLabel2.Text = string.Empty;
     this.toolStripStatusLabel1.Text = work;
     disableProgressIndicator();
 }