Cupola/Tranquility/MainWindow.xaml.cs
AUnicornWithNoLife 87f56d55de Tranquility
2023-02-12 23:23:10 +00:00

35 lines
828 B
C#

using System.Windows;
using Microsoft.WindowsAPICodePack.Dialogs;
using WinRT;
namespace Tranquility
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void LoadFilesClick(object sender, RoutedEventArgs e)
{
string file = OpenFolder();
}
private static string? OpenFolder()
{
CommonOpenFileDialog dialog = new CommonOpenFileDialog();
dialog.IsFolderPicker = true;
CommonFileDialogResult result = dialog.ShowDialog();
if (result == CommonFileDialogResult.Ok)
return dialog.FileName;
return null;
}
}
}