private void SaveToolStripMenuItemClick(object sender, EventArgs e) { String fileName = Core.Instance.State.LevelFile; if (fileName != null) { ClsFileWriter.writeClsFile(fileName, Core.Instance.LevelList); } }
private void SaveAsToolStripMenuItemClick(object sender, EventArgs e) { fileDialog = new SaveFileDialog(); fileDialog.Title = "Save Cubes LevelsFile As..."; fileDialog.DefaultExt = "cls"; fileDialog.Filter = "Cubes LevelsFile |*.cls"; fileDialog.FileName = Core.Instance.State.LevelFile; if (fileDialog.ShowDialog() == DialogResult.OK) { ClsFileWriter.writeClsFile(fileDialog.FileName, Core.Instance.LevelList); setCurrentFile(fileDialog.FileName); } }