private void DrawModifiers6(Graphics g, IEnumerable<GuitarMessage> vis) { foreach (var bre in vis.GetMessages(GuitarMessageType.GuitarBigRockEnding)) { var brush = Utility.noteBREBrush; if (bre.Selected) { brush = Utility.noteBGBrushSel; } FillRect(g, brush, bre.TickPair); } foreach (var solo in vis.GetMessages(GuitarMessageType.GuitarSolo)) { var brush = Utility.noteSoloBrush; if (solo.Selected) { brush = Utility.noteBGBrushSel; } FillRect(g, brush, solo.TickPair); } foreach (var pwer in vis.GetMessages(GuitarMessageType.GuitarPowerup)) { var brush = Utility.notePowerupBrush; if (pwer.Selected) { brush = Utility.noteBGBrushSel; } FillRect(g, brush, pwer.TickPair); } foreach (var msg in vis.GetMessages(GuitarMessageType.GuitarSingleStringTremelo)) { var brush = Utility.noteSingleStringTremeloBrush; if (msg.Selected) { brush = Utility.noteBGBrushSel; } var chords = vis.GetMessages(GuitarMessageType.GuitarChord).Cast<GuitarChord>(); if (chords.Any()) { int minString = chords.Min(x => x.Notes.Min(n => n.NoteString)); int maxString = chords.Max(x => x.Notes.Max(n => n.NoteString)); if (minString != Int32.MaxValue && maxString != Int32.MinValue) { DrawRect(g, brush, msg.TickPair, minString, maxString); } } else { FillRect(g, brush, msg.TickPair); } } foreach (var msg in vis.GetMessages(GuitarMessageType.GuitarMultiStringTremelo)) { var brush = Utility.noteMultiStringTremeloBrush; if (msg.Selected) { brush = Utility.noteBGBrushSel; } var msgs = vis.GetBetweenTick(msg.TickPair).Where(x => x is GuitarChord).Cast<GuitarChord>(); var chords = vis.GetMessages(GuitarMessageType.GuitarChord).Cast<GuitarChord>(); if (chords.Any()) { int minString = chords.Min(x => x.Notes.Min(n => n.NoteString)); int maxString = chords.Max(x => x.Notes.Max(n => n.NoteString)); if (minString != Int32.MaxValue && maxString != Int32.MinValue) { DrawRect(g, brush, msg.TickPair, minString, maxString); } } else { FillRect(g, brush, msg.TickPair); } } foreach (var arp in vis.GetMessages(GuitarMessageType.GuitarArpeggio)) { var brush = Utility.noteArpeggioBrush; if (arp.Selected) { brush = Utility.noteBGBrushSel; } FillRect(g, brush, arp.TickPair); } }
private void DrawModifiers6(Graphics g, IEnumerable<GuitarMessage> vis) { foreach (var bre in vis.GetMessages<GuitarBigRockEnding>()) { var brush = Utility.noteBREBrush; if (bre.Selected) { brush = Utility.noteBGBrushSel; } FillRect(g, brush, bre.DownTick, bre.UpTick); } foreach (var solo in vis.GetMessages<GuitarSolo>()) { var brush = Utility.noteSoloBrush; if (solo.Selected) { brush = Utility.noteBGBrushSel; } FillRect(g, brush, solo.DownTick, solo.UpTick); } foreach (var pwer in vis.GetMessages<GuitarPowerup>()) { var brush = Utility.notePowerupBrush; if (pwer.Selected) { brush = Utility.noteBGBrushSel; } FillRect(g, brush, pwer.DownTick, pwer.UpTick); } foreach (var bre in vis.GetMessages<GuitarSingleStringTremelo>()) { var brush = Utility.noteSingleStringTremeloBrush; if (bre.Selected) { brush = Utility.noteBGBrushSel; } var msgs = vis.GetBetweenTick(bre.DownTick, bre.UpTick).Where(x => x is GuitarChord).Cast<GuitarChord>(); int minString = Int32.MaxValue, maxString = Int32.MinValue; foreach (var m in msgs) { foreach (var n in m.Notes) { if (n != null) { if (n.NoteString < minString) minString = n.NoteString; if (n.NoteString > maxString) maxString = n.NoteString; } } } if (minString != Int32.MaxValue && maxString != Int32.MinValue) { DrawRect(g, brush, bre.DownTick, bre.UpTick, minString, maxString); } else { FillRect(g, brush, bre.DownTick, bre.UpTick); } } foreach (var bre in vis.GetMessages<GuitarMultiStringTremelo>()) { var brush = Utility.noteMultiStringTremeloBrush; if (bre.Selected) { brush = Utility.noteBGBrushSel; } var msgs = vis.GetBetweenTick(bre.DownTick, bre.UpTick).Where(x=> x is GuitarChord).Cast<GuitarChord>(); int minString = Int32.MaxValue, maxString = Int32.MinValue; foreach (var m in msgs) { foreach (var n in m.Notes) { if (n != null) { if (n.NoteString < minString) minString = n.NoteString; if (n.NoteString > maxString) maxString = n.NoteString; } } } if (minString != Int32.MaxValue && maxString != Int32.MinValue) { DrawRect(g, brush, bre.DownTick, bre.UpTick, minString, maxString); } else { FillRect(g, brush, bre.DownTick, bre.UpTick); } } foreach (var arp in vis.GetMessages<GuitarArpeggio>()) { var brush = Utility.noteArpeggioBrush; if (arp.Selected) { brush = Utility.noteBGBrushSel; } FillRect(g, brush, arp.DownTick, arp.UpTick); } }