public override void Refresh() { if ((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } var database = this.Object as Database; this.Text = "Database"; this.Name = database.Key; this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.Database); this.SelectedImageIndex = this.ImageIndex; if ((database.Tables != null) && (mTableCollectionNode == null)) { var dc = new TableCollectionController(database.Tables); //dc.Object = database.Tables; mTableCollectionNode = dc.Node; this.Nodes.Add(dc.Node); } if ((database.CustomViews != null) && (mCustomViewCollectionNode == null)) { var dc = new CustomViewCollectionController(database.CustomViews); //dc.Object = database.CustomViews; mCustomViewCollectionNode = dc.Node; this.Nodes.Add(dc.Node); } if ((database.CustomStoredProcedures != null) && (mCustomStoredProcedureCollectionNode == null)) { var dc = new CustomStoredProcedureCollectionController(database.CustomStoredProcedures); //dc.Object = database.CustomStoredProcedures; mCustomStoredProcedureCollectionNode = dc.Node; this.Nodes.Add(dc.Node); } //if ((database.CustomAggregates != null) && (mCustomAggregateCollectionNode == null)) //{ // var dc = new CustomAggregateCollectionController(database.CustomAggregates); // //dc.Object = database.CustomAggregates; // mCustomAggregateCollectionNode = dc.Node; // this.Nodes.Add(dc.Node); //} this.Controller.UIControl.Refresh(); this.Expand(); }
public override void Refresh() { if ((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } var database = this.Object as Database; this.Text = "Database"; this.Name = database.Key; this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.Database); this.SelectedImageIndex = this.ImageIndex; if ((database.Tables != null) && (mTableCollectionNode == null)) { var dc = new TableCollectionController(database.Tables); //dc.Object = database.Tables; mTableCollectionNode = dc.Node; this.Nodes.Add(dc.Node); } if((database.CustomViews != null) && (mCustomViewCollectionNode == null)) { var dc = new CustomViewCollectionController(database.CustomViews); //dc.Object = database.CustomViews; mCustomViewCollectionNode = dc.Node; this.Nodes.Add(dc.Node); } if((database.CustomStoredProcedures != null) && (mCustomStoredProcedureCollectionNode == null)) { var dc = new CustomStoredProcedureCollectionController(database.CustomStoredProcedures); //dc.Object = database.CustomStoredProcedures; mCustomStoredProcedureCollectionNode = dc.Node; this.Nodes.Add(dc.Node); } //if ((database.CustomAggregates != null) && (mCustomAggregateCollectionNode == null)) //{ // var dc = new CustomAggregateCollectionController(database.CustomAggregates); // //dc.Object = database.CustomAggregates; // mCustomAggregateCollectionNode = dc.Node; // this.Nodes.Add(dc.Node); //} this.Controller.UIControl.Refresh(); this.Expand(); }
public CustomStoredProcedureCollectionNode(CustomStoredProcedureCollectionController controller) : base(controller) { }