1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-22 05:40:11 +00:00
msfs-popout-panel-manager/MainApp/ViewModel/NumPadViewModel.cs
2024-02-27 21:44:21 -05:00

28 lines
875 B
C#

using System;
using System.Linq;
using MSFSPopoutPanelManager.DomainModel.Profile;
using MSFSPopoutPanelManager.Orchestration;
using MSFSPopoutPanelManager.WindowsAgent;
using Prism.Commands;
namespace MSFSPopoutPanelManager.MainApp.ViewModel
{
public class NumPadViewModel : BaseViewModel
{
public DelegateCommand<string> ButtonCommand { get; private set; }
public Guid PanelId { get; set; }
public PanelConfig PanelConfig => ActiveProfile.PanelConfigs.FirstOrDefault(p => p.Id == PanelId);
public NumPadViewModel(SharedStorage sharedStorage) : base(sharedStorage)
{
ButtonCommand = new DelegateCommand<string>(OnButtonActivated);
}
private void OnButtonActivated(string commandParameter)
{
InputEmulationManager.NumPadClick(commandParameter);
}
}
}