using System.Windows; using System.Windows.Controls; using Microsoft.Win32; namespace KakiniwaYmm4Import; public partial class ImportToolView : UserControl { public ImportToolView() { InitializeComponent(); } void OnImportClick(object sender, RoutedEventArgs e) { var dialog = new OpenFolderDialog { Title = "書き庭の受け渡しパック(timeline.json のあるフォルダ)を選択", }; if (dialog.ShowDialog() != true) return; LogBox.Clear(); void Log(string message) { LogBox.AppendText(message + Environment.NewLine); LogBox.ScrollToEnd(); } try { Importer.Run(dialog.FolderName, Log); } catch (Exception ex) { Log($"例外: {ex}"); } } }