mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-08-12 05:05:26 +02:00
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
using FluentAvalonia.UI.Controls;
|
|
using Ryujinx.Ava.Common.Locale;
|
|
using Ryujinx.Ava.Common.Models;
|
|
using Ryujinx.Ava.UI.Controls;
|
|
using Ryujinx.Ava.UI.Helpers;
|
|
using Ryujinx.Ava.UI.ViewModels;
|
|
using Ryujinx.Ava.Systems.AppLibrary;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Ryujinx.Ava.UI.Views.Dialog
|
|
{
|
|
public partial class DlcSelectView : RyujinxControl<DlcSelectViewModel>
|
|
{
|
|
public DlcSelectView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
#nullable enable
|
|
public static async Task<DownloadableContentModel?> Show(ulong selectedTitleId, ApplicationLibrary appLibrary)
|
|
#nullable disable
|
|
{
|
|
DlcSelectViewModel viewModel = new(selectedTitleId, appLibrary);
|
|
|
|
ContentDialog contentDialog = new()
|
|
{
|
|
PrimaryButtonText = LocaleManager.Instance[LocaleKeys.Continue],
|
|
SecondaryButtonText = string.Empty,
|
|
CloseButtonText = string.Empty,
|
|
Content = new DlcSelectView { ViewModel = viewModel }
|
|
};
|
|
|
|
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles());
|
|
|
|
return viewModel.SelectedDlc;
|
|
}
|
|
}
|
|
}
|