示例#1
0
        private async void Delete_Tapped(object sender, EventArgs e)
        {
            using (UserDialogs.Instance.Loading(""))
            {
                try
                {
                    var        s         = (TappedEventArgs)e;
                    var        castedObj = s.Parameter as Favourite;
                    FavService fs        = new FavService();

                    bool r = await fs.DeleteFavorite(castedObj).ConfigureAwait(false);

                    if (r)
                    {
                        IntroPageViewModel ivm = new IntroPageViewModel();
                        ivm.Initializefavourites();
                    }
                }
                catch (Exception ex)
                {
                    var log = ex;
                    LogService.LogErrors(ex.ToString());
                }
            }
        }
示例#2
0
 public AppLanding()
 {
     InitializeComponent();
     try
     {
         ivm  = new IntroPageViewModel();
         mcvm = new MyCreatedCollectionViewModel();
         ivm.GetDeals();
         ivm.GetCategories();
         ivm.GetAll();
         ivm.GetAllSearchFromNewModel();
         ivm.GetAllThisWeek();
         ivm.Initializefavourites();
         mcvm.InitializeFavListNewUI();
         ThisWeek_Tapped(this, null);
         ShowSurVeyOne();
         this.BindingContext = this;
     }
     catch (Exception ex)
     {
         var log = ex;
     }
 }
示例#3
0
        private void RefreshFavourites()
        {
            IntroPageViewModel ivm = new IntroPageViewModel();

            ivm.Initializefavourites();
        }