Files
EgtDOORCreator/AboutBoxWindow/AboutBoxViewModel.vb
T
Nicola Pievani 5cdd5a84c9 EgtDOORCreator 1.8f5 :
- se il direttorio BaseDir nel file Config.ini è sbagliato il programma avvisa con un messaggio a video e chiude il programma;
- se i direttori ProjectDirectory e TempateDirecory nel file Config.ini non esistono allora verranno creati di default i direttori MyProjects e Template nel direttorio C:\EgtData\EgtDOORCreator;
- selezionando la porta corrente dalla lista delle porte nel DoorManager non viene chiesto di salvare la porta corrente.
2017-06-22 15:38:47 +00:00

63 lines
1.7 KiB
VB.net

Imports System.ComponentModel
Public Class AboutBoxViewModel
Implements INotifyPropertyChanged
'Inherits ViewModelBase
Private m_AboutBoxVisibility As Visibility
Public Property AboutBoxVisibility As Visibility
Get
Return m_AboutBoxVisibility
End Get
Set(value As Visibility)
If value <> m_AboutBoxVisibility Then
m_AboutBoxVisibility = value
NotifyPropertyChanged("AboutBoxVisibility")
End If
End Set
End Property
' Definizione comandi
Private m_cmdClose As ICommand
#Region "COMMANDS"
#Region "CloseCommand"
''' <summary>
''' Returns a command that do Point.
''' </summary>
Public ReadOnly Property CloseCommand As ICommand
Get
If m_cmdClose Is Nothing Then
m_cmdClose = New Command(AddressOf Close, AddressOf CanClose)
End If
Return m_cmdClose
End Get
End Property
''' <summary>
''' Execute the Point. This method is invoked by the PointCommand.
''' </summary>
Public Sub Close(ByVal param As Object)
AboutBoxVisibility = Visibility.Hidden
End Sub
''' <summary>
''' Returns always true.
''' </summary>
Private Function CanClose(ByVal param As Object) As Boolean
Return True
End Function
#End Region ' CloseCommand
#End Region ' Commands
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
Public Sub NotifyPropertyChanged(propName As String)
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
End Sub
End Class