private void InputBtn_Click(object sender, EventArgs e) { try { OutputLbl.Text = ""; System.Windows.Forms.OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = System.IO.Path.GetFullPath(Environment.CurrentDirectory + Inp_Out.GetDataDirectiry()); if (openFileDialog.ShowDialog() == DialogResult.OK) { List <List <double> > data = Inp_Out.InpTXT(openFileDialog.FileName); DataGridViewUtils.ArrayToGrid <double>(gridView, DataProcessing.ListToArray(data)); } } catch (Exception exc) { MessageBsc.ShowError(exc.Message); } }
private void InpBtn_Click(object sender, EventArgs e) { try { System.Windows.Forms.OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.InitialDirectory = System.IO.Path.GetFullPath(Environment.CurrentDirectory + Inp_Out.GetDataDirectiry()); if (openFileDialog.ShowDialog() == DialogResult.OK) { List <List <double> > data = Inp_Out.InpTXT(openFileDialog.FileName); if (Inp_Out.IsArr2Square(data)) { DataGridViewUtils.ArrayToGrid <double>(gridView, DataProcessing.ListToArray(data)); } else { MessageBsc.Show("Данные не являются прямоугольным массивом"); } } } catch (Exception exc) { MessageBsc.ShowError(exc.Message); } }