Ejemplo n.º 1
0
 private void replay_Click(object sender, RoutedEventArgs e)
 {
     if (GuessingHelper.GetRecord() == null)
     {
         return;
     }
     rh.PlayRecord(GuessingHelper.GetRecord().FilePath);
     resultTextBlock.Text = "";
 }
Ejemplo n.º 2
0
        private void submit_Click(object sender, RoutedEventArgs e)
        {
            if (GuessingHelper.GetRecord() == null)
            {
                return;
            }
            rh.StopPlaying();
            if (GuessingHelper.GetRecord().Note == (string)PickChordComboBox.SelectedValue)
            {
                GuessingHelper.PickNewRecord();
                resultTextBlock.Text = "Good";
                statistics.AddGoodTryObservable(GuessingHelper.GetRecord().Note);
                StatisticsHelper.SaveStatistics(statistics);
            }
            else
            {
                resultTextBlock.Text = "Wrong";
                statistics.AddWrongTryObservable(GuessingHelper.GetRecord().Note);
                StatisticsHelper.SaveStatistics(statistics);
            }

            ToastHelper.Tile();
        }