예제 #1
0
        private void DrawNotes(Graphics g, Rectangle visibleAreaRectangle, Dictionary <Track.Command, CommandLineInfo> visibleNoteList)
        {
            //if (Channel == null)
            //{
            //    // nothing to draw
            //    return;
            //}

            int keysX = this.TextAreaWidth + 1;
            var brush = Brushes.Black;

            foreach (var info in visibleNoteList.Values)
            {
                if (ChannelCommand.NoteIsSharp(info.Command))
                {
                    brush = Brushes.Black;
                }
                else
                {
                    brush = Brushes.White;
                }
                g.FillRectangle(brush, keysX, info.LineArea.Y, keyAreaWidth, info.LineArea.Height);

                g.DrawString(info.Command.GetDescription(),
                             this.Font,
                             Brushes.Black,
                             2,
                             info.LineArea.Y + (info.LineArea.Height / 2) - (g.MeasureString(info.Command.GetDescription(), this.Font).Height / 2));
            }
        }