SaveAndClose and Close buttons

This commit is contained in:
Isaac Marovitz 2023-01-15 16:27:44 -05:00
parent 58e24e409d
commit 39d8fde391
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
2 changed files with 8 additions and 3 deletions

View file

@ -120,14 +120,14 @@
Name="SaveButton"
MinWidth="90"
Margin="5"
Command="{ReflectionBinding SaveAndClose}">
Click="SaveAndClose">
<TextBlock Text="{locale:Locale SettingsButtonSave}" />
</Button>
<Button
Name="CancelButton"
MinWidth="90"
Margin="5"
Command="{ReflectionBinding Close}">
Click="Close">
<TextBlock Text="{locale:Locale InputDialogCancel}" />
</Button>
</StackPanel>

View file

@ -54,12 +54,17 @@ namespace Ryujinx.Ava.UI.Windows
await ContentDialogHelper.ShowAsync(contentDialog);
}
public void SaveAndClose()
private void SaveAndClose(object sender, RoutedEventArgs routedEventArgs)
{
ViewModel.Save();
((ContentDialog)Parent).Hide();
}
private void Close(object sender, RoutedEventArgs e)
{
((ContentDialog)Parent).Hide();
}
private void RemoveDLC(object sender, RoutedEventArgs e)
{
ViewModel.RemoveSelected();