Add annotationResult and put them into json

This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-07-16 14:06:05 +03:00
parent ea8d0e686a
commit 71006a2462
16 changed files with 445 additions and 252 deletions
@@ -14,7 +14,8 @@ public class AnnotationControl : Border
private readonly Grid _grid;
private readonly TextBlock _classNameLabel;
public TimeSpan Time { get; set; }
private AnnotationClass _annotationClass = null!;
public AnnotationClass AnnotationClass
{
@@ -40,8 +41,9 @@ public class AnnotationControl : Border
}
}
public AnnotationControl(AnnotationClass annotationClass, Action<object, MouseButtonEventArgs> resizeStart)
public AnnotationControl(AnnotationClass annotationClass, TimeSpan time, Action<object, MouseButtonEventArgs> resizeStart)
{
Time = time;
_resizeStart = resizeStart;
_classNameLabel = new TextBlock
{
@@ -104,5 +106,5 @@ public class AnnotationControl : Border
return rect;
}
public AnnotationInfo Info => new(AnnotationClass.Id, Canvas.GetLeft(this), Canvas.GetTop(this), Width, Height);
public CanvasLabel Info => new(AnnotationClass.Id, Canvas.GetLeft(this), Canvas.GetTop(this), Width, Height);
}