/// <summary> /// Initializes a new instance of ContentEditorField class. /// </summary> /// <param name="form">The form object.</param> /// <param name="field">The content field.</param> public ContentEditorField(ContentFormDecorator form, ContentField field) { this.ParentForm = form; this.Parent = form.Parent; field.CopyTo(this, "Parent"); Template = new ContentTemplate(); switch ((ContentFormTypes)form.FormType) { case ContentFormTypes.Display: if (field.HasDisplayTemlpate) Template.Source = field.DisplayTemplate; break; case ContentFormTypes.Activity: if (field.HasActivityTemplate) Template.Source = field.ActivityTemplate; break; case ContentFormTypes.Edit: if (field.HasEditTemlpate) Template.Source = field.EditTemplate; break; case ContentFormTypes.New: if (field.HasNewTemlpate) Template.Source = field.NewTemplate; break; } }
/// <summary> /// Initializes a new instance of the ContentFieldRef class. /// </summary> /// <param name="parent">The parent view object.</param> /// <param name="field">The content field.</param> public ContentFieldRef(ContentViewDecorator parent, ContentField field) { this.ParentView = parent; this.Parent = parent.Parent; field.CopyTo(this, "Parent"); isFilterable = field.IsFilterable; this.Field = field; Template = new ContentTemplate(); if (field.HasViewTemplate) Template.Source = field.ViewTemplate; }
/// <summary> /// Initializes a new instance of the ContentFieldRef class. /// </summary> /// <param name="parent">The parent view object.</param> /// <param name="field">The content field.</param> public ContentFieldRef(ContentViewDecorator parent, ContentField field) { this.ParentView = parent; this.Parent = parent.Parent; field.CopyTo(this, "Parent"); isFilterable = field.IsFilterable; this.Field = field; Template = new ContentTemplate(); if (field.HasViewTemplate) { Template.Source = field.ViewTemplate; } }
/// <summary> /// Initializes a new instance of ContentEditorField class. /// </summary> /// <param name="form">The form object.</param> /// <param name="field">The content field.</param> public ContentEditorField(ContentFormDecorator form, ContentField field) { this.ParentForm = form; this.Parent = form.Parent; field.CopyTo(this, "Parent"); Template = new ContentTemplate(); switch ((ContentFormTypes)form.FormType) { case ContentFormTypes.Display: if (field.HasDisplayTemlpate) { Template.Source = field.DisplayTemplate; } break; case ContentFormTypes.Activity: if (field.HasActivityTemplate) { Template.Source = field.ActivityTemplate; } break; case ContentFormTypes.Edit: if (field.HasEditTemlpate) { Template.Source = field.EditTemplate; } break; case ContentFormTypes.New: if (field.HasNewTemlpate) { Template.Source = field.NewTemplate; } break; } }