private void PlayTracks(object state) { stopTimer.Change(3950, System.Threading.Timeout.Infinite); Dispatcher.BeginInvoke(delegate { MainProgress.Begin(); if (play1) { viewModel.AudioMan.PlayMixedBank(0); PlayBank1.Begin(); if (recording) { instructions[0][currentMeasure] = true; } } if (play2) { viewModel.AudioMan.PlayMixedBank(1); PlayBank2.Begin(); if (recording) { instructions[1][currentMeasure] = true; } } if (play3) { viewModel.AudioMan.PlayMixedBank(2); PlayBank3.Begin(); if (recording) { instructions[2][currentMeasure] = true; } } if (play4) { viewModel.AudioMan.PlayMixedBank(3); PlayBank4.Begin(); if (recording) { instructions[3][currentMeasure] = true; } } if (play5) { viewModel.AudioMan.PlayMixedBank(4); PlayBank5.Begin(); if (recording) { instructions[4][currentMeasure] = true; } } if (play6) { viewModel.AudioMan.PlayMixedBank(5); PlayBank6.Begin(); if (recording) { instructions[5][currentMeasure] = true; } } if (recording) { currentMeasure++; } }); }
private void playButton_Tap(object sender, System.Windows.Input.GestureEventArgs e) { PlayBank1.Begin(); }