private void DrawGridLines(long endTime, int bpm, int count)
{
int runner = 0;
for (double i = 0; i < (endTime + 1000); i = i + (multiplier) + (bpm / count)) {
Rectangle r = new Rectangle();
if (hInst == 0) {
r.Width = 1280;
if (runner % count == 0) {
r.Fill = new SolidColorBrush(Color.FromRgb(221, 221, 221));
r.SetValue(Canvas.TopProperty, (double)-i * scrollSpeed);
r.Height = 3;
}
else {
r.Fill = new SolidColorBrush(Color.FromRgb(255, 222, 222));
r.SetValue(Canvas.TopProperty, (double)-i * scrollSpeed);
r.Height = 1;
}
}
else {
r.Height = 326;
r.SetValue(Canvas.TopProperty, (double)170);
int left = (int)(((i * scrollSpeed) / 9) * 9) + 1;
if (runner % count == 0) {
r.Fill = new SolidColorBrush(Color.FromRgb(255, 255, 255));
r.SetValue(Canvas.LeftProperty, (double)left);
r.Width = 8;
}
else {
r.Fill = new SolidColorBrush(Color.FromRgb(230, 230, 230));
r.SetValue(Canvas.LeftProperty, (double)left);
r.Width = 8;
}
}
gridlines.Children.Add(r);
runner++;
}
}