예제 #1
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, "ошибка");
         }
     }
 }
예제 #2
0
 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, "ошибка");
         }
     }
 }
예제 #3
0
        static void FileOutput(List <Cut> Lines, string Path)
        {
            CutsFile file = new CutsFile(Path);

            file.WriteCuts(Lines);
        }
예제 #4
0
        static List <Cut> FileInput(string Path)
        {
            CutsFile file = new CutsFile(Path);

            return(file.ReadCuts());
        }