コード例 #1
0
        /// <summary>
        /// Finishes dragging, and invokes the EndResizing event.
        /// </summary>
        /// <param name="args">Mouse event arguments.</param>
        protected override void OnMouseUp(MouseEventArgs args)
        {
            if (args.Button == MouseButtons.Left)
            {
                this.dragging = false;

                if (EndResizing != null)
                {
                    EndResizing.Invoke(this);
                }
            }
        }
コード例 #2
0
        protected virtual void OnEndUpdating(IntPtr handle)
        {
            switch (_state)
            {
            case State.Moving:
                System.Diagnostics.Debug.WriteLine($"End moving");
                EndMoving?.Invoke(this, handle);
                break;

            case State.Resizing:
                System.Diagnostics.Debug.WriteLine($"End resizing");
                EndResizing?.Invoke(this, handle);
                break;

            default: break;
            }
            _state = State.None;
        }