6233d89e0f
- primo rilascio.
1069 lines
31 KiB
VB.net
1069 lines
31 KiB
VB.net
Namespace EgtCAM5
|
|
|
|
Public Class DrawPanelViewModel
|
|
Inherits ViewModelBase
|
|
|
|
' Definizione comandi
|
|
Private m_cmdPoint As ICommand
|
|
Private m_cmdLine2P As ICommand
|
|
Private m_cmdLinePDL As ICommand
|
|
Private m_cmdCircle As ICommand
|
|
Private m_cmdArcCSE As ICommand
|
|
Private m_cmdArc3P As ICommand
|
|
Private m_cmdArcPDP As ICommand
|
|
Private m_cmdFillet As ICommand
|
|
Private m_cmdRectangle2P As ICommand
|
|
Private m_cmdPolygon As ICommand
|
|
Private m_cmdText As ICommand
|
|
Private m_cmdPlane As ICommand
|
|
Private m_cmdExtrude As ICommand
|
|
Private m_cmdRevolve As ICommand
|
|
Private m_cmdScrew As ICommand
|
|
Private m_cmdRuled As ICommand
|
|
Private m_cmdMergeSurf As ICommand
|
|
Private m_cmdExplodeSurf As ICommand
|
|
Private m_cmdInvertSurf As ICommand
|
|
Private m_cmdDelete As ICommand
|
|
Private m_cmdChangeLayer As ICommand
|
|
Private m_cmdChangeColor As ICommand
|
|
Private m_cmdInvertCurve As ICommand
|
|
Private m_cmdChangeStartCurve As ICommand
|
|
Private m_cmdExtendCurve As ICommand
|
|
Private m_cmdBreakCurve As ICommand
|
|
Private m_cmdJoinCurve As ICommand
|
|
Private m_cmdExplodeCurve As ICommand
|
|
Private m_cmdSetCurveTh As ICommand
|
|
Private m_cmdMove As ICommand
|
|
Private m_cmdRotate As ICommand
|
|
Private m_cmdMirror As ICommand
|
|
Private m_cmdScale As ICommand
|
|
Private m_cmdOffset As ICommand
|
|
|
|
|
|
Sub New()
|
|
|
|
End Sub
|
|
|
|
#Region "PointCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Point.
|
|
''' </summary>
|
|
Public ReadOnly Property PointCommand As ICommand
|
|
Get
|
|
If m_cmdPoint Is Nothing Then
|
|
m_cmdPoint = New RelayCommand(AddressOf Point, AddressOf CanPoint)
|
|
End If
|
|
Return m_cmdPoint
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Point. This method is invoked by the PointCommand.
|
|
''' </summary>
|
|
Public Sub Point(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.POINT)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanPoint(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' PointCommand
|
|
|
|
#Region "Line2PCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Line2P.
|
|
''' </summary>
|
|
Public ReadOnly Property Line2PCommand As ICommand
|
|
Get
|
|
If m_cmdLine2P Is Nothing Then
|
|
m_cmdLine2P = New RelayCommand(AddressOf Line2P, AddressOf CanLine2P)
|
|
End If
|
|
Return m_cmdLine2P
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Line2P. This method is invoked by the Line2PCommand.
|
|
''' </summary>
|
|
Public Sub Line2P(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.LINE2P)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanLine2P(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' Line2PCommand
|
|
|
|
#Region "LinePDLCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do LinePDL.
|
|
''' </summary>
|
|
Public ReadOnly Property LinePDLCommand As ICommand
|
|
Get
|
|
If m_cmdLinePDL Is Nothing Then
|
|
m_cmdLinePDL = New RelayCommand(AddressOf LinePDL, AddressOf CanLinePDL)
|
|
End If
|
|
Return m_cmdLinePDL
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the LinePDL. This method is invoked by the LinePDLCommand.
|
|
''' </summary>
|
|
Public Sub LinePDL(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.LINEPDL)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanLinePDL(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' LinePDLCommand
|
|
|
|
#Region "CircleCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Circle.
|
|
''' </summary>
|
|
Public ReadOnly Property CircleCommand As ICommand
|
|
Get
|
|
If m_cmdCircle Is Nothing Then
|
|
m_cmdCircle = New RelayCommand(AddressOf Circle, AddressOf CanCircle)
|
|
End If
|
|
Return m_cmdCircle
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Circle. This method is invoked by the CircleCommand.
|
|
''' </summary>
|
|
Public Sub Circle(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.CIRCLE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanCircle(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' CircleCommand
|
|
|
|
#Region "ArcCSECommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ArcCSE.
|
|
''' </summary>
|
|
Public ReadOnly Property ArcCSECommand As ICommand
|
|
Get
|
|
If m_cmdArcCSE Is Nothing Then
|
|
m_cmdArcCSE = New RelayCommand(AddressOf ArcCSE, AddressOf CanArcCSE)
|
|
End If
|
|
Return m_cmdArcCSE
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ArcCSE. This method is invoked by the ArcCSECommand.
|
|
''' </summary>
|
|
Public Sub ArcCSE(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.ARCCSE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanArcCSE(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ArcCSECommand
|
|
|
|
#Region "Arc3PCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Arc3P.
|
|
''' </summary>
|
|
Public ReadOnly Property Arc3PCommand As ICommand
|
|
Get
|
|
If m_cmdArc3P Is Nothing Then
|
|
m_cmdArc3P = New RelayCommand(AddressOf Arc3P, AddressOf CanArc3P)
|
|
End If
|
|
Return m_cmdArc3P
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Arc3P. This method is invoked by the Arc3PCommand.
|
|
''' </summary>
|
|
Public Sub Arc3P(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.ARC3P)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanArc3P(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' Arc3PCommand
|
|
|
|
#Region "ArcPDPCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ArcPDP.
|
|
''' </summary>
|
|
Public ReadOnly Property ArcPDPCommand As ICommand
|
|
Get
|
|
If m_cmdArcPDP Is Nothing Then
|
|
m_cmdArcPDP = New RelayCommand(AddressOf ArcPDP, AddressOf CanArcPDP)
|
|
End If
|
|
Return m_cmdArcPDP
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ArcPDP. This method is invoked by the ArcPDPCommand.
|
|
''' </summary>
|
|
Public Sub ArcPDP(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.ARCPDP)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanArcPDP(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ArcPDPCommand
|
|
|
|
#Region "FilletCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Fillet.
|
|
''' </summary>
|
|
Public ReadOnly Property FilletCommand As ICommand
|
|
Get
|
|
If m_cmdFillet Is Nothing Then
|
|
m_cmdFillet = New RelayCommand(AddressOf Fillet, AddressOf CanFillet)
|
|
End If
|
|
Return m_cmdFillet
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Fillet. This method is invoked by the FilletCommand.
|
|
''' </summary>
|
|
Public Sub Fillet(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.FILLET)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanFillet(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' FilletCommand
|
|
|
|
#Region "Rectangle2PCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Rectangle2P.
|
|
''' </summary>
|
|
Public ReadOnly Property Rectangle2PCommand As ICommand
|
|
Get
|
|
If m_cmdRectangle2P Is Nothing Then
|
|
m_cmdRectangle2P = New RelayCommand(AddressOf Rectangle2P, AddressOf CanRectangle2P)
|
|
End If
|
|
Return m_cmdRectangle2P
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Rectangle2P. This method is invoked by the Rectangle2PCommand.
|
|
''' </summary>
|
|
Public Sub Rectangle2P(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.RECTANGLE2P)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanRectangle2P(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' Rectangle2PCommand
|
|
|
|
#Region "PolygonCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Polygon.
|
|
''' </summary>
|
|
Public ReadOnly Property PolygonCommand As ICommand
|
|
Get
|
|
If m_cmdPolygon Is Nothing Then
|
|
m_cmdPolygon = New RelayCommand(AddressOf Polygon, AddressOf CanPolygon)
|
|
End If
|
|
Return m_cmdPolygon
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Polygon. This method is invoked by the PolygonCommand.
|
|
''' </summary>
|
|
Public Sub Polygon(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.POLYGON)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanPolygon(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' PolygonCommand
|
|
|
|
#Region "TextCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Text.
|
|
''' </summary>
|
|
Public ReadOnly Property TextCommand As ICommand
|
|
Get
|
|
If m_cmdText Is Nothing Then
|
|
m_cmdText = New RelayCommand(AddressOf Text, AddressOf CanText)
|
|
End If
|
|
Return m_cmdText
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Text. This method is invoked by the TextCommand.
|
|
''' </summary>
|
|
Public Sub Text(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.TEXT)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanText(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' TextCommand
|
|
|
|
#Region "PlaneCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Plane.
|
|
''' </summary>
|
|
Public ReadOnly Property PlaneCommand As ICommand
|
|
Get
|
|
If m_cmdPlane Is Nothing Then
|
|
m_cmdPlane = New RelayCommand(AddressOf Plane, AddressOf CanPlane)
|
|
End If
|
|
Return m_cmdPlane
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Plane. This method is invoked by the PlaneCommand.
|
|
''' </summary>
|
|
Public Sub Plane(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.PLANE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanPlane(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' PlaneCommand
|
|
|
|
#Region "ExtrudeCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Extrude.
|
|
''' </summary>
|
|
Public ReadOnly Property ExtrudeCommand As ICommand
|
|
Get
|
|
If m_cmdExtrude Is Nothing Then
|
|
m_cmdExtrude = New RelayCommand(AddressOf Extrude, AddressOf CanExtrude)
|
|
End If
|
|
Return m_cmdExtrude
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Extrude. This method is invoked by the ExtrudeCommand.
|
|
''' </summary>
|
|
Public Sub Extrude(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.EXTRUDE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanExtrude(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ExtrudeCommand
|
|
|
|
#Region "RevolveCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Revolve.
|
|
''' </summary>
|
|
Public ReadOnly Property RevolveCommand As ICommand
|
|
Get
|
|
If m_cmdRevolve Is Nothing Then
|
|
m_cmdRevolve = New RelayCommand(AddressOf Revolve, AddressOf CanRevolve)
|
|
End If
|
|
Return m_cmdRevolve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Revolve. This method is invoked by the RevolveCommand.
|
|
''' </summary>
|
|
Public Sub Revolve(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.REVOLVE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanRevolve(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' RevolveCommand
|
|
|
|
#Region "ScrewCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Screw.
|
|
''' </summary>
|
|
Public ReadOnly Property ScrewCommand As ICommand
|
|
Get
|
|
If m_cmdScrew Is Nothing Then
|
|
m_cmdScrew = New RelayCommand(AddressOf Screw, AddressOf CanScrew)
|
|
End If
|
|
Return m_cmdScrew
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Screw. This method is invoked by the ScrewCommand.
|
|
''' </summary>
|
|
Public Sub Screw(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.SCREW)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanScrew(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ScrewCommand
|
|
|
|
#Region "RuledCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Ruled.
|
|
''' </summary>
|
|
Public ReadOnly Property RuledCommand As ICommand
|
|
Get
|
|
If m_cmdRuled Is Nothing Then
|
|
m_cmdRuled = New RelayCommand(AddressOf Ruled, AddressOf CanRuled)
|
|
End If
|
|
Return m_cmdRuled
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Ruled. This method is invoked by the RuledCommand.
|
|
''' </summary>
|
|
Public Sub Ruled(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.RULED)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanRuled(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' RuledCommand
|
|
|
|
#Region "MergeSurfCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do MergeSurf.
|
|
''' </summary>
|
|
Public ReadOnly Property MergeSurfCommand As ICommand
|
|
Get
|
|
If m_cmdMergeSurf Is Nothing Then
|
|
m_cmdMergeSurf = New RelayCommand(AddressOf MergeSurf, AddressOf CanMergeSurf)
|
|
End If
|
|
Return m_cmdMergeSurf
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the MergeSurf. This method is invoked by the MergeSurfCommand.
|
|
''' </summary>
|
|
Public Sub MergeSurf(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.MERGESURF)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanMergeSurf(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' MergeSurfCommand
|
|
|
|
#Region "ExplodeSurfCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ExplodeSurf.
|
|
''' </summary>
|
|
Public ReadOnly Property ExplodeSurfCommand As ICommand
|
|
Get
|
|
If m_cmdExplodeSurf Is Nothing Then
|
|
m_cmdExplodeSurf = New RelayCommand(AddressOf ExplodeSurf, AddressOf CanExplodeSurf)
|
|
End If
|
|
Return m_cmdExplodeSurf
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ExplodeSurf. This method is invoked by the ExplodeSurfCommand.
|
|
''' </summary>
|
|
Public Sub ExplodeSurf(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.MERGESURF)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanExplodeSurf(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ExplodeSurfCommand
|
|
|
|
#Region "InvertSurfCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do InvertSurf.
|
|
''' </summary>
|
|
Public ReadOnly Property InvertSurfCommand As ICommand
|
|
Get
|
|
If m_cmdInvertSurf Is Nothing Then
|
|
m_cmdInvertSurf = New RelayCommand(AddressOf InvertSurf, AddressOf CanInvertSurf)
|
|
End If
|
|
Return m_cmdInvertSurf
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the InvertSurf. This method is invoked by the InvertSurfCommand.
|
|
''' </summary>
|
|
Public Sub InvertSurf(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.INVERTSURF)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanInvertSurf(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' InvertSurfCommand
|
|
|
|
#Region "DeleteCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Delete.
|
|
''' </summary>
|
|
Public ReadOnly Property DeleteCommand As ICommand
|
|
Get
|
|
If m_cmdDelete Is Nothing Then
|
|
m_cmdDelete = New RelayCommand(AddressOf Delete, AddressOf CanDelete)
|
|
End If
|
|
Return m_cmdDelete
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Delete. This method is invoked by the DeleteCommand.
|
|
''' </summary>
|
|
Public Sub Delete(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.DELETE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanDelete(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' DeleteCommand
|
|
|
|
#Region "ChangeLayerCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ChangeLayer.
|
|
''' </summary>
|
|
Public ReadOnly Property ChangeLayerCommand As ICommand
|
|
Get
|
|
If m_cmdChangeLayer Is Nothing Then
|
|
m_cmdChangeLayer = New RelayCommand(AddressOf ChangeLayer, AddressOf CanChangeLayer)
|
|
End If
|
|
Return m_cmdChangeLayer
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ChangeLayer. This method is invoked by the ChangeLayerCommand.
|
|
''' </summary>
|
|
Public Sub ChangeLayer(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.CHANGELAYER)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanChangeLayer(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ChangeLayerCommand
|
|
|
|
#Region "ChangeColorCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ChangeColor.
|
|
''' </summary>
|
|
Public ReadOnly Property ChangeColorCommand As ICommand
|
|
Get
|
|
If m_cmdChangeColor Is Nothing Then
|
|
m_cmdChangeColor = New RelayCommand(AddressOf ChangeColor, AddressOf CanChangeColor)
|
|
End If
|
|
Return m_cmdChangeColor
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ChangeColor. This method is invoked by the ChangeColorCommand.
|
|
''' </summary>
|
|
Public Sub ChangeColor(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.CHANGECOLOR)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanChangeColor(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ChangeColorCommand
|
|
|
|
#Region "InvertCurveCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do InvertCurve.
|
|
''' </summary>
|
|
Public ReadOnly Property InvertCurveCommand As ICommand
|
|
Get
|
|
If m_cmdInvertCurve Is Nothing Then
|
|
m_cmdInvertCurve = New RelayCommand(AddressOf InvertCurve, AddressOf CanInvertCurve)
|
|
End If
|
|
Return m_cmdInvertCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the InvertCurve. This method is invoked by the InvertCurveCommand.
|
|
''' </summary>
|
|
Public Sub InvertCurve(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.INVERTCURVE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanInvertCurve(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' InvertCurveCommand
|
|
|
|
#Region "ChangeStartCurveCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ChangeStartCurve.
|
|
''' </summary>
|
|
Public ReadOnly Property ChangeStartCurveCommand As ICommand
|
|
Get
|
|
If m_cmdChangeStartCurve Is Nothing Then
|
|
m_cmdChangeStartCurve = New RelayCommand(AddressOf ChangeStartCurve, AddressOf CanChangeStartCurve)
|
|
End If
|
|
Return m_cmdChangeStartCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ChangeStartCurve. This method is invoked by the InvertCurveCommand.
|
|
''' </summary>
|
|
Public Sub ChangeStartCurve(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.CHANGESTARTCURVE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanChangeStartCurve(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ChangeStartCurveCommand
|
|
|
|
#Region "ExtendCurveCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ExtendCurve.
|
|
''' </summary>
|
|
Public ReadOnly Property ExtendCurveCommand As ICommand
|
|
Get
|
|
If m_cmdExtendCurve Is Nothing Then
|
|
m_cmdExtendCurve = New RelayCommand(AddressOf ExtendCurve, AddressOf CanExtendCurve)
|
|
End If
|
|
Return m_cmdExtendCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ExtendCurve. This method is invoked by the ExtendCurveCommand.
|
|
''' </summary>
|
|
Public Sub ExtendCurve(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.EXTENDCURVE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanExtendCurve(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ExtendCurveCommand
|
|
|
|
#Region "BreakCurveCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do BreakCurve.
|
|
''' </summary>
|
|
Public ReadOnly Property BreakCurveCommand As ICommand
|
|
Get
|
|
If m_cmdBreakCurve Is Nothing Then
|
|
m_cmdBreakCurve = New RelayCommand(AddressOf BreakCurve, AddressOf CanBreakCurve)
|
|
End If
|
|
Return m_cmdBreakCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the BreakCurve. This method is invoked by the BreakCurveCommand.
|
|
''' </summary>
|
|
Public Sub BreakCurve(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.BREAKCURVE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanBreakCurve(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' BreakCurveCommand
|
|
|
|
#Region "JoinCurveCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do JoinCurve.
|
|
''' </summary>
|
|
Public ReadOnly Property JoinCurveCommand As ICommand
|
|
Get
|
|
If m_cmdJoinCurve Is Nothing Then
|
|
m_cmdJoinCurve = New RelayCommand(AddressOf JoinCurve, AddressOf CanJoinCurve)
|
|
End If
|
|
Return m_cmdJoinCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the JoinCurve. This method is invoked by the JoinCurveCommand.
|
|
''' </summary>
|
|
Public Sub JoinCurve(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.JOINCURVE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanJoinCurve(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' JoinCurveCommand
|
|
|
|
#Region "ExplodeCurveCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ExplodeCurve.
|
|
''' </summary>
|
|
Public ReadOnly Property ExplodeCurveCommand As ICommand
|
|
Get
|
|
If m_cmdExplodeCurve Is Nothing Then
|
|
m_cmdExplodeCurve = New RelayCommand(AddressOf ExplodeCurve, AddressOf CanExplodeCurve)
|
|
End If
|
|
Return m_cmdExplodeCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ExplodeCurve. This method is invoked by the ExplodeCurveCommand.
|
|
''' </summary>
|
|
Public Sub ExplodeCurve(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.JOINCURVE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanExplodeCurve(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ExplodeCurveCommand
|
|
|
|
#Region "SetCurveThCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do SetCurveTh.
|
|
''' </summary>
|
|
Public ReadOnly Property SetCurveThCommand As ICommand
|
|
Get
|
|
If m_cmdSetCurveTh Is Nothing Then
|
|
m_cmdSetCurveTh = New RelayCommand(AddressOf SetCurveTh, AddressOf CanSetCurveTh)
|
|
End If
|
|
Return m_cmdSetCurveTh
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the SetCurveTh. This method is invoked by the SetCurveThCommand.
|
|
''' </summary>
|
|
Public Sub SetCurveTh(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.SETCURVETH)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanSetCurveTh(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' SetCurveThCommand
|
|
|
|
#Region "MoveCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Move.
|
|
''' </summary>
|
|
Public ReadOnly Property MoveCommand As ICommand
|
|
Get
|
|
If m_cmdMove Is Nothing Then
|
|
m_cmdMove = New RelayCommand(AddressOf Move, AddressOf CanMove)
|
|
End If
|
|
Return m_cmdMove
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Move. This method is invoked by the MoveCommand.
|
|
''' </summary>
|
|
Public Sub Move(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.MOVE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanMove(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' MoveCommand
|
|
|
|
#Region "RotateCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Rotate.
|
|
''' </summary>
|
|
Public ReadOnly Property RotateCommand As ICommand
|
|
Get
|
|
If m_cmdRotate Is Nothing Then
|
|
m_cmdRotate = New RelayCommand(AddressOf Rotate, AddressOf CanRotate)
|
|
End If
|
|
Return m_cmdRotate
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Rotate. This method is invoked by the RotateCommand.
|
|
''' </summary>
|
|
Public Sub Rotate(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.ROTATE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanRotate(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' RotateCommand
|
|
|
|
#Region "MirrorCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Mirror.
|
|
''' </summary>
|
|
Public ReadOnly Property MirrorCommand As ICommand
|
|
Get
|
|
If m_cmdMirror Is Nothing Then
|
|
m_cmdMirror = New RelayCommand(AddressOf Mirror, AddressOf CanMirror)
|
|
End If
|
|
Return m_cmdMirror
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Mirror. This method is invoked by the MirrorCommand.
|
|
''' </summary>
|
|
Public Sub Mirror(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.MIRROR)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanMirror(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' MirrorCommand
|
|
|
|
#Region "ScaleCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Scale.
|
|
''' </summary>
|
|
Public ReadOnly Property ScaleCommand As ICommand
|
|
Get
|
|
If m_cmdScale Is Nothing Then
|
|
m_cmdScale = New RelayCommand(AddressOf Scale, AddressOf CanScale)
|
|
End If
|
|
Return m_cmdScale
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Scale. This method is invoked by the ScaleCommand.
|
|
''' </summary>
|
|
Public Sub Scale(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.SCALE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanScale(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ScaleCommand
|
|
|
|
#Region "OffsetCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Offset.
|
|
''' </summary>
|
|
Public ReadOnly Property OffsetCommand As ICommand
|
|
Get
|
|
If m_cmdOffset Is Nothing Then
|
|
m_cmdOffset = New RelayCommand(AddressOf Offset, AddressOf CanOffset)
|
|
End If
|
|
Return m_cmdOffset
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Offset. This method is invoked by the OffsetCommand.
|
|
''' </summary>
|
|
Public Sub Offset(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.OFFSET)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanOffset(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' OffsetCommand
|
|
|
|
End Class
|
|
|
|
End Namespace |