1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-24 14:50:10 +00:00
msfs-popout-panel-manager/WpfApp/PreferencesDialog.xaml.cs

42 lines
1.2 KiB
C#
Raw Normal View History

2022-04-18 03:38:33 +00:00
using MahApps.Metro.Controls;
2022-07-23 19:23:32 +00:00
using MSFSPopoutPanelManager.UserDataAgent;
2022-06-30 23:53:08 +00:00
using MSFSPopoutPanelManager.WpfApp.ViewModel;
2022-04-18 03:38:33 +00:00
using System.Windows;
using System.Windows.Controls;
namespace MSFSPopoutPanelManager.WpfApp
{
2022-06-30 23:53:08 +00:00
public partial class PreferencesDialog : MetroWindow
2022-04-18 03:38:33 +00:00
{
2022-06-30 23:53:08 +00:00
private PreferencesViewModel _preferencesViewModel;
2022-04-18 03:38:33 +00:00
2022-06-30 23:53:08 +00:00
public PreferencesDialog(PreferencesViewModel preferencesViewModel)
2022-04-18 03:38:33 +00:00
{
2022-06-30 23:53:08 +00:00
_preferencesViewModel = preferencesViewModel;
2022-04-18 03:38:33 +00:00
2022-06-30 23:53:08 +00:00
InitializeComponent();
this.DataContext = preferencesViewModel;
2022-04-18 03:38:33 +00:00
}
public AppSetting AppSetting { get; set; }
2022-06-30 23:53:08 +00:00
public bool ApplicationSettingsVisible { get; set; }
2022-04-18 03:38:33 +00:00
2022-06-30 23:53:08 +00:00
public bool PopOutSettingsVisible { get; set; }
2022-04-18 03:38:33 +00:00
2022-06-30 23:53:08 +00:00
public bool AutoPopOutSettingsVisible { get; set; }
2022-04-18 03:38:33 +00:00
2022-06-30 23:53:08 +00:00
public bool TrackIRSettingsVisible { get; set; }
2022-05-04 15:11:04 +00:00
2022-07-23 19:23:32 +00:00
public bool TouchSettingsVisible { get; set; }
public bool MSFSTouchPanelSettingsVisible { get; set; }
2022-04-18 03:38:33 +00:00
private void TreeViewItem_Selected(object sender, RoutedEventArgs e)
{
var treeViewItem = (TreeViewItem)e.Source;
2022-06-30 23:53:08 +00:00
_preferencesViewModel.SectionSelectCommand.Execute(treeViewItem.Header.ToString());
2022-04-18 03:38:33 +00:00
}
}
}