c19dabea52
- per default in lavorazione si carica solo la tavola - non si salvano più in MRU i comandi lua dei bottoni Special.
87 lines
2.4 KiB
VB.net
87 lines
2.4 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class ExecutePanelViewModel
|
|
Inherits ViewModelBase
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Public ReadOnly Property MruScriptNames As ObservableCollection(Of String)
|
|
Get
|
|
Return IniFile.m_MruScripts.m_FileNames
|
|
End Get
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdExec As ICommand
|
|
Private Shared m_cmdOpenMruScript As ICommand
|
|
|
|
#Region "ToolTip"
|
|
|
|
Public ReadOnly Property ExecToolTip As String
|
|
Get
|
|
Return EgtMsg(MSG_TOPCOMMANDBAR + 8)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' ToolTip
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "ExecCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Exec.
|
|
''' </summary>
|
|
Public ReadOnly Property ExecCommand As ICommand
|
|
Get
|
|
If m_cmdExec Is Nothing Then
|
|
m_cmdExec = New RelayCommand(AddressOf Exec)
|
|
End If
|
|
Return m_cmdExec
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Exec. This method is invoked by the ExecCommand.
|
|
''' </summary>
|
|
Public Sub Exec(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.PREEXECSCRIPT, True)
|
|
Application.Msn.NotifyColleagues(Application.EXECSCRIPT, String.Empty)
|
|
End Sub
|
|
|
|
#End Region ' ExecCommand
|
|
|
|
#Region "OpenMruScriptCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that do Open.
|
|
''' </summary>
|
|
Public Shared ReadOnly Property OpenMruScriptCommand As ICommand
|
|
Get
|
|
If m_cmdOpenMruScript Is Nothing Then
|
|
m_cmdOpenMruScript = New RelayCommand(AddressOf OpenMruScript)
|
|
End If
|
|
Return m_cmdOpenMruScript
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Execute the Open. This method is invoked by the OpenCommand.
|
|
''' </summary>
|
|
Public Shared Sub OpenMruScript(ByVal param As Object)
|
|
Application.Msn.NotifyColleagues(Application.PREEXECSCRIPT, True)
|
|
Application.Msn.NotifyColleagues(Application.EXECSCRIPT, DirectCast(param, String).Replace("__", "_"))
|
|
End Sub
|
|
|
|
#End Region ' OpenMruFileCommand
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
End Namespace |