diff --git a/Pilz.UI/PaintingControl/PaintingObject.vb b/Pilz.UI/PaintingControl/PaintingObject.vb index c46c134..aa629f0 100644 --- a/Pilz.UI/PaintingControl/PaintingObject.vb +++ b/Pilz.UI/PaintingControl/PaintingObject.vb @@ -19,18 +19,22 @@ Imports Newtonsoft.Json Public Property OutlineColor As Color = Color.DarkBlue Public Property OutlineThicknes As Single = 1 Public Property OutlineDashStyle As DashStyle = DashStyle.Solid + Private _Text As String = "" Public Property TextPosition As TextPosition = TextPosition.FullCenter Public Property VerticalTextAlignment As StringAlignment = StringAlignment.Center Public Property HorizontalTextAlignment As StringAlignment = StringAlignment.Center Public Property TextFont As New Font(FontFamily.GenericSansSerif, 8.25) Public Property TextColor As Color = Color.Black + Private _Location As New PointF(50, 50) + Private _Size As New SizeF(50, 80) Public Property EnableFill As Boolean = True Public Property EnableOutline As Boolean = True Public Property SelectionColor As Color = Color.CornflowerBlue Public Property SelectionDashStyle As DashStyle = DashStyle.Dot + Private _EnableSelection As Boolean = True Public Property Image As Image = Nothing Public Property BufferedImage As Image = Nothing @@ -39,15 +43,20 @@ Imports Newtonsoft.Json Public Property Tag As String = Nothing Public Property Name As String = "" Public ReadOnly Property PinnedObjects As New List(Of PaintingObject) + Public ReadOnly Property DrawMethodes As New List(Of DelegateDrawPaintingObjectMethode) + Public ReadOnly Property DrawSelectionMethode As DelegateDrawPaintingObjectMethode = AddressOf DefaultDrawMethodes.DrawSelection Public Property Cursor As Cursor = Cursors.Default Public Property HardcodedSize As Boolean = False + Private _Visible As Boolean = True + Private _AutoAlignToGrid As Boolean = False Public Property MouseTransparency As Boolean = False Public ReadOnly Property Layering As New PaintingObjectLayering(Me) Public ReadOnly Property PaintingObjects As New PaintingObjectList(_Parent) With {.EnableRaisingEvents = False} + Public ReadOnly Property ErrorsAtDrawing As ULong = 0 Public Event MouseClick(sender As PaintingObject, e As MouseEventArgs) @@ -321,6 +330,7 @@ Imports Newtonsoft.Json End Set End Property + Public Property Rectangle As RectangleF Get Return New RectangleF(Location, Size) @@ -528,8 +538,10 @@ End Class Public Class PaintingObjectList Inherits List(Of PaintingObject) + Friend ReadOnly Property MyParent As PaintingControl Friend Property EnableRaisingEvents As Boolean = True + Public ReadOnly Property Layering As New PaintingObjectListLayering(Me) Public Sub New() diff --git a/Pilz.UI/PaintingControl/PaintingObjectJsonSerializer.vb b/Pilz.UI/PaintingControl/PaintingObjectJsonSerializer.vb new file mode 100644 index 0000000..f265c0b --- /dev/null +++ b/Pilz.UI/PaintingControl/PaintingObjectJsonSerializer.vb @@ -0,0 +1,3 @@ +Public Class PaintingObjectJsonSerializer + +End Class diff --git a/Pilz.UI/PaintingControl/PaintingObjectLayering.vb b/Pilz.UI/PaintingControl/PaintingObjectLayering.vb index f56e4ac..7b4c0a9 100644 --- a/Pilz.UI/PaintingControl/PaintingObjectLayering.vb +++ b/Pilz.UI/PaintingControl/PaintingObjectLayering.vb @@ -1,11 +1,22 @@ -Public Class PaintingObjectLayering +Imports Newtonsoft.Json +Public Class PaintingObjectLayering + + + Private ReadOnly _PaintingObject As PaintingObject + + Public ReadOnly Property PaintingObject As PaintingObject + Get + Return _PaintingObject + End Get + End Property ''' ''' Get the current object list from the painting object. ''' ''' Returns the current object list from the painting object. + Public ReadOnly Property ObjectList As PaintingObjectList Get Return PaintingObject.Parent.PaintingObjects @@ -17,7 +28,7 @@ ''' ''' Public Sub New(obj As PaintingObject) - PaintingObject = obj + _PaintingObject = obj End Sub '''