mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-27 23:17:13 +02:00
misc: Small code improvements.
This commit is contained in:
parent
5f6d9eef6b
commit
b2a35ecf6c
6 changed files with 71 additions and 112 deletions
|
@ -1,6 +1,4 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Styling;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
|
@ -64,21 +62,14 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
private void OpenLocation(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button button)
|
||||
{
|
||||
if (button.DataContext is TitleUpdateModel model)
|
||||
{
|
||||
OpenHelper.LocateFile(model.Path);
|
||||
}
|
||||
}
|
||||
if (sender is Button { DataContext: TitleUpdateModel model })
|
||||
OpenHelper.LocateFile(model.Path);
|
||||
}
|
||||
|
||||
private void RemoveUpdate(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is Button button)
|
||||
{
|
||||
ViewModel.RemoveUpdate((TitleUpdateModel)button.DataContext);
|
||||
}
|
||||
if (sender is Button { DataContext: TitleUpdateModel model })
|
||||
ViewModel.RemoveUpdate(model);
|
||||
}
|
||||
|
||||
private void RemoveAll(object sender, RoutedEventArgs e)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue