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