Exemplo n.º 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);
        }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
        }