44 instantiations of Link
System.Windows.Forms (5)
System\Windows\Forms\Controls\Labels\LinkConverter.cs (1)
69
return new LinkLabel.
Link
(values[0], values[1]);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (3)
188
Links.Add(new
Link
(this));
275
Links.Add(new
Link
(this));
523
Links.Add(new
Link
(0, -1)); // default 'magic' link.
System\Windows\Forms\Controls\Labels\LinkLabel.LinkCollection.cs (1)
128
Link l =
new
(_owner)
System.Windows.Forms.Tests (39)
System\Windows\Forms\AccessibleObjects\LinkLabel.Link.LinkAccessibleObjectTests.cs (6)
24
Assert.Throws<ArgumentNullException>(() => new LinkAccessibleObject(new
Link
(), owner: null));
34
linkLabel.Links.Add(
new
());
69
linkLabel.Links.Add(
new
());
91
linkLabel.Links.Add(
new
());
119
linkLabel.Links.Add(
new
());
216
linkLabel.Links.Add(
new
(start, name.Length));
System\Windows\Forms\AccessibleObjects\LinkLabel.LinkLabelAccessibleObjectTests.cs (5)
86
linkLabel.Links.Add(
new
());
108
linkLabel.Links.Add(
new
());
127
linkLabel.Links.Add(
new
());
156
linkLabel.Links.Add(
new
());
171
linkLabel.Links.Add(
new
());
System\Windows\Forms\LinkConverterTests.cs (8)
24
yield return new object[] { "1,2", new LinkLabel.
Link
(1, 2) };
25
yield return new object[] { " 1 , 1", new LinkLabel.
Link
(1, 1) };
74
Assert.Equal("1, 2", converter.ConvertTo(new LinkLabel.
Link
(1, 2), typeof(string)));
75
Assert.Equal("1, 2", converter.ConvertTo(null, null, new LinkLabel.
Link
(1, 2), typeof(string)));
76
Assert.Equal("1, 2", converter.ConvertTo(null, CultureInfo.InvariantCulture, new LinkLabel.
Link
(1, 2), typeof(string)));
83
InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new LinkLabel.
Link
(1, 2), typeof(InstanceDescriptor)));
93
InstanceDescriptor descriptor = Assert.IsType<InstanceDescriptor>(converter.ConvertTo(new LinkLabel.
Link
(1, 2, "linkData"), typeof(InstanceDescriptor)));
119
Assert.Throws<NotSupportedException>(() => converter.ConvertTo(new LinkLabel.
Link
(), destinationType));
System\Windows\Forms\LinkLabel.LinkComparerTests.cs (6)
11
yield return new object[] { null, new LinkLabel.
Link
(0, 1), -1 };
12
yield return new object[] { new LinkLabel.
Link
(0, 1), null, 1 };
13
yield return new object[] { new LinkLabel.
Link
(0, 1), new LinkLabel.
Link
(0, 1), 0 };
14
yield return new object[] { new LinkLabel.
Link
(1, 5), new LinkLabel.
Link
(2, 5), -1 };
System\Windows\Forms\LinkLabelLinkClickedEventArgsTests.cs (3)
12
yield return new object[] { new LinkLabel.
Link
() };
27
yield return new object[] { new LinkLabel.
Link
(), MouseButtons.Left };
28
yield return new object[] { new LinkLabel.
Link
(), MouseButtons.None };
System\Windows\Forms\LinkTests.cs (11)
12
var link = new LinkLabel.
Link
();
31
var link = new LinkLabel.
Link
(start, length);
50
var link = new LinkLabel.
Link
(start, length, linkData);
65
var link = new LinkLabel.
Link
80
var link = new LinkLabel.
Link
102
var link = new LinkLabel.
Link
117
var link = new LinkLabel.
Link
132
var link = new LinkLabel.
Link
147
var link = new LinkLabel.
Link
162
var link = new LinkLabel.
Link
177
var link = new LinkLabel.
Link
81 references to Link
System.Windows.Forms (54)
System\Windows\Forms\Controls\Labels\LinkConverter.cs (3)
84
if (value is LinkLabel.
Link
link)
105
typeof(LinkLabel.
Link
).GetConstructor([typeof(int), typeof(int)]),
111
typeof(LinkLabel.
Link
).GetConstructor([typeof(int), typeof(int), typeof(object)]),
System\Windows\Forms\Controls\Labels\LinkLabel.cs (24)
39
private readonly List<
Link
> _links = new(2);
41
private
Link
? _focusLink;
101
private
Link
? FocusLink
434
foreach (
Link
link in _links)
540
Link
link = Links[i];
631
foreach (
Link
link in Links)
670
protected
Link
? PointInLink(int x, int y)
673
Link
? hit = null;
676
foreach (
Link
link in _links)
692
private void InvalidateLink(
Link
? link)
761
Link
? focusLink = FocusLink;
814
foreach (
Link
link in _links)
884
Link
? clicked = PointInLink(e.X, e.Y);
903
Link
? hoverLink = null;
904
foreach (
Link
link in _links)
913
Link
? pointIn = PointInLink(e.X, e.Y);
1031
foreach (
Link
link in _links)
1087
foreach (
Link
link in _links)
1224
Link
? link,
1387
foreach (
Link
link in Links)
1476
Link
? test;
1638
private void UpdateAccessibilityLink(
Link
focusLink)
1669
Link
left = _links[x];
1679
Link
right = _links[y];
System\Windows\Forms\Controls\Labels\LinkLabel.Link.LinkAccessibleObject.cs (2)
17
private readonly
Link
_owningLink;
20
public LinkAccessibleObject(
Link
link, LinkLabel owner)
System\Windows\Forms\Controls\Labels\LinkLabel.LinkCollection.cs (16)
24
public virtual
Link
this[int index]
46
if (value is
Link
link)
60
public virtual
Link
? this[string key]
99
public
Link
Add(int start, int length)
109
public
Link
Add(int start, int length, object? linkData)
128
Link
l = new(_owner)
138
public int Add(
Link
value)
190
if (value is
Link
link)
202
if (value is
Link
link)
212
public bool Contains(
Link
link)
227
if (value is
Link
link)
237
public int IndexOf(
Link
link)
244
if (value is
Link
link)
330
return Array.Empty<
Link
>().GetEnumerator();
334
public void Remove(
Link
value)
382
if (value is
Link
link)
System\Windows\Forms\Controls\Labels\LinkLabel.LinkComparer.cs (3)
8
private class LinkComparer : IComparer<
Link
>
10
public int Compare(
Link
? link1,
Link
? link2)
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (1)
66
Link
? hit = owner.PointInLink(p.X, p.Y);
System\Windows\Forms\Controls\Labels\LinkLabelLinkClickedEventArgs.cs (4)
14
public LinkLabelLinkClickedEventArgs(LinkLabel.
Link
? link)
19
public LinkLabelLinkClickedEventArgs(LinkLabel.
Link
? link, MouseButtons button)
26
/// Gets the <see cref="LinkLabel.
Link
"/> that was clicked.
28
public LinkLabel.
Link
? Link { get; }
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.cs (1)
237
LinkLabel.
Link
link = Label.Links.Add(links[i].X, links[i].Y, _verbs[i]);
System.Windows.Forms.Tests (27)
System\Windows\Forms\AccessibleObjects\LinkLabel.Link.LinkAccessibleObjectTests.cs (2)
7
using static System.Windows.Forms.LinkLabel.
Link
;
55
Link
link = linkLabel.Links[0];
System\Windows\Forms\AccessibleObjects\LinkLabel.LinkLabelAccessibleObjectTests.cs (1)
6
using static System.Windows.Forms.LinkLabel.
Link
;
System\Windows\Forms\LinkCollectionTests.cs (4)
13
private readonly
Link
_link;
38
Link
link2 = new(_linkLabel) { Name = "TestLink2" };
85
Link
link = _linkCollection.Add(start, length);
97
Link
validLink = _linkCollection.Add(0, 1);
System\Windows\Forms\LinkConverterTests.cs (7)
14
[InlineData(typeof(LinkLabel.
Link
), false)]
61
[InlineData(typeof(LinkLabel.
Link
), false)]
84
Assert.Equal(typeof(LinkLabel.
Link
).GetConstructor([typeof(int), typeof(int)]), descriptor.MemberInfo);
94
Assert.Equal(typeof(LinkLabel.
Link
).GetConstructor([typeof(int), typeof(int), typeof(object)]), descriptor.MemberInfo);
114
[InlineData(typeof(LinkLabel.
Link
))]
138
if (expected is LinkLabel.
Link
expectedLink && actual is LinkLabel.
Link
actualLink)
System\Windows\Forms\LinkLabelLinkClickedEventArgsTests.cs (2)
17
public void Ctor_LinkLabelLink(LinkLabel.
Link
link)
33
public void Ctor_LinkLabelLink_MouseButtons(LinkLabel.
Link
link, MouseButtons button)
System\Windows\Forms\LinkTests.cs (11)
12
var
link = new LinkLabel.Link();
31
var
link = new LinkLabel.Link(start, length);
50
var
link = new LinkLabel.Link(start, length, linkData);
65
var
link = new LinkLabel.Link
80
var
link = new LinkLabel.Link
102
var
link = new LinkLabel.Link
117
var
link = new LinkLabel.Link
132
var
link = new LinkLabel.Link
147
var
link = new LinkLabel.Link
162
var
link = new LinkLabel.Link
177
var
link = new LinkLabel.Link