Wire up the views.
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace zaaReloaded2.Controller.Elements
|
||||
{
|
||||
@ -29,19 +30,29 @@ namespace zaaReloaded2.Controller.Elements
|
||||
/// Gets a list of child elements, all of which must be derived
|
||||
/// from FormatElementBase.
|
||||
/// </summary>
|
||||
public IList<FormatElementBase> FormatElements { get; private set; }
|
||||
public IList<FormatElementBase> Children { get; internal set; }
|
||||
|
||||
public ControlElementBase()
|
||||
: this(new List<FormatElementBase>())
|
||||
{ }
|
||||
|
||||
public ControlElementBase(IList<FormatElementBase> formatElements)
|
||||
public ControlElementBase(IList<FormatElementBase> children)
|
||||
{
|
||||
FormatElements = formatElements;
|
||||
Children = children;
|
||||
}
|
||||
|
||||
public ControlElementBase(FormatElementBase formatElement)
|
||||
: this(new List<FormatElementBase>() { formatElement })
|
||||
public ControlElementBase(FormatElementBase children)
|
||||
: this(new List<FormatElementBase>() { children })
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a clone of the Children list (for use in cloning
|
||||
/// derived classes).
|
||||
/// </summary>
|
||||
/// <returns>Clone of the Children list.</returns>
|
||||
protected IList<FormatElementBase> CloneChildren()
|
||||
{
|
||||
return Children.Select(child => child.Clone() as FormatElementBase).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user