Ejemplo n.º 1
0
        /// <summary>
        /// 鼠标单击事件:用来显示边框
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void MouseClick(object sender, MouseEventArgs e)
        {
            if (!_isOpenDrag)
            {
                return;
            }
            Control ct = sender as Control;

            if (ct is TabPage)
            {
                return;
            }
            ct.Parent.Refresh();
            ct.BringToFront();
            _fc = new FrameControl(ct);
            ct.Parent.Controls.Add(_fc);
            _fc.Visible = true;
            _fc.Draw();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 鼠标单击事件:用来显示边框
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void MouseClick(object sender, MouseEventArgs e)
        {
            if ((Control.ModifierKeys & Keys.Control) == Keys.Control)
            {
                System.Diagnostics.Debug.WriteLine("Press Ctrl");
            }
            else
            {
                this.CancelSelectedControlEvent(this._currentControl);
                this._currentControl.Parent.Refresh();
            }
            this.SelectedControlEvent(this._currentControl);

            this._currentControl.BringToFront();
            var _fc = new FrameControl(this._currentControl);

            this._currentControl.Parent.Controls.Add(_fc);
            _fc.Visible = true;
            _fc.Draw();
        }