Beispiel #1
0
 private void open_Click(object sender, EventArgs e)
 {
     if (openFileDialog.ShowDialog() == DialogResult.OK)
     {
         try
         {
             FileTls fileTls = new FileTls(openFileDialog.FileName);
             bool[,] Matrix = fileTls.ReadBoolMatrix();
             DataGridViewUtils.Array2ToGrid(Grid, Matrix);
         }
         catch (Exception eror)
         {
             MessageBox.Show(eror.Message, "ошибка");
         }
     }
 }
Beispiel #2
0
 private static bool[,] BoolMatrixFile()
 {
     while (true)
     {
         try
         {
             Console.Write("введите имя файла: ");
             FileTls fileTls = new FileTls(Console.ReadLine());
             bool[,] Matrix = fileTls.ReadBoolMatrix();
             return(Matrix);
         }
         catch (Exception eror)
         {
             Console.WriteLine(eror.Message);
         }
     }
 }