Refactor InvertedProgressConverter for readability
This commit is contained in:
parent
a8b91f4ee6
commit
c98c59edf2
@ -1,5 +1,5 @@
|
||||
using Avalonia.Data.Converters;
|
||||
using System.Globalization;
|
||||
using System.Globalization;
|
||||
using Avalonia.Data.Converters;
|
||||
|
||||
namespace SPTInstaller.Converters;
|
||||
|
||||
@ -7,7 +7,7 @@ public class InvertedProgressConverter : IValueConverter
|
||||
{
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if( value is int progress)
|
||||
if (value is int progress)
|
||||
{
|
||||
return 100 - progress;
|
||||
}
|
||||
@ -17,7 +17,7 @@ public class InvertedProgressConverter : IValueConverter
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
if ( value is int invertedProgress)
|
||||
if (value is int invertedProgress)
|
||||
{
|
||||
return 100 - invertedProgress;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user