Ejemplo n.º 1
0
 private void Pause()
 {
     _musicPlayer.Pause();
     PlayerState = PlayerState.paused;
     ReportStatus?.Invoke(this, new StatusEventArgs("Playing " + SFX.ShortFileNameOnly, true));
     UpdatePlayButton();
 }
Ejemplo n.º 2
0
 private void UnPause()
 {
     _musicPlayer.Resume();
     PlayerState = PlayerState.play;
     ReportStatus?.Invoke(this, new StatusEventArgs("Playing " + SFX.ShortFileNameOnly));
     UpdatePlayButton();
 }
Ejemplo n.º 3
0
 private void _musicPlayer_PlaybackStopped(object sender, PlaybackStoppedEventArgs e)
 {
     PlayerState = PlayerState.loaded;
     UpdatePlayButton();
     try {
         ReportStatus?.Invoke(this, new StatusEventArgs("Playing " + SFX.ShortFileNameOnly, true));
     } catch { }
 }
Ejemplo n.º 4
0
 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);
 }