1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-29 17:20:11 +00:00
msfs-popout-panel-manager/WpfApp/ViewModel/TouchPanelBindingViewModel.cs

34 lines
966 B
C#
Raw Normal View History

2022-07-23 19:23:32 +00:00
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);
}
}
}