Beispiel #1
0
 public virtual void Remove(TableTreeNode _tableTreeNode)
 {
     if (this[getIndex(_tableTreeNode)] != null)
     {
         List.Remove(_tableTreeNode);
     }
 }
Beispiel #2
0
 public virtual TableTreeNode this[int Index]
 {
     get
     {
         TableTreeNode retval = null;
         if (List.Count > 0 && Index > -1 && Index < List.Count)
         {
             if (!string.IsNullOrEmpty(((TableTreeNode)List[Index]).Text))
             {
                 retval = (TableTreeNode)List[Index];
             }
         }
         return(retval);
     }
     set
     {
         if (List.Count >= 0 && Index > -1)
         {
             if (Index < List.Count)
             {
                 List.RemoveAt(Index);
                 List.Insert(Index, value);
             }
             else if (Index == List.Count)
             {
                 List.Add(value);
             }
             else
             {
                 for (int ii = List.Count; ii < Index; ii++)
                 {
                     List.Add(new TableTreeNode());
                 }
                 List.Add(value);
             }
         }
     }
 }
 private void m_serverExplorer_TableSelected(object sender, TableTreeEventArgs e)
 {
     // display selected tables for compare
     m_currentSelectedTableTreeNode = e.TableTreeNode;
     if (sourceTableName == string.Empty)
     {
         sourceTableName = e.TableTreeNode.FullTablePath;
         selectedTables[0] = e.TableTreeNode;
         this.toolStripStatusLabel1.Text = "Source Table: " + sourceTableName + "...";
     }
     else if (targetTableName == string.Empty)
     {
         targetTableName = e.TableTreeNode.FullTablePath;
         selectedTables[1] = e.TableTreeNode;
         this.toolStripStatusLabel2.Text = "Target Table: " + targetTableName + "...";
     }
     if (sourceTableName != string.Empty && targetTableName != string.Empty)
     {
         selectedTablesMenuItem.Enabled = true;
     }
 }
 private void m_serverExplorer_TableUnSelected(object sender, TableTreeEventArgs e)
 {
     // update display of selected table names
     m_currentSelectedTableTreeNode = null;
     if (sourceTableName.Equals(e.TableTreeNode.FullTablePath))
     {
         sourceTableName = string.Empty;
         selectedTables[0] = null;
         selectedTablesMenuItem.Enabled = false;
         this.toolStripStatusLabel1.Text = string.Empty;
     }
     if (targetTableName.Equals(e.TableTreeNode.FullTablePath))
     {
         targetTableName = string.Empty;
         selectedTables[1] = null;
         selectedTablesMenuItem.Enabled = false;
         this.toolStripStatusLabel2.Text = string.Empty;
     }
     if (sourceTableName == string.Empty && targetTableName == string.Empty)
     {
         m_serverExplorer.ClearSelected(SQLServerExplorer.SelectedTypes.Tables);
     }
 }
 public virtual int Add(TableTreeNode _tableTreeNode)
 {
     return (this[getIndex(_tableTreeNode)] == null) ? List.Add(_tableTreeNode) : getIndex(_tableTreeNode);
 }
 public virtual void InsertAt(int index, TableTreeNode _tableTreeNode)
 {
     List.Insert(index, _tableTreeNode);
 }
 public virtual void Remove(TableTreeNode _tableTreeNode)
 {
     if (this[getIndex(_tableTreeNode)] != null)
     {
         List.Remove(_tableTreeNode);
     }
 }
 public virtual int getIndex(TableTreeNode _tableTreeNode)
 {
     return List.IndexOf(_tableTreeNode);
 }
Beispiel #9
0
 public virtual int Add(TableTreeNode _tableTreeNode)
 {
     return((this[getIndex(_tableTreeNode)] == null) ? List.Add(_tableTreeNode) : getIndex(_tableTreeNode));
 }
Beispiel #10
0
 public virtual void InsertAt(int index, TableTreeNode _tableTreeNode)
 {
     List.Insert(index, _tableTreeNode);
 }
Beispiel #11
0
 public virtual int getIndex(TableTreeNode _tableTreeNode)
 {
     return(List.IndexOf(_tableTreeNode));
 }