Example #1
0
 private void rootPivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (RecordingsList.Count > 0)
     {
         GuessingHelper.PickNewRecord();
     }
 }
Example #2
0
 private void replay_Click(object sender, RoutedEventArgs e)
 {
     if (GuessingHelper.GetRecord() == null)
     {
         return;
     }
     rh.PlayRecord(GuessingHelper.GetRecord().FilePath);
     resultTextBlock.Text = "";
 }
Example #3
0
        private void Init()
        {
            var task = Task.Run(async() => { await PopulateRecordings(); });

            task.Wait();

            task = Task.Run(async() => { await PopulatePlaces(); });
            task.Wait();

            CreateFoldersStructure();
            if (RecordingsList.Count > 0)
            {
                GuessingHelper.PickNewRecord();
            }
            statistics = StatisticsHelper.LoadStatistics();
            StatisticsListView.ItemsSource = statistics.StatisticsObservableList;
        }
Example #4
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();
        }