private void CornerCheck_MouseMove(object sender, MouseEventArgs e) { if (AllowSizing) { var sizingRect = Skin.SizingPadding; if (LeftCornerCursor == null) { sizingRect.Left = 0; } if (RightCornerCursor == null) { sizingRect.Right = 0; } if (TopCursor == null) { sizingRect.Top = 0; } ResizingClickPosition SizeTest = TestResizingClickPosition(e.Location, Size.Width, sizingRect); if (e.Clicks == 1 && e.Button == MouseButtons.Left) { if (SizingMouseDown != null) { SizingMouseDown(SizeTest, e); } } else { if (SizingMouseMove != null) { SizingMouseMove(SizeTest, e); } } } }
private void BottomSizingClick(ResizingClickPosition Type, MouseEventArgs e) { if (Type == ResizingClickPosition.LeftCorner) { ForceParentCommand(SystemCommands.DnLeftSize); } else if (Type == ResizingClickPosition.RightCorner) { ForceParentCommand(SystemCommands.DnRightSize); } else { ForceParentCommand(SystemCommands.DnSize); } }
private void TopSizingClick(ResizingClickPosition Type, MouseEventArgs e) { if (Type == ResizingClickPosition.LeftCorner) { ForceParentCommand(SystemCommands.UpLeftSize); } else if (Type == ResizingClickPosition.RightCorner) { ForceParentCommand(SystemCommands.UpRightSize); } else if (Type == ResizingClickPosition.TopSizing) { ForceParentCommand(SystemCommands.UpSize); } }
private void CornerCursorHandler(ResizingClickPosition Type, MouseEventArgs e) { switch (Type) { case ResizingClickPosition.LeftCorner: Cursor = LeftCornerCursor; break; case ResizingClickPosition.RightCorner: Cursor = RightCornerCursor; break; case ResizingClickPosition.TopSizing: Cursor = TopCursor; break; case ResizingClickPosition.None: if (Cursor == RightCornerCursor || Cursor == LeftCornerCursor || Cursor == TopCursor) { Cursor = NormalCursor; } break; } }
private void RightSizingClick(ResizingClickPosition Type, MouseEventArgs e) { ForceParentCommand(SystemCommands.RightSize); }
private void LeftSizingClick(ResizingClickPosition Type, MouseEventArgs e) { ForceParentCommand(SystemCommands.LeftSize); }