private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) { using (FileDialog fileDialog = new SaveFileDialog()) { fileDialog.Filter = "KLPint resource |*.klp"; if (fileDialog.ShowDialog() == DialogResult.OK) { Fileutil.Write(shapes, fileDialog.FileName); } } }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { Fileutil.Write(shapes); }