Пример #1
0
        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);
        }
Пример #2
0
        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);
        }