Imports System.Collections.ObjectModel Imports EgtUILib Namespace EgtCAM5 Public Class GunStockPanelViewModel Inherits ViewModelBase Public ReadOnly Property MruNewGunStockNames As ObservableCollection(Of String) Get Return IniFile.m_MruNewGunStock.m_FileNames End Get End Property Public ReadOnly Property MruModifyGunStockNames As ObservableCollection(Of String) Get Return IniFile.m_MruModifyGunStock.m_FileNames End Get End Property #Region "Messages" Public ReadOnly Property NewGunStockMsg As String Get Return EgtMsg(MSG_GUNSTOCK + 1) End Get End Property Public ReadOnly Property ModifyGunStockMsg As String Get Return EgtMsg(MSG_GUNSTOCK + 3) End Get End Property #End Region ' Messages #Region "ToolTip" Public ReadOnly Property NewGunStockToolTip As String Get Return EgtMsg(MSG_GUNSTOCK + 2) End Get End Property Public ReadOnly Property ModifyGunStockToolTip As String Get Return EgtMsg(MSG_GUNSTOCK + 4) End Get End Property #End Region ' ToolTip ' Definizione comandi Private m_cmdNewGunStock As ICommand Private m_cmdModifyGunStock As ICommand Private Shared m_cmdOpenMruNewGunStock As ICommand Private Shared m_cmdOpenMruModifyGunStock As ICommand #Region "COMMANDS" #Region "NewGunStockCommand" ''' ''' Returns a command that do Import. ''' Public ReadOnly Property NewGunStockCommand As ICommand Get If m_cmdNewGunStock Is Nothing Then m_cmdNewGunStock = New RelayCommand(AddressOf NewGunStock) End If Return m_cmdNewGunStock End Get End Property ''' ''' Execute the Door. This method is invoked by the DoorsCommand. ''' Public Sub NewGunStock(ByVal param As Object) Application.Msn.NotifyColleagues(Application.GUNSTOCKNEW, String.Empty) End Sub #End Region ' NewGunStockCommand #Region "ModifyGunStockCommand" ''' ''' Returns a command that do Import. ''' Public ReadOnly Property ModifyGunStockCommand As ICommand Get If m_cmdModifyGunStock Is Nothing Then m_cmdModifyGunStock = New RelayCommand(AddressOf ModifyGunStock) End If Return m_cmdModifyGunStock End Get End Property ''' ''' Execute the Door. This method is invoked by the DoorsCommand. ''' Public Sub ModifyGunStock(ByVal param As Object) Application.Msn.NotifyColleagues(Application.GUNSTOCKMODIF, String.Empty) End Sub #End Region ' ModifyGunStockCommand #Region "OpenMruNewGunStockCommand" ''' ''' Returns a command that do Open. ''' Public Shared ReadOnly Property OpenMruNewGunStockCommand As ICommand Get If m_cmdOpenMruNewGunStock Is Nothing Then m_cmdOpenMruNewGunStock = New RelayCommand(AddressOf OpenMruNewGunStock) End If Return m_cmdOpenMruNewGunStock End Get End Property ''' ''' Execute the Open. This method is invoked by the OpenCommand. ''' Public Shared Sub OpenMruNewGunStock(ByVal param As Object) Application.Msn.NotifyColleagues(Application.GUNSTOCKNEW, DirectCast(param, String).Replace("__", "_")) End Sub #End Region ' OpenMruNewGunStockCommand #Region "OpenMruModifyGunStockCommand" ''' ''' Returns a command that do Open. ''' Public Shared ReadOnly Property OpenMruModifyGunStockCommand As ICommand Get If m_cmdOpenMruModifyGunStock Is Nothing Then m_cmdOpenMruModifyGunStock = New RelayCommand(AddressOf OpenMruModifyGunStock) End If Return m_cmdOpenMruModifyGunStock End Get End Property ''' ''' Execute the Open. This method is invoked by the OpenCommand. ''' Public Shared Sub OpenMruModifyGunStock(ByVal param As Object) Application.Msn.NotifyColleagues(Application.GUNSTOCKMODIF, DirectCast(param, String).Replace("__", "_")) End Sub #End Region ' OpenMruNewGunStockCommand #End Region End Class End Namespace