Example #1
0
        private void tbtnAttribute_Click(object sender, EventArgs e)
        {
            if (this.tvUserControl.SelectedNode == null)
            {
                return;
            }
            if (this.lvClient.SelectedItems.Count <= 0)
            {
                return;
            }
            var tmpTreeNode = (BaseUserControlTreeNode)tvUserControl.SelectedNode;
            var key         = lvClient.SelectedItems[0].SubItems[1].Text;

            if (tmpTreeNode.NodeType == WorkConst.UserControl_Child + "#")
            {
                lvClient.ContextMenuStrip = lvcmUserControl;
                var f = new FrmUserControls(UserInfo.Id, UserInfo.UserName, key);
                f.ShowDialog();
            }
            else
            {
                if (tmpTreeNode.NodeType == WorkConst.UserControl_Main + "#")
                {
                    //lvClient.ContextMenuStrip = lvcmMainUserCtrl;
                    lvClient.ContextMenuStrip = lvcmMainUserControl;
                    var f = new FrmMainUserControl(UserInfo.Id, UserInfo.UserName, WorkConst.STATE_MOD, key);
                    f.ShowDialog();
                }
                else
                {
                    lvClient.ContextMenuStrip = null;
                }
            }
        }
        private void lvUserControls_DoubleClick(object sender, EventArgs e)
        {
            if (this.lvUserControls.SelectedItems.Count <= 0)
            {
                return;
            }
            var key = lvUserControls.SelectedItems[0].SubItems[1].Text;
            var f   = new FrmUserControls(UserId, UserName, key);

            f.ShowDialog();
        }
Example #3
0
        private void lvModifyUctoolStripMenuItem2_Click(object sender, EventArgs e)
        {
            if (this.lvClient.SelectedItems.Count <= 0)
            {
                return;
            }
            var key = lvClient.SelectedItems[0].SubItems[1].Text;
            var f   = new FrmUserControls(UserInfo.Id, UserInfo.UserName, key);

            f.ShowDialog();
        }
Example #4
0
        private void ModifyUcToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var f = new FrmUserControls(UserInfo.Id, UserInfo.UserName, NowNode.NodeId);

            f.ShowDialog();
        }