63 references to FromFile
System.Drawing.Common.Tests (11)
mono\System.Drawing.Imaging\IconCodecTests.cs (2)
42using Image image = Image.FromFile(sInFile); 59using Image image = Image.FromFile(sInFile);
mono\System.Drawing\GraphicsTests.cs (1)
346using Image img = Image.FromFile(sInFile);
System\Drawing\ImageConverterTests.cs (1)
19_image = Image.FromFile(Path.Combine("bitmaps", "TestImage.bmp"));
System\Drawing\ImageTests.cs (6)
496Assert.Throws<OutOfMemoryException>(() => Image.FromFile(file.Path)); 503AssertExtensions.Throws<ArgumentNullException>("path", () => Image.FromFile(null)); 510AssertExtensions.Throws<ArgumentException>("path", null, () => Image.FromFile(string.Empty)); 522Assert.Throws<PathTooLongException>(() => Image.FromFile(fileName)); 530Assert.Throws<FileNotFoundException>(() => Image.FromFile(fileName)); 539Assert.Throws<FileNotFoundException>(() => Image.FromFile("NoSuchFile"));
System\Drawing\Imaging\ImageFormatTests.cs (1)
110var img = Image.FromFile(path);
System.Windows.Forms.Design.Tests (2)
System\Resources\Tools\StronglyTypedResourceBuilderTests.cs (2)
317using Bitmap expected = (Bitmap)Image.FromFile(@"Resources\Image1.png"); 373using Bitmap expected = (Bitmap)Image.FromFile(@"Resources\Image1.png");
System.Windows.Forms.Tests (32)
System\Windows\Forms\ToolStripControlHostTests.cs (6)
400yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 401yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 1211yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 1212yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 1337yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), color }; 1338yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), color };
System\Windows\Forms\ToolStripItemTests.cs (20)
1769yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 1770yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 1865yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), 1 }; 1866yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), 1 }; 3785yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 3786yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 3815yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), -1 }; 3816yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), -1 }; 3889yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), 1 }; 3890yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), 1 }; 5603yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), color }; 5604yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), color }; 5670yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Empty, 0 }; 5671yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Red, 1 }; 5672yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Empty, 0 }; 5673yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Red, 1 }; 5737yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Empty, 0 }; 5738yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), Color.Red, 1 }; 5739yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Empty, 0 }; 5740yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), Color.Red, 1 };
System\Windows\Forms\ToolStripSeparatorTests.cs (6)
114yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 115yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 421yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")) }; 422yield return new object[] { imageTransparentColor, Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")) }; 531yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "nature24bits.gif")), color }; 532yield return new object[] { Image.FromFile(Path.Combine("bitmaps", "10x16_one_entry_32bit.ico")), color };
System.Windows.Forms.UI.IntegrationTests (1)
ToolStripTests.cs (1)
17_sharedImageList.Images.Add("square", Image.FromFile("./Resources/image.png"));
WinFormsControlsTest (17)
CollectionEditors.cs (4)
26imageList.Images.Add("SmallA", Image.FromFile("Images\\SmallA.bmp")); 27imageList.Images.Add(Image.FromFile("Images\\SmallABlue.bmp")); 28imageList.Images.Add("LargeA", Image.FromFile("Images\\LargeA.bmp")); 29imageList.Images.Add(Image.FromFile("Images\\LargeABlue.bmp"));
DataGridViewTest.cs (1)
30column6.Image = Image.FromFile("Images\\SmallA.bmp");
ListViewTest.cs (6)
130imageListSmall.Images.Add(Image.FromFile("Images\\SmallA.bmp")); 131imageListSmall.Images.Add(Image.FromFile("Images\\SmallABlue.bmp")); 132imageListLarge.Images.Add(Image.FromFile("Images\\LargeA.bmp")); 133imageListLarge.Images.Add(Image.FromFile("Images\\LargeABlue.bmp")); 249Bitmap bitmap = (Bitmap)Image.FromFile(file); 280Bitmap bitmap = (Bitmap)Image.FromFile(file);
MultipleControls.cs (4)
92imageListSmall.Images.Add(Image.FromFile("Images\\SmallA.bmp")); 93imageListSmall.Images.Add(Image.FromFile("Images\\SmallABlue.bmp")); 94imageListLarge.Images.Add(Image.FromFile("Images\\LargeA.bmp")); 95imageListLarge.Images.Add(Image.FromFile("Images\\LargeABlue.bmp"));
ToolStripTests.cs (2)
20toolStrip2_Button4.Image = Image.FromFile("Images\\SmallA.bmp"); 22toolStrip2_Button5.Image = Image.FromFile("Images\\SmallABlue.bmp");