public void RefreshSelectedNode(ObjectWithId owid) { if (base.SelectedNode != null) { if ((base.SelectedNode.GetType() == typeof(OrganizationNode)) && (owid.GetType() == typeof(Organization))) { base.Nodes.Add(new OrganizationNode((Organization) owid)); } else { System.Windows.Forms.TreeNode selectedNode = base.SelectedNode; selectedNode.Nodes.Clear(); selectedNode.Nodes.Add(""); (selectedNode as IExpandableNode).OnBeforeExpand(); selectedNode.Expand(); if (owid != null) { foreach (System.Windows.Forms.TreeNode node2 in selectedNode.Nodes) { if ((node2.get_Tag() != null) && owid.Equals(node2.get_Tag())) { base.SelectedNode.EnsureVisible(); base.set_SelectedNode(node2); break; } } } } } }
private void ShowView(ObjectWithId owid) { if ((owid == null) || !this.views.ContainsKey(owid.GetType())) { this.UnvisibleShowView(); } else { BaseView view = (BaseView) this.views[owid.GetType()]; view.ClearView(); this.ShowView(view); view.FillView(owid); view.ObjectWithId = owid; } }
private void ShowView(ObjectWithId owid, System.Type childType) { if (((owid != null) && (childType != null)) && this.views.ContainsKey((long) (owid.GetType().GetHashCode() + childType.GetHashCode()))) { Manager.ChiefMainForm.SuspendLayout(); BaseView view = (BaseView) this.views[(long) (owid.GetType().GetHashCode() + childType.GetHashCode())]; view.ClearView(); this.ShowView(view); view.FillView(owid); view.ObjectWithId = owid; Manager.ChiefMainForm.ResumeLayout(false); } }