Guest User

Untitled

a guest
Nov 20th, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. Thread hs;
  2. hs = new Thread(()=>Playsound(sound));
  3.  
  4.  
  5. while (bstate==-1)
  6. {
  7. t = Int16.Parse(bpm.Text);
  8. t = 60000 / t;
  9.  
  10. hs.Start();
  11.  
  12. cajas[compas-1].Fill = new SolidColorBrush(Colors.White);
  13. cajas[0].Fill = new SolidColorBrush(Colors.Red);
  14. await Task.Delay(t);
  15.  
  16. for (int k = 1; k < compas-1; k++)
  17. {
  18.  
  19.  
  20. hs.Start();
  21. cajas[k-1].Fill = new SolidColorBrush(Colors.White);
  22. cajas[k].Fill = new SolidColorBrush(Colors.Black);
  23. await Task.Delay(t);
  24. }
  25.  
  26. hs.Start();
  27.  
  28. cajas[compas - 2].Fill = new SolidColorBrush(Colors.White);
  29. cajas[compas - 1].Fill = new SolidColorBrush(Colors.Black);
  30. await Task.Delay(t);
  31.  
  32. }
Add Comment
Please, Sign In to add comment