コード例 #1
0
        public override void OnMouseDoubleClick(MouseEventArgs e)
        {
            if (!Enabled)
            {
                return;
            }
            _lastClickTime = 0;
            _buttons       = MouseButtons.None;

            if (ActiveControl != null && ActiveControl.IsMouseOver(CMain.MPoint) && ActiveControl != this)
            {
                if (ActiveControl == _clickedControl)
                {
                    ActiveControl.OnMouseDoubleClick(e);
                }
                else
                {
                    ActiveControl.OnMouseClick(e);
                }
            }
            else
            {
                if (ActiveControl == _clickedControl)
                {
                    base.OnMouseDoubleClick(e);
                }
                else
                {
                    base.OnMouseClick(e);
                }
            }
        }
コード例 #2
0
ファイル: MirScene.cs プロジェクト: jkloop45/Solution
        public override void OnMouseClick(MouseEventArgs e)
        {
            if (!Enabled)
            {
                return;
            }
            if (Buttons == e.Button)
            {
                if (LastClickTime + SystemInformation.DoubleClickTime >= Main.Time)
                {
                    OnMouseDoubleClick(e);
                    return;
                }
            }
            else
            {
                LastClickTime = 0;
            }

            if (ActiveControl != null && ActiveControl.IsMouseOver(e.Location) && ActiveControl != this)
            {
                ActiveControl.OnMouseClick(e);
            }
            else
            {
                base.OnMouseClick(e);
            }

            ClickedControl = ActiveControl;

            LastClickTime = Main.Time;
            Buttons       = e.Button;
        }
コード例 #3
0
        public override void OnMouseClick(MouseEventArgs e)
        {
            if (!Enabled)
            {
                return;
            }
            if (_buttons == e.Button)
            {
                if (_lastClickTime + SystemInformation.DoubleClickTime >= CMain.Time)
                {
                    OnMouseDoubleClick(e);
                    return;
                }
            }
            else
            {
                _lastClickTime = 0;
            }

            if (ActiveControl != null && ActiveControl.IsMouseOver(CMain.MPoint) && ActiveControl != this)
            {
                ActiveControl.OnMouseClick(e);
            }
            else
            {
                base.OnMouseClick(e);
            }

            _clickedControl = ActiveControl;

            _lastClickTime = CMain.Time;
            _buttons       = e.Button;
        }
コード例 #4
0
ファイル: MirScene.cs プロジェクト: jkloop45/Solution
        public override void OnMouseDoubleClick(MouseEventArgs e)
        {
            if (!Enabled)
            {
                return;
            }
            LastClickTime = 0;
            Buttons       = MouseButtons.None;

            if (ActiveControl != null && ActiveControl.IsMouseOver(e.Location) && ActiveControl != this)
            {
                if (ActiveControl == ClickedControl)
                {
                    ActiveControl.OnMouseDoubleClick(e);
                }
                else
                {
                    ActiveControl.OnMouseClick(e);
                }
            }
            else
            {
                if (ActiveControl == ClickedControl)
                {
                    base.OnMouseDoubleClick(e);
                }
                else
                {
                    base.OnMouseClick(e);
                }
            }
        }