ad38e4d3e1
This reverts commit 00a338c202.
161 lines
4.1 KiB
VB.net
161 lines
4.1 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
|
|
Public Class MachinePanelVM
|
|
Inherits VMBase
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
' Lista delle macchine disponibili
|
|
Private m_MachineList As New ObservableCollection(Of Machine)
|
|
Public Overridable Property MachineList As ObservableCollection(Of Machine)
|
|
Get
|
|
Return m_MachineList
|
|
End Get
|
|
Set(value As ObservableCollection(Of Machine))
|
|
m_MachineList = value
|
|
End Set
|
|
End Property
|
|
|
|
' Macchina correntemente selezionata e quindi attiva
|
|
Private m_SelectedMachine As Machine
|
|
Public Overridable Property SelectedMachine As Machine
|
|
Get
|
|
Return m_SelectedMachine
|
|
End Get
|
|
Set(value As Machine)
|
|
If value IsNot m_SelectedMachine Then
|
|
'EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
|
If EgtSetCurrMachine(value.Name) Then
|
|
m_SelectedMachine = value
|
|
NotifyPropertyChanged(NameOf(SelectedMachine))
|
|
End If
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_SetUp_Background As Brush = DirectCast(New BrushConverter().ConvertFrom("#FFDDDDDD"), SolidColorBrush)
|
|
Public Property SetUp_Background As Brush
|
|
Get
|
|
Return m_SetUp_Background
|
|
End Get
|
|
Set(value As Brush)
|
|
m_SetUp_Background = value
|
|
NotifyPropertyChanged(NameOf(SetUp_Background))
|
|
End Set
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdToolDb As ICommand
|
|
Private m_cmdMachDb As ICommand
|
|
Private m_cmdSetUp As ICommand
|
|
Private m_cmdMachOptions As ICommand
|
|
|
|
#End Region 'FIELDS & PROPERTIES
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
' Creo riferimento a questa classe in OmagOFFICEMap
|
|
LibMap.SetRefMachinePanelVM(Me)
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
#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 Command(AddressOf ToolDb)
|
|
End If
|
|
Return m_cmdToolDb
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Overridable Sub ToolDb(ByVal param As Object)
|
|
|
|
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 Command(AddressOf MachDb)
|
|
End If
|
|
Return m_cmdMachDb
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Overridable Sub MachDb(ByVal param As Object)
|
|
|
|
End Sub
|
|
|
|
#End Region ' MachDbCommand
|
|
|
|
#Region "SetUpCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Exec.
|
|
''' </summary>
|
|
Public ReadOnly Property SetUpCommand As ICommand
|
|
Get
|
|
If m_cmdSetUp Is Nothing Then
|
|
m_cmdSetUp = New Command(AddressOf SetUp)
|
|
End If
|
|
Return m_cmdSetUp
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Overridable Sub SetUp(ByVal param As Object)
|
|
|
|
End Sub
|
|
|
|
#End Region ' SetUpCommand
|
|
|
|
#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 Command(AddressOf MachOptions)
|
|
End If
|
|
Return m_cmdMachOptions
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Overridable Sub MachOptions(ByVal param As Object)
|
|
|
|
End Sub
|
|
|
|
#End Region ' MachOptionsCommand
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class |