2025-01-30 20:27:17 -06:00
|
|
|
|
using Avalonia.Controls;
|
2025-01-20 14:30:28 -06:00
|
|
|
|
using Avalonia.Styling;
|
|
|
|
|
|
using FluentAvalonia.UI.Controls;
|
|
|
|
|
|
using Ryujinx.Ava.Common.Locale;
|
|
|
|
|
|
using Ryujinx.Ava.Common.Models;
|
2025-03-02 21:41:46 -06:00
|
|
|
|
using Ryujinx.Ava.UI.Controls;
|
2025-01-20 14:30:28 -06:00
|
|
|
|
using Ryujinx.Ava.UI.Helpers;
|
|
|
|
|
|
using Ryujinx.Ava.UI.ViewModels;
|
|
|
|
|
|
using Ryujinx.Ava.Utilities.AppLibrary;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
2025-03-02 21:41:46 -06:00
|
|
|
|
namespace Ryujinx.Ava.UI.Views.Misc
|
2025-01-20 14:30:28 -06:00
|
|
|
|
{
|
2025-03-02 21:24:39 -06:00
|
|
|
|
public partial class DlcSelectView : RyujinxControl<DlcSelectViewModel>
|
2025-01-20 14:30:28 -06:00
|
|
|
|
{
|
|
|
|
|
|
public DlcSelectView()
|
|
|
|
|
|
{
|
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-01-20 16:56:05 -06:00
|
|
|
|
#nullable enable
|
2025-01-20 14:30:28 -06:00
|
|
|
|
public static async Task<DownloadableContentModel?> Show(ulong selectedTitleId, ApplicationLibrary appLibrary)
|
2025-01-20 16:56:05 -06:00
|
|
|
|
#nullable disable
|
2025-01-20 14:30:28 -06:00
|
|
|
|
{
|
|
|
|
|
|
DlcSelectViewModel viewModel = new(selectedTitleId, appLibrary);
|
|
|
|
|
|
|
|
|
|
|
|
ContentDialog contentDialog = new()
|
|
|
|
|
|
{
|
|
|
|
|
|
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.Continue],
|
|
|
|
|
|
SecondaryButtonText = string.Empty,
|
|
|
|
|
|
CloseButtonText = string.Empty,
|
2025-03-02 21:24:39 -06:00
|
|
|
|
Content = new DlcSelectView { ViewModel = viewModel }
|
2025-01-20 14:30:28 -06:00
|
|
|
|
};
|
|
|
|
|
|
|
2025-03-04 02:56:59 -06:00
|
|
|
|
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles());
|
2025-01-20 14:30:28 -06:00
|
|
|
|
|
|
|
|
|
|
return viewModel.SelectedDlc;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|