1 write to _dataGridViewButtonCell
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataGridViewButtonCellTests.cs (1)
14
public DataGridViewButtonCellTests() =>
_dataGridViewButtonCell
= new();
75 references to _dataGridViewButtonCell
System.Windows.Forms.Tests (75)
System\Windows\Forms\DataGridViewButtonCellTests.cs (75)
12
public void Dispose() =>
_dataGridViewButtonCell
?.Dispose();
19
Type result =
_dataGridViewButtonCell
.FormattedValueType;
26
_dataGridViewButtonCell
.UseColumnTextForButtonValue.Should().BeFalse();
31
_dataGridViewButtonCell
.UseColumnTextForButtonValue = true;
32
_dataGridViewButtonCell
.UseColumnTextForButtonValue.Should().BeTrue();
37
_dataGridViewButtonCell
.ValueType.Should().Be(typeof(object));
43
_dataGridViewButtonCell
.GetType().BaseType!
45
.SetValue(
_dataGridViewButtonCell
, customType);
47
_dataGridViewButtonCell
.ValueType.Should().Be(customType);
55
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetContentBounds(g, dataGridViewCellStyle, 0);
68
dataGridView[0, 0] =
_dataGridViewButtonCell
;
69
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetContentBounds(g, dataGridViewCellStyle, -1);
82
dataGridView[0, 0] =
_dataGridViewButtonCell
;
84
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetContentBounds(g, dataGridViewCellStyle, 0);
94
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetErrorIconBounds(g, dataGridViewCellStyle, 0);
107
dataGridView[0, 0] =
_dataGridViewButtonCell
;
108
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetErrorIconBounds(g, dataGridViewCellStyle, -1);
121
dataGridView[0, 0] =
_dataGridViewButtonCell
;
123
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetErrorIconBounds(g, dataGridViewCellStyle, 0);
137
dataGridView[0, 0] =
_dataGridViewButtonCell
;
138
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetErrorIconBounds(g, dataGridViewCellStyle, 0);
151
dataGridView[0, 0] =
_dataGridViewButtonCell
;
152
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetErrorIconBounds(g, dataGridViewCellStyle, 0);
165
dataGridView[0, 0] =
_dataGridViewButtonCell
;
166
_dataGridViewButtonCell
.ErrorText = "Error!";
168
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetErrorIconBounds(g, dataGridViewCellStyle, 0);
181
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetPreferredSize(g, dataGridViewCellStyle, 0, new Size(100, 100));
193
dataGridView[0, 0] =
_dataGridViewButtonCell
;
195
Action action = () =>
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetPreferredSize(g, null, 0, new Size(100, 100));
206
dataGridView[0, 0] =
_dataGridViewButtonCell
;
216
var result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetPreferredSize(
230
_dataGridViewButtonCell
.UseColumnTextForButtonValue = true;
231
dataGridView[0, 0] =
_dataGridViewButtonCell
;
233
var value =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetValue(0);
245
_dataGridViewButtonCell
.UseColumnTextForButtonValue = false;
246
dataGridView[0, 0] =
_dataGridViewButtonCell
;
247
_dataGridViewButtonCell
.Value = "CellValue";
249
var value =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetValue(0);
263
dataGridView[0, 0] =
_dataGridViewButtonCell
;
264
_dataGridViewButtonCell
.Value = "CellValue";
266
var value =
_dataGridViewButtonCell
.TestAccessor().Dynamic.GetValue(0);
288
bool result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.KeyDownUnsharesRow(e, 0);
300
bool result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.KeyUpUnsharesRow(e, 0);
314
bool result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.MouseDownUnsharesRow(e);
329
dataGridView[0, 0] =
_dataGridViewButtonCell
;
331
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState = buttonState;
333
bool result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.MouseLeaveUnsharesRow(0);
348
dataGridView[0, 0] =
_dataGridViewButtonCell
;
351
bool result =
_dataGridViewButtonCell
.TestAccessor().Dynamic.MouseUpUnsharesRow(dataGridViewCellMouseEventArgs);
362
dataGridView[0, 0] =
_dataGridViewButtonCell
;
366
ButtonState buttonState =
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState;
369
_dataGridViewButtonCell
.TestAccessor().Dynamic.OnKeyDown(keyEventArgs, 0);
370
buttonState =
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState;
387
dataGridView[0, 0] =
_dataGridViewButtonCell
;
391
ButtonState buttonState =
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState;
394
_dataGridViewButtonCell
.TestAccessor().Dynamic.OnKeyDown(keyEventArgs, 0);
395
buttonState =
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState;
412
dataGridView[0, 0] =
_dataGridViewButtonCell
;
414
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState = ButtonState.Checked;
417
_dataGridViewButtonCell
.TestAccessor().Dynamic.OnKeyUp(keyEventArgs, 0);
419
ButtonState buttonState =
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState;
431
dataGridView[0, 0] =
_dataGridViewButtonCell
;
433
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState = ButtonState.Pushed | ButtonState.Checked;
435
_dataGridViewButtonCell
.TestAccessor().Dynamic.OnLeave(0, false);
437
ButtonState buttonState =
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState;
448
dataGridView[0, 0] =
_dataGridViewButtonCell
;
449
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState = ButtonState.Pushed;
452
_dataGridViewButtonCell
.TestAccessor().Dynamic.OnMouseUp(dataGridViewCellMouseEventArgs);
454
((ButtonState)
_dataGridViewButtonCell
.TestAccessor().Dynamic.ButtonState).HasFlag(ButtonState.Pushed).Should().BeFalse();
464
dataGridView[0, 0] =
_dataGridViewButtonCell
;
467
_dataGridViewButtonCell
.TestAccessor().Dynamic.Paint(
480
_dataGridViewButtonCell
.DataGridView.Should().BeSameAs(dataGridView);
487
string result =
_dataGridViewButtonCell
.ToString();
497
dataGridView[0, 0] =
_dataGridViewButtonCell
;
499
_dataGridViewButtonCell
.ToString().Should().Be("DataGridViewButtonCell { ColumnIndex=0, RowIndex=0 }");