public override void ReadInt(ConfInt val) { _trackBar.Minimum = val.Min; _trackBar.Maximum = val.Max; _trackBar.Value = val.Value; AdjustTickFrequency(); }
public override void ReadInt(ConfInt val) { if ((val.Value >= _radioButtons.Count) || (val.Value < 0)) { throw new InvalidOperationException("The associated value is larger than the number of radiobuttons registered."); } _radioButtons[val.Value].Checked = true; }
public virtual void WriteInt(ConfInt val) { }
public virtual void ReadInt(ConfInt val) { }
public override void WriteInt(ConfInt val) { }
public override void ReadInt(ConfInt val) { _label.Text = val.Value.ToString(); }
public override void WriteInt(ConfInt val) { val.Value = _checkBox.Checked ? 1 : 0; }
public override void ReadInt(ConfInt val) { _checkBox.Checked = (val.Value != 0); }
public override void WriteInt(ConfInt val) { val.Value = _checkedIndex; }
public override void WriteInt(ConfInt val) { val.Value = (int)_numericUpDown.Value; }
public override void ReadInt(ConfInt val) { _numericUpDown.Minimum = val.Min; _numericUpDown.Maximum = val.Max; _numericUpDown.Value = val.Value; }
public override void WriteInt(ConfInt val) { val.Value = _trackBar.Value; }
public override void WriteInt(ConfInt val) { val.Value = Int32.Parse(_textBox.Text); }
/// <summary> /// If a value with the given name exists, returns a reference to it. /// Otherwise creates a new one. Should be used when it is expected /// that it will be called multiple times (one value can be created /// only once). /// </summary> public static ConfInt CreateIntValue(string name, int _def, int _min, int _max) { ConfInt existing = (ConfInt)GetInstance().GetValueByName(name); return(existing ?? new ConfInt(name, _def, _min, _max)); }