private void save_Click(object sender, EventArgs e) { if (saveFileDialog.ShowDialog() == DialogResult.OK) { try { CutsFile file = new CutsFile(openFileDialog.FileName); file.WriteCuts(CutConvert.MatrixToCutsList(DataGridViewUtils.GridToArray2 <double>(Output))); } catch (Exception ex) { MessageBox.Show(ex.Message, "ошибка"); } } }
static void FileOutput(List <Cut> Lines, string Path) { CutsFile file = new CutsFile(Path); file.WriteCuts(Lines); }