Пример #1
0
        public BasicListViewModel(AbstractListDataDeveloper dd, BasicListConfiguration conf, Action <object> click = null)
        {
            this.DisplayCollection = new List <TemplateClass>();
            this.DataDeveloper     = dd;

            this.ActualPage        = 1;
            this.AmountOfPages     = (int)Math.Ceiling((double)this.DataDeveloper.GetAmountOfRecords() / 10);
            this.DisplayCollection = TemplateConverter.Convert <TemplateClass>(this.DataDeveloper.LoadData(1));

            if (click != null)
            {
                this._contextMenuCommand = new RelayCommand(click);
            }

            this.DetailsConfiguration = new BasicDetailsControlConfiguration();

            this.Configuration = conf;
        }
Пример #2
0
        public BasicListViewModel(AbstractListDataDeveloper dd, AbstractDetailsComponent detailsClass, BasicListConfiguration conf, BasicDetailsControlConfiguration detailsConf)
        {
            this.DisplayCollection = new List <TemplateClass>();
            this.DetailsControl    = detailsClass;
            this.DataDeveloper     = dd;

            this.ActualPage        = 1;
            this.AmountOfPages     = (int)Math.Ceiling((double)this.DataDeveloper.GetAmountOfRecords() / 10);
            this.DisplayCollection = TemplateConverter.Convert <TemplateClass>(this.DataDeveloper.LoadData(1));

            this.DetailsConfiguration = detailsConf;

            this.Configuration = conf;
        }