mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Merge pull request #8585 from ivandrofly/event-args
Replace new EventArgs() with EventArgs.Empty
This commit is contained in:
commit
baec5663b3
@ -676,7 +676,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
OnVideoLoaded?.Invoke(_mediaPlayer, new EventArgs());
|
||||
OnVideoLoaded?.Invoke(_mediaPlayer, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public static string GetVlcPath(string fileName)
|
||||
@ -1065,7 +1065,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
Stop();
|
||||
Play();
|
||||
Pause();
|
||||
OnVideoEnded?.Invoke(_mediaPlayer, new EventArgs());
|
||||
OnVideoEnded?.Invoke(_mediaPlayer, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
NativeMethods.libvlc_media_player_pause(_mediaPlayer);
|
||||
_videoLoadedTimer.Stop();
|
||||
|
||||
OnVideoLoaded?.Invoke(_mediaPlayer, new EventArgs());
|
||||
OnVideoLoaded?.Invoke(_mediaPlayer, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public override void Initialize(Control ownerControl, string videoFileName, EventHandler onVideoLoaded, EventHandler onVideoEnded)
|
||||
@ -195,7 +195,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
Stop();
|
||||
Play();
|
||||
Pause();
|
||||
OnVideoEnded.Invoke(_mediaPlayer, new EventArgs());
|
||||
OnVideoEnded.Invoke(_mediaPlayer, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
|
||||
}
|
||||
|
||||
Resize(_initialWidth, _initialHeight);
|
||||
OnVideoLoaded?.Invoke(this, new EventArgs());
|
||||
OnVideoLoaded?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
SendMpcMessage(MpcHcCommand.SetSubtitleTrack, "-1");
|
||||
|
||||
@ -209,7 +209,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
|
||||
}
|
||||
break;
|
||||
case MpcHcCommand.NotifyEndOfStream:
|
||||
OnVideoEnded?.Invoke(this, new EventArgs());
|
||||
OnVideoEnded?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
break;
|
||||
case MpcHcCommand.CurrentPosition:
|
||||
|
@ -249,7 +249,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
{
|
||||
try
|
||||
{
|
||||
OnVideoLoaded.Invoke(_quartzFilgraphManager, new EventArgs());
|
||||
OnVideoLoaded.Invoke(_quartzFilgraphManager, EventArgs.Empty);
|
||||
}
|
||||
catch
|
||||
{
|
||||
@ -266,7 +266,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
||||
_isPaused = true;
|
||||
if (OnVideoEnded != null && _quartzFilgraphManager != null)
|
||||
{
|
||||
OnVideoEnded.Invoke(_quartzFilgraphManager, new EventArgs());
|
||||
OnVideoEnded.Invoke(_quartzFilgraphManager, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user