mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-22 13:50:14 +00:00
35 lines
No EOL
1,018 B
C#
35 lines
No EOL
1,018 B
C#
using Microsoft.Extensions.DependencyInjection;
|
|
using MSFSPopoutPanelManager.MainApp.ViewModel;
|
|
using System;
|
|
using System.ComponentModel;
|
|
using System.Diagnostics;
|
|
using System.Windows;
|
|
using System.Windows.Navigation;
|
|
|
|
namespace MSFSPopoutPanelManager.MainApp.AppUserControl
|
|
{
|
|
public partial class PreferenceDrawer
|
|
{
|
|
public PreferenceDrawer()
|
|
{
|
|
if (DesignerProperties.GetIsInDesignMode(new DependencyObject()))
|
|
{
|
|
InitializeComponent();
|
|
return;
|
|
}
|
|
|
|
var viewModel = App.AppHost.Services.GetRequiredService<PreferenceDrawerViewModel>();
|
|
Loaded += (_, _) =>
|
|
{
|
|
DataContext = viewModel;
|
|
InitializeComponent();
|
|
};
|
|
}
|
|
|
|
private void Hyperlink_OpenDataFolder(object sender, RequestNavigateEventArgs e)
|
|
{
|
|
// ToDo: check for folder existence
|
|
Process.Start("explorer.exe",e.Uri.ToString());
|
|
}
|
|
}
|
|
} |