public void DisplayConfigInspector(Rect rect, GUIStyle style) { var typeRect = new Rect(rect.x, rect.y, rect.width / 2, rect.height); var compareRect = new Rect(rect.x + rect.width / 2, rect.y, rect.width / 2, rect.height); Type = (ValueEventType)EditorGUI.EnumPopup(typeRect, Type, style); //ValueType = (GenericValue)EditorGUI.EnumPopup(compareRect, ValueType, style); }
public void Copy(ValueEvent source) { Type = source.Type; //ValueType = source.ValueType; StringValue = source.StringValue; EnumIndex = source.EnumIndex; IntValue = source.IntValue; AdditionalString = source.AdditionalString; }
/// <summary> /// Apply event performs two operations /// 1. Adds the event to the list of uncommitted events /// 2. Increment the version of the aggregate /// </summary> /// <param name="eventType"></param> public void ApplyEvent(ValueEventType eventType) { switch (eventType) { case ValueEventType.CodeChanged: base.ApplyEvent(new CodeChangedEvent(this)); break; case ValueEventType.NameChanged: base.ApplyEvent(new NameChangedEvent(this)); break; case ValueEventType.ValueChanged: base.ApplyEvent(new ValueChangedEvent(this)); break; case ValueEventType.ValueCreated: base.ApplyEvent(new ValueCreatedEvent(this)); break; default: throw new ArgumentOutOfRangeException(nameof(eventType), eventType, null); } }