new moving event for painting objects
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Imports System.Drawing
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing
|
||||
Imports System.Drawing.Drawing2D
|
||||
Imports System.Runtime.CompilerServices
|
||||
Imports System.Windows.Forms
|
||||
@@ -348,9 +349,14 @@ Public Class PaintingControl
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateObjectPosition(e As MouseEventArgs, obj As PaintingObject, sp As PointF)
|
||||
obj.Location = New Point(e.X - sp.X + Offset.X,
|
||||
e.Y - sp.Y + Offset.Y)
|
||||
obj.RaiseMoving(New EventArgs)
|
||||
Dim cancel As New CancelEventArgs(False)
|
||||
obj.RaiseMovingBeforePositionUpdated(cancel)
|
||||
|
||||
If Not cancel.Cancel Then
|
||||
obj.Location = New Point(e.X - sp.X + Offset.X,
|
||||
e.Y - sp.Y + Offset.Y)
|
||||
obj.RaiseMoving(New EventArgs)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function IsResizingObjs(objs As IList(Of PaintingObject)) As Boolean
|
||||
|
||||
Reference in New Issue
Block a user