mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-22 21:57:44 +02:00
misc: Code cleanup
This commit is contained in:
parent
c69904afc6
commit
281be7ca62
19 changed files with 136 additions and 156 deletions
|
@ -42,7 +42,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
PrimaryButtonCommand = MiniCommand.Create(() =>
|
||||
{
|
||||
result = primaryButtonResult;
|
||||
}),
|
||||
})
|
||||
};
|
||||
|
||||
contentDialog.SecondaryButtonCommand = MiniCommand.Create(() =>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using Avalonia.Logging;
|
||||
using Avalonia.Utilities;
|
||||
using Gommon;
|
||||
using Ryujinx.Common.Logging;
|
||||
using System;
|
||||
using System.Text;
|
||||
|
@ -90,7 +91,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
if (source != null)
|
||||
{
|
||||
result.Append(" (");
|
||||
result.Append(source.GetType().Name);
|
||||
result.Append(source.GetType().AsFullNamePrettyString());
|
||||
result.Append(" #");
|
||||
result.Append(source.GetHashCode());
|
||||
result.Append(')');
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
{
|
||||
Text = text,
|
||||
Source = this,
|
||||
RoutedEvent = TextInputEvent,
|
||||
RoutedEvent = TextInputEvent
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,20 +9,12 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
{
|
||||
public static TimeZoneConverter Instance = new();
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
=> value is TimeZone timeZone
|
||||
? $"{timeZone.UtcDifference} {timeZone.Location} {timeZone.Abbreviation}"
|
||||
: null;
|
||||
|
||||
var timeZone = (TimeZone)value;
|
||||
return string.Format("{0} {1} {2}", timeZone.UtcDifference, timeZone.Location, timeZone.Abbreviation);
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
=> throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue