Exemple #1
0
        public override void ReadInt(ConfInt val)
        {
            _trackBar.Minimum = val.Min;
            _trackBar.Maximum = val.Max;
            _trackBar.Value   = val.Value;

            AdjustTickFrequency();
        }
Exemple #2
0
        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;
        }
Exemple #3
0
 public virtual void WriteInt(ConfInt val)
 {
 }
Exemple #4
0
 public virtual void ReadInt(ConfInt val)
 {
 }
Exemple #5
0
 public override void WriteInt(ConfInt val)
 {
 }
Exemple #6
0
 public override void ReadInt(ConfInt val)
 {
     _label.Text = val.Value.ToString();
 }
Exemple #7
0
 public override void WriteInt(ConfInt val)
 {
     val.Value = _checkBox.Checked ? 1 : 0;
 }
Exemple #8
0
 public override void ReadInt(ConfInt val)
 {
     _checkBox.Checked = (val.Value != 0);
 }
Exemple #9
0
 public override void WriteInt(ConfInt val)
 {
     val.Value = _checkedIndex;
 }
Exemple #10
0
 public override void WriteInt(ConfInt val)
 {
     val.Value = (int)_numericUpDown.Value;
 }
Exemple #11
0
 public override void ReadInt(ConfInt val)
 {
     _numericUpDown.Minimum = val.Min;
     _numericUpDown.Maximum = val.Max;
     _numericUpDown.Value   = val.Value;
 }
Exemple #12
0
 public override void WriteInt(ConfInt val)
 {
     val.Value = _trackBar.Value;
 }
Exemple #13
0
 public override void WriteInt(ConfInt val)
 {
     val.Value = Int32.Parse(_textBox.Text);
 }
Exemple #14
0
        /// <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));
        }