Exemple #1
0
 public void UpdateDefaultValue(InputBox box, Control control)
 {
     if (control is UIntValueBox intValue)
     {
         intValue.Value = UnsignedIntegerValue.Get(box.ParentNode, box.Archetype, box.Value);
     }
 }
Exemple #2
0
        private void OnValueBoxChanged(ValueBox <uint> control)
        {
            var box = (InputBox)control.Tag;

            if (box.HasCustomValueAccess)
            {
                box.Value = control.Value;
            }
            else
            {
                UnsignedIntegerValue.Set(box.ParentNode, box.Archetype, control.Value);
            }
        }
Exemple #3
0
        public Control Create(InputBox box, ref Rectangle bounds)
        {
            var value   = UnsignedIntegerValue.Get(box.ParentNode, box.Archetype, box.Value);
            var control = new UIntValueBox(value, bounds.X, bounds.Y, 40, uint.MinValue, uint.MaxValue, 0.01f)
            {
                Height = bounds.Height,
                Parent = box.Parent,
                Tag    = box,
            };

            control.BoxValueChanged += OnValueBoxChanged;
            return(control);
        }
Exemple #4
0
        private void OnValueBoxChanged(ValueBox <uint> control)
        {
            var box = (InputBox)control.Tag;

            UnsignedIntegerValue.Set(box.ParentNode, box.Archetype, control.Value);
        }