add image editing

This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-08-07 13:22:17 +03:00
parent c72f7fc265
commit a81a6f881d
11 changed files with 146 additions and 57 deletions
+6 -5
View File
@@ -1,5 +1,4 @@
using System.Collections.ObjectModel;
using System.Globalization;
using System.IO;
using System.Windows;
@@ -8,14 +7,16 @@ namespace Azaion.Annotator.DTO;
public class FormState
{
public SelectionState SelectionState { get; set; } = SelectionState.None;
public string CurrentFile { get; set; } = null!;
public MediaFileInfo? CurrentMedia { get; set; }
public Size CurrentVideoSize { get; set; }
public string VideoName => Path.GetFileNameWithoutExtension(CurrentFile).Replace(" ", "");
public string VideoName => string.IsNullOrEmpty(CurrentMedia?.Name)
? ""
: Path.GetFileNameWithoutExtension(CurrentMedia.Name).Replace(" ", "");
public TimeSpan CurrentVideoLength { get; set; }
public int CurrentVolume { get; set; } = 100;
public ObservableCollection<AnnotationResult> AnnotationResults { get; set; } = [];
public string GetTimeName(TimeSpan ts) => $"{VideoName}_{ts:hmmssf}";
public TimeSpan? GetTime(string name)