Use ReflectionBinding instead of redundant funcs

This commit is contained in:
Isaac Marovitz 2022-12-25 19:23:15 +00:00 committed by Isaac Marovitz
parent b8a18930f2
commit da590b0fe3
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
2 changed files with 3 additions and 18 deletions

View file

@ -107,14 +107,14 @@
HotKey="Enter"
Classes="accent"
Content="{locale:Locale SettingsButtonOk}"
Click="OkButton" />
Command="{ReflectionBinding OkButton}" />
<Button
HotKey="Escape"
Content="{locale:Locale SettingsButtonCancel}"
Click="CancelButton" />
Command="{ReflectionBinding CancelButton}" />
<Button
Content="{locale:Locale SettingsButtonApply}"
Click="ApplyButton" />
Command="{ReflectionBinding ApplyButton}" />
</ReversibleStackPanel>
</Grid>
</window:StyleableWindow>

View file

@ -96,21 +96,6 @@ namespace Ryujinx.Ava.UI.Windows
}
}
private void OkButton(object sender, RoutedEventArgs e)
{
ViewModel.OkButton();
}
private void CancelButton(object sender, RoutedEventArgs e)
{
ViewModel.CancelButton();
}
private void ApplyButton(object sender, RoutedEventArgs e)
{
ViewModel.ApplyButton();
}
protected override void OnClosing(CancelEventArgs e)
{
HotkeysPage.Dispose();