public void exec_on_form(Conf_rules2 f) { f.conclusion.Text = conclusion; name_rules = port_db_helper.get_rules(ID_TEST); Power_rule e = high_medium_low[0]; f.kof_LOW.Text = e.kof.ToString(); fill_comboBox(f.id_type_LOW, type_rules, e.id_type); fill_comboBox(f.id_A_LOW, name_rules, e.id_A); fill_comboBox(f.id_B_LOW, name_rules, e.id_B); fill_comboBox(f.id_C_LOW, name_rules, e.id_C); fill_comboBox(f.id_A_val_LOW, type_val_ABC, e.id_A_val); fill_comboBox(f.id_B_val_LOW, type_val_ABC, e.id_B_val); fill_comboBox(f.id_C_val_LOW, type_val_ABC, e.id_C_val); e = high_medium_low[1]; f.kof_MEDIUM.Text = e.kof.ToString(); fill_comboBox(f.id_type_MEDIUM, type_rules, e.id_type); fill_comboBox(f.id_A_MEDIUM, name_rules, e.id_A); fill_comboBox(f.id_B_MEDIUM, name_rules, e.id_B); fill_comboBox(f.id_C_MEDIUM, name_rules, e.id_C); fill_comboBox(f.id_A_val_MEDIUM, type_val_ABC, e.id_A_val); fill_comboBox(f.id_B_val_MEDIUM, type_val_ABC, e.id_B_val); fill_comboBox(f.id_C_val_MEDIUM, type_val_ABC, e.id_C_val); e = high_medium_low[2]; f.kof_HIGH.Text = e.kof.ToString(); fill_comboBox(f.id_type_HIGH, type_rules, e.id_type); fill_comboBox(f.id_A_HIGH, name_rules, e.id_A); fill_comboBox(f.id_B_HIGH, name_rules, e.id_B); fill_comboBox(f.id_C_HIGH, name_rules, e.id_C); fill_comboBox(f.id_A_val_HIGH, type_val_ABC, e.id_A_val); fill_comboBox(f.id_B_val_HIGH, type_val_ABC, e.id_B_val); fill_comboBox(f.id_C_val_HIGH, type_val_ABC, e.id_C_val); f.a_txt.Text = aa.ToString(); f.b_txt.Text = bb.ToString(); f.c_txt.Text = cc.ToString(); f.d_txt.Text = dd.ToString(); f.e_txt.Text = ee.ToString(); f.f_txt.Text = ff.ToString(); f.g_txt.Text = gg.ToString(); f.h_txt.Text = hh.ToString(); }
public void load_changed_data_from_view(Conf_rules2 f) { conclusion = f.conclusion.Text.ToString(); Power_rule e = high_medium_low[0]; e.kof = double.Parse(f.kof_LOW.Text.ToString()); e.id_type = f.id_type_LOW.SelectedIndex + 1; e.id_A = f.id_A_LOW.SelectedIndex + 1; e.id_B = f.id_B_LOW.SelectedIndex + 1; e.id_C = f.id_C_LOW.SelectedIndex + 1; e.id_A_val = f.id_A_val_LOW.SelectedIndex + 1; e.id_B_val = f.id_B_val_LOW.SelectedIndex + 1; e.id_C_val = f.id_C_val_LOW.SelectedIndex + 1; e = high_medium_low[1]; e.kof = double.Parse(f.kof_MEDIUM.Text.ToString()); e.id_type = f.id_type_MEDIUM.SelectedIndex + 1; e.id_A = f.id_A_MEDIUM.SelectedIndex + 1; e.id_B = f.id_B_MEDIUM.SelectedIndex + 1; e.id_C = f.id_C_MEDIUM.SelectedIndex + 1; e.id_A_val = f.id_A_val_MEDIUM.SelectedIndex + 1; e.id_B_val = f.id_B_val_MEDIUM.SelectedIndex + 1; e.id_C_val = f.id_C_val_MEDIUM.SelectedIndex + 1; e = high_medium_low[2]; e.kof = double.Parse(f.kof_HIGH.Text.ToString()); e.id_type = f.id_type_HIGH.SelectedIndex + 1; e.id_A = f.id_A_HIGH.SelectedIndex + 1; e.id_B = f.id_B_HIGH.SelectedIndex + 1; e.id_C = f.id_C_HIGH.SelectedIndex + 1; e.id_A_val = f.id_A_val_HIGH.SelectedIndex + 1; e.id_B_val = f.id_B_val_HIGH.SelectedIndex + 1; e.id_C_val = f.id_C_val_HIGH.SelectedIndex + 1; aa = double.Parse(f.a_txt.Text.ToString()); bb = double.Parse(f.b_txt.Text.ToString()); cc = double.Parse(f.c_txt.Text.ToString()); dd = double.Parse(f.d_txt.Text.ToString()); ee = double.Parse(f.e_txt.Text.ToString()); ff = double.Parse(f.f_txt.Text.ToString()); gg = double.Parse(f.g_txt.Text.ToString()); hh = double.Parse(f.h_txt.Text.ToString()); }