private void сохранитьToolStripMenuItem_Click(object sender, EventArgs e) { try { Topology.Topology topology = topologyBuilder.ToTopology(); TopologySaverAndLoader.Save(fullFilePath, topology); MessageBox.Show("Топология сохраненена в\n" + fullFilePath); } catch (Exception exc) { MessageBox.Show(exc.Message); } }
private void сохранитьКакToolStripMenuItem_Click(object sender, EventArgs e) { SaveFileDialog sfd = new SaveFileDialog { DefaultExt = TopologySaverAndLoader.DotExt, Filter = TopologySaverAndLoader.Filter }; if (sfd.ShowDialog() == DialogResult.OK) { fullFilePath = sfd.FileName; Topology.Topology topology = topologyBuilder.ToTopology(); TopologySaverAndLoader.Save(fullFilePath, topology); } }