Inheritance: System.Windows.Forms.MouseEventArgs
コード例 #1
0
ファイル: FormChrome.cs プロジェクト: pvginkel/CustomChrome
        protected internal virtual void OnNonClientMouseUp(NonClientMouseEventArgs e)
        {
            var ev = NonClientMouseUp;

            if (ev != null)
            {
                ev(this, e);
            }
        }
コード例 #2
0
        void _formChrome_NonClientMouseUp(object sender, NonClientMouseEventArgs e)
        {
            if (!CaptureStart.HasValue)
            {
                return;
            }

            ProcessMouseUp();
        }
コード例 #3
0
        private void WmNCLButtonUp(ref Message msg)
        {
            var pt   = PointToClient(new Point(msg.LParam.ToInt32()));
            var args = new NonClientMouseEventArgs(
                MouseButtons.Left, 1, pt.X, pt.Y, 0, msg.WParam.ToInt32()
                );

            _chrome.OnNonClientMouseUp(args);

            if (!args.Handled)
            {
                base.WndProc(ref msg);
            }

            msg.Result = (IntPtr)1;
        }
コード例 #4
0
        void _formChrome_NonClientMouseDown(object sender, NonClientMouseEventArgs e)
        {
            var state = new ButtonStates(this);

            if (state.OverButton != ChromeButton.None || state.OverExtraButton != null)
            {
                _formChrome.BeginUpdate();

                SetOverButton(ChromeButton.None);
                SetOverButton(null);
                SetDownButton(state.OverButton);
                SetDownButton(state.OverExtraButton);

                CaptureStart = e.Location;
                Form.Capture = true;

                _formChrome.EndUpdate();
            }
        }
コード例 #5
0
        protected internal virtual void OnNonClientMouseUp(NonClientMouseEventArgs e)
        {
            var ev = NonClientMouseUp;

            if (ev != null)
                ev(this, e);
        }
コード例 #6
0
        private void WmNCLButtonUp(ref Message msg)
        {
            var pt = PointToClient(new Point(msg.LParam.ToInt32()));
            var args = new NonClientMouseEventArgs(
                MouseButtons.Left, 1, pt.X, pt.Y, 0, msg.WParam.ToInt32()
            );

            _chrome.OnNonClientMouseUp(args);

            if (!args.Handled)
                base.WndProc(ref msg);

            msg.Result = (IntPtr)1;
        }
コード例 #7
0
        void _formChrome_NonClientMouseUp(object sender, NonClientMouseEventArgs e)
        {
            if (!CaptureStart.HasValue)
                return;

            ProcessMouseUp();
        }
コード例 #8
0
        void _formChrome_NonClientMouseDown(object sender, NonClientMouseEventArgs e)
        {
            var state = new ButtonStates(this);

            if (state.OverButton != ChromeButton.None || state.OverExtraButton != null)
            {
                _formChrome.BeginUpdate();

                SetOverButton(ChromeButton.None);
                SetOverButton(null);
                SetDownButton(state.OverButton);
                SetDownButton(state.OverExtraButton);

                CaptureStart = e.Location;
                Form.Capture = true;

                _formChrome.EndUpdate();
            }
        }
コード例 #9
0
        void _formChrome_NonClientMouseDown(object sender, NonClientMouseEventArgs e)
        {
            var state = new ButtonStates(this);

            if (state.OverButton != ChromeButton.None)
            {
                SetOverButton(ChromeButton.None);
                SetDownButton(state.OverButton);

                CaptureStart = e.Location;
                Form.Capture = true;

                FormChrome.PaintNonClientArea();
            }
        }