add volume

This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-05-26 15:11:16 +03:00
parent f179a5f0ca
commit e317ce2310
6 changed files with 167 additions and 20 deletions
+2 -1
View File
@@ -10,7 +10,8 @@ public class FormState
public string CurrentFile { get; set; } = null!;
public Size CurrentVideoSize { get; set; }
public string VideoName => Path.GetFileNameWithoutExtension(CurrentFile).Replace(" ", "");
public TimeSpan CurrentVideoLength { get; set; }
public TimeSpan CurrentVideoLength { get; set; }
public int CurrentVolume { get; set; } = 100;
public string GetTimeName(TimeSpan ts) => $"{VideoName}_{ts:hmmssf}";
}
+5
View File
@@ -13,3 +13,8 @@ public class PlaybackControlEvent(PlaybackControlEnum playbackControlEnum) : INo
{
public PlaybackControlEnum PlaybackControl { get; set; } = playbackControlEnum;
}
public class VolumeChangedEvent(int volume) : INotification
{
public int Volume { get; set; } = volume;
}
+3 -1
View File
@@ -10,5 +10,7 @@ public enum PlaybackControlEnum
NextFrame = 5,
SaveAnnotations = 6,
RemoveSelectedAnns = 7,
RemoveAllAnns = 8
RemoveAllAnns = 8,
TurnOffVolume = 9,
TurnOnVolume = 10
}