public override void Refresh() { if ((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } var customRetrieveRule = (CustomRetrieveRule)this.Object; //this.Text = this.Object.ToString(); //this.Name = this.Object.Key; this.ToolTipText = customRetrieveRule.Description; this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.CustomRetrieveRule); this.SelectedImageIndex = this.ImageIndex; this.Text = customRetrieveRule.Name; if (this.Parent != null) ((CustomRetrieveRuleCollectionController)((CustomRetrieveRuleCollectionNode)this.Parent).Controller).Refresh(); if ((customRetrieveRule.Parameters != null) && (mParameterCollectionNode == null)) { var element = new ParameterCollectionController(customRetrieveRule.Parameters); mParameterCollectionNode = element.Node; this.Nodes.Add(element.Node); } //Update the CustomRetrieveRuleCollection list if (this.Parent != null) ((CustomRetrieveRuleCollectionNode)this.Parent).Refresh(); }
public override void Refresh() { if ((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } var customRetrieveRule = (CustomRetrieveRule)this.Object; //this.Text = this.Object.ToString(); //this.Name = this.Object.Key; this.ToolTipText = customRetrieveRule.Description; this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.CustomRetrieveRule); this.SelectedImageIndex = this.ImageIndex; this.Text = customRetrieveRule.Name; if (this.Parent != null) { ((CustomRetrieveRuleCollectionController)((CustomRetrieveRuleCollectionNode)this.Parent).Controller).Refresh(); } if ((customRetrieveRule.Parameters != null) && (mParameterCollectionNode == null)) { var element = new ParameterCollectionController(customRetrieveRule.Parameters); mParameterCollectionNode = element.Node; this.Nodes.Add(element.Node); } //Update the CustomRetrieveRuleCollection list if (this.Parent != null) { ((CustomRetrieveRuleCollectionNode)this.Parent).Refresh(); } }
public ParameterCollectionNode(ParameterCollectionController controller) : base(controller) { }
public override void Refresh() { if ((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } var customView = ((CustomStoredProcedure)this.Object); this.Text = customView.ToString(); this.Name = customView.Key; this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.CustomStoredProcedure); this.SelectedImageIndex = this.ImageIndex; this.ToolTipText = customView.Description; if ((customView.Columns != null) && (mColumnCollectionNode == null)) { var element = new CustomStoredProcedureColumnCollectionController(customView.Columns); mColumnCollectionNode = element.Node; this.Nodes.Add(element.Node); } if ((customView.Parameters != null) && (mParametersCollectionNode == null)) { var element = new ParameterCollectionController(customView.Parameters); mParametersCollectionNode = element.Node; this.Nodes.Add(element.Node); } //Update the CustomStoredProcedureCollection list if (this.Parent != null) ((CustomStoredProcedureCollectionNode)this.Parent).Refresh(); }