Files
EgtCAM5/ProjectPage/DbPanel/DbPanelViewModel.vb
T
Emmanuele Sassi dffe9de64e EgtCAM5 :
- Migliorie SetUp.
- Migliorie simulazione.
2017-01-27 18:33:56 +00:00

137 lines
3.8 KiB
VB.net

Imports EgtUILib
Namespace EgtCAM5
Public Class DbPanelViewModel
Inherits ViewModelBase
#Region "FIELDS & PROPERTIES"
' Definizione comandi
Private m_cmdToolDb As ICommand
Private m_cmdMachDb As ICommand
Private m_cmdMachOptions As ICommand
#Region "Messages"
Public ReadOnly Property ToolDBMsg As String
Get
Return EgtMsg(MSG_MAINWINDOW + 6)
End Get
End Property
Public ReadOnly Property MachiningDbMsg As String
Get
Return EgtMsg(MSG_MAINWINDOW + 7)
End Get
End Property
#End Region ' Messages
#Region "ToolTip"
Public ReadOnly Property ToolDBToolTip As String
Get
Return EgtMsg(MSG_MAINWINDOW + 3)
End Get
End Property
Public ReadOnly Property MachiningDbToolTip As String
Get
Return EgtMsg(MSG_MAINWINDOW + 4)
End Get
End Property
#End Region ' ToolTip
#End Region 'FIELDS & PROPERTIES
#Region "COMMANDS"
#Region "ToolDbCommand"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property ToolDbCommand As ICommand
Get
If m_cmdToolDb Is Nothing Then
m_cmdToolDb = New RelayCommand(AddressOf ToolDb)
End If
Return m_cmdToolDb
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub ToolDb(ByVal param As Object)
Dim ToolDbWindow As New ToolsDbView
ToolDbWindow.Height = 614
ToolDbWindow.Width = 1024
ToolDbWindow.DataContext = New ToolsDbViewModel
ToolDbWindow.Owner = Application.Current.MainWindow
ToolDbWindow.ShowDialog()
End Sub
#End Region ' ToolDbCommand
#Region "MachDbCommand"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property MachDbCommand As ICommand
Get
If m_cmdMachDb Is Nothing Then
m_cmdMachDb = New RelayCommand(AddressOf MachDb)
End If
Return m_cmdMachDb
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub MachDb(ByVal param As Object)
Dim MachDbWindow As New MachiningsDbView
MachDbWindow.Height = 614
MachDbWindow.Width = 1024
MachDbWindow.DataContext = New MachiningsDbViewModel
MachDbWindow.Owner = Application.Current.MainWindow
MachDbWindow.ShowDialog()
End Sub
#End Region ' MachDbCommand
#Region "MachOptionsCommand"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property MachOptionsCommand As ICommand
Get
If m_cmdMachOptions Is Nothing Then
m_cmdMachOptions = New RelayCommand(AddressOf MachOptions)
End If
Return m_cmdMachOptions
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub MachOptions(ByVal param As Object)
Dim MachOptionWindow As New MachOptionsView
'MachOptionWindow.Height = 614
'MachOptionWindow.Width = 256
MachOptionWindow.DataContext = New MachOptionsViewModel
MachOptionWindow.Owner = Application.Current.MainWindow
MachOptionWindow.ShowDialog()
End Sub
#End Region ' MachOptionsCommand
#End Region ' COMMANDS
End Class
End Namespace