/// <summary> /// Initializes a new instance of the <see cref="InlineEditorAttribute" /> class. /// </summary> /// <param name="inlineEditorMode">The inline editor mode.</param> /// <param name="objectFieldMode">How the object field should be drawn.</param> public InlineEditorAttribute(InlineEditorModes inlineEditorMode = InlineEditorModes.GUIOnly, InlineEditorObjectFieldModes objectFieldMode = InlineEditorObjectFieldModes.Boxed) { this.ObjectFieldMode = objectFieldMode; switch (inlineEditorMode) { case InlineEditorModes.GUIOnly: this.DrawGUI = true; break; case InlineEditorModes.GUIAndHeader: this.DrawGUI = true; this.DrawHeader = true; break; case InlineEditorModes.GUIAndPreview: this.DrawGUI = true; this.DrawPreview = true; break; case InlineEditorModes.SmallPreview: this.Expanded = true; this.DrawPreview = true; break; case InlineEditorModes.LargePreview: this.Expanded = true; this.DrawPreview = true; this.PreviewHeight = 170; break; case InlineEditorModes.FullEditor: this.DrawGUI = true; this.DrawHeader = true; this.DrawPreview = true; break; default: throw new NotImplementedException(); } }
/// <summary> /// Initializes a new instance of the <see cref="InlineEditorAttribute"/> class. /// </summary> /// <param name="objectFieldMode">How the object field should be drawn.</param> public InlineEditorAttribute(InlineEditorObjectFieldModes objectFieldMode) : this(InlineEditorModes.GUIOnly, objectFieldMode) { }