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