public void OnClick(IDialogInterface dialog, int which)
 {
     if (AppStatus.UserLogged.ContainsTraps())
     {
         homeActivity.OnSectionAttached(HomeActivity.PLANT_MENU_INDEX);
     }
     else
     {
         homeActivity.OnSectionAttached(HomeActivity.BUY_MENU_INDEX);
     }
 }
Пример #2
0
        private async void LoadTraps()
        {
            try
            {
                var response = await PurchaseApiService.ListAvailableTraps();

                if (response != null)
                {
                    availableTraps = response;

                    LoadGooglePrices();
                }
                else
                {
                    progressDialog.Cancel();

                    HomeActivity homeActivity = (HomeActivity)Activity;
                    homeActivity.OnSectionAttached(HomeActivity.HOME_MENU_INDEX, true);
                }

                if (!AppStatus.UserLogged.ContainsTraps())
                {
                    lbl_title_my_traps.Visibility = ViewStates.Gone;
                }
            }
            catch (Exception exception)
            {
                InsightsUtils.LogException(exception);
            }
        }
Пример #3
0
 public void OnClick(IDialogInterface dialog, int which)
 {
     if (homeActivity == null)
     {
         if (which == -1)
         {
             armFragment.SendArmedTrap();
         }
     }
     else
     {
         homeActivity.OnSectionAttached(HomeActivity.HOME_MENU_INDEX, true);
     }
 }
Пример #4
0
        private async void BillingHandler_OnProductPurchased(int response, Purchase purchase, string purchaseData, string purchaseSignature)
        {
            var result = await RegisterPurchase(pendingBuyIntent);

            if (result)
            {
                _serviceConnection.BillingHandler.ConsumePurchase(purchase);
            }

            HomeActivity homeActivity = (HomeActivity)Activity;

            homeActivity.OnSectionAttached(HomeActivity.HOME_MENU_INDEX, true);

            progressDialog.Cancel();
        }
Пример #5
0
        private void Btn_home_arm_Click(object sender, EventArgs e)
        {
            HomeActivity homeActivity = (HomeActivity)Activity;

            homeActivity.OnSectionAttached(HomeActivity.PLANT_MENU_INDEX);
        }