7f5216acaf
- Aggiunti in opzioni progamma i parametri che indicano il tipo di entità da selezionae per ogni tipo di lavorazioni. - Aggiunta la pagina opzioni macchina con l'indicazione della Z di sicurezza. - Inizio progetto selezione avanzata.
66 lines
1.8 KiB
VB.net
66 lines
1.8 KiB
VB.net
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class MachOptionsViewModel
|
|
|
|
' Definizione comandi
|
|
Private m_cmdCloseMachOptions As ICommand
|
|
|
|
Private m_dSafeZ As String
|
|
Public Property SafeZ As String
|
|
Get
|
|
Return m_dSafeZ
|
|
End Get
|
|
Set(value As String)
|
|
Dim dSafeZ As Double = 0
|
|
StringToLen(value, dSafeZ)
|
|
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, dSafeZ)
|
|
EgtMdbSave()
|
|
m_dSafeZ = value
|
|
End Set
|
|
End Property
|
|
|
|
Sub New()
|
|
' Leggo distanza di sicurezza
|
|
Dim dVal As Double = 0
|
|
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, dVal)
|
|
m_dSafeZ = LenToString(dVal, 2)
|
|
End Sub
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "CloseMachOptionsCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that remove the current selected machining.
|
|
''' </summary>
|
|
Public ReadOnly Property CloseMachOptionsCommand() As ICommand
|
|
Get
|
|
If m_cmdCloseMachOptions Is Nothing Then
|
|
m_cmdCloseMachOptions = New RelayCommand(AddressOf CloseMachOptions)
|
|
End If
|
|
Return m_cmdCloseMachOptions
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand.
|
|
''' </summary>
|
|
Public Sub CloseMachOptions()
|
|
' Chiusura finestra
|
|
For Each Window In Application.Current.Windows
|
|
If TypeOf Window Is MachOptionsView Then
|
|
Dim MachOptionsWindow As MachOptionsView = DirectCast(Window, MachOptionsView)
|
|
MachOptionsWindow.Close()
|
|
End If
|
|
Next
|
|
End Sub
|
|
|
|
#End Region ' CloseMachOptionsCommand
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
End Namespace |