2022-12-29 15:24:05 +01:00
|
|
|
|
using Ryujinx.Ava.UI.ViewModels;
|
2022-07-08 20:47:11 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
2022-12-29 15:24:05 +01:00
|
|
|
|
namespace Ryujinx.Ava.UI.Models
|
2022-07-08 20:47:11 +02:00
|
|
|
|
{
|
|
|
|
|
public class CheatModel : BaseModel
|
|
|
|
|
{
|
|
|
|
|
private bool _isEnabled;
|
|
|
|
|
|
|
|
|
|
public event EventHandler<bool> EnableToggled;
|
|
|
|
|
|
|
|
|
|
public CheatModel(string name, string buildId, bool isEnabled)
|
|
|
|
|
{
|
2022-07-29 00:41:34 +02:00
|
|
|
|
Name = name;
|
|
|
|
|
BuildId = buildId;
|
2022-07-08 20:47:11 +02:00
|
|
|
|
IsEnabled = isEnabled;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool IsEnabled
|
|
|
|
|
{
|
|
|
|
|
get => _isEnabled;
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
_isEnabled = value;
|
2022-07-29 00:41:34 +02:00
|
|
|
|
|
2022-07-08 20:47:11 +02:00
|
|
|
|
EnableToggled?.Invoke(this, _isEnabled);
|
2022-07-29 00:41:34 +02:00
|
|
|
|
|
2022-07-08 20:47:11 +02:00
|
|
|
|
OnPropertyChanged();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string BuildId { get; }
|
|
|
|
|
|
|
|
|
|
public string BuildIdKey => $"{BuildId}-{Name}";
|
2022-07-29 00:41:34 +02:00
|
|
|
|
|
2022-07-08 20:47:11 +02:00
|
|
|
|
public string Name { get; }
|
|
|
|
|
|
|
|
|
|
public string CleanName => Name.Substring(1, Name.Length - 8);
|
|
|
|
|
}
|
|
|
|
|
}
|