public override void Refresh() { if ((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } var root = (ModelRoot)this.Object; this.Text = root.CompanyName + (root.ProjectName == "" ? "" : ".") + root.ProjectName; this.Name = root.Key; this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.Domain); this.SelectedImageIndex = this.ImageIndex; if ((root.Database != null) && (_databaseNode == null)) { var dc = new DatabaseController(root.Database); _databaseNode = dc.Node; this.Nodes.Add(dc.Node); } //if ((root.UserInterface != null) && (mUserInterfaceNode == null)) //{ // UserInterfaceController dc = new UserInterfaceController(root.UserInterface); // mUserInterfaceNode = dc.Node; // this.Nodes.Add(dc.Node); //} this.Expand(); }
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 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(); }
private void RefreshDeep(ModelObjectTreeNode node) { try { if (node == null) return; node.Refresh(); foreach (ModelObjectTreeNode child in node.Nodes) { this.RefreshDeep(child); if (DateTime.Now.Millisecond % 6 == 0) System.Windows.Forms.Application.DoEvents(); } } catch (Exception ex) { throw; } }
public override void Refresh() { if ((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } this.Text = ((UserInterface)this.Object).Name; this.Name = ((UserInterface)this.Object).Key; this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.UI); this.SelectedImageIndex = this.ImageIndex; var ui = (UserInterface)this.Object; if (ui.Packages != null && mPackagesCollectionNode == null) { var pc = new PackageCollectionController(ui.Packages); //dc.Object = database.Tables; mPackagesCollectionNode = pc.Node; this.Nodes.Add(pc.Node); } }
public override void Refresh() { try { if ((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } var tableComponent = ((TableComponent)this.Object); this.Text = tableComponent.ToString(); this.Name = tableComponent.Key; this.SelectedImageIndex = this.ImageIndex; if ((tableComponent.Columns != null) && (mColumnCollectionNode == null)) { var element = new ColumnCollectionController(tableComponent.Columns); mColumnCollectionNode = element.Node; this.Nodes.Add(element.Node); } else { mColumnCollectionNode.Refresh(); } //Update the TableCollection list if (this.Parent != null) ((TableComponentCollectionNode)this.Parent).Refresh(); } catch (Exception ex) { throw; } }
private void RefreshDeep(ModelObjectTreeNode node) { try { if (node == null) { return; } node.Refresh(); foreach (ModelObjectTreeNode child in node.Nodes) { this.RefreshDeep(child); if (DateTime.Now.Millisecond % 6 == 0) { System.Windows.Forms.Application.DoEvents(); } } } catch (Exception ex) { throw; } }
public override void Refresh() { if((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } var customView = ((CustomView)this.Object); this.Text = customView.ToString(); this.Name = customView.Key; this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.CustomView); this.SelectedImageIndex = this.ImageIndex; this.ToolTipText = customView.Description; if((customView.Columns != null) && (mColumnCollectionNode == null)) { var element = new CustomViewColumnCollectionController(customView.Columns); mColumnCollectionNode = element.Node; this.Nodes.Add(element.Node); } //if((customView.Parameters != null) && (mParametersCollectionNode == null)) //{ // ParameterCollectionController element = new ParameterCollectionController(customView.Parameters); // mParametersCollectionNode = element.Node; // this.Nodes.Add(element.Node); //} //Update the CustomViewCollection list if(this.Parent != null) ((CustomViewCollectionNode)this.Parent).Refresh(); }
public override void Refresh() { try { if ((this.TreeView != null) && (this.TreeView.InvokeRequired)) { this.TreeView.Invoke(new EmptyDelegate(this.Refresh)); return; } var table = ((Table)this.Object); this.Text = table.ToString(); this.Name = table.Key; if (!table.Generated) this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.TableNonGen); else if (table.AssociativeTable) this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.TableAssociative); else if (table.IsTypeTable) this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.TableType); else if (table.ParentTable != null) this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.TableDerived); else this.ImageIndex = ImageHelper.GetImageIndex(TreeIconConstants.Table); this.SelectedImageIndex = this.ImageIndex; this.ToolTipText = table.Description; //Columns if ((table.Columns != null) && (_columnCollectionNode == null)) { var element = new ColumnCollectionController(table.Columns); _columnCollectionNode = element.Node; this.Nodes.Add(element.Node); } else _columnCollectionNode.Refresh(); //Retrieve rules if ((table.CustomRetrieveRules != null) && (_customRetrieveRulesNode == null)) { var element = new CustomRetrieveRuleCollectionController(table.CustomRetrieveRules); _customRetrieveRulesNode = element.Node; this.Nodes.Add(element.Node); } else _customRetrieveRulesNode.Refresh(); //Composites //if (table.CompositeList != null) //{ // TableCompositeCollectionController element = null; // if (mCompositeCollectionNode == null) // { // element = new TableCompositeCollectionController(((Table)_object).CompositeList); // mCompositeCollectionNode = element.Node; // this.Nodes.Add(element.Node); // } // else // { // element = (TableCompositeCollectionController)mCompositeCollectionNode.Controller; // } // mCompositeCollectionNode.Nodes.Clear(); // element.Node.Refresh(); //} //Components if (table.ComponentList != null) { TableComponentCollectionController element = null; if (_componentCollectionNode == null) { element = new TableComponentCollectionController(((Table)_object).ComponentList); _componentCollectionNode = element.Node; this.Nodes.Add(element.Node); } else { element = (TableComponentCollectionController)_componentCollectionNode.Controller; } _componentCollectionNode.Nodes.Clear(); element.Node.Refresh(); } ////Relations //if (table.Relationships != null) //{ // RelationCollectionController element = null; // if (_relationshipCollectionNode == null) // { // element = new RelationCollectionController(((Table)_object).Relationships); // _relationshipCollectionNode = element.Node; // this.Nodes.Add(element.Node); // } // else // { // element = (RelationCollectionController)_relationshipCollectionNode.Controller; // } // _relationshipCollectionNode.Nodes.Clear(); // element.Node.Refresh(); //} //Update the TableCollection list if (this.Parent != null) ((TableCollectionNode)this.Parent).Refresh(); } catch (Exception ex) { throw; } }