private void DrawCell(Graphics g, Dictionary <FontStyle, Font> fonts, bool highlighted, BrushesStorage brushes, int y, ChartIconDropDownRowCells cells, int rowsDisplayed) { DrawBack(g, highlighted, brushes, y); var top = y * cellHeight; var cy = top + cellHeight / 2; var itemsLeftAbove = startItemIndex; var itemsLeftBelow = formattedValues.Count - rowsDisplayed - startItemIndex - 1; if (cells.TypeOfRow == ChartIconDropDownRowCells.RowType.ArrowUp) { DrawArrowUpDown(g, highlighted, brushes, true, cy, itemsLeftAbove); return; } if (cells.TypeOfRow == ChartIconDropDownRowCells.RowType.ArrowDown) { DrawArrowUpDown(g, highlighted, brushes, false, cy, itemsLeftBelow); return; } // вписать в ячеи текст var leftPos = paddingLeft; for (var i = 0; i < cells.cells.Length; i++) { var col = columns[i]; DrawText(g, fonts, highlighted, brushes, y, cells.cells[i], leftPos); leftPos += col.ColumnWidth; } }
private void DrawCell(Graphics g, Dictionary<FontStyle, Font> fonts, bool highlighted, BrushesStorage brushes, int y, ChartIconDropDownRowCells cells, int rowsDisplayed) { DrawBack(g, highlighted, brushes, y); var top = y * cellHeight; var cy = top + cellHeight / 2; var itemsLeftAbove = startItemIndex; var itemsLeftBelow = formattedValues.Count - rowsDisplayed - startItemIndex - 1; if (cells.TypeOfRow == ChartIconDropDownRowCells.RowType.ArrowUp) { DrawArrowUpDown(g, highlighted, brushes, true, cy, itemsLeftAbove); return; } if (cells.TypeOfRow == ChartIconDropDownRowCells.RowType.ArrowDown) { DrawArrowUpDown(g, highlighted, brushes, false, cy, itemsLeftBelow); return; } // вписать в ячеи текст var leftPos = paddingLeft; for (var i = 0; i < cells.cells.Length; i++) { var col = columns[i]; DrawText(g, fonts, highlighted, brushes, y, cells.cells[i], leftPos); leftPos += col.ColumnWidth; } }