private void OnSelectedForCompare(int index)
        {
            XMLDocEventArgs args = new XMLDocEventArgs();
            args.selectedFileAndIndex = string.Format("{0},{1}", m_fileName, index).Split(',');

            EventHandler<XMLDocEventArgs> handler = SelectedForCompare;
            if (handler != null)
            {
                // raises the event. 
                handler(this, args);
            }
        }
Beispiel #2
0
        private void OnSyncWithTree()
        {
            XMLDocEventArgs args = new XMLDocEventArgs();

            args.selectedFileAndIndex = string.Format("{0},-1", m_fileName).Split(',');

            EventHandler <XMLDocEventArgs> handler = SyncWithTree;

            if (handler != null)
            {
                // raises the event.
                handler(this, args);
            }
        }
Beispiel #3
0
        private void OnSelectedForCompare(int index)
        {
            XMLDocEventArgs args = new XMLDocEventArgs();

            args.selectedFileAndIndex = string.Format("{0},{1}", m_fileName, index).Split(',');

            EventHandler <XMLDocEventArgs> handler = SelectedForCompare;

            if (handler != null)
            {
                // raises the event.
                handler(this, args);
            }
        }
 private void doc_SelectedForCompare(object sender, XMLDocEventArgs e)
 {
     // hookup status text and persist selected xml file
     if (e.selectedFileAndIndex.Length > 1)
     {
         FileInfo fi = new FileInfo(e.selectedFileAndIndex[0]);
         if (e.selectedFileAndIndex[1] == "0" && m_currentCompareDBTreeNode1 == null)
         {
             m_xmlSnapShotFile1 = e.selectedFileAndIndex[0];
             this.toolStripStatusLabel1.Text = "Source XML Snapshot: " + fi.Name + "...";
         }
         else if (e.selectedFileAndIndex[1] == "1" && m_currentCompareDBTreeNode2 == null)
         {
             m_xmlSnapShotFile2 = e.selectedFileAndIndex[0];
             this.toolStripStatusLabel2.Text = "Target XML Snapshot: " + fi.Name + "...";
         }
         else if (e.selectedFileAndIndex[1] == "0" && m_currentCompareDBTreeNode1 != null) //hmmm...
         {
             m_xmlSnapShotFile2 = e.selectedFileAndIndex[0];
             this.toolStripStatusLabel2.Text = "Target XML Snapshot: " + fi.Name + "...";
         }
     }
 }
 private void doc_UnSelectedForCompare(object sender, XMLDocEventArgs e)
 {
     // TODO: hookup status text and remove persisted xml file variable 
     if (e.selectedFileAndIndex.Length > 1)
     {
         if (e.selectedFileAndIndex[1] == "0" && m_currentCompareDBTreeNode1 == null)
         {
             m_xmlSnapShotFile1 = null;
             this.toolStripStatusLabel1.Text = string.Empty;
         }
         else if (e.selectedFileAndIndex[1] == "1" && m_currentCompareDBTreeNode2 == null)
         {
             m_xmlSnapShotFile2 = null;
             this.toolStripStatusLabel2.Text = string.Empty;
         }
         else if (e.selectedFileAndIndex[1] == "0" && m_currentCompareDBTreeNode1 != null) //hmmm...
         {
             m_xmlSnapShotFile2 = null;
             this.toolStripStatusLabel2.Text = string.Empty;
         }
     }
     if (m_xmlSnapShotFile1 == null && m_xmlSnapShotFile2 == null)
     {
         m_serverExplorer.ClearSelected(SQLServerExplorer.SelectedTypes.XML);
     }
 }
 private void doc_SyncWithTree(object sender, XMLDocEventArgs e)
 {
     if (e.selectedFileAndIndex.Length > 1)
     {
         FileInfo fi = new FileInfo(e.selectedFileAndIndex[0]);
         m_xmlNodeExplorer.OpenFile(fi.FullName);
     }
 }
 private void doc_ReCreateDTS(object sender, XMLDocEventArgs e)
 {
     if (dockPanel.ActiveDocument != null && typeof(XMLDoc).IsInstanceOfType(dockPanel.ActiveDocument.DockHandler.Form))
     {
         XMLDoc doc = (XMLDoc)dockPanel.ActiveDocument.DockHandler.Form;
         if (doc.IsDTSPackage)
         {
             doc.ReHydrateDTS(m_serverExplorer.Servers);
         }
     }
 }
        private void OnSyncWithTree()
        {
            XMLDocEventArgs args = new XMLDocEventArgs();
            args.selectedFileAndIndex = string.Format("{0},-1", m_fileName).Split(',');

            EventHandler<XMLDocEventArgs> handler = SyncWithTree;
            if (handler != null)
            {
                // raises the event. 
                handler(this, args);
            }
        }