Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Thread hs;
- hs = new Thread(()=>Playsound(sound));
- while (bstate==-1)
- {
- t = Int16.Parse(bpm.Text);
- t = 60000 / t;
- hs.Start();
- cajas[compas-1].Fill = new SolidColorBrush(Colors.White);
- cajas[0].Fill = new SolidColorBrush(Colors.Red);
- await Task.Delay(t);
- for (int k = 1; k < compas-1; k++)
- {
- hs.Start();
- cajas[k-1].Fill = new SolidColorBrush(Colors.White);
- cajas[k].Fill = new SolidColorBrush(Colors.Black);
- await Task.Delay(t);
- }
- hs.Start();
- cajas[compas - 2].Fill = new SolidColorBrush(Colors.White);
- cajas[compas - 1].Fill = new SolidColorBrush(Colors.Black);
- await Task.Delay(t);
- }
Add Comment
Please, Sign In to add comment