Esempio 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();
 }
Esempio n. 2
0
        public void ResetTool()
        {
            _tool = _defaultTool;
            SSet.ClearSelection();
            lblToolRunning.Text = string.Format("{0}", _defaultTool.GetType().Name);

            this.SetToolbarRadioButton(tsbtnPan, null);
        }
Esempio n. 3
0
 private void removeEntityToolStripMenuItem_Click(object sender, EventArgs e)
 {
     PyCmd.sset.ForEach(x =>
     {
         if (x is SpotEntity)
         {
             _display.RemoveSpot(x as SpotEntity);
         }
     });
     SSet.ClearSelection();
     ValueBuffer.UpdateValues();
     Canvas.Invalidate();
 }
Esempio n. 4
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();
     }
 }