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