Пример #1
0
 private void StickyNoteForm_MouseUp(object sender, MouseEventArgs e)
 {
     if (isResizingWidth != ResizingWidth.None || isResizingHeight != ResizingHeight.None)
     {
         _note.StickyNoteSize = Size;
         isResizingWidth      = ResizingWidth.None;
         isResizingHeight     = ResizingHeight.None;
     }
 }
Пример #2
0
 private void StickyNoteForm_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.X < BORDER_THICKNESS)
     {
         isResizingWidth = ResizingWidth.Left;
     }
     else if (e.X > ClientSize.Width - BORDER_THICKNESS)
     {
         isResizingWidth = ResizingWidth.Right;
     }
     if (e.Y < BORDER_THICKNESS)
     {
         isResizingHeight = ResizingHeight.Top;
     }
     else if (e.Y > ClientSize.Height - BORDER_THICKNESS)
     {
         isResizingHeight = ResizingHeight.Bottom;
     }
     mouseDownPoint  = PointToScreen(e.Location);
     mouseDownWidth  = Width;
     mouseDownHeight = Height;
 }