rework to have only 1 exe!

This commit is contained in:
Alex Bezdieniezhnykh
2024-12-04 20:51:26 +02:00
parent 3944df8efe
commit 60519461a1
25 changed files with 194 additions and 198 deletions
-41
View File
@@ -1,41 +0,0 @@
using System.Windows.Media;
using Azaion.Common.DTO;
using Newtonsoft.Json;
namespace Azaion.Annotator.DTO;
public class AnnotationResult
{
[JsonProperty(PropertyName = "f")]
public string Image { get; set; } = null!;
[JsonProperty(PropertyName = "t")]
public TimeSpan Time { get; set; }
public double Lat { get; set; }
public double Lon { get; set; }
public List<Detection> Detections { get; set; } = new();
#region For XAML Form
[JsonIgnore]
public string TimeStr => $"{Time:h\\:mm\\:ss}";
[JsonIgnore]
public string ClassName { get; set; } = null!;
[JsonIgnore]
public Color ClassColor0 { get; set; }
[JsonIgnore]
public Color ClassColor1 { get; set; }
[JsonIgnore]
public Color ClassColor2 { get; set; }
[JsonIgnore]
public Color ClassColor3 { get; set; }
#endregion
}
-23
View File
@@ -1,23 +0,0 @@
using System.Collections.ObjectModel;
using System.IO;
using System.Windows;
namespace Azaion.Annotator.DTO;
public class FormState
{
public MediaFileInfo? CurrentMedia { get; set; }
public string VideoName => string.IsNullOrEmpty(CurrentMedia?.Name)
? ""
: Path.GetFileNameWithoutExtension(CurrentMedia.Name).Replace(" ", "");
public string CurrentMrl { get; set; } = null!;
public Size CurrentVideoSize { get; set; }
public TimeSpan CurrentVideoLength { get; set; }
public TimeSpan? BackgroundTime { get; set; }
public int CurrentVolume { get; set; } = 100;
public ObservableCollection<AnnotationResult> AnnotationResults { get; set; } = [];
public string GetTimeName(TimeSpan? ts) => $"{VideoName}_{ts:hmmssf}";
}
-11
View File
@@ -1,11 +0,0 @@
namespace Azaion.Annotator.DTO;
public class MediaFileInfo
{
public string Name { get; set; } = null!;
public string Path { get; set; } = null!;
public TimeSpan Duration { get; set; }
public string DurationStr => $"{Duration:h\\:mm\\:ss}";
public bool HasAnnotations { get; set; }
public MediaTypes MediaType { get; set; }
}
-8
View File
@@ -1,8 +0,0 @@
namespace Azaion.Annotator.DTO;
public enum MediaTypes
{
None = 0,
Video = 1,
Image = 2
}