internal bool CustomizeCells(Row row) { bool flag = false; if (!this.HasCustomizedCells || (this.Parent == null)) { return(false); } int count = this.m_CellTemplates.Count; for (int i = 0; i < count; i++) { Cell cell = this.m_CellTemplates[i]; if (cell.CustomizeCell) { object data = cell[row, i]; CustomizeCellEventArgs e = new CustomizeCellEventArgs(cell, data, row); this.OnCustomizeCell(e); RowSpecificCellProperties rowSpecificProperties = cell.GetRowSpecificProperties(row); bool flag2 = rowSpecificProperties.Visible.Value; rowSpecificProperties.Selectable = new bool?(e.Cell.Selectable); rowSpecificProperties.Visible = new bool?(e.Cell.Visible); rowSpecificProperties.CachedAutoHeight = e.Cell.GetAutoHeight(e.DataRow, i, rowSpecificProperties); rowSpecificProperties.Cea = e; if (e.Cell.Visible != flag2) { flag = true; } } } return(flag); }
protected internal virtual void Draw(Graphics gr, int xOffset, int yOffset, Row row, int width, int height) { Color colorKey; this.CurrentRow = row; if (height == -1) { height = this.GetHeight(row); } if (this.m_BackColor == Color.Transparent) { if (this.Parent.BackgroundType == BackgroundType.btGradient) { colorKey = this.Parent.m_colorKey; } else { colorKey = this.Parent.BackColor; } } else { colorKey = this.m_BackColor; } if (((this.GradientBackColor != null) && !this.GradientBackColor.CanDraw()) && (this.Parent != null)) { if ((this.Parent.BackgroundType == BackgroundType.btSolid) || (this.m_BackColor != Color.Transparent)) { gr.FillRectangle(Resco.Controls.AdvancedList.AdvancedList.GetBrush(colorKey), xOffset, yOffset, width, height); } } else { this.m_bgRect.X = xOffset; this.m_bgRect.Y = yOffset; this.m_bgRect.Width = width; this.m_bgRect.Height = height; this.m_gradientBackColor.DrawGradient(gr, this.m_bgRect); } int count = this.m_CellTemplates.Count; for (int i = 0; i < count; i++) { Cell cell = this.m_CellTemplates[i]; RowSpecificCellProperties rscp = null; object data = null; if (cell.CustomizeCell && (this.Parent != null)) { rscp = cell.GetRowSpecificProperties(row); if (rscp.Cea != null) { cell = rscp.Cea.Cell; data = rscp.Cea.Data; } } else { data = cell[row, i]; } if (cell is ButtonCell) { ((ButtonCell)cell).Pressed = row.PressedButtonIndex == i; } if ((cell != null) && cell.Visible) { cell.Draw(gr, xOffset, yOffset, width, data, rscp); } if (rscp != null) { rscp.Cea = null; } } }