fix initialization, throttle operations

day/winter/night switcher fixes
This commit is contained in:
Alex Bezdieniezhnykh
2025-02-19 23:07:16 +02:00
parent c314268d1e
commit d1af7958f8
17 changed files with 170 additions and 88 deletions
+20
View File
@@ -11,6 +11,23 @@ public class DetectionClass
public string Name { get; set; } = null!;
public string ShortName { get; set; } = null!;
public string UIName
{
get
{
var mode = PhotoMode switch
{
PhotoMode.Night => "(ніч)",
PhotoMode.Winter => "(зим)",
PhotoMode.Regular => "",
_ => ""
};
return ShortName + mode;
}
}
[JsonIgnore]
public PhotoMode PhotoMode { get; set; }
[JsonIgnore]
@@ -19,6 +36,9 @@ public class DetectionClass
[JsonIgnore] //For UI
public int ClassNumber => Id + 1;
[JsonIgnore]
public int YoloId => (int)PhotoMode + Id;
[JsonIgnore]
public SolidColorBrush ColorBrush => new(Color);
}