示例#1
0
 private void Pause()
 {
     _musicPlayer.Pause();
     PlayerState = PlayerState.paused;
     ReportStatus?.Invoke(this, new StatusEventArgs("Playing " + SFX.ShortFileNameOnly, true));
     UpdatePlayButton();
 }
示例#2
0
 private void UnPause()
 {
     _musicPlayer.Resume();
     PlayerState = PlayerState.play;
     ReportStatus?.Invoke(this, new StatusEventArgs("Playing " + SFX.ShortFileNameOnly));
     UpdatePlayButton();
 }
示例#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 { }
 }
示例#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);
 }