Ejemplo n.º 1
0
        /// <summary>
        /// Starts dragging, and invokes the StartMoving event.
        /// </summary>
        /// <param name="args">Mouse event arguments.</param>
        protected override void OnMouseDown(MouseEventArgs args)
        {
            if (args.Button == MouseButtons.Left)
            {
                this.isDragging   = true;
                this.lastLocation = args.Position;

                if (StartMoving != null)
                {
                    StartMoving.Invoke(this);
                }
            }
        }
Ejemplo n.º 2
0
 private void OnStartMoving()
 {
     StartMoving?.Invoke(this, new EventArgs());
 }
Ejemplo n.º 3
0
 protected virtual void OnStartMoving(IntPtr handle)
 {
     System.Diagnostics.Debug.WriteLine($"Start moving");
     _state = State.Moving;
     StartMoving?.Invoke(this, handle);
 }