mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 09:06:30 +00:00
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:
@@ -116,8 +116,8 @@ public partial class Annotator
|
||||
|
||||
_suspendLayout = true;
|
||||
|
||||
MainGrid.ColumnDefinitions.FirstOrDefault()!.Width = new GridLength(_appConfig.AnnotationConfig.LeftPanelWidth);
|
||||
MainGrid.ColumnDefinitions.LastOrDefault()!.Width = new GridLength(_appConfig.AnnotationConfig.RightPanelWidth);
|
||||
MainGrid.ColumnDefinitions.FirstOrDefault()!.Width = new GridLength(_appConfig.UIConfig.LeftPanelWidth);
|
||||
MainGrid.ColumnDefinitions.LastOrDefault()!.Width = new GridLength(_appConfig.UIConfig.RightPanelWidth);
|
||||
|
||||
_suspendLayout = false;
|
||||
TbFolder.Text = _appConfig.DirectoriesConfig.VideosDirectory;
|
||||
@@ -255,8 +255,8 @@ public partial class Annotator
|
||||
if (_suspendLayout)
|
||||
return;
|
||||
|
||||
_appConfig.AnnotationConfig.LeftPanelWidth = MainGrid.ColumnDefinitions.FirstOrDefault()!.Width.Value;
|
||||
_appConfig.AnnotationConfig.RightPanelWidth = MainGrid.ColumnDefinitions.LastOrDefault()!.Width.Value;
|
||||
_appConfig.UIConfig.LeftPanelWidth = MainGrid.ColumnDefinitions.FirstOrDefault()!.Width.Value;
|
||||
_appConfig.UIConfig.RightPanelWidth = MainGrid.ColumnDefinitions.LastOrDefault()!.Width.Value;
|
||||
|
||||
await ThrottleExt.ThrottleRunFirst(() =>
|
||||
{
|
||||
@@ -329,8 +329,19 @@ public partial class Annotator
|
||||
var existingResult = _formState.AnnotationResults.FirstOrDefault(x => x.Annotation.Time == time);
|
||||
if (existingResult != null)
|
||||
{
|
||||
_logger.LogInformation($"remove annotation {existingResult.TimeStr} {existingResult.ClassName}!");
|
||||
_formState.AnnotationResults.Remove(existingResult);
|
||||
try
|
||||
{
|
||||
_logger.LogInformation($"remove annotation {existingResult.TimeStr} {existingResult.ClassName}!");
|
||||
_formState.AnnotationResults.Remove(existingResult);
|
||||
_logger.LogInformation($"removed {existingResult.TimeStr} {existingResult.ClassName} sucessfully!");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_logger.LogError(e, e.Message);
|
||||
//Console.WriteLine(e);
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -640,7 +651,7 @@ public class GradientStyleSelector : StyleSelector
|
||||
};
|
||||
|
||||
var gradients = new List<GradientStop>();
|
||||
if (result.Colors.Count != 0)
|
||||
if (result.Colors.Count == 0)
|
||||
{
|
||||
var color = (Color)ColorConverter.ConvertFromString("#40DDDDDD");
|
||||
gradients = [new GradientStop(color, 0.99)];
|
||||
|
||||
Reference in New Issue
Block a user