mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-22 13:50:14 +00:00
33 lines
966 B
C#
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);
|
|
}
|
|
}
|
|
}
|