private void StopTracks(object state) { Dispatcher.BeginInvoke(delegate { MainProgress.Stop(); viewModel.AudioMan.StopAll(); Bank1Go.Stop(); Bank2Go.Stop(); Bank3Go.Stop(); Bank4Go.Stop(); Bank5Go.Stop(); Bank6Go.Stop(); }); }
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(); } }); }