1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-10-16 22:20:06 +00:00
msfs-popout-panel-manager/WpfApp/PreferencesDialog.xaml.cs

38 lines
1.1 KiB
C#
Raw Normal View History

2022-04-18 03:38:33 +00:00
using MahApps.Metro.Controls;
using MSFSPopoutPanelManager.Model;
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-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
}
}
}