Remove old migrations
This commit is contained in:
parent
a7bf30954d
commit
1ac825919a
10 changed files with 29 additions and 244 deletions
|
|
@ -43,7 +43,7 @@ namespace LibationWinForms.GridView
|
|||
protected override void Paint(Graphics graphics, Rectangle clipBounds, Rectangle cellBounds, int rowIndex, DataGridViewElementStates cellState, object value, object formattedValue, string errorText, DataGridViewCellStyle cellStyle, DataGridViewAdvancedBorderStyle advancedBorderStyle, DataGridViewPaintParts paintParts)
|
||||
{
|
||||
if (value is Rating rating)
|
||||
{
|
||||
{
|
||||
ToolTipText = "Click to change ratings";
|
||||
|
||||
var starString = rating.ToStarString();
|
||||
|
|
@ -53,6 +53,9 @@ namespace LibationWinForms.GridView
|
|||
base.Paint(graphics, clipBounds, cellBounds, rowIndex, cellState, string.Empty, string.Empty, errorText, cellStyle, advancedBorderStyle, paintParts);
|
||||
}
|
||||
|
||||
protected override object GetFormattedValue(object value, int rowIndex, ref DataGridViewCellStyle cellStyle, TypeConverter valueTypeConverter, TypeConverter formattedValueTypeConverter, DataGridViewDataErrorContexts context)
|
||||
=> value is Rating rating ? rating.ToStarString() : value?.ToString();
|
||||
|
||||
public override object ParseFormattedValue(object formattedValue, DataGridViewCellStyle cellStyle, TypeConverter formattedValueTypeConverter, TypeConverter valueTypeConverter)
|
||||
=> formattedValue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ namespace LibationWinForms.GridView
|
|||
try
|
||||
{
|
||||
var dgv = (DataGridView)sender;
|
||||
var text = dgv[e.ColumnIndex, e.RowIndex].Value.ToString();
|
||||
var text = dgv[e.ColumnIndex, e.RowIndex].FormattedValue.ToString();
|
||||
InteropFactory.Create().CopyTextToClipboard(text);
|
||||
}
|
||||
catch { }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue