.
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
|
|
||||||
Public Class PluginManager
|
Public Class PluginManager
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Gets or sets an indicator if an exception should throw on error while loading a plugin.
|
||||||
|
''' </summary>
|
||||||
|
''' <returns></returns>
|
||||||
|
Public Property ThrowOnError As Boolean = False
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' The name of the type where to search for Methods when loading a new Plugin.
|
''' The name of the type where to search for Methods when loading a new Plugin.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
@@ -79,7 +85,11 @@ Public Class PluginManager
|
|||||||
If addToList Then Plugins.Add(filePath, plugin)
|
If addToList Then Plugins.Add(filePath, plugin)
|
||||||
Return plugin
|
Return plugin
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Return Nothing
|
If ThrowOnError Then
|
||||||
|
Throw
|
||||||
|
Else
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ Public Class PaintingControl
|
|||||||
|
|
||||||
Private Sub SaveObjectPositions(e As MouseEventArgs, objs As IList)
|
Private Sub SaveObjectPositions(e As MouseEventArgs, objs As IList)
|
||||||
For Each obj As PaintingObject In objs
|
For Each obj As PaintingObject In objs
|
||||||
If Not savedPos.ContainsKey(obj) Then
|
If Not obj.HardcodedLocation AndAlso Not savedPos.ContainsKey(obj) Then
|
||||||
savedPos.Add(obj, New PointF(e.X - obj.Location.X + Offset.X, e.Y - obj.Location.Y + Offset.Y))
|
savedPos.Add(obj, New PointF(e.X - obj.Location.X + Offset.X, e.Y - obj.Location.Y + Offset.Y))
|
||||||
SaveObjectPositions(e, obj.PinnedObjects)
|
SaveObjectPositions(e, obj.PinnedObjects)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ Imports Newtonsoft.Json
|
|||||||
<JsonIgnore> Public Property BufferedImage As Image = Nothing
|
<JsonIgnore> Public Property BufferedImage As Image = Nothing
|
||||||
Public Property ImageSizeMode As ImageSizeMode
|
Public Property ImageSizeMode As ImageSizeMode
|
||||||
Public Property ImageProperties As New PaintingObjectImageProperties
|
Public Property ImageProperties As New PaintingObjectImageProperties
|
||||||
Public Property Tag As String = Nothing
|
<JsonIgnore>
|
||||||
|
Public Property Tag As Object = Nothing
|
||||||
Public Property Name As String = ""
|
Public Property Name As String = ""
|
||||||
Public ReadOnly Property PinnedObjects As New List(Of PaintingObject)
|
Public ReadOnly Property PinnedObjects As New List(Of PaintingObject)
|
||||||
<JsonIgnore>
|
<JsonIgnore>
|
||||||
@@ -51,6 +52,7 @@ Imports Newtonsoft.Json
|
|||||||
Public ReadOnly Property DrawSelectionMethode As DelegateDrawPaintingObjectMethode = AddressOf DefaultDrawMethodes.DrawSelection
|
Public ReadOnly Property DrawSelectionMethode As DelegateDrawPaintingObjectMethode = AddressOf DefaultDrawMethodes.DrawSelection
|
||||||
Public Property Cursor As Cursor = Cursors.Default
|
Public Property Cursor As Cursor = Cursors.Default
|
||||||
Public Property HardcodedSize As Boolean = False
|
Public Property HardcodedSize As Boolean = False
|
||||||
|
Public Property HardcodedLocation As Boolean = False
|
||||||
<JsonProperty>
|
<JsonProperty>
|
||||||
Private _Visible As Boolean = True
|
Private _Visible As Boolean = True
|
||||||
<JsonProperty>
|
<JsonProperty>
|
||||||
@@ -421,6 +423,20 @@ Imports Newtonsoft.Json
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
<JsonProperty(NameOf(Tag))>
|
||||||
|
Public Property TagString As String
|
||||||
|
Get
|
||||||
|
If TypeOf Tag Is String Then
|
||||||
|
Return Tag
|
||||||
|
Else
|
||||||
|
Return String.Empty
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
Tag = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Property EnableResize As Boolean
|
Public Property EnableResize As Boolean
|
||||||
Get
|
Get
|
||||||
If resizeEngine Is Nothing Then
|
If resizeEngine Is Nothing Then
|
||||||
|
|||||||
Reference in New Issue
Block a user