5eecf956b5
- Tradotti un po' di messaggi in italiano. - Aggiunta possibilità in Db utensili e lavorazioni di annullare le modifiche apportate ad un elemento premendo il tasto Esc.
71 lines
2.0 KiB
VB.net
71 lines
2.0 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtUILib
|
|
|
|
Namespace EgtCAM5
|
|
|
|
Public Class OptionsViewModel
|
|
|
|
Public ReadOnly Property LanguageList As ObservableCollection(Of Language)
|
|
Get
|
|
Return IniFile.m_LanguageList
|
|
End Get
|
|
End Property
|
|
|
|
Public Property SelectedLanguage As Language
|
|
Get
|
|
Return IniFile.m_SelectedLanguage
|
|
End Get
|
|
Set(value As Language)
|
|
If value IsNot IniFile.m_SelectedLanguage Then
|
|
IniFile.m_SelectedLanguage = value
|
|
WritePrivateProfileString(S_GENERAL, K_MESSAGES, m_SelectedLanguage.Name)
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_Title As String
|
|
Public ReadOnly Property Title As String
|
|
Get
|
|
Return EgtMsg(MSG_MAINWINDOW + 5)
|
|
End Get
|
|
End Property
|
|
|
|
' Definizione comandi
|
|
Private m_cmdCloseOptions As ICommand
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "CloseMachiningsDbCommand"
|
|
|
|
''' <summary>
|
|
''' Returns a command that remove the current selected machining.
|
|
''' </summary>
|
|
Public ReadOnly Property CloseOptionsCommand() As ICommand
|
|
Get
|
|
If m_cmdCloseOptions Is Nothing Then
|
|
m_cmdCloseOptions = New RelayCommand(AddressOf CloseOptions)
|
|
End If
|
|
Return m_cmdCloseOptions
|
|
End Get
|
|
End Property
|
|
|
|
''' <summary>
|
|
''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand.
|
|
''' </summary>
|
|
Public Sub CloseOptions()
|
|
' Chiusura finestra
|
|
For Each Window In Application.Current.Windows
|
|
If TypeOf Window Is OptionsView Then
|
|
Dim OptionsWindow As OptionsView = DirectCast(Window, OptionsView)
|
|
OptionsWindow.Close()
|
|
End If
|
|
Next
|
|
End Sub
|
|
|
|
#End Region ' CloseMachiningDbCommand
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class
|
|
|
|
End Namespace |