Cupola/Tranquility/MainWindow.xaml.cs

57 lines
1.2 KiB
C#
Raw Normal View History

2023-02-12 23:23:10 +00:00
using System.Windows;
using Microsoft.WindowsAPICodePack.Dialogs;
using WinRT;
2023-02-13 09:58:11 +00:00
using Cupola;
using System.IO;
2023-02-13 10:01:31 +00:00
using System;
2023-02-12 23:23:10 +00:00
namespace Tranquility
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
2023-02-13 09:58:11 +00:00
string[]? files;
2023-02-12 23:23:10 +00:00
public MainWindow()
{
InitializeComponent();
}
private void LoadFilesClick(object sender, RoutedEventArgs e)
{
2023-02-13 09:58:11 +00:00
string file = OpenFolder();
files = Directory.GetFiles(file);
2023-02-13 10:01:31 +00:00
string iFilesT = "";
foreach (string iFile in files)
{
iFilesT += iFile + Environment.NewLine;
}
Input_Folder.Text = file;
Input_Files.Text = iFilesT;
2023-02-12 23:23:10 +00:00
}
private static string? OpenFolder()
{
CommonOpenFileDialog dialog = new CommonOpenFileDialog();
dialog.IsFolderPicker = true;
CommonFileDialogResult result = dialog.ShowDialog();
if (result == CommonFileDialogResult.Ok)
return dialog.FileName;
return null;
}
2023-02-13 10:08:27 +00:00
private void Run(object sender, RoutedEventArgs e)
{
}
2023-02-12 23:23:10 +00:00
}
}