Пример #1
0
        /// <summary>
        /// Gets the Show spinner items.
        /// </summary>
        /// <returns>ShowSelectedItemModel collection.</returns>
        public ObservableCollection <ShowSelectedItemModel> GetShowSpinnerItems()
        {
            ObservableCollection <ShowSelectedItemModel> collection = new ObservableCollection <ShowSelectedItemModel>();

            foreach (var realRiderData in realRiderDataProvider.RealRiderListPageItem.ShowItemsList)
            {
                ShowSelectedItemModel model = new ShowSelectedItemModel();
                model.ShowSelectedItemText = realRiderData;
                collection.Add(model);
            }
            return(collection);
        }
        /// <summary>
        /// Load the page when app starts.
        /// </summary>
        public void PageLoad()
        {
            RealRiderListItems = new ObservableCollection <RealRiderListItemModel>();
            ShowSelectedItem   = new ShowSelectedItemModel();
            WhereSelectedItem  = new WhereSelectionItemModel();

            var rrItems = realRiderMainService.GetRealRiderListItems();

            foreach (var item in rrItems)
            {
                RealRiderListItems.Add(item);
            }

            ShowItems = realRiderMainService.GetShowSpinnerItems();
            ShowSelectedItem.ShowSelectedItemText = ShowItems.FirstOrDefault().ShowSelectedItemText;

            WhereItems        = realRiderMainService.GetWhereSpinnerItems();
            WhereSelectedItem = WhereItems.FirstOrDefault();
        }