public void Solve() { //Input data for (i = 0; i < 2; i++) { X[i] = Convert.ToSingle(dataGridView.Rows[i].Cells[1].Value); Z[i] = Convert.ToSingle(dataGridView.Rows[i].Cells[2].Value); } //Solve for Standard deviation SolvedStdDev = (X[0] - X[1]) / (Z[0] - Z[1]); //solve for mean SolvedMean = X[1] - SolvedStdDev * Z[1]; //output mean and standard deviation TxtCalculatedMean.Text = SolvedMean.ToString(); TxtCalculatedStdDev.Text = SolvedStdDev.ToString(); //send mean and standard deviation to parameter form FrmInputANNParameters form = (FrmInputANNParameters)Application.OpenForms["FrmInputANNParameters"]; form.TxtMean.Text = TxtCalculatedMean.Text; form.TxtStdDev.Text = TxtCalculatedStdDev.Text; }
private void BtnInputANNPara_Click(object sender, EventArgs e) { FrmInputANNParameters fInANN = new FrmInputANNParameters(); fInANN.Show(); }