/// <summary> /// Saves the current file as .bgf or .xml/.bmp /// </summary> /// <param name="Filename"></param> public static void Save(string Filename) { // set values in file from input controls in 'settings' window CurrentFile.ShrinkFactor = SettingsForm.ShrinkFactor; CurrentFile.Version = SettingsForm.Version; CurrentFile.Name = SettingsForm.BgfName; string extension = Path.GetExtension(Filename); switch (extension) { case FileExtensions.BGF: if (SettingsForm.IsSaveCompresed) { CurrentFile.CompressAll(); } else { CurrentFile.DecompressAll(); } CurrentFile.Save(Filename); break; case FileExtensions.XML: CurrentFile.WriteXml(Filename); break; } }