Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Equation Solver - Form2.cs

Form2.cs

Caricato da: Matthew
Scarica il programma completo

  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8.  
  9. namespace Equazioni_2
  10. {
  11.     public partial class Form2 : Form
  12.     {
  13.         public Form2()
  14.         {
  15.             InitializeComponent();
  16.         }
  17.  
  18.         private void Form2_Load(object sender, EventArgs e)
  19.         {
  20.             //Riempi il combo box 1
  21.             for (int cont2 = 0; cont2 <= Form1.grado; cont2++)
  22.             {
  23.                 comboBox1.Items.Add(cont2.ToString());
  24.             }
  25.             comboBox1.Text = "0";
  26.             comboBox1.DropDownStyle = ComboBoxStyle.DropDownList;
  27.         }
  28.  
  29.  
  30.         private void bt_edit_Click_1(object sender, EventArgs e)
  31.         {
  32.             int grado2 = Convert.ToInt32(comboBox1.Text);
  33.  
  34.             try
  35.             {
  36.                 Form1.coefficiente[grado2] = new Complex(double.Parse(textBox5.Text), 0);
  37.                 //Form1.Scrivi_Equazione();
  38.                 Form2.ActiveForm.Close();
  39.             }
  40.             catch
  41.             {
  42.                 MessageBox.Show("Il valore inserito non è valido");
  43.             }
  44.            
  45.         }
  46.  
  47.         private void button1_Click(object sender, EventArgs e)
  48.         {
  49.             Form2.ActiveForm.Close();
  50.         }
  51.     }
  52. }