2024-03-03 05:02:21 +00:00
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using MSFSPopoutPanelManager.MainApp.ViewModel;
|
2024-07-28 00:12:07 +00:00
|
|
|
|
using System;
|
2024-03-03 05:02:21 +00:00
|
|
|
|
using System.ComponentModel;
|
2024-07-28 00:12:07 +00:00
|
|
|
|
using System.Diagnostics;
|
2024-03-03 05:02:21 +00:00
|
|
|
|
using System.Windows;
|
2024-07-28 00:12:07 +00:00
|
|
|
|
using System.Windows.Navigation;
|
2024-03-03 05:02:21 +00:00
|
|
|
|
|
|
|
|
|
namespace MSFSPopoutPanelManager.MainApp.AppUserControl
|
2024-02-28 02:44:21 +00:00
|
|
|
|
{
|
|
|
|
|
public partial class PreferenceDrawer
|
|
|
|
|
{
|
|
|
|
|
public PreferenceDrawer()
|
|
|
|
|
{
|
2024-03-03 05:02:21 +00:00
|
|
|
|
if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-04 03:10:13 +00:00
|
|
|
|
var viewModel = App.AppHost.Services.GetRequiredService<PreferenceDrawerViewModel>();
|
2024-03-03 05:02:21 +00:00
|
|
|
|
Loaded += (_, _) =>
|
|
|
|
|
{
|
2024-03-04 03:10:13 +00:00
|
|
|
|
DataContext = viewModel;
|
2024-03-03 05:02:21 +00:00
|
|
|
|
InitializeComponent();
|
|
|
|
|
};
|
2024-02-28 02:44:21 +00:00
|
|
|
|
}
|
2024-07-28 00:12:07 +00:00
|
|
|
|
|
|
|
|
|
private void Hyperlink_OpenDataFolder(object sender, RequestNavigateEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
// ToDo: check for folder existence
|
|
|
|
|
Process.Start("explorer.exe",e.Uri.ToString());
|
|
|
|
|
}
|
2024-02-28 02:44:21 +00:00
|
|
|
|
}
|
|
|
|
|
}
|