/// <summary> /// 刷新配置树 /// </summary> void RefreshConfigTree() { treeConfig.Nodes.Clear(); SYS_SYSTEMCONFIG obj = new SYS_SYSTEMCONFIG(); obj.ID = -1; obj.KEY = "系统配置"; TreeListNode root = treeConfig.AppendNode(new object[] { obj.KEY }, obj.ID); root.Tag = obj; List <SYS_SYSTEMCONFIG> cnfgs = ConfigService.Configs(); foreach (SYS_SYSTEMCONFIG cnfg in cnfgs) { //TreeListNode node = treeConfig.AppendNode(new object[] { (null == cnfg.DESCRIPTION || "" == cnfg.DESCRIPTION) ? cnfg.KEY : cnfg.DESCRIPTION }, root); TreeListNode node = treeConfig.AppendNode(new object[] { cnfg.DESCRIPTION + "(" + cnfg.KEY + ")" }, root); node.Tag = cnfg; } treeConfig.ExpandAll(); }