Exemplo n.º 1
0
        /// <summary></summary>
        public ListEntryBuilder StartEntry(IEnumerable <string> entrySelectedByType = null, IEnumerable <DisplayEntry> entrySelectedByCondition = null)
        {
            var listEntry = new ListControlEntry
            {
                EntrySelectedBy = EntrySelectedBy.Get(entrySelectedByType, entrySelectedByCondition)
            };

            _list.Entries.Add(listEntry);
            return(new ListEntryBuilder(this, listEntry));
        }
Exemplo n.º 2
0
 private ListControlEntryDefinition LoadListControlEntryDefinitionFromObjectModel(ListControlEntry listEntry, int viewIndex, string typeName)
 {
     ListControlEntryDefinition lved = new ListControlEntryDefinition();
     if (listEntry.SelectedBy.Count > 0)
     {
         lved.appliesTo = this.LoadAppliesToSectionFromObjectModel(listEntry.SelectedBy);
     }
     this.LoadListControlItemDefinitionsFromObjectModel(lved, listEntry.Items, viewIndex, typeName);
     if (lved.itemDefinitionList == null)
     {
         return null;
     }
     return lved;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Load ListEntry into ListControlEntryDefinition
        /// </summary>
        /// <param name="listEntry"></param>
        /// <param name="viewIndex"></param>
        /// <param name="typeName"></param>
        /// <returns></returns>
        private ListControlEntryDefinition LoadListControlEntryDefinitionFromObjectModel(ListControlEntry listEntry, int viewIndex, string typeName)
        {
            ListControlEntryDefinition lved = new ListControlEntryDefinition();

            // Contains:
            //   SelectedBy ---  EntrySelectedBy(TypeName)  cardinality 0..1
            //   Items      ---  ListItems                  cardinality 1
            if (listEntry.EntrySelectedBy != null)
            {
                lved.appliesTo = LoadAppliesToSectionFromObjectModel(listEntry.EntrySelectedBy.TypeNames, listEntry.EntrySelectedBy.SelectionCondition);
            }

            LoadListControlItemDefinitionsFromObjectModel(lved, listEntry.Items, viewIndex, typeName);
            if (lved.itemDefinitionList == null)
            {
                return null;
            }

            return lved;
        }
Exemplo n.º 4
0
 internal ListEntryBuilder(ListControlBuilder listBuilder, ListControlEntry listEntry)
 {
     _listBuilder = listBuilder;
     _listEntry   = listEntry;
 }
Exemplo n.º 5
0
 /// <summary></summary>
 public ListEntryBuilder StartEntry(IEnumerable<string> entrySelectedByType = null, IEnumerable<DisplayEntry> entrySelectedByCondition = null)
 {
     var listEntry = new ListControlEntry
     {
         EntrySelectedBy = EntrySelectedBy.Get(entrySelectedByType, entrySelectedByCondition)
     };
     _list.Entries.Add(listEntry);
     return new ListEntryBuilder(this, listEntry);
 }
Exemplo n.º 6
0
 internal ListEntryBuilder(ListControlBuilder listBuilder, ListControlEntry listEntry)
 {
     _listBuilder = listBuilder;
     _listEntry = listEntry;
 }