public static void LoadAndSaveImage(TestNodeType nodeType, string outputPath) { using(Image img = LoadImage(nodeType)) { string path = Path.Combine(outputPath,nodeType.ToString())+".png"; img.Save(path); } }
public static void LoadAndSaveImage(TestNodeType nodeType, string outputPath) { using (Image img = LoadImage(nodeType)) { string path = Path.Combine(outputPath, nodeType.ToString()) + ".png"; img.Save(path); } }
public static Image LoadImage(TestNodeType nodeType) { Assembly a = Assembly.GetExecutingAssembly(); string imgName = String.Format("MbUnit.Framework.Core.{0}.png",nodeType.ToString()); Stream s = a.GetManifestResourceStream(imgName); // get icon Image icon = Image.FromStream(s); return icon; }
public static Image LoadImage(TestNodeType nodeType) { Assembly a = Assembly.GetExecutingAssembly(); string imgName = String.Format("MbUnit.Framework.Core.{0}.png", nodeType.ToString()); Stream s = a.GetManifestResourceStream(imgName); // get icon Image icon = Image.FromStream(s); return(icon); }