mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 16:16:31 +00:00
add volume
This commit is contained in:
@@ -74,7 +74,7 @@ public partial class MainWindow
|
||||
_helpWindow.Show();
|
||||
}
|
||||
|
||||
public void BlinkHelp(string helpText, int times = 3)
|
||||
public void BlinkHelp(string helpText, int times = 2)
|
||||
{
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
@@ -112,7 +112,7 @@ public partial class MainWindow
|
||||
|
||||
_mediaPlayer.PositionChanged += (o, args) =>
|
||||
{
|
||||
Dispatcher.Invoke(() => videoSlider.Value = _mediaPlayer.Position * videoSlider.Maximum);
|
||||
Dispatcher.Invoke(() => VideoSlider.Value = _mediaPlayer.Position * VideoSlider.Maximum);
|
||||
Dispatcher.Invoke(() => StatusClock.Text = $"{TimeSpan.FromMilliseconds(_mediaPlayer.Time):mm\\:ss} / {_formState.CurrentVideoLength:mm\\:ss}");
|
||||
|
||||
var curTime = _formState.GetTimeName(TimeSpan.FromMilliseconds(_mediaPlayer.Time));
|
||||
@@ -149,11 +149,13 @@ public partial class MainWindow
|
||||
|
||||
};
|
||||
|
||||
videoSlider.ValueChanged += (value, newValue) =>
|
||||
_mediaPlayer.Position = (float)(newValue / videoSlider.Maximum);
|
||||
VideoSlider.ValueChanged += (value, newValue) =>
|
||||
_mediaPlayer.Position = (float)(newValue / VideoSlider.Maximum);
|
||||
|
||||
videoSlider.KeyDown += (sender, args) => _mediator.Publish(new KeyEvent(sender, args));
|
||||
VideoSlider.KeyDown += (sender, args) => _mediator.Publish(new KeyEvent(sender, args));
|
||||
|
||||
Volume.ValueChanged += (_, newValue) => _mediator.Publish(new VolumeChangedEvent((int)newValue));
|
||||
|
||||
SizeChanged += (sender, args) =>
|
||||
{
|
||||
if (!_suspendLayout)
|
||||
@@ -257,6 +259,8 @@ public partial class MainWindow
|
||||
|
||||
private void RemoveSelectedClick(object sender, RoutedEventArgs e) => _mediator.Publish(new PlaybackControlEvent(PlaybackControlEnum.RemoveSelectedAnns));
|
||||
private void RemoveAllClick(object sender, RoutedEventArgs e) => _mediator.Publish(new PlaybackControlEvent(PlaybackControlEnum.RemoveAllAnns));
|
||||
private void TurnOffVolume(object sender, RoutedEventArgs e) => _mediator.Publish(new PlaybackControlEvent(PlaybackControlEnum.TurnOffVolume));
|
||||
private void TurnOnVolume(object sender, RoutedEventArgs e) => _mediator.Publish(new PlaybackControlEvent(PlaybackControlEnum.TurnOnVolume));
|
||||
|
||||
private void OpenHelpWindowClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user