private void RandomValuesToolStripMenu_Click(object sender, EventArgs e) { functionFromFile = InformationService.GetRandomFunction(1, 10, 10); InformationService.WriteToDataGridView(dataGridView, functionFromFile); var spline = new Spline(functionFromFile); spline.OutToDataGridView(dataGridView2); DrawSeries(spline); }
private void SaveValuesToolStripMenuItem_Click(object sender, EventArgs e) { saveFileDialog.InitialDirectory = Application.StartupPath; if (saveFileDialog.ShowDialog() == DialogResult.OK && dataGridView.RowCount > 0) { InformationService.WriteToFile( dataGridView, saveFileDialog.FileName); } }
private void ReadToolStripMenu_Click(object sender, EventArgs e) { openFileDialog.InitialDirectory = Application.StartupPath; if (openFileDialog.ShowDialog() != DialogResult.OK) { return; } functionFromFile = InformationService.ReadFile(openFileDialog.FileName); InformationService.WriteToDataGridView(dataGridView, functionFromFile); var spline = new Spline(functionFromFile); spline.OutToDataGridView(dataGridView2); DrawSeries(spline); }