This forum contains outdated content and is available for reading only. Please contact technical support if you have any questions.

Notification

Icon
Error

Options
Go to last post Go to first unread
dotnet67  
#1 Posted : Sunday, October 30, 2011 6:12:57 AM(UTC)
dotnet67

Rank: Newbie

Groups: Guest
Joined: 10/25/2011(UTC)
Posts: 5

Hi,

I need implement cutom PolylineVObject and designer. I'm found solution,
but for me missing information how to set array of points from custom PolylineVObject designer.
Please help me with this question,

Thank you

Roman

Imports Aurigma.GraphicsMill.WinControls

Public Class TypA
Inherits Aurigma.GraphicsMill.WinControls.PolylineVObject

Public Sub New(ByVal pt() As PointF)
MyBase.New(pt, True, Drawing2D.FillMode.Alternate)
MyBase.Pen = New System.Drawing.Pen(Color.Cyan, 1)
MyBase.Brush = New SolidBrush(Color.FromArgb(120, Color.Cyan))
MyBase.Tag = "TypA"
End Sub

Public Overrides Sub Draw(renderingRect As System.Drawing.Rectangle, g As System.Drawing.Graphics, coordinateMapper As Aurigma.GraphicsMill.WinControls.ICoordinateMapper)
MyBase.Draw(renderingRect, g, coordinateMapper)
End Sub

End Class


Public Class TypADesigner
Implements Aurigma.GraphicsMill.WinControls.IDesigner

Public Sub New()
_vObjectHost = Nothing
_objects = New TypA() {}
End Sub

Public Sub Draw(ByVal g As System.Drawing.Graphics) Implements Aurigma.GraphicsMill.WinControls.IDesigner.Draw
End Sub

Public ReadOnly Property Connected() As Boolean Implements Aurigma.GraphicsMill.WinControls.IDesigner.Connected
Get
Return Not IsNothing(_vObjectHost)
End Get
End Property

Public ReadOnly Property VObjects() As Aurigma.GraphicsMill.WinControls.IVObject() Implements Aurigma.GraphicsMill.WinControls.IDesigner.VObjects
Get
Return _objects
End Get
End Property

Public Sub NotifyConnect(ByVal vObjectHost As Aurigma.GraphicsMill.WinControls.IVObjectHost) Implements Aurigma.GraphicsMill.WinControls.IDesigner.NotifyConnect
_vObjectHost = vObjectHost
End Sub

Public Sub NotifyDisconnect() Implements Aurigma.GraphicsMill.WinControls.IDesigner.NotifyDisconnect
_vObjectHost = Nothing
End Sub

Public Function NotifyKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs) As Boolean Implements Aurigma.GraphicsMill.WinControls.IDesigner.NotifyKeyDown
Return True
End Function

Public Function NotifyKeyUp(ByVal e As System.Windows.Forms.KeyEventArgs) As Boolean Implements Aurigma.GraphicsMill.WinControls.IDesigner.NotifyKeyUp
Return True
End Function

Public Function NotifyMouseDoubleClick(ByVal e As System.EventArgs) As Boolean Implements Aurigma.GraphicsMill.WinControls.IDesigner.NotifyMouseDoubleClick
Return True
End Function

Public Function NotifyMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs) As Boolean Implements Aurigma.GraphicsMill.WinControls.IDesigner.NotifyMouseDown
Dim obj As New TypA(New PointF() {})
_vObjectHost.CurrentLayer.VObjects.Insert(0, obj)
_vObjectHost.CurrentDesigner = _vObjectHost.DefaultDesigner
End Function

Public Function NotifyMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs) As Boolean Implements Aurigma.GraphicsMill.WinControls.IDesigner.NotifyMouseMove
Return True
End Function

Public Function NotifyMouseUp(ByVal e As System.Windows.Forms.MouseEventArgs) As Boolean Implements Aurigma.GraphicsMill.WinControls.IDesigner.NotifyMouseUp
Return True
End Function

Public Sub UpdateSettings() Implements Aurigma.GraphicsMill.WinControls.IDesigner.UpdateSettings
End Sub

Public _objects() As TypA
Private _vObjectHost As Aurigma.GraphicsMill.WinControls.IVObjectHost

End Class
Dmitry.Obukhov  
#2 Posted : Monday, October 31, 2011 12:13:14 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Guest
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello Roman,

Please submit new support ticket, and describe your problem in details. Unfortunately, we do not understand what you want to get using this code.
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.