public string RunDialog(string name, Visual_Flow_Form form) { string result; result = Procedure_name.RunDialog(name, ref param_names, ref param_is_input, ref param_is_output, form); if (result != null && result != "") { num_params = param_is_output.Length; this.SetText(); } return(result); }
public static string RunDialog(string s, ref string[] incoming_param_names, ref bool[] is_input, ref bool[] is_output, Visual_Flow_Form the_form) { Procedure_name dialog = new Procedure_name(); result = ""; if (Component.USMA_mode) { dialog.checkBoxInput2.Visible = false; dialog.checkBoxInput3.Visible = false; dialog.checkBoxInput4.Visible = false; dialog.checkBoxInput5.Visible = false; dialog.checkBoxInput6.Visible = false; dialog.checkBoxOutput1.Text = "Return"; dialog.checkBoxOutput2.Visible = false; dialog.checkBoxOutput3.Visible = false; dialog.checkBoxOutput4.Visible = false; dialog.checkBoxOutput5.Visible = false; dialog.checkBoxOutput6.Visible = false; } dialog.textBoxProcedureName.Text = s; if (incoming_param_names.Length >= 1) { dialog.textBoxParam1.Text = incoming_param_names[0]; dialog.checkBoxInput1.Checked = is_input[0]; dialog.checkBoxOutput1.Checked = is_output[0]; } if (incoming_param_names.Length >= 2) { dialog.textBoxParam2.Text = incoming_param_names[1]; dialog.checkBoxInput2.Checked = is_input[1]; dialog.checkBoxOutput2.Checked = is_output[1]; } if (incoming_param_names.Length >= 3) { dialog.textBoxParam3.Text = incoming_param_names[2]; dialog.checkBoxInput3.Checked = is_input[2]; dialog.checkBoxOutput3.Checked = is_output[2]; } if (incoming_param_names.Length >= 4) { dialog.textBoxParam4.Text = incoming_param_names[3]; dialog.checkBoxInput4.Checked = is_input[3]; dialog.checkBoxOutput4.Checked = is_output[3]; } if (incoming_param_names.Length >= 5) { dialog.textBoxParam5.Text = incoming_param_names[4]; dialog.checkBoxInput5.Checked = is_input[4]; dialog.checkBoxOutput5.Checked = is_output[4]; } if (incoming_param_names.Length >= 6) { dialog.textBoxParam6.Text = incoming_param_names[5]; dialog.checkBoxInput6.Checked = is_input[5]; dialog.checkBoxOutput6.Checked = is_output[5]; } dialog.init_name = s.ToLower(); dialog.form = the_form; dialog.ShowDialog(); // outputs // changed on 11 Dec 2006 by mcc to not reset if result is null if (result != null && result != "") { incoming_param_names = param_names; is_input = param_is_input; is_output = param_is_output; return(result); } else { return(null); } }