private void btnSolve_Click(object sender, EventArgs e) { playingSolutionClip = true; if (btnAnswerState == buttonAnswerState.STATE_NONE) { btnAnswerState = buttonAnswerState.STATE_PLAYING_ANSWER_ONLY; Song.Clip solutionClip = theGame.CurrentGame.Song.SolutionClip; playClip(solutionClip); } else if (btnAnswerState == buttonAnswerState.STATE_PLAYING_ANSWER_ONLY) { btnAnswerState = buttonAnswerState.STATE_PLAYING_FULL_SONG; playFullSong(); } else if (btnAnswerState == buttonAnswerState.STATE_PLAYING_FULL_SONG) { btnAnswerState = buttonAnswerState.STATE_PLAYING_ANSWER_ONLY; Song.Clip solutionClip = theGame.CurrentGame.Song.SolutionClip; playClip(solutionClip); } updateControls(); this.tbSongInfo.Text = string.Format("Song: {0}...", theGame.CurrentGame.Song.Name); }
private void btnNextSong_Click(object sender, EventArgs e) { // Stop any song that might be playing currently MediaPlayerStop(); if (stopTimer != null) { // Disable the timer stopTimer.Change(Timeout.Infinite, Timeout.Infinite); } // Get the next song theGame.GetNextSingleGame(); // Update the controls this.axWindowsMediaPlayer.uiMode = "none"; this.btnCurrentPlayButtonState = buttonPlayState.STATE_NONE; this.btnAnswerState = buttonAnswerState.STATE_NONE; playingSolutionClip = false; currentClip = null; updateControls(); this.tbSongInfo.Text = string.Format("Loaded Song {0}/{1}", theGame.SongIndex + 1, theGame.SongFile.listOfSongs.Count); }