private void boomarkDataGridView_CellPainting(object sender, DataGridViewCellPaintingEventArgs e) { if (this.bookmarkData == null) { return; } lock (this.paintLock) { try { if (e.RowIndex < 0 || e.ColumnIndex < 0 || this.bookmarkData.Bookmarks.Count <= e.RowIndex) { e.Handled = false; return; } int lineNum = this.bookmarkData.Bookmarks[e.RowIndex].LineNum; //if (e.ColumnIndex == 1) //{ // CommentPainting(this.bookmarkDataGridView, lineNum, e); //} //else { PaintHelper.CellPainting(this.logPaintContext, this.bookmarkDataGridView, lineNum, e); } } catch (Exception ex) { Logger.logError(ex.StackTrace); } } }