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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|