mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2026-03-11 22:15:34 +00:00
Moved AppLibrary, Configuration, and PlayReport namespaces to Ryujinx.Systems, add the compat list stuff in the base Ryujinx.Systems namespace. Moved the compatibility UI stuff to the proper UI view/viewmodel folders.
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using Avalonia.Controls;
|
|
using Avalonia.Styling;
|
|
using FluentAvalonia.UI.Controls;
|
|
using Ryujinx.Ava.Common.Locale;
|
|
using Ryujinx.Ava.UI.Helpers;
|
|
using Ryujinx.Ava.UI.ViewModels;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Ryujinx.Ava.UI.Views.Misc
|
|
{
|
|
public partial class CompatibilityList : UserControl
|
|
{
|
|
public static async Task Show(string titleId = null)
|
|
{
|
|
ContentDialog contentDialog = new()
|
|
{
|
|
PrimaryButtonText = string.Empty,
|
|
SecondaryButtonText = string.Empty,
|
|
CloseButtonText = LocaleManager.Instance[LocaleKeys.SettingsButtonClose],
|
|
Content = new CompatibilityList
|
|
{
|
|
DataContext = new CompatibilityViewModel(RyujinxApp.MainWindow.ViewModel.ApplicationLibrary),
|
|
SearchBox = {
|
|
Text = titleId ?? ""
|
|
}
|
|
}
|
|
};
|
|
|
|
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles());
|
|
}
|
|
|
|
public CompatibilityList()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void TextBox_OnTextChanged(object sender, TextChangedEventArgs e)
|
|
{
|
|
if (DataContext is not CompatibilityViewModel cvm)
|
|
return;
|
|
|
|
if (sender is not TextBox searchBox)
|
|
return;
|
|
|
|
cvm.Search(searchBox.Text);
|
|
}
|
|
}
|
|
}
|