Beispiel #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());
                }
            }
        }
Beispiel #2
0
 public AppLanding()
 {
     InitializeComponent();
     ivm = new IntroPageViewModel();
     ivm.GetDeals();
     ivm.GetCategories();
     ivm.GetAll();
     Deals_Tapped(this, null);
     //ShowSurVeyOne();
 }
Beispiel #3
0
 public ThisWeek()
 {
     InitializeComponent();
     RefreshListView();
     ivm  = new IntroPageViewModel();
     days = new List <string>()
     {
         "ALL", "MON", "TUE", "WED", "THUR", "FRI", "SAT", "SUN"
     };
     segment.Children = days;
 }
Beispiel #4
0
 private void RefreshCategoryListView()
 {
     ListCategories.RefreshCommand = new Command(() =>
     {
         IntroPageViewModel ivmm = new IntroPageViewModel();
         ivmm.GetCategories();
         ivmm.GetDeals();
         ivmm.GetAll();
         this.BindingContext         = ivmm;
         ListCategories.IsRefreshing = false;
     });
 }
Beispiel #5
0
        //private void RefreshListView()
        //{
        //    dealsListview.RefreshCommand = new Command(()=>

        //    {
        //        IntroPageViewModel vm = new IntroPageViewModel();
        //        vm.GetDeals();
        //        this.BindingContext = vm;
        //        dealsListview.IsRefreshing = false;
        //    });
        //}

        private void RefreshListView()
        {
            dealsListview.RefreshCommand = new Command(() =>

            {
                IntroPageViewModel vm = new IntroPageViewModel();
                vm.GetDeals();
                vm.GetCategories();
                vm.GetAll();
                this.BindingContext        = vm;
                dealsListview.IsRefreshing = false;
            });
        }
Beispiel #6
0
        public Form1()
        {
            InitializeComponent();

            var wizardView        = new WizardViewWidget();
            var secondPage        = new PageExample(null, "second page");
            var firstPage         = new PageExample(secondPage, "first page");
            var localInstancePage = new LocalServerPickerPage(new LocalServerPickerWidget(), firstPage,
                                                              new TestConnection(), new GetLocalInstances());
            var introPage = new IntroPageViewModel(new IntroPageWidget(), localInstancePage);

            new WizardViewModel(wizardView, introPage, cancel, cancel);

            Controls.Add(wizardView);
        }
Beispiel #7
0
 public AppLanding()
 {
     InitializeComponent();
     try
     {
         ivm = new IntroPageViewModel();
         ivm.GetDeals();
         ivm.GetCategories();
         ivm.GetAll();
         ivm.GetAllSearchFromNewModel();
         ivm.GetAllThisWeek();
         Deals_Tapped(this, null);
         ShowSurVeyOne();
     }
     catch (Exception ex)
     {
         var log = ex;
     }
 }
Beispiel #8
0
        private void RefreshListView()
        {
            dealsListview.RefreshCommand = new Command(async() =>

            {
                ivm = new IntroPageViewModel();
                ivm.GetDeals();
                ivm.GetCategories();
                ivm.GetAll();
                // await Task.Delay(3000);
                ivm.GetAllThisWeek();

                var groupByDate = GroupListByDate();
                //GlobalStaticFields.GetAllGrouping = groupByDate;
                BindingContext = groupByDate;
                await Task.Delay(3000);
                dealsListview.IsRefreshing = false;
            });
        }
Beispiel #9
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;
     }
 }
Beispiel #10
0
        private void RefreshFavourites()
        {
            IntroPageViewModel ivm = new IntroPageViewModel();

            ivm.Initializefavourites();
        }
Beispiel #11
0
        public IntroPage()
        {
            InitializeComponent();

            BindingContext = viewModel = new IntroPageViewModel();
        }
Beispiel #12
0
        public IntroPage()
        {
            InitializeComponent();

            BindingContext = new IntroPageViewModel(Navigation);
        }