public override bool ConfigurationMenu(Form parent, ActionCoreController cp, List <BaseUtils.TypeHelpers.PropertyNameInfo> eventvars) { string progname; Variables cond; Dictionary <string, string> altops; FromString(UserData, out progname, out cond, out altops); // test example List<string> p2romptValue = ExtendedControls.PromptMultiLine.ShowDialog(parent, "caption", cp.Icon, new string[] { "wkwkwkw wkw qwjkqwkqw qwkqwk", "wkwkw ejjd2" }, null, true); string promptValue = ExtendedControls.PromptSingleLine.ShowDialog(parent, "Program to call (use set::prog if req)", progname, "Configure Call Command", cp.Icon); if (promptValue != null) { ExtendedConditionsForms.VariablesForm avf = new ExtendedConditionsForms.VariablesForm(); avf.Init("Variables to pass into called program", cp.Icon, cond, showatleastoneentry: true, allownoexpand: true, altops: altops); if (avf.ShowDialog(parent) == DialogResult.OK) { userdata = ToString(promptValue, avf.result, avf.result_altops); return(true); } } return(false); }
private void Dmf_OnEditGlobals() // edit the globals { ExtendedConditionsForms.VariablesForm avf = new ExtendedConditionsForms.VariablesForm(); avf.Init("Global User variables to pass to program on run", this.Icon, PersistentVariables, showatleastoneentry: true); if (avf.ShowDialog(discoveryform) == DialogResult.OK) { LoadPeristentVariables(avf.result); } }
private void buttonInstallationVars_Click(object sender, EventArgs e) { ExtendedConditionsForms.VariablesForm avf = new ExtendedConditionsForms.VariablesForm(); avf.Init("Configuration items for installation - specialist use".TxID(AFIDs.ActionPackEditForm_ci), this.Icon, actionfile.InstallationVariables, showatleastoneentry: false); if (avf.ShowDialog(this) == DialogResult.OK) { actionfile.ChangeInstallationVariables(avf.result); } }
private void Paras_Click(object sender, EventArgs e) // FULL { Variables cond = new Variables(paras.Text, Variables.FromMode.MultiEntryComma); ExtendedConditionsForms.VariablesForm avf = new ExtendedConditionsForms.VariablesForm(); avf.Init("Input parameters to pass to program on run", this.Icon, cond, showatleastoneentry: true, showrunatrefreshcheckbox: true); if (avf.ShowDialog(FindForm()) == DialogResult.OK) { paras.Text = avf.result.ToString(); cd.actionvars = avf.result; } }
private void Paras_Click(object sender, EventArgs e) // FULL { Variables cond = new Variables(); string flag = ""; if (paras.Text.Length > 0) { cond.FromActionDataString(paras.Text, out flag); } ExtendedConditionsForms.VariablesForm avf = new ExtendedConditionsForms.VariablesForm(); avf.Init("Input parameters and flags to pass to program on run", this.Icon, cond, showone: true, showrefresh: true, showrefreshstate: flag.Equals(Variables.flagRunAtRefresh)); if (avf.ShowDialog(FindForm()) == DialogResult.OK) { cd.actiondata = paras.Text = avf.result.ToActionDataString(avf.result_refresh ? Variables.flagRunAtRefresh : ""); } }
public bool ConfigurationMenu(Form parent, ActionCoreController cp, List <BaseUtils.TypeHelpers.PropertyNameInfo> eventvars, bool allowaddv, bool allownoexpandv) { Variables av; Dictionary <string, string> operations; FromString(userdata, out av, out operations); ExtendedConditionsForms.VariablesForm avf = new ExtendedConditionsForms.VariablesForm(); avf.Init("Define Variable:", cp.Icon, av, showone: true, allowadd: allowaddv, allownoexpand: allownoexpandv, altops: operations, allowmultiple: false); if (avf.ShowDialog(parent) == DialogResult.OK) { userdata = ToString(avf.result, avf.result_altops); return(true); } else { return(false); } }