Files
2021-09-22 19:13:52 +02:00

148 lines
4.5 KiB
VB.net

Imports EgtWPFLib5
Imports EgtPHOTOLib
Module Map
Private m_refMainWindowVM As MainWindowVM
Private m_refTopCommandBarVM As TopCommandBarVM
'Private m_refProjectVM As ProjectVM
'Private m_refOptionPanelVM As OptionPanelVM
'Private m_refListPageVM As ListPageVM
'Private m_refDetailPageVM As DetailPageVM
'Private m_refSearchPanelVM As SearchPanelVM
#Region "Get"
Public ReadOnly Property refMainWindowVM As MainWindowVM
Get
Return m_refMainWindowVM
End Get
End Property
Public ReadOnly Property refStatusBarVM As StatusBarVM
Get
Return LibMap.refStatusBarVM
End Get
End Property
Public ReadOnly Property refTopCommandBarVM As TopCommandBarVM
Get
Return m_refTopCommandBarVM
End Get
End Property
Public ReadOnly Property refSceneHostVM As SceneHostVM
Get
Return LibMap.refSceneHostVM
End Get
End Property
Public ReadOnly Property refShowPanelVM As ShowPanelVM
Get
Return LibMap.refShowPanelVM
End Get
End Property
Public ReadOnly Property refProjectVM As ProjectSlabVM
Get
Return PhotoMap.refProjectVM
End Get
End Property
Public ReadOnly Property refOptionPanelVM As OptionPanelSlabVM
Get
Return PhotoMap.refOptionPanelVM
End Get
End Property
Public ReadOnly Property refListPageVM As ListPageSlabVM
Get
Return PhotoMap.refListPageVM
End Get
End Property
Public ReadOnly Property refDetailPageVM As DetailPageSlabVM
Get
Return PhotoMap.refDetailPageVM
End Get
End Property
Public ReadOnly Property refSearchPanelVM As SearchPanelSlabVM
Get
Return PhotoMap.refSearchPanelVM
End Get
End Property
#End Region ' Get
#Region "Set"
Friend Function SetRefStatusBarVM(StatusBarVM As StatusBarVM) As Boolean
LibMap.SetRefStatusBarVM(StatusBarVM)
Return Not IsNothing(LibMap.refStatusBarVM)
End Function
Friend Function SetRefTopCommandBarVM(TopCommandBarVM As TopCommandBarVM) As Boolean
m_refTopCommandBarVM = TopCommandBarVM
Return Not IsNothing(m_refTopCommandBarVM)
End Function
'Friend Function SetRefProjectVM(ProjectVM As ProjectVM) As Boolean
' m_refProjectVM = ProjectVM
' Return Not IsNothing(m_refProjectVM)
'End Function
Friend Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
LibMap.SetRefSceneHostVM(SceneHostVM)
Return Not IsNothing(LibMap.refSceneHostVM)
End Function
Friend Function SetRefShowPanelVM(ShowPanelVM As ShowPanelVM) As Boolean
LibMap.SetRefShowPanelVM(ShowPanelVM)
Return Not IsNothing(LibMap.refShowPanelVM)
End Function
'Friend Function SetRefOptionPanelVM(OptionPanelVM As OptionPanelVM) As Boolean
' m_refOptionPanelVM = OptionPanelVM
' Return Not IsNothing(m_refOptionPanelVM)
'End Function
'Friend Function SetRefListPageVM(ListPageVM As ListPageVM) As Boolean
' m_refListPageVM = ListPageVM
' Return Not IsNothing(m_refListPageVM)
'End Function
'Friend Function SetRefDetailPageVM(DetailPageVM As DetailPageVM) As Boolean
' m_refDetailPageVM = DetailPageVM
' Return Not IsNothing(m_refDetailPageVM)
'End Function
'Friend Function SetRefSearchPanelVM(SearchPanelVM As SearchPanelVM) As Boolean
' m_refSearchPanelVM = SearchPanelVM
' Return Not IsNothing(m_refSearchPanelVM)
'End Function
#End Region ' Set
#Region "Init"
Friend Function BeginInit(MainWindowVM As MainWindowVM) As Boolean
m_refMainWindowVM = MainWindowVM
Return Not IsNothing(m_refMainWindowVM)
End Function
Friend Function EndInit() As Boolean
' LibMap.EndInit AndAlso -> ho eliminato questo controllo perchè altrimenti fallisce
' Verifico se tutti i pezzi necessari sono stati caricati
Return Not IsNothing(m_refMainWindowVM) AndAlso Not IsNothing(PhotoMap.refProjectVM) AndAlso
Not IsNothing(LibMap.refStatusBarVM) AndAlso Not IsNothing(m_refTopCommandBarVM) AndAlso
Not IsNothing(LibMap.refSceneHostVM) AndAlso
Not IsNothing(PhotoMap.refOptionPanelVM) AndAlso Not IsNothing(PhotoMap.refListPageVM) AndAlso
Not IsNothing(PhotoMap.refDetailPageVM) AndAlso Not IsNothing(PhotoMap.refSearchPanelVM) AndAlso
PhotoMap.ContinueApplication
End Function
#End Region ' Init
End Module