示例#1
0
文件: RowLabel.cs 项目: robness/Vixen
        protected override void OnMouseClick(MouseEventArgs e)
        {
            base.OnMouseClick(e);

            if (MousePosContainsResizeBar(e))
            {
                return;
            }


            if ((ParentRow.ChildRows.Count > 0) && IconArea.Contains(e.Location))
            {
                // if it's within the toggle button, toggle the tree
                _TreeToggled();
                Invalidate();
            }
            else if (LabelArea.Contains(e.Location) || ((ParentRow.ChildRows.Count == 0) && IconArea.Contains(e.Location)))
            {
                _LabelClicked(Form.ModifierKeys);
            }
        }
示例#2
0
文件: RowLabel.cs 项目: robness/Vixen
        protected override void OnMouseUp(MouseEventArgs e)
        {
            base.OnMouseUp(e);

            if (e.Button == MouseButtons.Left)
            {
                if (Resizing)
                {
                    _HeightResized();
                }
                Resizing = false;
            }
            if (e.Button == MouseButtons.Right)
            {
                if (LabelArea.Contains(e.Location) || ((ParentRow.ChildRows.Count == 0) && IconArea.Contains(e.Location)))
                {
                    _LabelClicked(Form.ModifierKeys);
                }
                _RowContextMenuSelect();
            }
        }