Imports EgtUILib Public Class OptionPanelVM Inherits ViewModelBase Private m_DrawIsChecked As Boolean = True Private m_MachiningIsChecked As Boolean = False Sub New() Map.SetRefOptionPanelVM(Me) DrawOptPanelV = New DrawOptionPanelV MachOptPanelV = New MachiningOptionPanelV End Sub Dim DrawOptPanelV As DrawOptionPanelV Dim MachOptPanelV As MachiningOptionPanelV Dim DrawOptPanelVM As New DrawOptionPanelVM Dim MachOptPanelVM As New MachiningOptionPanelVM Public ReadOnly Property ModePanel As ContentControl Get DrawOptPanelV.DataContext = Nothing MachOptPanelV.DataContext = Nothing If Not IsNothing(Map.refDrawOptionPanelVM) And Not IsNothing(Map.refMachiningOptionPanelVM) Then If m_DrawIsChecked And Not m_MachiningIsChecked Then Map.refMachiningOptionPanelVM.ExitMachiningOptionPanel() Map.refDrawOptionPanelVM.InitDrawOptionPanel() DrawOptPanelV.DataContext = Map.refDrawOptionPanelVM Return DrawOptPanelV End If If m_MachiningIsChecked And Not m_DrawIsChecked Then Map.refDrawOptionPanelVM.ExitDrawOptionPanel() Map.refMachiningOptionPanelVM.InitMachiningOptionPanel() MachOptPanelV.DataContext = Map.refMachiningOptionPanelVM Return MachOptPanelV End If End If Return Nothing End Get End Property Friend Sub DrawMode_IsChecked() m_DrawIsChecked = True m_MachiningIsChecked = False If Not IsNothing(Map.refSimulationExpanderVM) AndAlso Not IsNothing(Map.refEstimationsExpanderVM) Then Map.refSimulationExpanderVM.Simulation_IsExpanded = False Map.refEstimationsExpanderVM.Estimation_IsExpanded = False End If OnPropertyChanged("ModePanel") End Sub Friend Sub MachiningMode_IsChecked() m_DrawIsChecked = False m_MachiningIsChecked = True EgtZoom(ZM.ALL, False) OnPropertyChanged("ModePanel") End Sub End Class