private void setDiffParameters(Ur_Dif _dif)
 {
     _dif.set_c(Convert.ToDouble(TB_c.Text));
     _dif.set_y(Convert.ToDouble(TB_y.Text));
     _dif.set_v(Convert.ToDouble(TB_v.Text));
     _dif.set_t(Convert.ToDouble(TB_t.Text));
     _dif.set_p(Convert.ToDouble(TB_p.Text));
     _dif.set_k(Convert.ToDouble(TB_k.Text));
     _dif.set_lymb1(Convert.ToDouble(TB_lymb1.Text));
     _dif.set_lymb2(Convert.ToDouble(TB_lymb2.Text));
 }
Exemplo n.º 2
0
        private void BT_GO_Click(object sender, EventArgs e)
        {
            zedGraphControl1.GraphPane.YAxis.Scale.Min = Convert.ToDouble(TB_min_Y.Text);
            zedGraphControl1.GraphPane.YAxis.Scale.Max = Convert.ToDouble(TB_max_Y.Text);
            double[] l       = new double[5];
            double[] coef_u1 = new double[5];
            double[] coef_u2 = new double[5];

            l[0] = Convert.ToDouble(NUD_GU_1.Value);
            l[1] = Convert.ToDouble(NUD_GU_2.Value);
            l[2] = Convert.ToDouble(NUD_GU_3.Value);
            l[3] = Convert.ToDouble(NUD_GU_4.Value);
            l[4] = Convert.ToDouble(NUD_GU_5.Value);

            coef_u1[0] = Convert.ToDouble(TB_GU1_1.Text);
            coef_u1[1] = Convert.ToDouble(TB_GU1_2.Text);
            coef_u1[2] = Convert.ToDouble(TB_GU1_3.Text);
            coef_u1[3] = Convert.ToDouble(TB_GU1_4.Text);
            coef_u1[4] = Convert.ToDouble(TB_GU1_5.Text);

            coef_u2[0] = Convert.ToDouble(TB_GU2_1.Text);
            coef_u2[1] = Convert.ToDouble(TB_GU2_2.Text);
            coef_u2[2] = Convert.ToDouble(TB_GU2_3.Text);
            coef_u2[3] = Convert.ToDouble(TB_GU2_4.Text);
            coef_u2[4] = Convert.ToDouble(TB_GU2_5.Text);


            dif = new Ur_Dif(l, coef_u1, coef_u2, 5);
            dif.set_c(Convert.ToDouble(TB_c.Text));
            dif.set_y(Convert.ToDouble(TB_y.Text));
            dif.set_v(Convert.ToDouble(TB_v.Text));
            dif.set_t(Convert.ToDouble(TB_t.Text));
            dif.set_p(Convert.ToDouble(TB_p.Text));
            dif.set_k(Convert.ToDouble(TB_k.Text));
            dif.set_lymb1(Convert.ToDouble(TB_lymb1.Text));
            dif.set_lymb2(Convert.ToDouble(TB_lymb2.Text));
            dif.set_n(Convert.ToInt32(NUD_n.Text));
            timer1.Interval = Convert.ToInt32(NUD_Tick.Text);
            t    = Convert.ToDouble(TB_t.Text);
            time = 0;
            timer1.Start();
        }