Esempio n. 1
0
 /// <summary>
 /// Handler for MouseUp events
 /// </summary>
 /// <param name="e">MouseEventArgs object that describes this event</param>
 protected override void OnMouseUp(MouseEventArgs e)
 {
     base.OnMouseUp(e);
     if(e.Button == MouseButtons.Right)
     {
         contextMenu.IsOpen = true;
     }
     else if(e.Button == MouseButtons.Left)
     {
         relativeLocation = CardWFItem.RelativeLocations.Outside;
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Handler for mouse down events
 /// </summary>
 /// <param name="e">MouseEventArgs object that describes this event</param>
 protected override void OnMouseDown(MouseEventArgs e)
 {
     base.OnMouseDown(e);
     if(e.Button == MouseButtons.Left)
     {
         CardWFItem ci = QslCard.GetSelectedItem();
         if(ci != null)
         {
             relativeLocation = ci.GetRelativeLocation(
                 e.X - CardLocation.X, e.Y - CardLocation.Y);
             cursorDownLocation = new Point(
                 e.X - CardLocation.X, e.Y - CardLocation.Y);
             originalItemRectangle = new Rectangle(
                 ci.X, ci.Y, ci.Width, ci.Height);
         }
     }
 }