private void Pause() { _musicPlayer.Pause(); PlayerState = PlayerState.paused; ReportStatus?.Invoke(this, new StatusEventArgs("Playing " + SFX.ShortFileNameOnly, true)); UpdatePlayButton(); }
private void UnPause() { _musicPlayer.Resume(); PlayerState = PlayerState.play; ReportStatus?.Invoke(this, new StatusEventArgs("Playing " + SFX.ShortFileNameOnly)); UpdatePlayButton(); }
private void _musicPlayer_PlaybackStopped(object sender, PlaybackStoppedEventArgs e) { PlayerState = PlayerState.loaded; UpdatePlayButton(); try { ReportStatus?.Invoke(this, new StatusEventArgs("Playing " + SFX.ShortFileNameOnly, true)); } catch { } }
public void Play() { if (PlayerState == PlayerState.uninitialised) { LoadFile(); } if (PlayerState == PlayerState.loaded) { PlayFromStart(); ReportStatus?.Invoke(this, new StatusEventArgs("Playing " + SFX.ShortFileNameOnly)); } if (bnStopAll.Checked) { StopAll?.Invoke(this, new EventArgs()); } }
/// <inheritdoc/> protected void OnReportStatus(EventArgs e) { ReportStatus?.Invoke(this, e); }