private void open_Click(object sender, EventArgs e) { if (openFileDialog.ShowDialog() == DialogResult.OK) { try { CutsFile file = new CutsFile(openFileDialog.FileName); List <Cut> Cuts = file.ReadCuts(); DataGridViewUtils.Array2ToGrid(Input, CutConvert.CutsListToMatrix(Cuts)); } catch (Exception ex) { MessageBox.Show(ex.Message, "ошибка"); } } }
static List <Cut> FileInput(string Path) { CutsFile file = new CutsFile(Path); return(file.ReadCuts()); }