public bool DoCommand(string _cmdName) { TreeListNode _fnode = treeList1.FocusedNode; if (_fnode != null) { object _value = _fnode.GetValue(this.treeListColumn1); if (MenuDefine.RunObjectCommand(_cmdName, _value)) { //刷新树 if (_fnode.ParentNode != null) { RefrashNode(_fnode.ParentNode); } else { this.treeList1.Nodes.Clear(); InitNodes(); InitConcept(); } } ; } Control _control = this.panel1.Controls.Count == 0 ? null : this.panel1.Controls[0]; if (_control is IControlMenu) { (_control as IControlMenu).DoCommand(_cmdName); } return(true); }
public bool DoCommand(string _cmdName) { TreeListNode _fnode = treeList1.FocusedNode; if (_cmdName == "查询指标") { //Find QueryGuideLineNode(_fnode); } else { if (_fnode != null) { object _value = _fnode.GetValue(this.treeListColumn1); if (MenuDefine.RunObjectCommand(_cmdName, _value)) { //刷新树 RefrashNode(_fnode.ParentNode); //InitNodes(); } ; } Control _control = this.panel1.Controls.Count == 0 ? null : this.panel1.Controls[0]; if (_control is IControlMenu) { (_control as IControlMenu).DoCommand(_cmdName); } } return(true); }
private IList <FrmMenuGroup> GetMenuGroups(string _pagename) { IList <FrmMenuGroup> _ret = new List <FrmMenuGroup>(); TreeListNode _fnode = treeList1.FocusedNode; if (_fnode != null) { object _value = _fnode.GetValue(this.treeListColumn1); FrmMenuGroup _mg = MenuDefine.GetMenuGroupByObject(_value); if (_mg != null) { _ret.Add(_mg); } } Control _control = this.panel1.Controls.Count == 0 ? null : this.panel1.Controls[0]; if (_control != null) { foreach (FrmMenuGroup _mg in MenuDefine.GetMenuGroupByControls(_control)) { if (_mg != null) { _ret.Add(_mg); } } } return(_ret); }