public void UpdateDefaultValue(InputBox box, Control control) { if (control is UIntValueBox intValue) { intValue.Value = UnsignedIntegerValue.Get(box.ParentNode, box.Archetype, box.Value); } }
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); } }
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); }
private void OnValueBoxChanged(ValueBox <uint> control) { var box = (InputBox)control.Tag; UnsignedIntegerValue.Set(box.ParentNode, box.Archetype, control.Value); }