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/WpfApp/UserControlPanelSelection.xaml.cs

31 lines
1.2 KiB
C#
Raw Normal View History

2022-01-27 13:40:04 +00:00
using MSFSPopoutPanelManager.WpfApp.ViewModel;
using System.Windows;
using System.Windows.Controls;
namespace MSFSPopoutPanelManager.WpfApp
{
public partial class UserControlPanelSelection : UserControl
{
private PanelSelectionViewModel _panelSelectionViewModel;
public UserControlPanelSelection(PanelSelectionViewModel panelSelectionViewModel)
{
InitializeComponent();
_panelSelectionViewModel = panelSelectionViewModel;
this.DataContext = panelSelectionViewModel;
2022-07-23 19:23:32 +00:00
panelSelectionViewModel.OpenTouchPanelBindingDialog += HandleOpenTouchPanelBindingDialog;
2022-04-18 16:24:00 +00:00
}
2022-07-23 19:23:32 +00:00
private void HandleOpenTouchPanelBindingDialog(object sender, System.EventArgs e)
2022-01-27 13:40:04 +00:00
{
2022-07-23 19:23:32 +00:00
TouchPanelBindingDialog dialog = new TouchPanelBindingDialog(_panelSelectionViewModel.TouchPanelBindingViewModel);
_panelSelectionViewModel.TouchPanelBindingViewModel.Initialize();
2022-01-27 13:40:04 +00:00
dialog.Owner = Application.Current.MainWindow;
dialog.Topmost = true;
dialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
2022-07-23 19:23:32 +00:00
dialog.ShowDialog();
2022-01-27 13:40:04 +00:00
}
}
}