misc: Code cleanup
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user