Esempio n. 1
0
 private void form_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Left)
     {
         if (IsMoving || IsCreating)
         {
             EndRegionSelection();
         }
     }
     else if (e.Button == MouseButtons.Right)
     {
         if (IsCreating)
         {
             DeleteCurrentShape();
             EndRegionSelection();
         }
         else if (form.IsAnnotationMode)
         {
             RunAction(Config.RegionCaptureActionRightClick);
         }
         else if (IsShapeIntersect())
         {
             DeleteIntersectShape();
         }
         else
         {
             form.Close();
         }
     }
     else if (e.Button == MouseButtons.Middle)
     {
         if (form.IsEditorMode)
         {
             EndPanning();
         }
         else
         {
             RunAction(Config.RegionCaptureActionMiddleClick);
         }
     }
     else if (e.Button == MouseButtons.XButton1)
     {
         RunAction(Config.RegionCaptureActionX1Click);
     }
     else if (e.Button == MouseButtons.XButton2)
     {
         RunAction(Config.RegionCaptureActionX2Click);
     }
 }