// Finds all the embedded resources with names that match the supplied pattern.
        private static IList <string> GetEmbeddedResources(string pattern)
        {
            string[] resources = ThisAssembly.GetManifestResourceNames();

            return((from r in resources where r.EndsWith(pattern.Replace("*", string.Empty)) select r).ToList());
        }