private void load() { if (this.openFileDialog1.ShowDialog() == DialogResult.Cancel) { return; } currentFileName = this.openFileDialog1.FileName; GameShape g = SaveAndLoad.loadGame(this.openFileDialog1.FileName); panel.applyGameShape(g); }
private void loadGameToolStripMenuItem_Click(object sender, EventArgs e) { if (currentFileName == "") { load(); } else { panel.applyGameShape(SaveAndLoad.loadGame(currentFileName)); } }