Пример #1
0
        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);
        }
Пример #2
0
 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);
     }
 }
Пример #3
0
        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);
        }