Ejemplo n.º 1
0
 private async void Form1_Load(object sender, EventArgs e)
 {
     panel.Hide();
     if (UserManager.getInstance().IsLoogedin())
     {
         logout_btn.Visible = true;
         loginBtn.Visible   = false;
     }
     else
     {
         loginBtn.Visible   = true;
         logout_btn.Visible = false;
     }
     UserManager.getInstance().readUsers();
     rrm = new RecipeReviewManager();
     rrm.readReviews();
     rsm = new CachedRecipesAPIHelper(new RecipesAPIHelper());
     recipeController = new RecipeController(await rsm.fetchRandomRecipesAsync(), dgv1);
 }
Ejemplo n.º 2
0
 public CachedRecipesAPIHelper(RecipeStorageManager rsm)
 {
     service = rsm;
     cache   = new Dictionary <string, List <Recipe> >();
 }