Пример #1
0
 private void Combine_Click(object sender, EventArgs e)
 {
     try
     {
         List <Cut> cuts        = CutConvert.MatrixToCutsList(DataGridViewUtils.GridToArray2 <double>(Input));
         List <Cut> CombineCuts = Cut.Combine(cuts);
         DataGridViewUtils.Array2ToGrid(Output, CutConvert.CutsListToMatrix(CombineCuts));
         save.Enabled = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "ошибка");
     }
 }
Пример #2
0
 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, "ошибка");
         }
     }
 }