private void rootPivot_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (RecordingsList.Count > 0) { GuessingHelper.PickNewRecord(); } }
private void replay_Click(object sender, RoutedEventArgs e) { if (GuessingHelper.GetRecord() == null) { return; } rh.PlayRecord(GuessingHelper.GetRecord().FilePath); resultTextBlock.Text = ""; }
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; }
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(); }