private void PlayTracks(object state) { stopTimer.Change(3950, System.Threading.Timeout.Infinite); Dispatcher.BeginInvoke(delegate { MainProgress.Begin(); //foreach (int k in banksToPlay.Keys) //{ // if (banksToPlay[k]) // { // viewModel.AudioMan.PlayBank(k); // } //} if (play1) { viewModel.AudioMan.PlayMixedBank(0); Bank1Go.Begin(); } if (play2) { viewModel.AudioMan.PlayMixedBank(1); Bank2Go.Begin(); } if (play3) { viewModel.AudioMan.PlayMixedBank(2); Bank3Go.Begin(); } if (play4) { viewModel.AudioMan.PlayMixedBank(3); Bank4Go.Begin(); } if (play5) { viewModel.AudioMan.PlayMixedBank(4); Bank5Go.Begin(); } if (play6) { viewModel.AudioMan.PlayMixedBank(5); Bank6Go.Begin(); } }); }
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++; } }); }