mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-03-11 17:45:43 +00:00
32 lines
1,009 B
C#
32 lines
1,009 B
C#
using Avalonia.Controls;
|
|
using Avalonia.Platform.Storage;
|
|
using CommunityToolkit.Mvvm.ComponentModel;
|
|
using CommunityToolkit.Mvvm.Input;
|
|
using Gommon;
|
|
using Ryujinx.Ava.Common.Locale;
|
|
using Ryujinx.Ava.UI.ViewModels;
|
|
using Ryujinx.Ava.Utilities;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Ryujinx.Ava.UI.SetupWizard.Pages
|
|
{
|
|
public partial class SetupKeysPageViewModel : BaseModel
|
|
{
|
|
[ObservableProperty]
|
|
public partial string KeysFolderPath { get; set; }
|
|
|
|
[RelayCommand]
|
|
private static async Task Browse(TextBox tb)
|
|
{
|
|
Optional<IStorageFolder> result = await RyujinxApp.MainWindow.ViewModel.StorageProvider.OpenSingleFolderPickerAsync(new FolderPickerOpenOptions
|
|
{
|
|
Title = LocaleManager.Instance[LocaleKeys.SetupWizardKeysPageFolderPopupTitle]
|
|
});
|
|
|
|
if (result.TryGet(out IStorageFolder keyFolder))
|
|
{
|
|
tb.Text = keyFolder.TryGetLocalPath();
|
|
}
|
|
}
|
|
}
|
|
}
|