Inspections added

This commit is contained in:
retr0volkov
2025-07-08 22:19:51 +03:00 Unverified
parent bd8b780a39
commit 646f60e800
14 changed files with 239 additions and 20 deletions
+22 -1
View File
@@ -1,4 +1,8 @@
namespace GazpromApp.Enums;
using System;
using System.Globalization;
using Avalonia.Data.Converters;
namespace GazpromApp.Enums;
public enum PeriodType
{
@@ -35,4 +39,21 @@ public static class PeriodTypeExtensions
_ => PeriodType.Unknown
};
}
}
public class PeriodConverter : IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is PeriodType periodType)
return periodType.ToDescription();
return false;
}
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is string periodType)
return periodType.ToPeriodType();
return false;
}
}