protected override void OnSetEvents(Cell cell, ITableCellViewModel model)
        {
            base.OnSetEvents(cell, model);
            var entryCellViewModel = model as IEntryCellViewModel;

            SetEvents(cell, entryCellViewModel);
        }
Esempio n. 2
0
        private void RemoveCell(TableSection section, ITableCellViewModel cell)
        {
            var cellView = _tableCellViewModelMap[cell];

            _tableCellViewModelMap.Remove(cell);
            _tableCellReverseViewModelMap.Remove(cellView);
            section.Remove(cellView);
        }
Esempio n. 3
0
        private void AddCell(TableSection section, ITableCellViewModel cell, int index)
        {
            var cellView = _cellFactory.CreateCellView(cell);

            _tableCellViewModelMap.Add(cell, cellView);
            _tableCellReverseViewModelMap.Add(cellView, cell);
            section.Insert(index, cellView);
        }
Esempio n. 4
0
        public Cell CreateCellView(ITableCellViewModel arg)
        {
            if (arg == null)
            {
                throw new ArgumentNullException(nameof(arg));
            }
            _logger.WriteDebug($"TableCellFactory: Creating cell for cell type '{arg.CellType}'...");
            var factory = _container.Resolve <ICellFactory>(arg.CellType);

            return(factory.Create(arg));
        }
Esempio n. 5
0
        protected override Cell OnCreate(ITableCellViewModel model)
        {
            var castModel = model as TModel;

            if (castModel == null)
            {
                throw new NotSupportedException("Cannot cast to the correct view model type.");
            }

            return(OnCreateCell(castModel));
        }
Esempio n. 6
0
        private int VisibleIndexOf(ObservableCollection <ITableCellViewModel> cells, ITableCellViewModel cell)
        {
            var actualIndex = cells.Where(s => s.IsVisible).ToList();

            return(actualIndex.IndexOf(cell));
        }
Esempio n. 7
0
 public int CompareTo(ITableCellViewModel other)
 {
     return(0);
 }
Esempio n. 8
0
 protected override Cell OnCreate(ITableCellViewModel model)
 {
     return(new DatePickerCell());
 }
Esempio n. 9
0
 public bool Contains(ITableCellViewModel cell)
 {
     return(Cells.Contains(cell));
 }
Esempio n. 10
0
 public void Remove(ITableCellViewModel cell)
 {
     Cells.Remove(cell);
 }