refactors and more UI

This commit is contained in:
Alex
2025-08-13 20:13:40 -07:00
parent 32396c3210
commit f61f6a7e28
11 changed files with 268 additions and 43 deletions
+40
View File
@@ -0,0 +1,40 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Platform.Storage;
using Avalonia.Threading;
namespace MercuryConverter.UI.Dialogs;
public partial class DataOpen : Window
{
public DataOpen()
{
InitializeComponent();
BeginDirSelection();
}
private void BeginDirSelection()
{
Dispatcher.UIThread.Invoke(async () =>
{
await Task.Delay(200);
var dirSelection = await GetTopLevel(this)!.StorageProvider.OpenFolderPickerAsync
(
new FolderPickerOpenOptions
{
Title = "Open Data Folder",
AllowMultiple = false,
}
);
if (dirSelection.Count <= 0)
{
return;
}
var d = dirSelection!.First().TryGetLocalPath()!;
});
}
}