private void FileSave_Click(object sender, EventArgs e) { SaveFileDialog saveFile = new SaveFileDialog(); if (saveFile.ShowDialog() == DialogResult.OK) { graph.Save(saveFile.FileName); } saveFile.Dispose(); }