private void InputAxisDropdown_SelectedIndexChanged(object sender, EventArgs e) { var prev = EditingConsideration.Input; var axis = InputAxisDropdown.SelectedItem as InputAxis; EditingConsideration.Input = axis; foreach (Control c in ParamFlowPanel.Controls) { c.Dispose(); } ParamFlowPanel.Controls.Clear(); EditingConsideration.GenerateParameterValuesFromInput(); foreach (var param in EditingConsideration.ParameterValues) { ParamFlowPanel.Controls.Add(new EditWidgetParameterValue(param, EditingProject)); } if (prev != EditingConsideration.Input) { EditingProject.MarkDirty(); } }
private void InputComboBox_SelectedIndexChanged(object sender, EventArgs e) { var axis = InputComboBox.SelectedItem as InputAxis; foreach (Control c in ParamFlowPanel.Controls) { c.Dispose(); } ParamFlowPanel.Controls.Clear(); EditConsideration.GenerateParameterValuesFromInput(); foreach (var param in EditConsideration.ParameterValues) { ParamFlowPanel.Controls.Add(new EditWidgetParameterValue(param)); } if (EditConsideration.ParameterValues.Count == 0) { ParameterHintSpecificsLabel.Text = "This input has no parameters, so go ahead and click Next to move on."; } else if (EditConsideration.ParameterValues.Count == 1) { ParameterHintSpecificsLabel.Text = "This input has one parameter. By default, input numbers are divided by this value before being processed through a response curve."; } else if (EditConsideration.ParameterValues.Count == 2) { ParameterHintSpecificsLabel.Text = "This input controls a range. Input numbers will be normalized to 0-1 using this lower and upper bound."; } else { ParameterHintSpecificsLabel.Text = "This input has multiple parameters. Nobody knows what they do."; } }
private void InputComboBox_SelectedIndexChanged(object sender, EventArgs e) { var axis = InputComboBox.SelectedItem as InputAxis; EditingConsideration.Input = axis; ParameterInputHintLabel.Text = "The input being configured is: " + axis.ReadableName; foreach (Control c in ParamFlowPanel.Controls) { c.Dispose(); } ParamFlowPanel.Controls.Clear(); EditingConsideration.GenerateParameterValuesFromInput(); foreach (var param in EditingConsideration.ParameterValues) { ParamFlowPanel.Controls.Add(new EditWidgetParameterValue(param, EditingProject)); } if (EditingConsideration.ParameterValues.Count == 0) { ParameterHintSpecificsLabel.Text = "This input has no parameters, so go ahead and click Next to move on."; } else if (EditingConsideration.ParameterValues.Count == 1) { if (EditingConsideration.ParameterValues[0] is InputParameterValueNumeric) { ParameterHintSpecificsLabel.Text = "This input has one parameter. By default, input numbers are divided by this value before being processed through a response curve."; } else { if ((EditingConsideration.Input.Parameters[0] as InputParameterEnumeration).ScoreOnMatch) { ParameterHintSpecificsLabel.Text = "This input must have a predefined value; if the subject has the same value assigned, the input will score 1.0."; } else { ParameterHintSpecificsLabel.Text = "This input must have a predefined value; if the subject has any other value assigned, the input will score 1.0."; } } } else if (EditingConsideration.ParameterValues.Count == 2) { ParameterHintSpecificsLabel.Text = "This input controls a range. Input numbers will be normalized to 0-1 using this lower and upper bound."; } else { ParameterHintSpecificsLabel.Text = "This input has multiple parameters. Nobody knows what they do."; } }