Style fixes

This commit is contained in:
Isaac Marovitz 2023-08-12 12:24:47 +01:00 committed by Isaac Marovitz
parent 9a8a926851
commit 3a10d79bd9
2 changed files with 7 additions and 7 deletions

View file

@ -12,7 +12,7 @@ namespace Ryujinx.Ava.UI.Helpers
{
public static KeyValueConverter Instance = new();
private static readonly Dictionary<Key, LocaleKeys> KeysMap = new()
private static readonly Dictionary<Key, LocaleKeys> _keysMap = new()
{
{ Key.Unknown, LocaleKeys.KeyUnknown },
{ Key.ShiftLeft, LocaleKeys.KeyShiftLeft },
@ -85,7 +85,7 @@ namespace Ryujinx.Ava.UI.Helpers
{ Key.Unbound, LocaleKeys.KeyUnbound },
};
private static readonly Dictionary<GamepadInputId, LocaleKeys> GamepadInputIdMap = new()
private static readonly Dictionary<GamepadInputId, LocaleKeys> _gamepadInputIdMap = new()
{
{ GamepadInputId.LeftStick, LocaleKeys.GamepadLeftStick },
{ GamepadInputId.RightStick, LocaleKeys.GamepadRightStick },
@ -113,7 +113,7 @@ namespace Ryujinx.Ava.UI.Helpers
{ GamepadInputId.Unbound, LocaleKeys.KeyUnbound},
};
private static readonly Dictionary<StickInputId, LocaleKeys> StickInputIdMap = new()
private static readonly Dictionary<StickInputId, LocaleKeys> _stickInputIdMap = new()
{
{ StickInputId.Left, LocaleKeys.StickLeft},
{ StickInputId.Right, LocaleKeys.StickRight},
@ -126,7 +126,7 @@ namespace Ryujinx.Ava.UI.Helpers
if (value is Key key)
{
if (KeysMap.TryGetValue(key, out LocaleKeys localeKey))
if (_keysMap.TryGetValue(key, out LocaleKeys localeKey))
{
keyString = LocaleManager.Instance[localeKey];
}
@ -137,7 +137,7 @@ namespace Ryujinx.Ava.UI.Helpers
}
else if (value is GamepadInputId gamepadInputId)
{
if (GamepadInputIdMap.TryGetValue(gamepadInputId, out LocaleKeys localeKey))
if (_gamepadInputIdMap.TryGetValue(gamepadInputId, out LocaleKeys localeKey))
{
keyString = LocaleManager.Instance[localeKey];
}
@ -148,7 +148,7 @@ namespace Ryujinx.Ava.UI.Helpers
}
else if (value is StickInputId stickInputId)
{
if (StickInputIdMap.TryGetValue(stickInputId, out LocaleKeys localeKey))
if (_stickInputIdMap.TryGetValue(stickInputId, out LocaleKeys localeKey))
{
keyString = LocaleManager.Instance[localeKey];
}

View file

@ -22,7 +22,7 @@ namespace Ryujinx.Ava.UI.Views.Input
foreach (ILogical visual in SettingButtons.GetLogicalDescendants())
{
if (visual is ToggleButton button && !(visual is CheckBox))
if (visual is ToggleButton button and not CheckBox)
{
button.IsCheckedChanged += Button_IsCheckedChanged;
}