mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 06:17:10 +02:00
misc: chore: Use explicit types in the Avalonia project
This commit is contained in:
parent
3b5f6170d1
commit
be3bd0bcb5
69 changed files with 367 additions and 348 deletions
|
@ -28,7 +28,7 @@ namespace Ryujinx.Ava.UI.Models
|
|||
}
|
||||
set
|
||||
{
|
||||
foreach (var cheat in SubNodes)
|
||||
foreach (CheatNode cheat in SubNodes)
|
||||
{
|
||||
cheat.IsEnabled = value;
|
||||
cheat.OnPropertyChanged();
|
||||
|
|
|
@ -367,7 +367,7 @@ namespace Ryujinx.Ava.UI.Models.Input
|
|||
|
||||
public InputConfig GetConfig()
|
||||
{
|
||||
var config = new StandardKeyboardInputConfig
|
||||
StandardKeyboardInputConfig config = new StandardKeyboardInputConfig
|
||||
{
|
||||
Id = Id,
|
||||
Backend = InputBackendType.WindowKeyboard,
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace Ryujinx.Ava.UI.Models
|
|||
TitleId = info.ProgramId;
|
||||
UserId = info.UserId;
|
||||
|
||||
var appData = RyujinxApp.MainWindow.ViewModel.Applications.FirstOrDefault(x => x.IdString.EqualsIgnoreCase(TitleIdString));
|
||||
ApplicationData appData = RyujinxApp.MainWindow.ViewModel.Applications.FirstOrDefault(x => x.IdString.EqualsIgnoreCase(TitleIdString));
|
||||
|
||||
InGameList = appData != null;
|
||||
|
||||
|
@ -59,13 +59,13 @@ namespace Ryujinx.Ava.UI.Models
|
|||
}
|
||||
else
|
||||
{
|
||||
var appMetadata = ApplicationLibrary.LoadAndSaveMetaData(TitleIdString);
|
||||
ApplicationMetadata appMetadata = ApplicationLibrary.LoadAndSaveMetaData(TitleIdString);
|
||||
Title = appMetadata.Title ?? TitleIdString;
|
||||
}
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
var saveRoot = Path.Combine(VirtualFileSystem.GetNandPath(), $"user/save/{info.SaveDataId:x16}");
|
||||
string saveRoot = Path.Combine(VirtualFileSystem.GetNandPath(), $"user/save/{info.SaveDataId:x16}");
|
||||
|
||||
long totalSize = GetDirectorySize(saveRoot);
|
||||
|
||||
|
@ -74,14 +74,14 @@ namespace Ryujinx.Ava.UI.Models
|
|||
long size = 0;
|
||||
if (Directory.Exists(path))
|
||||
{
|
||||
var directories = Directory.GetDirectories(path);
|
||||
foreach (var directory in directories)
|
||||
string[] directories = Directory.GetDirectories(path);
|
||||
foreach (string directory in directories)
|
||||
{
|
||||
size += GetDirectorySize(directory);
|
||||
}
|
||||
|
||||
var files = Directory.GetFiles(path);
|
||||
foreach (var file in files)
|
||||
string[] files = Directory.GetFiles(path);
|
||||
foreach (string file in files)
|
||||
{
|
||||
size += new FileInfo(file).Length;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Media;
|
||||
using Ryujinx.Ava.UI.Controls;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
|
@ -87,7 +88,7 @@ namespace Ryujinx.Ava.UI.Models
|
|||
|
||||
private void UpdateBackground()
|
||||
{
|
||||
var currentApplication = Avalonia.Application.Current;
|
||||
Application currentApplication = Avalonia.Application.Current;
|
||||
currentApplication.Styles.TryGetResource("ControlFillColorSecondary", currentApplication.ActualThemeVariant, out object color);
|
||||
|
||||
if (color is not null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue