7e660ee9a2
- Aggiunti MRUFile su ExecScript e Doors.
108 lines
3.0 KiB
VB.net
108 lines
3.0 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class DoorsPanelViewModel
|
|
Inherits ViewModelBase
|
|
|
|
Public ReadOnly Property MruDoorNames As ObservableCollection(Of String)
|
|
Get
|
|
Return IniFile.m_MruDoors.m_FileNames
|
|
End Get
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdDoors As ICommand
|
|
Private m_cmdDMach As ICommand
|
|
Private Shared m_cmdOpenMruDoor As ICommand
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "DoorsCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Import.
|
|
''' </summary>
|
|
Public ReadOnly Property DoorsCommand As ICommand
|
|
Get
|
|
If m_cmdDoors Is Nothing Then
|
|
m_cmdDoors = New RelayCommand(AddressOf Doors, AddressOf CanDoors)
|
|
End If
|
|
Return m_cmdDoors
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Door. This method is invoked by the DoorsCommand.
|
|
''' </summary>
|
|
Public Sub Doors(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.DOORSSCRIPT, String.Empty)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanDoors(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' DoorsCommand
|
|
|
|
#Region "OpenMruDoorCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Open.
|
|
''' </summary>
|
|
Public Shared ReadOnly Property OpenMruDoorCommand As ICommand
|
|
Get
|
|
If m_cmdOpenMruDoor Is Nothing Then
|
|
m_cmdOpenMruDoor = New RelayCommand(AddressOf OpenMruDoor)
|
|
End If
|
|
Return m_cmdOpenMruDoor
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Open. This method is invoked by the OpenCommand.
|
|
''' </summary>
|
|
Public Shared Sub OpenMruDoor(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.DOORSSCRIPT, DirectCast(param, String))
|
|
End Sub
|
|
|
|
#End Region ' OpenMruFileCommand
|
|
|
|
#Region "DMachCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Import.
|
|
''' </summary>
|
|
Public ReadOnly Property DMachCommand As ICommand
|
|
Get
|
|
If m_cmdDMach Is Nothing Then
|
|
m_cmdDMach = New RelayCommand(AddressOf DMach, AddressOf CanDMach)
|
|
End If
|
|
Return m_cmdDMach
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Dmach. This method is invoked by the DMachCommand.
|
|
''' </summary>
|
|
Public Sub DMach(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.DMACHSCRIPT)
|
|
End Sub
|
|
|
|
''' <summary>
|
|
''' Returns always true.
|
|
''' </summary>
|
|
Private Function CanDMach(ByVal param As Object) As Boolean
|
|
Return True
|
|
End Function
|
|
|
|
#End Region ' DMachCommand
|
|
|
|
#End Region
|
|
|
|
End Class
|
|
|
|
End Namespace |