protected override void OnPaintSubItem(SubItemPaintEventArgs paintEventArgs) { switch ((ColumnId)paintEventArgs.SubItemId) { case ColumnId.Id: paintEventArgs.PaintText(DataContext.Id.ToString(CultureInfo.InvariantCulture)); break; case ColumnId.Name: paintEventArgs.PaintText(DataContext.Name); break; case ColumnId.Description: paintEventArgs.PaintText(DataContext.Description); break; case ColumnId.Project: RedmineGuiUtility.PaintOptionalContent(DataContext.Project, paintEventArgs); break; case ColumnId.Status: paintEventArgs.PaintText(DataContext.Status.ToString()); break; case ColumnId.CreatedOn: VersionCreatedOnColumn.OnPaintSubItem(paintEventArgs, DataContext.CreatedOn); break; case ColumnId.UpdatedOn: VersionUpdatedOnColumn.OnPaintSubItem(paintEventArgs, DataContext.UpdatedOn); break; case ColumnId.DueDate: RedmineGuiUtility.PaintOptionalContent(DataContext.DueDate, paintEventArgs); break; } }
protected override Size OnMeasureSubItem(SubItemMeasureEventArgs measureEventArgs) { switch ((ColumnId)measureEventArgs.SubItemId) { case ColumnId.Id: return(measureEventArgs.MeasureText(DataContext.Id.ToString(CultureInfo.InvariantCulture))); case ColumnId.Name: return(measureEventArgs.MeasureText(DataContext.Name)); case ColumnId.Description: return(measureEventArgs.MeasureText(DataContext.Description)); case ColumnId.Project: return(MeasureOptionalContent(DataContext.Project, measureEventArgs)); case ColumnId.CreatedOn: return(VersionCreatedOnColumn.OnMeasureSubItem(measureEventArgs, DataContext.CreatedOn)); case ColumnId.UpdatedOn: return(VersionUpdatedOnColumn.OnMeasureSubItem(measureEventArgs, DataContext.UpdatedOn)); case ColumnId.Status: return(measureEventArgs.MeasureText(DataContext.Status.ToString())); case ColumnId.DueDate: if (DataContext.DueDate.HasValue) { return(VersionDueDateColumn.OnMeasureSubItem(measureEventArgs, DataContext.DueDate.Value)); } else { return(measureEventArgs.MeasureText(Resources.StrsUnassigned.SurroundWith('<', '>'))); } } return(base.MeasureSubItem(measureEventArgs)); }