mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +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
|
// ignore
|
||||||
}
|
}
|
||||||
OnVideoLoaded?.Invoke(_mediaPlayer, new EventArgs());
|
OnVideoLoaded?.Invoke(_mediaPlayer, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetVlcPath(string fileName)
|
public static string GetVlcPath(string fileName)
|
||||||
@ -1065,7 +1065,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
|||||||
Stop();
|
Stop();
|
||||||
Play();
|
Play();
|
||||||
Pause();
|
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);
|
NativeMethods.libvlc_media_player_pause(_mediaPlayer);
|
||||||
_videoLoadedTimer.Stop();
|
_videoLoadedTimer.Stop();
|
||||||
|
|
||||||
OnVideoLoaded?.Invoke(_mediaPlayer, new EventArgs());
|
OnVideoLoaded?.Invoke(_mediaPlayer, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Initialize(Control ownerControl, string videoFileName, EventHandler onVideoLoaded, EventHandler onVideoEnded)
|
public override void Initialize(Control ownerControl, string videoFileName, EventHandler onVideoLoaded, EventHandler onVideoEnded)
|
||||||
@ -195,7 +195,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
|||||||
Stop();
|
Stop();
|
||||||
Play();
|
Play();
|
||||||
Pause();
|
Pause();
|
||||||
OnVideoEnded.Invoke(_mediaPlayer, new EventArgs());
|
OnVideoEnded.Invoke(_mediaPlayer, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
|
|||||||
}
|
}
|
||||||
|
|
||||||
Resize(_initialWidth, _initialHeight);
|
Resize(_initialWidth, _initialHeight);
|
||||||
OnVideoLoaded?.Invoke(this, new EventArgs());
|
OnVideoLoaded?.Invoke(this, EventArgs.Empty);
|
||||||
|
|
||||||
SendMpcMessage(MpcHcCommand.SetSubtitleTrack, "-1");
|
SendMpcMessage(MpcHcCommand.SetSubtitleTrack, "-1");
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MpcHcCommand.NotifyEndOfStream:
|
case MpcHcCommand.NotifyEndOfStream:
|
||||||
OnVideoEnded?.Invoke(this, new EventArgs());
|
OnVideoEnded?.Invoke(this, EventArgs.Empty);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MpcHcCommand.CurrentPosition:
|
case MpcHcCommand.CurrentPosition:
|
||||||
|
@ -249,7 +249,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OnVideoLoaded.Invoke(_quartzFilgraphManager, new EventArgs());
|
OnVideoLoaded.Invoke(_quartzFilgraphManager, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
@ -266,7 +266,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
|
|||||||
_isPaused = true;
|
_isPaused = true;
|
||||||
if (OnVideoEnded != null && _quartzFilgraphManager != null)
|
if (OnVideoEnded != null && _quartzFilgraphManager != null)
|
||||||
{
|
{
|
||||||
OnVideoEnded.Invoke(_quartzFilgraphManager, new EventArgs());
|
OnVideoEnded.Invoke(_quartzFilgraphManager, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user