Esempio n. 1
0
 private void ImagepictureBox_MouseDown(object sender, MouseEventArgs e)
 {
     if (bSizing == null)
     {
         bDragging = null;
         foreach (var el in m_rtList)
         {
             Rectangle rt = el.Rect;
             rt.Inflate(-iMul, -iMul);
             if (rt.Contains(e.Location))
             {
                 bDragging = el;
                 Cursor = iCursorType = Cursors.SizeAll;
                 break;
             }
         }
     }
     if (bDragging == null)
     {
         bSizing = null;
         foreach (var el in m_rtList)
         {
             if (el.Rect.Contains(e.Location))
             {
                 iDraggingType = DetectPointOnRect(el.Rect, e.Location);
                 if (iDraggingType >= 1 && iDraggingType <= 8)
                 {
                     bSizing = el;
                     Cursor = iCursorType = GetCursorByType(iDraggingType);
                     break;
                 }
             }
         }
     }
     pOld = e.Location;
 }
Esempio n. 2
0
 private void ImagepictureBox_MouseUp(object sender, MouseEventArgs e)
 {
     bDragging = null;
     bSizing = null;
 }
Esempio n. 3
0
 private void DeleteButton_Click(object sender, EventArgs e)
 {
     GrabRect rt = VideopropertyGrid.SelectedObject as GrabRect;
     m_rtList.Remove(rt);
     bDragging = null;
     bSizing = null;
     VideopropertyGrid.SelectedObject = null;
     RedrawItems();
 }