public void proceed(rate_functions Rate_function, bool invert, bool mobility, bool Cal_control) { Constant constant = new Constant(); Linear linear = new Linear(); Quadratic quadratic = new Quadratic(); Cubic cubic = new Cubic(); Exponencional exponencional = new Exponencional(); Exponencional2 exponencional2 = new Exponencional2(); Exponencional3 exponencional3 = new Exponencional3(); Exponencional4 exponencional4 = new Exponencional4(); Exponencional5 exponencional5 = new Exponencional5(); Association acoss = new Association(); if (mobility) // functions for a mobility { comboBox1.Items.Add(constant); comboBox1.Items.Add(linear); comboBox1.Items.Add(quadratic); comboBox1.Items.Add(cubic); comboBox1.Items.Add(exponencional); comboBox1.Items.Add(exponencional3); comboBox1.Items.Add(exponencional4); comboBox1.Items.Add(exponencional5); } else // functions for a rate konstant { comboBox1.Items.Add(constant); comboBox1.Items.Add(exponencional2); comboBox1.Items.Add(exponencional3); comboBox1.Items.Add(acoss); } if (Rate_function != null) { if (Rate_function.ToString() == constant.ToString()) { comboBox1.Items.Remove(constant); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = false; checkBox3.Enabled = false; textBox4.Enabled = false; checkBox4.Enabled = false; textBox5.Enabled = false; checkBox5.Enabled = false; textBox3.Text = ""; textBox4.Text = ""; textBox5.Text = ""; } if (Rate_function.ToString() == linear.ToString()) { comboBox1.Items.Remove(linear); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox3.Text = Rate_function.B.ToString(); checkBox3.Checked = Rate_function.B_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = true; checkBox3.Enabled = true; textBox4.Enabled = false; checkBox4.Enabled = false; textBox5.Enabled = false; checkBox5.Enabled = false; textBox4.Text = ""; textBox5.Text = ""; } if (Rate_function.ToString() == quadratic.ToString()) { comboBox1.Items.Remove(quadratic); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox3.Text = Rate_function.B.ToString(); checkBox3.Checked = Rate_function.B_lock; textBox4.Text = Rate_function.C.ToString(); checkBox4.Checked = Rate_function.C_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = true; checkBox3.Enabled = true; textBox4.Enabled = true; checkBox4.Enabled = true; textBox5.Enabled = false; checkBox5.Enabled = false; textBox5.Text = ""; } if (Rate_function.ToString() == cubic.ToString()) { comboBox1.Items.Remove(cubic); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox3.Text = Rate_function.B.ToString(); checkBox3.Checked = Rate_function.B_lock; textBox4.Text = Rate_function.C.ToString(); checkBox4.Checked = Rate_function.C_lock; textBox5.Text = Rate_function.D.ToString(); checkBox5.Checked = Rate_function.D_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = true; checkBox3.Enabled = true; textBox4.Enabled = true; checkBox4.Enabled = true; textBox5.Enabled = true; checkBox5.Enabled = true; } if (Rate_function.ToString() == exponencional.ToString()) { comboBox1.Items.Remove(exponencional); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox3.Text = Rate_function.B.ToString(); checkBox3.Checked = Rate_function.B_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = true; checkBox3.Enabled = true; textBox4.Enabled = false; checkBox4.Enabled = false; textBox5.Enabled = false; checkBox5.Enabled = false; textBox4.Text = ""; textBox5.Text = ""; } if (Rate_function.ToString() == exponencional2.ToString()) { comboBox1.Items.Remove(exponencional2); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox3.Text = Rate_function.B.ToString(); checkBox3.Checked = Rate_function.B_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = true; checkBox3.Enabled = true; textBox4.Enabled = false; checkBox4.Enabled = false; textBox5.Enabled = false; checkBox5.Enabled = false; textBox4.Text = ""; textBox5.Text = ""; } if (Rate_function.ToString() == exponencional3.ToString()) { comboBox1.Items.Remove(exponencional3); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox3.Text = Rate_function.B.ToString(); checkBox3.Checked = Rate_function.B_lock; textBox4.Text = Rate_function.C.ToString(); checkBox4.Checked = Rate_function.C_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = true; checkBox3.Enabled = true; textBox4.Enabled = true; checkBox4.Enabled = true; textBox5.Enabled = false; checkBox5.Enabled = false; textBox4.Text = ""; textBox5.Text = ""; } if (Rate_function.ToString() == exponencional4.ToString()) { comboBox1.Items.Remove(exponencional4); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox3.Text = Rate_function.B.ToString(); checkBox3.Checked = Rate_function.B_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = true; checkBox3.Enabled = true; textBox4.Enabled = false; checkBox4.Enabled = false; textBox5.Enabled = false; checkBox5.Enabled = false; textBox4.Text = ""; textBox5.Text = ""; } if (Rate_function.ToString() == exponencional5.ToString()) { comboBox1.Items.Remove(exponencional5); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox3.Text = Rate_function.B.ToString(); checkBox3.Checked = Rate_function.B_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = true; checkBox3.Enabled = true; textBox4.Enabled = false; checkBox4.Enabled = false; textBox5.Enabled = false; checkBox5.Enabled = false; textBox4.Text = ""; textBox5.Text = ""; } if (Rate_function.ToString() == acoss.ToString()) { comboBox1.Items.Remove(acoss); comboBox1.Items.Add(Rate_function); textBox2.Text = Rate_function.A.ToString(); checkBox2.Checked = Rate_function.A_lock; textBox3.Text = Rate_function.B.ToString(); checkBox3.Checked = Rate_function.B_lock; textBox2.Enabled = true; checkBox2.Enabled = true; textBox3.Enabled = true; checkBox3.Enabled = true; textBox4.Enabled = false; checkBox4.Enabled = false; textBox5.Enabled = false; checkBox5.Enabled = false; textBox4.Text = ""; textBox5.Text = ""; } comboBox1.SelectedItem = Rate_function; comboBox1.Text = Rate_function.ToString(); } _invert = invert; _mobility = mobility; _cal_control = Cal_control; }