/// *****************************************************
/// <summary>
/// Retrieves an embedded image.
/// </summary>
/// <param name="dir"> The directory. </param>
/// <param name="imgName"> The image's name. </param>
/// <param name="nspace"> The namespace. </param>
/// <returns> The image. </returns>
/// *****************************************************
public static Image GetAssemblyImage(string dir, string imgName, string nspace)
{
Assembly a = Assembly.GetExecutingAssembly(); // Current Assembly
string path = null;
// Top Directory or not ?
if (string.IsNullOrEmpty(dir)) path = string.Format("{0}.{1}", nspace, imgName);
else path = string.Format("{0}.{1}.{2}", nspace, dir, imgName);
// Retrieves the image
return Image.FromStream(a.GetManifestResourceStream(path));
}