public bool SaveMap(string fileName) { if (Path.GetExtension(fileName) == ".trizbort") { engine = new LegacyMapFileEngine(project); return(engine.Save(fileName)); } return(false); }
public bool LoadMap(string fileName) { // empty file if (isEmptyFile(fileName)) { Settings.Reset(); return(false); } if (Path.GetExtension(fileName) == ".trizbort") { loader = new LegacyMapFileEngine(project); return(loader.Load(fileName)); } MessageBox.Show($"'{fileName}' is not a known Trizbort file.", "Not a valid file", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(false); }