2234 lines
67 KiB
VB.net
2234 lines
67 KiB
VB.net
Imports EgtUILib
|
|
|
|
Public Class DrawPanelVM
|
|
Inherits ViewModelBase
|
|
|
|
Private WithEvents IdleTimer As New System.Windows.Threading.DispatcherTimer(TimeSpan.FromMilliseconds(200), Windows.Threading.DispatcherPriority.ApplicationIdle, AddressOf OnIdle, Application.Current.Dispatcher)
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property Draw2DMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 44)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Draw3DMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 45)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ModifyMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 46)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property TransformMsg As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 47)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Messages
|
|
|
|
#Region "ToolTip"
|
|
|
|
'Proprietà ToolTip
|
|
Public ReadOnly Property PointToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 1)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Line2PToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 2)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property LinePDLToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 3)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property CircleCPToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 4)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property CircleCDToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 5)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Circle3PToolTip As String
|
|
Get
|
|
Return EgtMsg(5156)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ArcCSEToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 6)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Arc3PToolTip As String
|
|
Get
|
|
Return EgtMsg(5207)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Arc2PRToolTip As String
|
|
Get
|
|
Return EgtMsg(5169)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ArcPDPToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 8)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property BiArcToolTip As String
|
|
Get
|
|
Return EgtMsg(5170)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Rectangle2PToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 11)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property PolygonToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 12)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property PolygonSideToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 13)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property TextToolTip As String
|
|
Get
|
|
Return EgtMsg( 5214) ' Testo<br/>Testo Avanzato (Shift)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property LinearDimensionToolTip As String
|
|
Get
|
|
Return EgtMsg( 5155) ' Quota Lineare<br/>Quota Allineata (Shift)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property AngularDimensionToolTip As String
|
|
Get
|
|
Return EgtMsg( 5167) ' Quota Angolare<br/>Quota Angolare Avanzata (Shift)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property DiamRadDimensionToolTip As String
|
|
Get
|
|
Return EgtMsg( 5168) ' Quota Diametrale<br/>Quota Radiale (Shift)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property PlaneToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 15)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ExtrudeToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 16)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property RevolveToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 17)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ScrewToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 18)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property SweptToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 48)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property RuledToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 19)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property MergeSurfToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 20)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ExplodeSurfToolTip As String
|
|
Get
|
|
Return EgtMsg( 5221) 'Esplodi Superfici e Regioni Piane
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ApproxSurfToolTip As String
|
|
Get
|
|
Return EgtMsg( 5165) 'Approssima Superfici e Regioni Piane
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property StmMoveVertexFacetToolTip As String
|
|
Get
|
|
Return EgtMsg( 5166) 'Muovi Vertice di Superficie<br/>Muovi Faccia di Superficie (Shift)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ExtractSurfFacetToolTip As String
|
|
Get
|
|
Return EgtMsg( 5158) 'Estrai Faccia da Superficie
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property InvertSurfToolTip As String
|
|
Get
|
|
Return EgtMsg( 5222) 'Inverti Superfici e Regioni Piane
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ExtractLoopsToolTip As String
|
|
Get
|
|
Return EgtMsg( 5150) 'Estrai Bordi Liberi di Superfici e Regioni Piane
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ExtractFacetLoopsToolTip As String
|
|
Get
|
|
Return EgtMsg( 5157) 'Estrai Bordi di Faccia di superficie e di Parti di Regioni Piane
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property SolidAddSurfToolTip As String
|
|
Get
|
|
Return EgtMsg( 5151) 'Unisci Superfici e Regioni Piane
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property SolidSubtractSurfToolTip As String
|
|
Get
|
|
Return EgtMsg( 5152) 'Sottrai Superfici e Regioni Piane
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property SolidIntersectSurfToolTip As String
|
|
Get
|
|
Return EgtMsg( 5153) 'Interseca Superfici e Regioni Piane
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property IntersectSurfSurfToolTip As String
|
|
Get
|
|
Return EgtMsg( 5154) 'Punti, Curve e Facce di Intersezione Tra Superfici
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property DeleteToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 23)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ChangeLayerToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 24)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ChangeStatusToolTip As String
|
|
Get
|
|
Return EgtMsg(5250)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property ChangeAlphaToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 25)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ResetColorToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 26)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ChangeColorToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 27)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property InvertCurveToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 28)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ChangeStartToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 29)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ExtendCurveToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 30)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property BreakCurveToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 31)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property SplitCurveToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 32)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property JoinCurveToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 33)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ExplodeCurveToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 34)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ThickCurveToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 35)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property FilletToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 9)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ChamferToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 10)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ArcFlipToolTip As String
|
|
Get
|
|
Return EgtMsg( 5159)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property OffsetToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 43)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ModifyCurveToolTip As String
|
|
Get
|
|
Return EgtMsg( 5160)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property AddPointCurveToolTip As String
|
|
Get
|
|
Return EgtMsg( 5161)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property RemovePointCurveToolTip As String
|
|
Get
|
|
Return EgtMsg( 5162)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ApproxCurveToolTip As String
|
|
Get
|
|
Return EgtMsg(5163)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ModifyArcRadiusToolTip As String
|
|
Get
|
|
Return EgtMsg(5164)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ModifyTextToolTip As String
|
|
Get
|
|
Return EgtMsg(5249)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property MoveToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 36)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property RotateToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 37)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Rotate3DToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 38)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property MirrorToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 39)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Mirror3DToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 40)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property ScaleToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 41)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property Scale3DToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_DRAWPANEL + 42)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' ToolTip
|
|
|
|
' Proprietà che permettono di aprire e chiudere gli expander
|
|
Private m_Draw2DIsExpanded As Boolean
|
|
Public Property Draw2DIsExpanded As Boolean
|
|
Get
|
|
Return m_Draw2DIsExpanded
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_Draw2DIsExpanded = value
|
|
End Set
|
|
End Property
|
|
|
|
Public ReadOnly Property Draw3DVisibility As Visibility
|
|
Get
|
|
Return If( (IniFile.m_nKeyOptions And KEY_OPT.CAD2D) = 0, Visibility.Visible, Visibility.Collapsed)
|
|
End Get
|
|
End Property
|
|
|
|
Private m_Draw3DIsExpanded As Boolean
|
|
Public Property Draw3DIsExpanded As Boolean
|
|
Get
|
|
Return m_Draw3DIsExpanded
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_Draw3DIsExpanded = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_ModifyIsExpanded As Boolean
|
|
Public Property ModifyIsExpanded As Boolean
|
|
Get
|
|
Return m_ModifyIsExpanded
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_ModifyIsExpanded = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_TransformIsExpanded As Boolean
|
|
Public Property TransformIsExpanded As Boolean
|
|
Get
|
|
Return m_TransformIsExpanded
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_TransformIsExpanded = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_DrawPanel_Visibility As Visibility
|
|
Public ReadOnly Property DrawPanel_Visibility As Visibility
|
|
Get
|
|
Return m_DrawPanel_Visibility
|
|
End Get
|
|
End Property
|
|
Friend Sub SetDrawPanelVisibility(bValue As Boolean)
|
|
m_DrawPanel_Visibility = If(bValue, Visibility.Visible, Visibility.Collapsed)
|
|
OnPropertyChanged(NameOf(DrawPanel_Visibility))
|
|
End Sub
|
|
|
|
|
|
#Region "Button state"
|
|
|
|
Private m_bLayerOk As Boolean
|
|
Public Property bLayerOk As Boolean
|
|
Get
|
|
Return m_bLayerOk
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_bLayerOk = value
|
|
OnPropertyChanged("bLayerOk")
|
|
End Set
|
|
End Property
|
|
Private m_bSelOk As Boolean
|
|
Public Property bSelOk As Boolean
|
|
Get
|
|
Return m_bSelOk
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_bSelOk = value
|
|
OnPropertyChanged("bSelOk")
|
|
End Set
|
|
End Property
|
|
Private m_bLayerOkAndSelOk As Boolean
|
|
Public Property bLayerOkAndSelOk As Boolean
|
|
Get
|
|
Return m_bLayerOkAndSelOk
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_bLayerOkAndSelOk = value
|
|
OnPropertyChanged("bLayerOkAndSelOk")
|
|
End Set
|
|
End Property
|
|
|
|
#End Region ' Button state
|
|
|
|
' Definizione comandi
|
|
Private m_cmdPoint As ICommand
|
|
Private m_cmdLine2P As ICommand
|
|
Private m_cmdLinePDL As ICommand
|
|
Private m_cmdCircleCP As ICommand
|
|
Private m_cmdCircleCD As ICommand
|
|
Private m_cmdCircle3P As ICommand
|
|
Private m_cmdArcCSE As ICommand
|
|
Private m_cmdArc3P As ICommand
|
|
Private m_cmdArc2PR As ICommand
|
|
Private m_cmdArcPDP As ICommand
|
|
Private m_cmdBiArc As ICommand
|
|
Private m_cmdRectangle2P As ICommand
|
|
Private m_cmdPolygon As ICommand
|
|
Private m_cmdPolygonSide As ICommand
|
|
Private m_cmdText As ICommand
|
|
Private m_cmdLinDim As ICommand
|
|
Private m_cmdAngDim As ICommand
|
|
Private m_cmdDiamRadDim As ICommand
|
|
Private m_cmdModifyCurve As ICommand
|
|
Private m_cmdAddPointCurve As ICommand
|
|
Private m_cmdPlane As ICommand
|
|
Private m_cmdExtrude As ICommand
|
|
Private m_cmdRevolve As ICommand
|
|
Private m_cmdScrew As ICommand
|
|
Private m_cmdSwept As ICommand
|
|
Private m_cmdRuled As ICommand
|
|
Private m_cmdMergeSurf As ICommand
|
|
Private m_cmdExplodeSurf As ICommand
|
|
Private m_cmdApproxSurf As ICommand
|
|
Private m_cmdMoveStmVertexFacet As ICommand
|
|
Private m_cmdExtractSurfFacet As ICommand
|
|
Private m_cmdInvertSurf As ICommand
|
|
Private m_cmdExtractLoops As ICommand
|
|
Private m_cmdExtractFacetLoops As ICommand
|
|
Private m_cmdSolidAddSurf As ICommand
|
|
Private m_cmdSolidSubtractSurf As ICommand
|
|
Private m_cmdSolidIntersectSurf As ICommand
|
|
Private m_cmdIntersectSurfSurf As ICommand
|
|
Private m_cmdDelete As ICommand
|
|
Private m_cmdChangeLayer As ICommand
|
|
Private m_cmdChangeStatus As ICommand
|
|
Private m_cmdChangeAlpha As ICommand
|
|
Private m_cmdResetColor 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_cmdSplitCurve As ICommand
|
|
Private m_cmdJoinCurve As ICommand
|
|
Private m_cmdExplodeCurve As ICommand
|
|
Private m_cmdSetCurveTh As ICommand
|
|
Private m_cmdFillet As ICommand
|
|
Private m_cmdChamfer As ICommand
|
|
Private m_cmdArcFlip As ICommand
|
|
Private m_cmdModifyArcRadius As ICommand
|
|
Private m_cmdModifyText As ICommand
|
|
Private m_cmdMove As ICommand
|
|
Private m_cmdRotate As ICommand
|
|
Private m_cmdRotate3D As ICommand
|
|
Private m_cmdMirror As ICommand
|
|
Private m_cmdMirror3D As ICommand
|
|
Private m_cmdScale As ICommand
|
|
Private m_cmdScale3D As ICommand
|
|
Private m_cmdOffset As ICommand
|
|
Private m_cmdRemovePointCurve As ICommand
|
|
Private m_cmdApproxCurve As ICommand
|
|
|
|
|
|
#End Region ' Fileds & Properties
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
' Creo riferimento a questa classe in Map
|
|
Map.SetRefDrawPanelVM(Me)
|
|
' Leggo stato expander da file ini
|
|
Draw2DIsExpanded = If(GetPrivateProfileInt(S_GENERAL, K_DRAW2D, 0) = 0, False, True)
|
|
Draw3DIsExpanded = If(GetPrivateProfileInt(S_GENERAL, K_DRAW3D, 0) = 0, False, True)
|
|
ModifyIsExpanded = If(GetPrivateProfileInt(S_GENERAL, K_MODIFY, 0) = 0, False, True)
|
|
TransformIsExpanded = If(GetPrivateProfileInt(S_GENERAL, K_TRANSFORM, 0) = 0, False, True)
|
|
End Sub
|
|
|
|
#End Region ' Constructor
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.FRAME)
|
|
ElseIf (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.VECTOR)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.POINT)
|
|
End If
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
|
Map.refProjectVM.GetController.SetContinue()
|
|
End If
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.LINE2P)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.LINEPDL)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.LINEPVL)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' LinePDLCommand
|
|
|
|
#Region "CircleCPCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do CircleCP.
|
|
''' </summary>
|
|
Public ReadOnly Property CircleCPCommand As ICommand
|
|
Get
|
|
If m_cmdCircleCP Is Nothing Then
|
|
m_cmdCircleCP = New RelayCommand(AddressOf CircleCP)
|
|
End If
|
|
Return m_cmdCircleCP
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the CircleCP. This method is invoked by the CircleCPCommand.
|
|
''' </summary>
|
|
Public Sub CircleCP(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CIRCLECP)
|
|
End Sub
|
|
|
|
#End Region ' CircleCPCommand
|
|
|
|
#Region "CircleCDCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do CircleCD.
|
|
''' </summary>
|
|
Public ReadOnly Property CircleCDCommand As ICommand
|
|
Get
|
|
If m_cmdCircleCD Is Nothing Then
|
|
m_cmdCircleCD = New RelayCommand(AddressOf CircleCD)
|
|
End If
|
|
Return m_cmdCircleCD
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the CircleCD. This method is invoked by the CircleCDCommand.
|
|
''' </summary>
|
|
Public Sub CircleCD(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CIRCLECD)
|
|
End Sub
|
|
|
|
#End Region ' CircleCDCommand
|
|
|
|
#Region "Circle3PCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Circle3P.
|
|
''' </summary>
|
|
Public ReadOnly Property Circle3PCommand As ICommand
|
|
Get
|
|
If m_cmdCircle3P Is Nothing Then
|
|
m_cmdCircle3P = New RelayCommand(AddressOf Circle3P)
|
|
End If
|
|
Return m_cmdCircle3P
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Circle3P. This method is invoked by the Circle3PDCommand.
|
|
''' </summary>
|
|
Public Sub Circle3P(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CIRCLE3P)
|
|
End Sub
|
|
|
|
#End Region ' Circle3PCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCCSE)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC2PR)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC3P)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' Arc3PCommand
|
|
|
|
#Region "Arc2PRCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Arc2PR.
|
|
''' </summary>
|
|
Public ReadOnly Property Arc2PRCommand As ICommand
|
|
Get
|
|
If m_cmdArc2PR Is Nothing Then
|
|
m_cmdArc2PR = New RelayCommand(AddressOf Arc2PR)
|
|
End If
|
|
Return m_cmdArc2PR
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Arc2PR. This method is invoked by the Arc2PRCommand.
|
|
''' </summary>
|
|
Public Sub Arc2PR(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARC2PR)
|
|
End Sub
|
|
|
|
#End Region ' Arc2PRCommand
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPVP)
|
|
ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
|
Map.refProjectVM.GetController.SetContinue()
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCPDP)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' ArcPDPCommand
|
|
|
|
#Region "BiArcCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do BiArc.
|
|
''' </summary>
|
|
Public ReadOnly Property BiArcCommand As ICommand
|
|
Get
|
|
If m_cmdBiArc Is Nothing Then
|
|
m_cmdBiArc = New RelayCommand(AddressOf BiArc)
|
|
End If
|
|
Return m_cmdBiArc
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the BiArc. This method is invoked by the BiArcCommand.
|
|
''' </summary>
|
|
Public Sub BiArc(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.BIARC)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CURVEBEZIER)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' BiArcCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.RECTANGLE2P)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.POLYGON)
|
|
End Sub
|
|
|
|
#End Region ' PolygonCommand
|
|
|
|
#Region "PolygonSideCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do PolygonSide.
|
|
''' </summary>
|
|
Public ReadOnly Property PolygonSideCommand As ICommand
|
|
Get
|
|
If m_cmdPolygonSide Is Nothing Then
|
|
m_cmdPolygonSide = New RelayCommand(AddressOf PolygonSide)
|
|
End If
|
|
Return m_cmdPolygonSide
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the PolygonSide. This method is invoked by the PolygonSideCommand.
|
|
''' </summary>
|
|
Public Sub PolygonSide(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.POLYGONSIDE)
|
|
End Sub
|
|
|
|
#End Region ' PolygonSideCommand
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.TEXT)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.TEXTPLUS)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' TextCommand
|
|
|
|
#Region "LinearDimensionCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Linear Dimension.
|
|
''' </summary>
|
|
Public ReadOnly Property LinearDimensionCommand As ICommand
|
|
Get
|
|
If m_cmdLinDim Is Nothing Then
|
|
m_cmdLinDim = New RelayCommand(AddressOf LinearDimension)
|
|
End If
|
|
Return m_cmdLinDim
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
|
''' </summary>
|
|
Public Sub LinearDimension(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.LINEARDIMENSION)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ALIGNEDDIMENSION)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' LinearDimensionCommand
|
|
|
|
#Region "AngularDimensionCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Angular Dimension.
|
|
''' </summary>
|
|
Public ReadOnly Property AngularDimensionCommand As ICommand
|
|
Get
|
|
If m_cmdAngDim Is Nothing Then
|
|
m_cmdAngDim = New RelayCommand(AddressOf AngularDimension)
|
|
End If
|
|
Return m_cmdAngDim
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the AngularDimension. This method is invoked by the AngDimCommand.
|
|
''' </summary>
|
|
Public Sub AngularDimension(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ANGULARDIMENSIONPLUS)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ANGULARDIMENSION)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' AngularDimensionCommand
|
|
|
|
#Region "DiamRadDimensionCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do DiamRad Dimension.
|
|
''' </summary>
|
|
Public ReadOnly Property DiamRadDimensionCommand As ICommand
|
|
Get
|
|
If m_cmdDiamRadDim Is Nothing Then
|
|
m_cmdDiamRadDim = New RelayCommand(AddressOf DiamRadDimension)
|
|
End If
|
|
Return m_cmdDiamRadDim
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the DiamRadDimension. This method is invoked by the DiamRadDimCommand.
|
|
''' </summary>
|
|
Public Sub DiamRadDimension(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.RADIALDIMENSION)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.DIAMETRALDIMENSION)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' DiamRadDimensionCommand
|
|
|
|
#Region "ModifyCurve"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Linear Dimension.
|
|
''' </summary>
|
|
Public ReadOnly Property ModifyCurveCommand As ICommand
|
|
Get
|
|
If m_cmdModifyCurve Is Nothing Then
|
|
m_cmdModifyCurve = New RelayCommand(AddressOf ModifyCurve)
|
|
End If
|
|
Return m_cmdModifyCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
|
''' </summary>
|
|
Public Sub ModifyCurve(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MODIFYCURVE)
|
|
End Sub
|
|
|
|
#End Region ' ModifyCurve
|
|
|
|
#Region "AddPointCurve"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Linear Dimension.
|
|
''' </summary>
|
|
Public ReadOnly Property AddPointCurveCommand As ICommand
|
|
Get
|
|
If m_cmdAddPointCurve Is Nothing Then
|
|
m_cmdAddPointCurve = New RelayCommand(AddressOf AddPointCurve)
|
|
End If
|
|
Return m_cmdAddPointCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
|
''' </summary>
|
|
Public Sub AddPointCurve(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CLOSECOMPO)
|
|
Else If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CURVETOARC)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ADDPOINTCURVE)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' AddPointCurve
|
|
|
|
#Region "RemovePointCurve"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Linear Dimension.
|
|
''' </summary>
|
|
Public ReadOnly Property RemovePointCurveCommand As ICommand
|
|
Get
|
|
If m_cmdRemovePointCurve Is Nothing Then
|
|
m_cmdRemovePointCurve = New RelayCommand(AddressOf RemovePointCurve)
|
|
End If
|
|
Return m_cmdRemovePointCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the LinearDimension. This method is invoked by the LinDimCommand.
|
|
''' </summary>
|
|
Public Sub RemovePointCurve(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.OPENCOMPO)
|
|
Else If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CURVETOLINE)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.REMOVEPOINTCURVE)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' RemovePointCurve
|
|
|
|
#Region "ApproxCurve"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ApproxCurve.
|
|
''' </summary>
|
|
Public ReadOnly Property ApproxCurveCommand As ICommand
|
|
Get
|
|
If m_cmdApproxCurve Is Nothing Then
|
|
m_cmdApproxCurve = New RelayCommand(AddressOf ApproxCurve)
|
|
End If
|
|
Return m_cmdApproxCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ApproxCurve. This method is invoked by the ApproxCurveCommand.
|
|
''' </summary>
|
|
Public Sub ApproxCurve(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.APPROXCURVEWITHLINES)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.APPROXCURVE)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' ApproxCurve
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.REGION)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.PLANE)
|
|
End If
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRUDE)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.REVOLVE)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SCREW)
|
|
End Sub
|
|
|
|
#End Region ' ScrewCommand
|
|
|
|
#Region "SweptCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Swept.
|
|
''' </summary>
|
|
Public ReadOnly Property SweptCommand As ICommand
|
|
Get
|
|
If m_cmdSwept Is Nothing Then
|
|
m_cmdSwept = New RelayCommand(AddressOf Swept)
|
|
End If
|
|
Return m_cmdSwept
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Ruled. This method is invoked by the SweptCommand.
|
|
''' </summary>
|
|
Public Sub Swept(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SWEPT)
|
|
End Sub
|
|
|
|
#End Region ' SweptCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.RULED)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MERGESURF)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SURFTMTOTRIANGLES)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXPLODESURF)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' ExplodeSurfCommand
|
|
|
|
#Region "ApproxSurfCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ApproxSurf.
|
|
''' </summary>
|
|
Public ReadOnly Property ApproxSurfCommand As ICommand
|
|
Get
|
|
If m_cmdApproxSurf Is Nothing Then
|
|
m_cmdApproxSurf = New RelayCommand(AddressOf ApproxSurf)
|
|
End If
|
|
Return m_cmdApproxSurf
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ApproxSurf. This method is invoked by the ApproxSurfCommand.
|
|
''' </summary>
|
|
Public Sub ApproxSurf(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.APPROXSURF)
|
|
End Sub
|
|
|
|
#End Region ' ApproxSurfCommand
|
|
|
|
#Region "MoveStmVertexFacetCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do MoveStmVertex.
|
|
''' </summary>
|
|
Public ReadOnly Property MoveStmVertexFacetCommand As ICommand
|
|
Get
|
|
If m_cmdMoveStmVertexFacet Is Nothing Then
|
|
m_cmdMoveStmVertexFacet = New RelayCommand(AddressOf MoveStmVertexFacet)
|
|
End If
|
|
Return m_cmdMoveStmVertexFacet
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the MoveStmVertexFacet. This method is invoked by the MoveStmVertexFacetCommand.
|
|
''' </summary>
|
|
Public Sub MoveStmVertexFacet(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MOVESURFFACET)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MOVESURFVERTEX)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' MoveStmVertexFacetCommand
|
|
|
|
#Region "ExtractSurfFacetCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ExtractSurfFacet.
|
|
''' </summary>
|
|
Public ReadOnly Property ExtractSurfFacetCommand As ICommand
|
|
Get
|
|
If m_cmdExtractSurfFacet Is Nothing Then
|
|
m_cmdExtractSurfFacet = New RelayCommand(AddressOf ExtractSurfFacet)
|
|
End If
|
|
Return m_cmdExtractSurfFacet
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ExtractSurfFacet. This method is invoked by the ExtractSurfFacetCommand.
|
|
''' </summary>
|
|
Public Sub ExtractSurfFacet(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACET)
|
|
End Sub
|
|
|
|
#End Region ' ExtractSurfFacetCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.INVERTSURF)
|
|
End Sub
|
|
|
|
#End Region ' InvertSurfCommand
|
|
|
|
#Region "ExtractLoopsCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ExtractLoops.
|
|
''' </summary>
|
|
Public ReadOnly Property ExtractLoopsCommand As ICommand
|
|
Get
|
|
If m_cmdExtractLoops Is Nothing Then
|
|
m_cmdExtractLoops = New RelayCommand(AddressOf ExtractLoops)
|
|
End If
|
|
Return m_cmdExtractLoops
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ExtractLoops. This method is invoked by the ExtractLoopsCommand.
|
|
''' </summary>
|
|
Public Sub ExtractLoops(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFLOOPS)
|
|
End Sub
|
|
|
|
#End Region ' ExtractLoopsCommand
|
|
|
|
#Region "ExtractFacetLoopsCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ExtractFacetLoops.
|
|
''' </summary>
|
|
Public ReadOnly Property ExtractFacetLoopsCommand As ICommand
|
|
Get
|
|
If m_cmdExtractFacetLoops Is Nothing Then
|
|
m_cmdExtractFacetLoops = New RelayCommand(AddressOf ExtractFacetLoops)
|
|
End If
|
|
Return m_cmdExtractFacetLoops
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ExtractFacetLoops. This method is invoked by the ExtractFacetLoopsCommand.
|
|
''' </summary>
|
|
Public Sub ExtractFacetLoops(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXTRACTSURFFACETLOOPS)
|
|
End Sub
|
|
|
|
#End Region ' ExtractFaceLoopsCommand
|
|
|
|
#Region "SolidAddSurfCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do SolidAddSurf.
|
|
''' </summary>
|
|
Public ReadOnly Property SolidAddSurfCommand As ICommand
|
|
Get
|
|
If m_cmdSolidAddSurf Is Nothing Then
|
|
m_cmdSolidAddSurf = New RelayCommand(AddressOf SolidAddSurf)
|
|
End If
|
|
Return m_cmdSolidAddSurf
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the SolidAddSurf. This method is invoked by the AddSurfCommand.
|
|
''' </summary>
|
|
Public Sub SolidAddSurf(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SOLIDADDSURF)
|
|
End Sub
|
|
|
|
#End Region ' SolidAddSurfCommand
|
|
|
|
#Region "SolidSubtractSurfCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do SolidSubtractSurf.
|
|
''' </summary>
|
|
Public ReadOnly Property SolidSubtractSurfCommand As ICommand
|
|
Get
|
|
If m_cmdSolidSubtractSurf Is Nothing Then
|
|
m_cmdSolidSubtractSurf = New RelayCommand(AddressOf SolidSubtractSurf)
|
|
End If
|
|
Return m_cmdSolidSubtractSurf
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the SolidSubtractSurf. This method is invoked by the SolidSubtractSurfCommand.
|
|
''' </summary>
|
|
Public Sub SolidSubtractSurf(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.INVCUTSURFSURF)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SOLIDSUBTRACTSURF)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' SolidSubtractSurfCommand
|
|
|
|
#Region "SolidIntersectSurfCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do SolidIntersectSurf.
|
|
''' </summary>
|
|
Public ReadOnly Property SolidIntersectSurfCommand As ICommand
|
|
Get
|
|
If m_cmdSolidIntersectSurf Is Nothing Then
|
|
m_cmdSolidIntersectSurf = New RelayCommand(AddressOf SolidIntersectSurf)
|
|
End If
|
|
Return m_cmdSolidIntersectSurf
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the SolidIntersectSurf. This method is invoked by the SolidIntersectSurfCommand.
|
|
''' </summary>
|
|
Public Sub SolidIntersectSurf(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CUTSURFSURF)
|
|
ElseIf (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.TRIMSURFTMWITHCURVE)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SOLIDINTERSECTSURF)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' SolidIntersectSurfCommand
|
|
|
|
#Region "IntersectSurfSurfCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do IntersectSurfSurf.
|
|
''' </summary>
|
|
Public ReadOnly Property IntersectSurfSurfCommand As ICommand
|
|
Get
|
|
If m_cmdIntersectSurfSurf Is Nothing Then
|
|
m_cmdIntersectSurfSurf = New RelayCommand(AddressOf IntersectSurfSurf)
|
|
End If
|
|
Return m_cmdIntersectSurfSurf
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the IntersectSurfSurf. This method is invoked by the IntersectSurfSurfCommand.
|
|
''' </summary>
|
|
Public Sub IntersectSurfSurf(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.INTERSECTSURFSURF)
|
|
End Sub
|
|
|
|
#End Region ' IntersectSurfSurfCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.SetLastInteger(GDB_ID.SEL)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.DELETE)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGELAYERGLOB)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGELAYER)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' ChangeLayerCommand
|
|
|
|
#Region "ChangeStatusCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ChangeStatus.
|
|
''' </summary>
|
|
Public ReadOnly Property ChangeStatusCommand As ICommand
|
|
Get
|
|
If m_cmdChangeStatus Is Nothing Then
|
|
m_cmdChangeStatus = New RelayCommand(AddressOf ChangeStatus)
|
|
End If
|
|
Return m_cmdChangeStatus
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ChangeStatus. This method is invoked by the ChangeStatusCommand.
|
|
''' </summary>
|
|
Public Sub ChangeStatus(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Control) = ModifierKeys.Control Then
|
|
Map.refProjectVM.GetController.SetLastInteger( GDB_ID.SELPART)
|
|
Map.refProjectVM.GetController.SetLastBoolean( True)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTATUS)
|
|
ElseIf (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.SetLastInteger( GDB_ID.SELLAYER)
|
|
Map.refProjectVM.GetController.SetLastBoolean( True)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTATUS)
|
|
Else
|
|
Map.refProjectVM.GetController.SetLastInteger( GDB_ID.SEL)
|
|
Map.refProjectVM.GetController.SetLastBoolean( False)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTATUS)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' ChangeStatusCommand
|
|
|
|
#Region "ChangeAlphaCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ChangeAlpha.
|
|
''' </summary>
|
|
Public ReadOnly Property ChangeAlphaCommand As ICommand
|
|
Get
|
|
If m_cmdChangeAlpha Is Nothing Then
|
|
m_cmdChangeAlpha = New RelayCommand(AddressOf ChangeAlpha)
|
|
End If
|
|
Return m_cmdChangeAlpha
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ChangeAlpha. This method is invoked by the ChangeAlphaCommand.
|
|
''' </summary>
|
|
Public Sub ChangeAlpha(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGEALPHA)
|
|
End Sub
|
|
|
|
#End Region ' ChangeAlphaCommand
|
|
|
|
#Region "ResetColorCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ResetColor.
|
|
''' </summary>
|
|
Public ReadOnly Property ResetColorCommand As ICommand
|
|
Get
|
|
If m_cmdResetColor Is Nothing Then
|
|
m_cmdResetColor = New RelayCommand(AddressOf ResetColor)
|
|
End If
|
|
Return m_cmdResetColor
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ResetColor. This method is invoked by the ResetColorCommand.
|
|
''' </summary>
|
|
Public Sub ResetColor(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.RESETCOLOR)
|
|
End Sub
|
|
|
|
#End Region ' ResetColorCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGECOLOR)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.INVERTCURVE)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHANGESTARTCURVE)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.TRIMEXTENDCURVE)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.BREAKCURVE)
|
|
End Sub
|
|
|
|
#End Region ' BreakCurveCommand
|
|
|
|
#Region "SplitCurveCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do SplitCurve.
|
|
''' </summary>
|
|
Public ReadOnly Property SplitCurveCommand As ICommand
|
|
Get
|
|
If m_cmdSplitCurve Is Nothing Then
|
|
m_cmdSplitCurve = New RelayCommand(AddressOf SplitCurve)
|
|
End If
|
|
Return m_cmdSplitCurve
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the SplitCurve. This method is invoked by the SplitCurveCommand.
|
|
''' </summary>
|
|
Public Sub SplitCurve(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SPLITCURVE)
|
|
End Sub
|
|
|
|
#End Region ' SplitCurveCommand
|
|
|
|
#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)
|
|
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)
|
|
If (Keyboard.Modifiers And ModifierKeys.Control) <> ModifierKeys.Control Then
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) <> ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.SetLastBoolean(False)
|
|
Else
|
|
Map.refProjectVM.GetController.SetLastBoolean(True)
|
|
End If
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.JOINCURVE)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MERGECURVESINCOMPO)
|
|
End If
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.EXPLODECURVE)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SETCURVETHICKNESS)
|
|
End Sub
|
|
|
|
#End Region ' SetCurveThCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.FILLET)
|
|
End Sub
|
|
|
|
#End Region ' FilletCommand
|
|
|
|
#Region "ChamferCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Chamfer.
|
|
''' </summary>
|
|
Public ReadOnly Property ChamferCommand As ICommand
|
|
Get
|
|
If m_cmdChamfer Is Nothing Then
|
|
m_cmdChamfer = New RelayCommand(AddressOf Chamfer)
|
|
End If
|
|
Return m_cmdChamfer
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Chamfer. This method is invoked by the ChamferCommand.
|
|
''' </summary>
|
|
Public Sub Chamfer(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.CHAMFER)
|
|
End Sub
|
|
|
|
#End Region ' ChamferCommand
|
|
|
|
#Region "ArcFlipCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Arc Flip.
|
|
''' </summary>
|
|
Public ReadOnly Property ArcFlipCommand As ICommand
|
|
Get
|
|
If m_cmdArcFlip Is Nothing Then
|
|
m_cmdArcFlip = New RelayCommand(AddressOf ArcFlip)
|
|
End If
|
|
Return m_cmdArcFlip
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ArcFlip. This method is invoked by the ArcFlipCommand.
|
|
''' </summary>
|
|
Public Sub ArcFlip(ByVal param As Object)
|
|
If (Keyboard.Modifiers And ModifierKeys.Shift) = ModifierKeys.Shift Then
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCEXPLEMENTARY)
|
|
Else
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ARCFLIP)
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' ArcFlipCommand
|
|
|
|
#Region "ModifyArcRadiusCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ModifyArcRadius.
|
|
''' </summary>
|
|
Public ReadOnly Property ModifyArcRadiusCommand As ICommand
|
|
Get
|
|
If m_cmdModifyArcRadius Is Nothing Then
|
|
m_cmdModifyArcRadius = New RelayCommand(AddressOf ModifyArcRadius)
|
|
End If
|
|
Return m_cmdModifyArcRadius
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ModifyArcRadius. This method is invoked by the ModifyArcRadiusCommand.
|
|
''' </summary>
|
|
Public Sub ModifyArcRadius(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MODIFYARCRADIUS)
|
|
End Sub
|
|
|
|
#End Region ' ModifyTextCommand
|
|
|
|
#Region "ModifyTextCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do ModifyText.
|
|
''' </summary>
|
|
Public ReadOnly Property ModifyTextCommand As ICommand
|
|
Get
|
|
If m_cmdModifyText Is Nothing Then
|
|
m_cmdModifyText = New RelayCommand(AddressOf ModifyText)
|
|
End If
|
|
Return m_cmdModifyText
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the ModifyText. This method is invoked by the ModifyTextCommand.
|
|
''' </summary>
|
|
Public Sub ModifyText(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MODIFYTEXT)
|
|
End Sub
|
|
|
|
#End Region ' ModifyTextCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MOVE)
|
|
End Sub
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ROTATE)
|
|
End Sub
|
|
|
|
#End Region ' RotateCommand
|
|
|
|
#Region "Rotate3DCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Rotate3D.
|
|
''' </summary>
|
|
Public ReadOnly Property Rotate3DCommand As ICommand
|
|
Get
|
|
If m_cmdRotate3D Is Nothing Then
|
|
m_cmdRotate3D = New RelayCommand(AddressOf Rotate3D)
|
|
End If
|
|
Return m_cmdRotate3D
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Rotate3D. This method is invoked by the Rotate3DCommand.
|
|
''' </summary>
|
|
Public Sub Rotate3D(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.ROTATE3D)
|
|
End Sub
|
|
|
|
#End Region ' Rotate3DCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MIRROR)
|
|
End Sub
|
|
|
|
#End Region ' MirrorCommand
|
|
|
|
#Region "Mirror3DCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Mirror3D.
|
|
''' </summary>
|
|
Public ReadOnly Property Mirror3DCommand As ICommand
|
|
Get
|
|
If m_cmdMirror3D Is Nothing Then
|
|
m_cmdMirror3D = New RelayCommand(AddressOf Mirror3D)
|
|
End If
|
|
Return m_cmdMirror3D
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Mirror3D. This method is invoked by the Mirror3DCommand.
|
|
''' </summary>
|
|
Public Sub Mirror3D(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.MIRROR3D)
|
|
End Sub
|
|
|
|
#End Region ' Mirror3DCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SCALE)
|
|
End Sub
|
|
|
|
#End Region ' ScaleCommand
|
|
|
|
#Region "Scale3DCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Scale3D.
|
|
''' </summary>
|
|
Public ReadOnly Property Scale3DCommand As ICommand
|
|
Get
|
|
If m_cmdScale3D Is Nothing Then
|
|
m_cmdScale3D = New RelayCommand(AddressOf Scale3D)
|
|
End If
|
|
Return m_cmdScale3D
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Scale3D. This method is invoked by the Scale3DCommand.
|
|
''' </summary>
|
|
Public Sub Scale3D(ByVal param As Object)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.SCALE3D)
|
|
End Sub
|
|
|
|
#End Region ' Scale3DCommand
|
|
|
|
#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)
|
|
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)
|
|
Map.refProjectVM.GetController.ExecuteCommand(Controller.CMD.OFFSET)
|
|
End Sub
|
|
|
|
#End Region ' OffsetCommand
|
|
|
|
#End Region ' Commands
|
|
|
|
Private Sub OnIdle()
|
|
If IniFile.m_ProjectMode = ProjectModeOpt.DRAW OrElse IniFile.m_ProjectMode = ProjectModeOpt.ONLYDRAW Then
|
|
bLayerOk = Map.refProjectVM.GetController.GetCurrLayer <> GDB_ID.NULL
|
|
If Not IniFile.m_ProjectSceneContext = 0 Then
|
|
bSelOk = EgtGetFirstSelectedObj() <> GDB_ID.NULL
|
|
bLayerOkAndSelOk = m_bLayerOk And m_bSelOk
|
|
Map.refStatusBarVM.UpdateSelectedCount()
|
|
End If
|
|
|
|
If Application.m_UpdateLayerTree Then
|
|
Map.refManageLayerExpanderVM.LoadObjTree()
|
|
Application.m_UpdateLayerTree = False
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
End Class |