1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-10-16 22:20:06 +00:00
msfs-popout-panel-manager/WpfApp/ViewModel/TouchPanelBindingViewModel.cs
2022-07-23 15:23:32 -04:00

33 lines
966 B
C#

using MSFSPopoutPanelManager.Orchestration;
using MSFSPopoutPanelManager.Shared;
using Prism.Commands;
using System.Collections.ObjectModel;
namespace MSFSPopoutPanelManager.WpfApp.ViewModel
{
public class TouchPanelBindingViewModel : ObservableObject
{
private MainOrchestrator _orchestrator;
public TouchPanelBindingViewModel(MainOrchestrator orchestrator)
{
_orchestrator = orchestrator;
PanelSelectCommand = new DelegateCommand(OnPanelSelected);
}
public DelegateCommand PanelSelectCommand { get; private set; }
public ObservableCollection<PlaneProfile> PlaneProfiles { get { return _orchestrator.TouchPanel.PlaneProfiles; } }
public void Initialize()
{
_orchestrator.TouchPanel.LoadPlaneProfiles();
}
private void OnPanelSelected()
{
_orchestrator.TouchPanel.PanelSelected(PlaneProfiles);
}
}
}