public PropertyRowNodeAttrEnum(NodeAttribute attr) { if (!(attr.GetValueType().IsEnum)) { throw new InvalidOperationException("passed attribute does not contain enum"); } _enumType = attr.GetValueType(); _attr = attr; _attr.Changed += (s, e) => Changed?.Invoke(this, new PropertyGridRowChangedEventArgs()); _box = new PropertyRowContainer <ComboBox>(new ComboBox() { DropDownStyle = ComboBoxStyle.DropDownList }, attr.Unit); FillComboBox(); Select(_attr.Get()); }
public PropertyRowNodeAttrInt(AttributeValueInt attr) { _box = new PropertyRowContainer <TextBox>(new TextBox(), attr.Unit); _attr = attr; _attr.Changed += (s, e) => Changed?.Invoke(this, new PropertyGridRowChangedEventArgs()); }
public PropertyRowNodeAttrDouble(AttributeValueDouble attr) { _box = new PropertyRowContainer <TextBox>(new TextBox(), attr.Unit); _attr = attr; _attr.Changed += _attr_Changed; }