move detection classes and other system values from local config to remote

forbid non validators to read from queue
create better visualization in detector control
make colors for detection classes more distinguishable
fix bug with removing detection (probably completely)
This commit is contained in:
Alex Bezdieniezhnykh
2025-04-02 19:53:03 +03:00
parent e182547dc8
commit 83ae6a0ae9
19 changed files with 209 additions and 169 deletions
@@ -1,6 +1,8 @@
using System.Windows;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
using Azaion.Common.DTO;
using Azaion.Common.Extensions;
namespace Azaion.Common.Controls;
@@ -14,6 +16,7 @@ public partial class DetectionClasses
{
public event EventHandler<DetectionClassChangedEventArgs>? DetectionClassChanged;
private const int CaptionedMinWidth = 230;
ObservableCollection<DetectionClass> _detectionClasses = new();
public DetectionClasses()
{
@@ -37,7 +40,14 @@ public partial class DetectionClasses
public void Init(List<DetectionClass> detectionClasses)
{
DetectionDataGrid.ItemsSource = detectionClasses;
foreach (var dClass in detectionClasses)
{
var cl = (DetectionClass)dClass.Clone();
cl.Color = cl.Color.ToConfidenceColor();
_detectionClasses.Add(cl);
}
DetectionDataGrid.ItemsSource = _detectionClasses;
DetectionDataGrid.SelectedIndex = 0;
}