Example #1
0
        public async void LoadButtons()
        {
            List <string> buttonList = await JsonSerilizer.GetButtons();

            foreach (string button in buttonList)
            {
                CategoryButtons.Add(button);
            }

            LoadProductsFromFile(CategoryButtons[0]);
        }
Example #2
0
        public async static void LoadProductsFromFile(string fileName)
        {
            LoadedProducts.Clear();

            ObservableCollection <Product> loading = await JsonSerilizer.ReadProducts(fileName);

            foreach (Product product in loading)
            {
                LoadedProducts.Add(product);
            }
        }