public AccelTypeOptions( ComboBox accelDropdown, Option acceleration, Option scale, CapOptions cap, Option weight, OffsetOptions offset, Option limit, Option exponent, Option midpoint, Button writeButton, ActiveValueLabel accelTypeActiveValue) { AccelDropdown = accelDropdown; AccelDropdown.Items.Clear(); AccelDropdown.Items.AddRange(AccelerationTypes.Keys.ToArray()); AccelDropdown.SelectedIndexChanged += new System.EventHandler(OnIndexChanged); Acceleration = acceleration; Scale = scale; Cap = cap; Weight = weight; Offset = offset; Limit = limit; Exponent = exponent; Midpoint = midpoint; WriteButton = writeButton; AccelTypeActiveValue = accelTypeActiveValue; AccelTypeActiveValue.Left = AccelDropdown.Left + AccelDropdown.Width; AccelTypeActiveValue.Height = AccelDropdown.Height; Layout("Off"); ShowingDefault = true; }
public Option( TextBox box, Form containingForm, double defaultData, Label label, int left, ActiveValueLabel activeValueLabel) : this( new Field(box, containingForm, defaultData), label, activeValueLabel, left) { }
public Option( TextBox box, Form containingForm, double defaultData, Label label, int left, ActiveValueLabel activeValueLabel, string startingName) : this( box, containingForm, defaultData, label, left, activeValueLabel) { SetName(startingName); }
public Option( Field field, Label label, ActiveValueLabel activeValueLabel, int left) { Field = field; Label = label; ActiveValueLabel = activeValueLabel; Left = left; label.AutoSize = false; label.TextAlign = System.Drawing.ContentAlignment.MiddleRight; label.Width = Field.Left - left - Constants.OptionLabelBoxSeperation; label.Height = Field.Height; ActiveValueLabel.Left = Field.Left + Field.Width; ActiveValueLabel.Height = Field.Height; }
public override void AlignActiveValues() { ActiveValueLabel.Align(); }
public void UpdateActiveValue(double value) { ActiveValueLabel.SetValue(value); }
public void Show() { Field.Show(); Label.Show(); ActiveValueLabel.Show(); }
public override void Hide() { Field.Hide(); Label.Hide(); ActiveValueLabel.Hide(); }
public void SetActiveValue(double value) { ActiveValueLabel.SetValue(value); Field.SetNewDefault(value); Field.SetToDefault(); }