コード例 #1
0
 public ItemPaintEventArgs(Graphics graphics, Rectangle rectangle, Rectangle fillRectangle, DynamicList list, DynamicListColumn column, DynamicListItem item, bool isMouseEntered) : base(graphics, rectangle)
 {
     this.fillRectangle = fillRectangle;
     this.list = list;
     this.column = column;
     this.item = item;
     this.isMouseEntered = isMouseEntered;
 }
コード例 #2
0
 internal void PaintTo(Graphics g, Rectangle rectangle, DynamicList list, DynamicListColumn column, bool isMouseEntered)
 {
     Rectangle rect = rectangle;
     rect.Width++;
     if ((this.highlightBrush != null) && isMouseEntered)
     {
         g.FillRectangle(this.highlightBrush, rect);
     }
     else
     {
         bool isActivated = list.IsActivated;
         Brush rowHighlightBrush = this.GetBrush(isActivated, this.backgroundBrush, this.backgroundBrushInactive);
         if (rowHighlightBrush == null)
         {
             rowHighlightBrush = this.GetBrush(isActivated, column.BackgroundBrush, column.BackgroundBrushInactive);
             if ((isActivated && (list.RowAtMousePosition == this.row)) && (column.RowHighlightBrush != null))
             {
                 rowHighlightBrush = column.RowHighlightBrush;
             }
         }
         g.FillRectangle(rowHighlightBrush, rect);
     }
     if (this.Paint != null)
     {
         this.Paint(this, new ItemPaintEventArgs(g, rectangle, rect, list, column, this, isMouseEntered));
     }
     if (this.text.Length > 0)
     {
         g.DrawString(this.text, this.font, this.textBrush, rectangle, this.textFormat);
     }
 }