3a5aeedd81
- Separazione GridView in più pannelli. - Cambio colori della grafica.
148 lines
4.2 KiB
VB.net
148 lines
4.2 KiB
VB.net
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class ShowPanelViewModel
|
|
Inherits ViewModelBase
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
' Definizione comandi
|
|
Private m_cmdWireframe As ICommand
|
|
Private m_cmdHiddenLine As ICommand
|
|
Private m_cmdShading As ICommand
|
|
Private m_cmdCurveDir As ICommand
|
|
|
|
#Region "ToolTip"
|
|
|
|
Public ReadOnly Property RenderingWFToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_GRIDVIEWPANEL + 1)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property RenderingHLToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_GRIDVIEWPANEL + 2)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property RenderingSHToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_GRIDVIEWPANEL + 3)
|
|
End Get
|
|
End Property
|
|
Public ReadOnly Property CurveDirToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_GRIDVIEWPANEL + 16)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region
|
|
|
|
Private m_CurveDirIsChecked As Boolean
|
|
Public Property CurveDirIsChecked As Boolean
|
|
Get
|
|
Return m_CurveDirIsChecked
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_CurveDirIsChecked Then
|
|
m_CurveDirIsChecked = value
|
|
EgtSetShowCurveDirection(value)
|
|
OnPropertyChanged("CurveDirIsChecked")
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "WireframeCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that manage the MainWindow_ContentRendered command
|
|
''' </summary>
|
|
Public ReadOnly Property WireframeCommand() As ICommand
|
|
Get
|
|
If m_cmdWireframe Is Nothing Then
|
|
m_cmdWireframe = New RelayCommand(AddressOf Wireframe)
|
|
End If
|
|
Return m_cmdWireframe
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Manage the MainWindow_ContentRendered event. This method is invoked by the cmdMainWindow_ContentRendered.
|
|
''' </summary>
|
|
Public Sub Wireframe(ByVal param As Object)
|
|
' Notify the ContentRendered event
|
|
Application.Msn.NotifyColleagues(Application.WIREFRAME)
|
|
End Sub
|
|
|
|
#End Region ' WireframeCommand
|
|
|
|
#Region "HiddenLineCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that swith the view mode to HiddenLine.
|
|
''' </summary>
|
|
Public ReadOnly Property HiddenLineCommand As ICommand
|
|
Get
|
|
If m_cmdHiddenLine Is Nothing Then
|
|
m_cmdHiddenLine = New RelayCommand(AddressOf HiddenLine, AddressOf CanHiddenLine)
|
|
End If
|
|
Return m_cmdHiddenLine
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Swith the view mode to HiddenLine. This method is invoked by the HiddenLineCommand.
|
|
''' </summary>
|
|
Public Sub HiddenLine(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.HIDDENLINE)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanHiddenLine(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' HiddenLineCommand
|
|
|
|
#Region "ShadingCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that swith the view mode to Shading.
|
|
''' </summary>
|
|
Public ReadOnly Property ShadingCommand As ICommand
|
|
Get
|
|
If m_cmdShading Is Nothing Then
|
|
m_cmdShading = New RelayCommand(AddressOf Shading, AddressOf CanShading)
|
|
End If
|
|
Return m_cmdShading
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Swith the view mode to Shading. This method is invoked by the ShadingCommand.
|
|
''' </summary>
|
|
Public Sub Shading(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.SHADING)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanShading(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' ShadingCommand
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
End Namespace |