示例#1
0
 private void button1_Click(object sender, EventArgs e)
 {
     param.n       = Convert.ToInt32(textBox1.Text);
     param.maxtime = Convert.ToInt32(textBox2.Text);
     param.np      = Convert.ToInt32(textBox3.Text);
     param.e1      = Convert.ToDouble(textBox4.Text);
     param.e2      = Convert.ToDouble(textBox5.Text);
     param.Uratio  = Convert.ToDouble(textBox6.Text);
     Counts.paramset(param.n, param.maxtime, param.np, param.e1, param.e2, param.Uratio, ref param1);
     if (param.n != param1.n || param.maxtime != param1.maxtime || param.np != param1.np || param.e1 != param1.e1 || param.e2 != param1.e2 || param.Uratio != param1.Uratio)
     {
         param         = param1;
         textBox1.Text = param.n.ToString();
         textBox2.Text = param.maxtime.ToString();
         textBox3.Text = param.np.ToString();
         textBox4.Text = param.e1.ToString();
         textBox5.Text = param.e2.ToString();
         textBox6.Text = param.Uratio.ToString();
         label6.Show();
     }
     else
     {
         this.Close();
     }
 }
示例#2
0
 public Form3(Counts.Params param)
 {
     InitializeComponent();
     label6.Hide();
     this.param    = param;
     param2        = param;
     textBox1.Text = param.n.ToString();
     textBox2.Text = param.maxtime.ToString();
     textBox3.Text = param.np.ToString();
     textBox4.Text = param.e1.ToString();
     textBox5.Text = param.e2.ToString();
     textBox6.Text = param.Uratio.ToString();
     this.Show();
 }
示例#3
0
 private void button2_Click(object sender, EventArgs e)
 {
     param = param2;
     this.Close();
 }
示例#4
0
 private void Form3Closing(object sender, EventArgs e)
 {
     Params = ((Form3)sender).param;
 }