예제 #1
0
        public bool SelectElementPreviousOf(ListState list)
        {
            var index = GetIndex(list);

            if (index < 0)
            {
                return(false);
            }

            _elements[index].Focus = true;
            StateHasChanged?.Invoke(this, new System.EventArgs());

            return(true);
        }
예제 #2
0
        private void FillEntities(IEnumerable <IEntity> entities, ListState listState, IEnumerable <IEntity> parentEntities)
        {
            foreach (var entity in entities)
            {
                var parents = parentEntities.Append(entity);

                var element = new ListElement <IEntity>(entity);

                listState._elements.Add(element);

                if (entity.SubEntities != null)
                {
                    element.NestedList = new ListState(_entityService, entity, parents, listState);
                    FillEntities(entity.SubEntities, element.NestedList, parents);
                }
            }
        }