1 write to _cell
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataGridViewLinkCellTests.cs (1)
13public DataGridViewLinkCellTests() => _cell = new();
152 references to _cell
System.Windows.Forms.Tests (152)
System\Windows\Forms\DataGridViewLinkCellTests.cs (152)
15public void Dispose() => _cell.Dispose(); 28_cell.Should().BeOfType<DataGridViewLinkCell>(); 29_cell.Should().BeAssignableTo<DataGridViewCell>(); 36dataGridView.Rows[0].Cells[0] = _cell; 38_cell.Selected = false; 39_cell.ActiveLinkColor.Should().Be(LinkUtilities.IEActiveLinkColor); 41_cell.Selected = true; 42_cell.ActiveLinkColor.Should().Be(SystemColors.HighlightText); 49_cell.ActiveLinkColor = color; 51_cell.ActiveLinkColor.Should().Be(color); 58dataGridView.Rows[0].Cells[0] = _cell; 60_cell.Selected = false; 62_cell.ActiveLinkColor = Color.Blue; 63_cell.ActiveLinkColor.Should().Be(Color.Blue); 65_cell.Selected = true; 66_cell.ActiveLinkColor = Color.Blue; 68_cell.ActiveLinkColor.Should().Be(Color.Blue); 74_cell.ActiveLinkColorInternal = Color.Yellow; 76_cell.ActiveLinkColor.Should().Be(Color.Yellow); 81_cell.EditType.Should().BeNull(); 93_cell.FormattedValueType.Should().Be(typeof(string)); 97_cell.LinkBehavior.Should().Be(LinkBehavior.SystemDefault); 102_cell.LinkBehavior = LinkBehavior.HoverUnderline; 103_cell.LinkBehavior.Should().Be(LinkBehavior.HoverUnderline); 105_cell.LinkBehavior = LinkBehavior.NeverUnderline; 106_cell.LinkBehavior.Should().Be(LinkBehavior.NeverUnderline); 112_cell.LinkBehavior = LinkBehavior.SystemDefault; 113_cell.LinkBehavior.Should().Be(LinkBehavior.SystemDefault); 120dataGridView.Rows[0].Cells[0] = _cell; 122_cell.Selected = false; 123_cell.LinkColor.Should().Be(LinkUtilities.IELinkColor); 125_cell.Selected = true; 126_cell.LinkColor.Should().Be(SystemColors.HighlightText); 133_cell.LinkColor = color; 135_cell.LinkColor.Should().Be(color); 141_cell.LinkColorInternal = Color.Brown; 143_cell.LinkColor.Should().Be(Color.Brown); 148_cell.LinkVisited.Should().BeFalse(); 153_cell.LinkVisited = true; 154_cell.LinkVisited.Should().BeTrue(); 156_cell.LinkVisited = false; 157_cell.LinkVisited.Should().BeFalse(); 163_cell.LinkVisited = false; 164_cell.LinkVisited.Should().BeFalse(); 169_cell.TrackVisitedState.Should().BeTrue(); 174_cell.TrackVisitedState = false; 175_cell.TrackVisitedState.Should().BeFalse(); 177_cell.TrackVisitedState = true; 178_cell.TrackVisitedState.Should().BeTrue(); 184_cell.TrackVisitedState = true; 185_cell.TrackVisitedState.Should().BeTrue(); 190_cell.UseColumnTextForLinkValue.Should().BeFalse(); 195_cell.UseColumnTextForLinkValue = true; 196_cell.UseColumnTextForLinkValue.Should().BeTrue(); 198_cell.UseColumnTextForLinkValue = false; 199_cell.UseColumnTextForLinkValue.Should().BeFalse(); 205_cell.UseColumnTextForLinkValue = false; 206_cell.UseColumnTextForLinkValue.Should().BeFalse(); 212_cell.ToString().Should().Be("DataGridViewLinkCell { ColumnIndex=-1, RowIndex=-1 }"); 215dataGridView.Rows[0].Cells[0] = _cell; 224_cell.ActiveLinkColor = Color.Red; 225_cell.LinkBehavior = LinkBehavior.HoverUnderline; 226_cell.LinkColor = Color.Green; 227_cell.TrackVisitedState = false; 228_cell.VisitedLinkColor = Color.Blue; 229_cell.UseColumnTextForLinkValue = true; 230_cell.LinkVisited = true; 232DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)_cell.Clone(); 234clonedLinkCell.Should().NotBeSameAs(_cell); 235clonedLinkCell.ActiveLinkColor.Should().Be(_cell.ActiveLinkColor); 236clonedLinkCell.LinkBehavior.Should().Be(_cell.LinkBehavior); 237clonedLinkCell.LinkColor.Should().Be(_cell.LinkColor); 238clonedLinkCell.TrackVisitedState.Should().Be(_cell.TrackVisitedState); 239clonedLinkCell.VisitedLinkColor.Should().Be(_cell.VisitedLinkColor); 240clonedLinkCell.UseColumnTextForLinkValue.Should().Be(_cell.UseColumnTextForLinkValue); 241clonedLinkCell.LinkVisited.Should().Be(_cell.LinkVisited); 247_cell.LinkColor = Color.Pink; 248DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)_cell.Clone(); 251clonedLinkCell.LinkColor.Should().Be(_cell.LinkColor); 257_cell.LinkColor = Color.Orange; 258DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)_cell.Clone(); 269_cell.GetContentBounds(0).Should().Be(Rectangle.Empty); 275dataGridView.Rows[0].Cells[0] = _cell; 284_cell.GetContentBounds(0).Should().Be(Rectangle.Empty); 288((Action)(() => _cell.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>(); 294dataGridView.Rows[0].Cells[0] = _cell; 296Action action = () => _cell.GetErrorIconBounds(-1); 299ReferenceEquals(_cell, dataGridView.Rows[0].Cells[0]).Should().BeTrue(); 304((Action)(() => _cell.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>(); 310dataGridView.Rows[0].Cells[0] = _cell; 312Rectangle result = _cell.GetErrorIconBounds(0); 321dataGridView.Rows[0].Cells[0] = _cell; 323string? errorText = _cell.TestAccessor().Dynamic.GetErrorText(0); 325Rectangle result = _cell.GetErrorIconBounds(0); 337dataGridView.Rows[0].Cells[0] = _cell; 339_cell.Value = testValue; 341object? result = _cell.TestAccessor().Dynamic.GetValue(0); 353_cell.UseColumnTextForLinkValue = true; 354dataGridView.Rows[0].Cells[0] = _cell; 356object? result = _cell.TestAccessor().Dynamic.GetValue(0); 365_cell.UseColumnTextForLinkValue = true; 366dataGridView.Rows[0].Cells[0] = _cell; 368_cell.Value = testValue; 370object? result = _cell.TestAccessor().Dynamic.GetValue(0); 382_cell.UseColumnTextForLinkValue = true; 383dataGridView.Rows[0].Cells[0] = _cell; 386_cell.Value = testValue; 388object? result = _cell.TestAccessor().Dynamic.GetValue(newRowIndex); 403_cell.TrackVisitedState = trackVisitedState; 404_cell.LinkVisited = linkVisited; 406bool result = _cell.TestAccessor().Dynamic.KeyUpUnsharesRow(keyEvent, 0); 415dataGridView.Rows[0].Cells[0] = _cell; 419bool result = _cell.TestAccessor().Dynamic.MouseDownUnsharesRow(args); 428dataGridView.Rows[0].Cells[0] = _cell; 432bool result = _cell.TestAccessor().Dynamic.MouseDownUnsharesRow(args); 440_cell.TestAccessor().Dynamic.LinkState = LinkState.Hover; 445bool result = _cell.TestAccessor().Dynamic.MouseMoveUnsharesRow(args); 453_cell.TestAccessor().Dynamic.LinkBehaviorInternal = LinkBehavior.AlwaysUnderline; 455_cell.LinkBehavior.Should().Be(LinkBehavior.AlwaysUnderline); 461_cell.TestAccessor().Dynamic.LinkState = LinkState.Hover; 466bool result = _cell.TestAccessor().Dynamic.MouseMoveUnsharesRow(args); 477bool result = _cell.TestAccessor().Dynamic.MouseMoveUnsharesRow(args); 485_cell.TrackVisitedState = false; 490bool result = _cell.TestAccessor().Dynamic.MouseUpUnsharesRow(args); 498_cell.TrackVisitedState = false; 503bool result = _cell.TestAccessor().Dynamic.MouseUpUnsharesRow(args); 513_cell.Invoking(c => c.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0)).Should().NotThrow(); 521dataGridView.Rows[0].Cells[0] = _cell; 522_cell.TrackVisitedState = true; 537_cell.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0); 542_cell.LinkVisited.Should().BeTrue(); 549dataGridView.Rows[0].Cells[0] = _cell; 550_cell.TrackVisitedState = false; 565_cell.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0); 570_cell.LinkVisited.Should().BeFalse(); 577dataGridView.Rows[0].Cells[0] = _cell; 584_cell.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0); 597_cell.Invoking(c => c.TestAccessor().Dynamic.OnMouseDown(args)).Should().NotThrow(); 602_cell.Invoking(c => c.TestAccessor().Dynamic.OnMouseLeave(0)).Should().NotThrow(); 610_cell.Invoking(c => c.TestAccessor().Dynamic.OnMouseMove(args)).Should().NotThrow(); 619_cell.Invoking(c => c.TestAccessor().Dynamic.OnMouseUp(args)).Should().NotThrow(); 626dataGridView.Rows[0].Cells[0] = _cell; 627_cell.TrackVisitedState = true; 628_cell.LinkVisited = false; 632_cell.TestAccessor().Dynamic.OnMouseUp(args); 634_cell.LinkVisited.Should().BeFalse(); 641dataGridView.Rows[0].Cells[0] = _cell; 642_cell.TrackVisitedState = false; 643_cell.LinkVisited = false; 647_cell.TestAccessor().Dynamic.OnMouseUp(args); 649_cell.LinkVisited.Should().BeFalse(); 659_cell.TestAccessor().Dynamic.Paint(