1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2025-02-16 16:34:28 +01:00
msfs-popout-panel-manager/WpfApp/PreferencesDialog.xaml.cs

42 lines
1.2 KiB
C#
Raw Normal View History

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