예제 #1
0
 private async void Recipiestxtblck_Tapped(object sender, TappedRoutedEventArgs e)
 {
     this.loadingModal();
     Responsef2f response = new Responsef2f();
     Bussiness.Recipef2f responseRecipe = new Bussiness.Recipef2f();
     String responseString = await response.getData(1);
     List<Model.ResponseRecipef2f> recipeList;
     List<Model.Recipef2f> recipeFinalList = new List<Model.Recipef2f>();
     recipeList = response.parseResponse(responseString);
     foreach (Model.ResponseRecipef2f recipe in recipeList)
     {
         Model.Recipef2f recipeModel = new Model.Recipef2f();
         recipeModel = await responseRecipe.getRecipe(recipe.RecipeId);
         recipeFinalList.Add(recipeModel);
     }
     this.ReloadScreen();
     Frame.Navigate(typeof(ShowRecipies), recipeFinalList);
 }
예제 #2
0
        private async void pvtRecipes_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if ((pvtRecipes.SelectedIndex + 27) % 10 == 0)
            {
                page++;
                Bussiness.Responsef2f response       = new Bussiness.Responsef2f();
                Bussiness.Recipef2f   responseRecipe = new Bussiness.Recipef2f();
                String responseString = await response.getData(page);

                List <Model.ResponseRecipef2f> recipeList;
                //List<Model.Recipef2f> recipeFinalList = new List<Model.Recipef2f>();
                recipeList = response.parseResponse(responseString);
                foreach (Model.ResponseRecipef2f recipe in recipeList)
                {
                    Model.Recipef2f recipeModel = new Model.Recipef2f();
                    recipeModel = await responseRecipe.getRecipe(recipe.RecipeId);

                    recipeFinalList.Add(recipeModel);
                }
                this.populateRecipes();
            }
        }
예제 #3
0
        private async void Searchblck_Tapped(object sender, TappedRoutedEventArgs e)
        {
            string query = "&q=";

            for (int i = 0; i <= numIngredients; i++)
            {
                var myTextBox = (TextBox)this.FindName("Ingredient" + i.ToString());
                if (myTextBox.Text != null)
                {
                    if (i == numIngredients)
                    {
                        query += myTextBox.Text;
                    }
                    else
                    {
                        query += myTextBox.Text + ",";
                    }
                }
            }
            this.loadingModal();
            Bussiness.Responsef2f response = new Bussiness.Responsef2f();
            response.StringUri = response.StringUri + query;
            Bussiness.Recipef2f responseRecipe = new Bussiness.Recipef2f();
            String responseString = await response.getData(1);

            List <Model.ResponseRecipef2f> recipeList;
            List <Model.Recipef2f>         recipeFinalList = new List <Model.Recipef2f>();

            recipeList = response.parseResponse(responseString);
            foreach (Model.ResponseRecipef2f recipe in recipeList)
            {
                Model.Recipef2f recipeModel = new Model.Recipef2f();
                recipeModel = await responseRecipe.getRecipe(recipe.RecipeId);

                recipeFinalList.Add(recipeModel);
            }
            this.reloadScreen();
            Frame.Navigate(typeof(ShowRecipies), recipeFinalList);
        }
예제 #4
0
        private async void Recipiestxtblck_Tapped(object sender, TappedRoutedEventArgs e)
        {
            this.loadingModal();
            Responsef2f response = new Responsef2f();

            Bussiness.Recipef2f responseRecipe = new Bussiness.Recipef2f();
            String responseString = await response.getData(1);

            List <Model.ResponseRecipef2f> recipeList;
            List <Model.Recipef2f>         recipeFinalList = new List <Model.Recipef2f>();

            recipeList = response.parseResponse(responseString);
            foreach (Model.ResponseRecipef2f recipe in recipeList)
            {
                Model.Recipef2f recipeModel = new Model.Recipef2f();
                recipeModel = await responseRecipe.getRecipe(recipe.RecipeId);

                recipeFinalList.Add(recipeModel);
            }
            this.ReloadScreen();
            Frame.Navigate(typeof(ShowRecipies), recipeFinalList);
        }
 private async void pvtRecipes_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if((pvtRecipes.SelectedIndex+27) % 10 == 0)
     {
         page++;
         Bussiness.Responsef2f response = new Bussiness.Responsef2f();
         Bussiness.Recipef2f responseRecipe = new Bussiness.Recipef2f();
         String responseString = await response.getData(page);
         List<Model.ResponseRecipef2f> recipeList;
         //List<Model.Recipef2f> recipeFinalList = new List<Model.Recipef2f>();
         recipeList = response.parseResponse(responseString);
         foreach (Model.ResponseRecipef2f recipe in recipeList)
         {
             Model.Recipef2f recipeModel = new Model.Recipef2f();
             recipeModel = await responseRecipe.getRecipe(recipe.RecipeId);
             recipeFinalList.Add(recipeModel);
         }
         this.populateRecipes();
     }
 }
 private async void Searchblck_Tapped(object sender, TappedRoutedEventArgs e)
 {
     string query = "&q=";
     for(int i = 0; i <= numIngredients; i++)
     {
         var myTextBox = (TextBox)this.FindName("Ingredient" + i.ToString());
         if(myTextBox.Text != null)
         {
             if (i == numIngredients)
                 query += myTextBox.Text;
             else
                 query += myTextBox.Text + ",";
         }
     }
     this.loadingModal();
     Bussiness.Responsef2f response = new Bussiness.Responsef2f();
     response.StringUri = response.StringUri + query;
     Bussiness.Recipef2f responseRecipe = new Bussiness.Recipef2f();
     String responseString = await response.getData(1);
     List<Model.ResponseRecipef2f> recipeList;
     List<Model.Recipef2f> recipeFinalList = new List<Model.Recipef2f>();
     recipeList = response.parseResponse(responseString);
     foreach (Model.ResponseRecipef2f recipe in recipeList)
     {
         Model.Recipef2f recipeModel = new Model.Recipef2f();
         recipeModel = await responseRecipe.getRecipe(recipe.RecipeId);
         recipeFinalList.Add(recipeModel);
     }
     this.reloadScreen();
     Frame.Navigate(typeof(ShowRecipies), recipeFinalList);
 }