Exemplo n.º 1
0
 public override void MouseClickHandler(object sender, MouseEventArgs e)
 {
     if (Viewer.Current.ShiftDown)
     {
         if (_hover == null)
         {
         }
         else
         {
             SSet.AddSelection(_hover);
         }
     }
     else
     {
         if (_hover == null)
         {
             SSet.ClearSelection();
         }
         else
         {
             SSet.Select(_hover);
         }
     }
     Viewer.Current.Canvas.Invalidate();
 }
Exemplo n.º 2
0
 public override void MouseHoverHandler(object sender, MouseEventArgs e)
 {
     _cursor = e.Location;
     if (e.Button == MouseButtons.Left)
     {
         if (_isDragging == false)
         {
             _draggingStartPoint = e.Location;
         }
         _isDragging = true;
         if (e.X >= _draggingStartPoint.X)
         {
             _isCrossing = false;
         }
         else
         {
             _isCrossing = true;
         }
     }
     else if (e.Button == MouseButtons.None)
     {
         if (_isDragging == true)
         {
             _draggingEndPoint = e.Location;
             var ready = HandleWindowOrCross();  // *************
             if (Viewer.Current.ShiftDown)
             {
                 SSet.AddSelection(ready);
             }
             else
             {
                 SSet.Select(ready);
             }
         }
         _isDragging = false;
     }
     if (_isDragging)
     {
         Viewer.Current.Canvas.Invalidate();
     }
     else
     {
         Viewer.Current.Canvas.Invalidate();
     }
 }