private void QualificationAuthForm_Load(object sender, EventArgs e) { DepositoryResourceCatlog.InitModuleCatlog(Modeltree); Modeltree.CollapseAll(); List <String> Codes = DepositoryQualificationAuth.InitTestRoomQualificationAuth(FolderCode); if (Modeltree.Nodes.Count > 0) { TreeNode NextNode = Modeltree.Nodes[0]; NextNode.Expand(); while (NextNode != null) { if (Codes.Contains(NextNode.Name)) { if (NextNode.Parent != null) { NextNode.Parent.Expand(); } NextNode.Checked = true; } if (NextNode.FirstNode != null) { NextNode = NextNode.FirstNode; } else if (NextNode.NextNode != null) { NextNode = NextNode.NextNode; } else { if (NextNode.Parent != null) { TreeNode tempNode = NextNode.Parent; while (tempNode.NextNode == null) { if (tempNode.Parent == null) { break; } tempNode = tempNode.Parent; } NextNode = tempNode.NextNode; } else { NextNode = NextNode.Parent; } } } } Modeltree.AfterCheck += new TreeViewEventHandler(Modeltree_AfterCheck); }
private void DataFieldSelector_Load(object sender, EventArgs e) { DepositoryResourceCatlog.InitModuleCatlog(ModelView); ModelView.SelectedNode = ModelView.TopNode; label2.BackColor = Color.LightPink; FpSpread.CellClick += new CellClickEventHandler(FpSpread_CellClick); }
public void InitModuleCatlog() { if (Yqun.Common.ContextCache.ApplicationContext.Current.IsAdministrator) { DepositoryResourceCatlog.InitModuleCatlog(TemplateTree); } else { DepositoryResourceCatlog.InitModuleCatlog(TemplateTree); } TemplateTree.SelectedNode = TemplateTree.TopNode; }