1 write to _cell
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataGridViewLinkCellTests.cs (1)
12
public DataGridViewLinkCellTests() =>
_cell
= new();
152 references to _cell
System.Windows.Forms.Tests (152)
System\Windows\Forms\DataGridViewLinkCellTests.cs (152)
14
public void Dispose() =>
_cell
.Dispose();
27
_cell
.Should().BeOfType<DataGridViewLinkCell>();
28
_cell
.Should().BeAssignableTo<DataGridViewCell>();
35
dataGridView.Rows[0].Cells[0] =
_cell
;
37
_cell
.Selected = false;
38
_cell
.ActiveLinkColor.Should().Be(LinkUtilities.IEActiveLinkColor);
40
_cell
.Selected = true;
41
_cell
.ActiveLinkColor.Should().Be(SystemColors.HighlightText);
48
_cell
.ActiveLinkColor = color;
50
_cell
.ActiveLinkColor.Should().Be(color);
57
dataGridView.Rows[0].Cells[0] =
_cell
;
59
_cell
.Selected = false;
61
_cell
.ActiveLinkColor = Color.Blue;
62
_cell
.ActiveLinkColor.Should().Be(Color.Blue);
64
_cell
.Selected = true;
65
_cell
.ActiveLinkColor = Color.Blue;
67
_cell
.ActiveLinkColor.Should().Be(Color.Blue);
73
_cell
.ActiveLinkColorInternal = Color.Yellow;
75
_cell
.ActiveLinkColor.Should().Be(Color.Yellow);
80
_cell
.EditType.Should().BeNull();
92
_cell
.FormattedValueType.Should().Be(typeof(string));
96
_cell
.LinkBehavior.Should().Be(LinkBehavior.SystemDefault);
101
_cell
.LinkBehavior = LinkBehavior.HoverUnderline;
102
_cell
.LinkBehavior.Should().Be(LinkBehavior.HoverUnderline);
104
_cell
.LinkBehavior = LinkBehavior.NeverUnderline;
105
_cell
.LinkBehavior.Should().Be(LinkBehavior.NeverUnderline);
111
_cell
.LinkBehavior = LinkBehavior.SystemDefault;
112
_cell
.LinkBehavior.Should().Be(LinkBehavior.SystemDefault);
119
dataGridView.Rows[0].Cells[0] =
_cell
;
121
_cell
.Selected = false;
122
_cell
.LinkColor.Should().Be(LinkUtilities.IELinkColor);
124
_cell
.Selected = true;
125
_cell
.LinkColor.Should().Be(SystemColors.HighlightText);
132
_cell
.LinkColor = color;
134
_cell
.LinkColor.Should().Be(color);
140
_cell
.LinkColorInternal = Color.Brown;
142
_cell
.LinkColor.Should().Be(Color.Brown);
147
_cell
.LinkVisited.Should().BeFalse();
152
_cell
.LinkVisited = true;
153
_cell
.LinkVisited.Should().BeTrue();
155
_cell
.LinkVisited = false;
156
_cell
.LinkVisited.Should().BeFalse();
162
_cell
.LinkVisited = false;
163
_cell
.LinkVisited.Should().BeFalse();
168
_cell
.TrackVisitedState.Should().BeTrue();
173
_cell
.TrackVisitedState = false;
174
_cell
.TrackVisitedState.Should().BeFalse();
176
_cell
.TrackVisitedState = true;
177
_cell
.TrackVisitedState.Should().BeTrue();
183
_cell
.TrackVisitedState = true;
184
_cell
.TrackVisitedState.Should().BeTrue();
189
_cell
.UseColumnTextForLinkValue.Should().BeFalse();
194
_cell
.UseColumnTextForLinkValue = true;
195
_cell
.UseColumnTextForLinkValue.Should().BeTrue();
197
_cell
.UseColumnTextForLinkValue = false;
198
_cell
.UseColumnTextForLinkValue.Should().BeFalse();
204
_cell
.UseColumnTextForLinkValue = false;
205
_cell
.UseColumnTextForLinkValue.Should().BeFalse();
211
_cell
.ToString().Should().Be("DataGridViewLinkCell { ColumnIndex=-1, RowIndex=-1 }");
214
dataGridView.Rows[0].Cells[0] =
_cell
;
223
_cell
.ActiveLinkColor = Color.Red;
224
_cell
.LinkBehavior = LinkBehavior.HoverUnderline;
225
_cell
.LinkColor = Color.Green;
226
_cell
.TrackVisitedState = false;
227
_cell
.VisitedLinkColor = Color.Blue;
228
_cell
.UseColumnTextForLinkValue = true;
229
_cell
.LinkVisited = true;
231
DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)
_cell
.Clone();
233
clonedLinkCell.Should().NotBeSameAs(
_cell
);
234
clonedLinkCell.ActiveLinkColor.Should().Be(
_cell
.ActiveLinkColor);
235
clonedLinkCell.LinkBehavior.Should().Be(
_cell
.LinkBehavior);
236
clonedLinkCell.LinkColor.Should().Be(
_cell
.LinkColor);
237
clonedLinkCell.TrackVisitedState.Should().Be(
_cell
.TrackVisitedState);
238
clonedLinkCell.VisitedLinkColor.Should().Be(
_cell
.VisitedLinkColor);
239
clonedLinkCell.UseColumnTextForLinkValue.Should().Be(
_cell
.UseColumnTextForLinkValue);
240
clonedLinkCell.LinkVisited.Should().Be(
_cell
.LinkVisited);
246
_cell
.LinkColor = Color.Pink;
247
DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)
_cell
.Clone();
250
clonedLinkCell.LinkColor.Should().Be(
_cell
.LinkColor);
256
_cell
.LinkColor = Color.Orange;
257
DataGridViewLinkCell clonedLinkCell = (DataGridViewLinkCell)
_cell
.Clone();
268
_cell
.GetContentBounds(0).Should().Be(Rectangle.Empty);
274
dataGridView.Rows[0].Cells[0] =
_cell
;
283
_cell
.GetContentBounds(0).Should().Be(Rectangle.Empty);
287
((Action)(() =>
_cell
.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>();
293
dataGridView.Rows[0].Cells[0] =
_cell
;
295
Action action = () =>
_cell
.GetErrorIconBounds(-1);
298
ReferenceEquals(
_cell
, dataGridView.Rows[0].Cells[0]).Should().BeTrue();
303
((Action)(() =>
_cell
.GetErrorIconBounds(0))).Should().Throw<InvalidOperationException>();
309
dataGridView.Rows[0].Cells[0] =
_cell
;
311
Rectangle result =
_cell
.GetErrorIconBounds(0);
320
dataGridView.Rows[0].Cells[0] =
_cell
;
322
string? errorText =
_cell
.TestAccessor().Dynamic.GetErrorText(0);
324
Rectangle result =
_cell
.GetErrorIconBounds(0);
336
dataGridView.Rows[0].Cells[0] =
_cell
;
338
_cell
.Value = testValue;
340
object? result =
_cell
.TestAccessor().Dynamic.GetValue(0);
352
_cell
.UseColumnTextForLinkValue = true;
353
dataGridView.Rows[0].Cells[0] =
_cell
;
355
object? result =
_cell
.TestAccessor().Dynamic.GetValue(0);
364
_cell
.UseColumnTextForLinkValue = true;
365
dataGridView.Rows[0].Cells[0] =
_cell
;
367
_cell
.Value = testValue;
369
object? result =
_cell
.TestAccessor().Dynamic.GetValue(0);
381
_cell
.UseColumnTextForLinkValue = true;
382
dataGridView.Rows[0].Cells[0] =
_cell
;
385
_cell
.Value = testValue;
387
object? result =
_cell
.TestAccessor().Dynamic.GetValue(newRowIndex);
402
_cell
.TrackVisitedState = trackVisitedState;
403
_cell
.LinkVisited = linkVisited;
405
bool result =
_cell
.TestAccessor().Dynamic.KeyUpUnsharesRow(keyEvent, 0);
414
dataGridView.Rows[0].Cells[0] =
_cell
;
418
bool result =
_cell
.TestAccessor().Dynamic.MouseDownUnsharesRow(args);
427
dataGridView.Rows[0].Cells[0] =
_cell
;
431
bool result =
_cell
.TestAccessor().Dynamic.MouseDownUnsharesRow(args);
439
_cell
.TestAccessor().Dynamic.LinkState = LinkState.Hover;
444
bool result =
_cell
.TestAccessor().Dynamic.MouseMoveUnsharesRow(args);
452
_cell
.TestAccessor().Dynamic.LinkBehaviorInternal = LinkBehavior.AlwaysUnderline;
454
_cell
.LinkBehavior.Should().Be(LinkBehavior.AlwaysUnderline);
460
_cell
.TestAccessor().Dynamic.LinkState = LinkState.Hover;
465
bool result =
_cell
.TestAccessor().Dynamic.MouseMoveUnsharesRow(args);
476
bool result =
_cell
.TestAccessor().Dynamic.MouseMoveUnsharesRow(args);
484
_cell
.TrackVisitedState = false;
489
bool result =
_cell
.TestAccessor().Dynamic.MouseUpUnsharesRow(args);
497
_cell
.TrackVisitedState = false;
502
bool result =
_cell
.TestAccessor().Dynamic.MouseUpUnsharesRow(args);
512
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0)).Should().NotThrow();
520
dataGridView.Rows[0].Cells[0] =
_cell
;
521
_cell
.TrackVisitedState = true;
536
_cell
.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0);
541
_cell
.LinkVisited.Should().BeTrue();
548
dataGridView.Rows[0].Cells[0] =
_cell
;
549
_cell
.TrackVisitedState = false;
564
_cell
.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0);
569
_cell
.LinkVisited.Should().BeFalse();
576
dataGridView.Rows[0].Cells[0] =
_cell
;
583
_cell
.TestAccessor().Dynamic.OnKeyUp(keyEvent, 0);
596
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnMouseDown(args)).Should().NotThrow();
601
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnMouseLeave(0)).Should().NotThrow();
609
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnMouseMove(args)).Should().NotThrow();
618
_cell
.Invoking(c => c.TestAccessor().Dynamic.OnMouseUp(args)).Should().NotThrow();
625
dataGridView.Rows[0].Cells[0] =
_cell
;
626
_cell
.TrackVisitedState = true;
627
_cell
.LinkVisited = false;
631
_cell
.TestAccessor().Dynamic.OnMouseUp(args);
633
_cell
.LinkVisited.Should().BeFalse();
640
dataGridView.Rows[0].Cells[0] =
_cell
;
641
_cell
.TrackVisitedState = false;
642
_cell
.LinkVisited = false;
646
_cell
.TestAccessor().Dynamic.OnMouseUp(args);
648
_cell
.LinkVisited.Should().BeFalse();
658
_cell
.TestAccessor().Dynamic.Paint(