Пример #1
0
        /// <summary>
        /// 选中树节点后发生的事件
        /// 将当前选中节点中的控件对象设置为选中状态
        /// </summary>
        /// <param Name="sender"></param>
        /// <param Name="e"></param>
        void SVObjTreeView_AfterSelect(object sender, TreeViewEventArgs e)
        {
            ObjTreeNode node = e.Node as ObjTreeNode;

            if (node == null)
            {
                return;
            }

            SVPanel panel = node.objControl as SVPanel;

            if (panel == null)
            {
                return;
            }

            panel.Selected = true;
            panel.Refresh();
        }
Пример #2
0
        /// <summary>
        /// 单击树节点事件
        /// 清空当前选中节点对象的选中状态
        /// </summary>
        /// <param Name="sender"></param>
        /// <param Name="e"></param>
        void SVObjTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            ObjTreeNode node = this.SelectedNode as ObjTreeNode;

            if (node == null)
            {
                return;
            }

            SVPanel panel = node.objControl as SVPanel;

            if (panel == null)
            {
                return;
            }

            panel.Selected = false;
            panel.Refresh();
        }