Exemple #1
0
            public async T.Task InitMaster(string userId)
            {
                await InitCategories(userId);

                MenuItems = new ObservableCollection <Page>();
                // All category
                var allCategories = await TasksAndMenuDetail.Create(userId, null, true);

                MenuItems.Add(allCategories);
                // Other categories
                foreach (var category in categories)
                {
                    var otherCategory = await TasksAndMenuDetail.Create(userId, category.IdCategory, false);

                    MenuItems.Add(otherCategory);
                }
                // Create category
                MenuItems.Add(new CreateCategoryPage(userId));
                // Change categories
                MenuItems.Add(new ChangesCategoryPage(userId));
                // Map
                MenuItems.Add(new MapPage());
                // Settings
                MenuItems.Add(new Settings(userId));
            }
Exemple #2
0
        // private ArrayMap<Integer, String> menuCategory = new ArrayMap<>();
        //private Menu subMenu;
        #endregion

        public static async T.Task <TasksAndMenuDetail> Create(string userId, int?categoryId, bool all = false)
        {
            var page = new TasksAndMenuDetail();

            page.Set(userId, categoryId, all);
            await page.InitPage();

            return(page);
        }