private static ResStateInfo GetStateInfo(string image, string shd, string sound, ResType type) { var info = new ResStateInfo(); var ext = Path.GetExtension(image); ext = string.IsNullOrEmpty(ext) ? "" : ext; ext = ext.ToLower(); switch (ext) { case ".asf": info.SetImageFilePath(ImageType.ASF, GetAsfFilePathBase(image, type), image, shd); break; case ".mpc": info.SetImageFilePath(ImageType.MPC, GetMpcFilePathBase(image, type), image, shd); break; } info.SetSound(sound); return(info); }