Exemplo n.º 1
0
        private void lvLUGBETA_MouseUp(object sender, MouseEventArgs e)
        {
            ContextMenu cm       = null;
            ListView    lvSender = sender as ListView;

            if (lvSender != null && e.Button == MouseButtons.Right)
            {
                ListViewHitTestInfo hti = lvSender.HitTest(e.X, e.Y);

                if (memberType == LUGAPI.LUGType.Dummy)
                {
                    ListViewItem selectedItem = lvLUGBETA.SelectedItems[0];
                    if (selectedItem.Tag != null && selectedItem.Tag is LACTreeNode)
                    {
                        LACTreeNode node = selectedItem.Tag as LACTreeNode;
                        if (node != null)
                        {
                            LUGPlugIn plugin = node.Plugin as LUGPlugIn;
                            cm = plugin.GetTreeContextMenu(node);
                        }
                    }
                }
                else
                {
                    cm = BuildLUGContextMenu();
                }
                cm.Show(lvSender, new Point(e.X, e.Y));
            }
        }
Exemplo n.º 2
0
    public NewGroupDlg(IPlugInContainer container, StandardPage parentPage,Hostinfo hn, IPlugIn plugin)
    : base(container, parentPage)
    {
        InitializeComponent();
        
        // Create an instance of a ListView column sorter and assign it
        // to the ListView control.
        lvwColumnSorter = new ListViewColumnSorter();
        this.lvMembers.ListViewItemSorter = lvwColumnSorter;
        
        this.ButtonCancel.Text = "Cancel";
        
        this.ButtonOK.Text = "Create";
        
        this.SetAllValueChangedHandlers(this);
        
        localParent = (LUGPage)parentPage;
        
        if (localParent == null)
        {
            throw new ArgumentException("NewGroupDlg constructor: (LUGPage) parentPage == null");
        }

        this._hn = hn;
        this._plugin = (LUGPlugIn)plugin;

        ((EditDialog)this).btnApply.Visible = false;
        users = new Hashtable();
        
        this.tbGroupName.Select();
        
    }
Exemplo n.º 3
0
        public NewGroupDlg(IPlugInContainer container, StandardPage parentPage, Hostinfo hn, IPlugIn plugin)
            : base(container, parentPage)
        {
            InitializeComponent();

            // Create an instance of a ListView column sorter and assign it
            // to the ListView control.
            lvwColumnSorter = new ListViewColumnSorter();
            this.lvMembers.ListViewItemSorter = lvwColumnSorter;

            this.ButtonCancel.Text = "Cancel";

            this.ButtonOK.Text = "Create";

            this.SetAllValueChangedHandlers(this);

            localParent = (LUGPage)parentPage;

            if (localParent == null)
            {
                throw new ArgumentException("NewGroupDlg constructor: (LUGPage) parentPage == null");
            }

            this._hn     = hn;
            this._plugin = (LUGPlugIn)plugin;

            ((EditDialog)this).btnApply.Visible = false;
            users = new Hashtable();

            this.tbGroupName.Select();
        }