Imports EgtWPFLib5

Public Module CoreMap

   Private m_refMachinePanelVM As MachinePanelVM
   Private m_refMyMachGroupPanelVM As MyMachGroupPanelVM

#Region "Get"

   Public ReadOnly Property refSceneHostVM As SceneHostVM
      Get
         Return LibMap.refSceneHostVM
      End Get
   End Property

   Public ReadOnly Property refMachinePanelVM As MachinePanelVM
      Get
         Return m_refMachinePanelVM
      End Get
   End Property

   Public ReadOnly Property refMachGroupPanelVM As MyMachGroupPanelVM
      Get
         Return m_refMyMachGroupPanelVM
      End Get
   End Property

#End Region    ' Get

#Region "Set"

   Public Function SetRefSceneHostVM(SceneHostVM As SceneHostVM) As Boolean
      LibMap.SetRefSceneHostVM(SceneHostVM)
      Return Not IsNothing(LibMap.refSceneHostVM)
   End Function

   Public Function SetRefMachinePanelVM(MachinePanelVM As MachinePanelVM) As Boolean
      m_refMachinePanelVM = MachinePanelVM
      Return Not IsNothing(m_refMachinePanelVM)
   End Function

   Public Function SetRefMachGroupPanelVM(MachGroupPanelVM As MyMachGroupPanelVM) As Boolean
      m_refMyMachGroupPanelVM = MachGroupPanelVM
      Return Not IsNothing(m_refMyMachGroupPanelVM)
   End Function

#End Region    ' Set

#Region "Init"

   Friend Function EndInit() As Boolean
      Return Not IsNothing(m_refMachinePanelVM) AndAlso Not IsNothing(LibMap.refMachGroupPanelVM)
   End Function

#End Region    ' Init

End Module
