/// <summary> /// Makes a tree node from this object. /// </summary> /// <returns></returns> public override TreeNode toTreeNode() { TreeNode Node = new TreeNode(); Node.Text = Connection.Name; Base.SetNodeImageFromQualifier(Node, Qualifier, IsGhost); //---------------------------------------------------------------- Node.Nodes.Add(TableCont.toTreeNode()); Node.Nodes.Add(ViewCont.toTreeNode()); Node.Nodes.Add(ProcedureCont.toTreeNode()); Node.Nodes.Add(FunctionCont.toTreeNode()); //---------------------------------------------------------------- Node.Tag = this; if (IsGhost) { Node.ForeColor = Color.Gray; } return(Node); }
/// <summary> /// Qualifies this object against another one. /// </summary> /// <param name="Analyzer">The analyzer.</param> /// <param name="target">The target.</param> /// <param name="dir">The direction.</param> /// <returns></returns> public Modification qualifyVersus(BaseAnalyzer Analyzer, Base target, Direction dir) { Qualifier = Modification.None; Analyzer.Progress_Max = 4; Analyzer.Progress_Current = 0; // Qualify tables Analyzer.Progress_Current++; Analyzer.Status = "Qualifying tables..."; if (TableCont.qualifyVersus(target.TableCont, dir) != Modification.None) { Qualifier = Modification.Modified; } // Qualify views Analyzer.Progress_Current++; Analyzer.Status = "Qualifying views..."; if (ViewCont.qualifyVersus(target.ViewCont, dir) != Modification.None) { Qualifier = Modification.Modified; } // Qualify procedures Analyzer.Progress_Current++; Analyzer.Status = "Qualifying procedures..."; if (ProcedureCont.qualifyVersus(target.ProcedureCont, dir) != Modification.None) { Qualifier = Modification.Modified; } // Qualify functions Analyzer.Progress_Current++; Analyzer.Status = "Qualifying functions..."; if (FunctionCont.qualifyVersus(target.FunctionCont, dir) != Modification.None) { Qualifier = Modification.Modified; } Analyzer.Status = "Qualifying done..."; Analyzer.Progress_Current = 0; return(Qualifier); }