using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Equazioni_2
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
//Riempi il combo box 1
for (int cont2 = 0; cont2 <= Form1.grado; cont2++)
{
comboBox1.Items.Add(cont2.ToString());
}
comboBox1.Text = "0";
comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
}
private void bt_edit_Click_1(object sender, EventArgs e)
{
int grado2 = Convert.ToInt32(comboBox1.Text);
try
{
Form1.
coefficiente[grado2
] = new Complex
(double.
Parse(textBox5.
Text), 0
);
//Form1.Scrivi_Equazione();
Form2.ActiveForm.Close();
}
catch
{
MessageBox.Show("Il valore inserito non è valido");
}
}
private void button1_Click(object sender, EventArgs e)
{
Form2.ActiveForm.Close();
}
}
}