a312eef399
- Aggiunta possibilità di getire progressbar e output message presenti nella StatusBar da LUA. - Inizio scrittura della struttura per MTables. - Aggiunta la possibilità di aggiungere nuovi gruppi di lavorazione. - Gestita uscita da NewMachiningCmd(in OperationList) con Esc.
137 lines
3.9 KiB
VB.net
137 lines
3.9 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
|
|
Private m_cmdMTableDb 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
|
|
|
|
#Region "MTableDbCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Exec.
|
|
''' </summary>
|
|
Public ReadOnly Property MTableDbCommand As ICommand
|
|
Get
|
|
If m_cmdMTableDb Is Nothing Then
|
|
m_cmdMTableDb = New RelayCommand(AddressOf MTableDb)
|
|
End If
|
|
Return m_cmdMTableDb
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Sub MTableDb(ByVal param As Object)
|
|
Dim MTableDbWindow As New MTableDbView
|
|
MTableDbWindow.Height = 614
|
|
MTableDbWindow.Width = 1024
|
|
MTableDbWindow.DataContext = New MTableDbViewModel
|
|
MTableDbWindow.Owner = Application.Current.MainWindow
|
|
MTableDbWindow.ShowDialog()
|
|
End Sub
|
|
|
|
#End Region ' MTableDbCommand
|
|
|
|
#End Region
|
|
|
|
End Class
|
|
|
|
End Namespace |