f68dd5c81a
- primo rilascio.
60 lines
1.5 KiB
VB.net
60 lines
1.5 KiB
VB.net
Public Class MainWindowVM
|
|
|
|
' Riferimento al Model della MainWindow
|
|
Private m_MainWindowM As MainWindowM
|
|
Friend ReadOnly Property MainWindowM As MainWindowM
|
|
Get
|
|
Return m_MainWindowM
|
|
End Get
|
|
End Property
|
|
|
|
' variabile che indica che il programma è stato avviato correttamente (sia la mappa che l'ambiente Egt)
|
|
Private m_bInitStatus As Boolean
|
|
Friend ReadOnly Property bInitStatus As Boolean
|
|
Get
|
|
Return m_bInitStatus
|
|
End Get
|
|
End Property
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
' Avvio l'inizializzazione della mappa passandogli il riferimento al MainWindowVM
|
|
OmagOFFICEMap.BeginInit(Me)
|
|
' Creo Model della MainWindow
|
|
m_MainWindowM = New MainWindowM
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
#Region "METHODS"
|
|
|
|
Friend Sub ContentRendered()
|
|
' Verifico che l'inizializzazione di tutte le parti del programma sia andata a buon fine
|
|
If OmagOFFICEMap.EndInit() Then
|
|
m_bInitStatus = True
|
|
Else
|
|
'altrimenti chiudo il programma
|
|
m_bInitStatus = False
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub OnApplicationClose()
|
|
|
|
End Sub
|
|
|
|
Private Sub CloseApplication(bOnApplicationStart As Boolean)
|
|
If Not bOnApplicationStart Then
|
|
OnApplicationClose()
|
|
End If
|
|
' Termino il Model
|
|
m_MainWindowM.Close()
|
|
' Termino il programma
|
|
Application.Current.Shutdown()
|
|
End Sub
|
|
|
|
|
|
#End Region ' METHODS
|
|
|
|
End Class
|