68 references to new
DesignSurface (1)
MainForm.cs (1)
158pb1.Image = new Icon("painter.ico").ToBitmap();
System.Drawing.Common.Tests (38)
mono\System.Drawing\BitmapTests.cs (4)
1197using (Icon icon = new(Helpers.GetTestBitmapPath("16x16_one_entry_4bit.ico"))) 1215using (Icon icon = new(Helpers.GetTestBitmapPath("32x32_one_entry_4bit.ico"))) 1233using (Icon icon = new(Helpers.GetTestBitmapPath("64x64_one_entry_8bit.ico"))) 1251using (Icon icon = new(Helpers.GetTestBitmapPath("96x96_one_entry_8bit.ico")))
System\Drawing\BitmapTests.cs (5)
661yield return new object[] { new Icon(Helpers.GetTestBitmapPath("16x16_one_entry_4bit.ico")), 16, 16 }; 662yield return new object[] { new Icon(Helpers.GetTestBitmapPath("32x32_one_entry_4bit.ico")), 32, 32 }; 663yield return new object[] { new Icon(Helpers.GetTestBitmapPath("64x64_one_entry_8bit.ico")), 64, 64 }; 664yield return new object[] { new Icon(Helpers.GetTestBitmapPath("96x96_one_entry_8bit.ico")), 96, 96 }; 767using Icon icon = new(Helpers.GetTestBitmapPath("48x48_one_entry_1bit.ico"));
System\Drawing\GdiPlusHandlesTests.cs (1)
25using Icon ico = new(Helpers.GetTestBitmapPath("16x16_one_entry_4bit.ico"));
System\Drawing\IconConverterTests.cs (1)
21_icon = new Icon(Path.Combine("bitmaps", "TestIcon.ico"));
System\Drawing\IconTests.cs (25)
40using Icon icon = new(Helpers.GetTestBitmapPath(name)); 89AssertExtensions.Throws<ArgumentNullException>("path", () => new Icon((string)null)); 222using Icon sourceIcon = new(Helpers.GetTestBitmapPath(fileName)); 234using Icon sourceIcon = new(Helpers.GetTestBitmapPath(fileName)); 281using Icon icon = new(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico")); 305Icon icon = new(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico")); 322using Icon source = new(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico")); 425SaveAndCompare(new Icon(Helpers.GetTestBitmapPath(fileName)), true); 432using Icon icon = new(filePath); 442Icon icon = new(filePath); 452using Icon icon = new(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico")); 459using Icon source = new(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico")); 469using Icon icon = new(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico")); 479using Icon source = new(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico")); 507yield return new object[] { new Icon(Helpers.GetTestBitmapPath("16x16_one_entry_4bit.ico")) }; 508yield return new object[] { new Icon(Helpers.GetTestBitmapPath("32x32_one_entry_4bit.ico")) }; 509yield return new object[] { new Icon(Helpers.GetTestBitmapPath("48x48_one_entry_1bit.ico")) }; 510yield return new object[] { new Icon(Helpers.GetTestBitmapPath("64x64_one_entry_8bit.ico")) }; 511yield return new object[] { new Icon(Helpers.GetTestBitmapPath("96x96_one_entry_8bit.ico")) }; 544using Icon originalIcon = new(Helpers.GetTestBitmapPath("48x48_one_entry_1bit.ico")); 636using Icon icon1 = new(Helpers.GetTestBitmapPath("16x16_one_entry_4bit.ico")); 646using Icon icon1 = new(Helpers.GetTestBitmapPath("16x16_one_entry_4bit.ico")); 664using (Icon icon1 = new(Helpers.GetTestBitmapPath("16x16_one_entry_4bit.ico"))) 679using (Icon icon1 = new(Helpers.GetTestBitmapPath("16x16_one_entry_4bit.ico"))) 706Icon icon = new(Helpers.GetTestBitmapPath("48x48_multiple_entries_4bit.ico"));
System\Drawing\ImageConverterTests.cs (1)
38using Icon icon = new(Helpers.GetTestBitmapPath(name));
System\Drawing\TextureBrushTests.cs (1)
41using Icon icon = new(Helpers.GetTestBitmapPath("10x16_one_entry_32bit.ico"));
System.Windows.Forms.Design.Tests (2)
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (2)
398using Icon expected = new(@"Resources\Icon1.ico"); 453using Icon expected = new(@"Resources\Icon1.ico");
System.Windows.Forms.Tests (27)
System\Windows\Forms\ErrorProviderTests.cs (1)
1335using Icon newIcon = new("bitmaps/10x16_one_entry_32bit.ico");
System\Windows\Forms\ImageList.ImageCollectionTests.cs (5)
646yield return new object[] { transparentColor, new Icon("bitmaps/10x16_one_entry_32bit.ico") }; 1746yield return new object[] { new Icon("bitmaps/10x16_one_entry_32bit.ico") }; 1777yield return new object[] { new Icon("bitmaps/10x16_one_entry_32bit.ico") }; 1797yield return new object[] { index, new Icon("bitmaps/10x16_one_entry_32bit.ico") }; 1829yield return new object[] { new Icon("bitmaps/10x16_one_entry_32bit.ico") };
System\Windows\Forms\ImageListTests.cs (2)
830using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico"); 886using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico");
System\Windows\Forms\NotifyIconTests.cs (19)
195yield return new object[] { new Icon("bitmaps/10x16_one_entry_32bit.ico") }; 217using Icon oldValue = new(new Icon("bitmaps/10x16_one_entry_32bit.ico"), 10, 10); 250yield return new object[] { new Icon("bitmaps/10x16_one_entry_32bit.ico"), 1 }; 309using Icon value = new("bitmaps/10x16_one_entry_32bit.ico"); 333foreach (Icon icon in new Icon[] { null, new("bitmaps/10x16_one_entry_32bit.ico") }) 383foreach (Icon icon in new Icon[] { null, new("bitmaps/10x16_one_entry_32bit.ico") }) 393yield return new object[] { false, new Icon("bitmaps/10x16_one_entry_32bit.ico"), "text", "text", 0 }; 394yield return new object[] { false, new Icon("bitmaps/10x16_one_entry_32bit.ico"), new string('a', NotifyIcon.MaxTextSize), new string('a', NotifyIcon.MaxTextSize), 0 }; 395yield return new object[] { true, new Icon("bitmaps/10x16_one_entry_32bit.ico"), "text", "text", 1 }; 396yield return new object[] { true, new Icon("bitmaps/10x16_one_entry_32bit.ico"), new string('a', NotifyIcon.MaxTextSize), new string('a', NotifyIcon.MaxTextSize), 1 }; 475using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico"); 535using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico"); 759foreach (Icon icon in new Icon[] { null, new("bitmaps/10x16_one_entry_32bit.ico") }) 837using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico"); 853using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico"); 878using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico"); 904using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico"); 917using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico"); 931using Icon icon = new("bitmaps/10x16_one_entry_32bit.ico");