private void CheckLastPurchases()
        {
            FirebaseDatabase database = FirebaseDatabase.Instance;
            FirebaseCallback p        = new FirebaseCallback();

            p.CheckPendingPurchased(database, UserID);
            p.lastPurch += (o, data) =>
            {
                if (data.Count > 0)
                {
                    purchasesID = data[0].PurchasesID;
                    GetPending(data[0].PurchasesID);
                }
                else
                {
                    progressBar.Visibility    = ViewStates.Gone;
                    mLoaderContent.Visibility = ViewStates.Visible;
                }
            };
        }
        private void CheckLastPurchases()
        {
            progressDialog = new ProgressDialog(this);
            progressDialog.SetMessage(Resources.GetString(Resource.String.prgdlg));
            progressDialog.SetCanceledOnTouchOutside(false);
            progressDialog.SetCancelable(false);
            progressDialog.Show();

            FirebaseDatabase database = FirebaseDatabase.Instance;
            FirebaseCallback p        = new FirebaseCallback();

            p.CheckPendingPurchased(database, UserID);
            p.lastPurch += (o, data) =>
            {
                progressDialog.Hide();
                if (data.Count > 0)
                {
                    LastPurchases = data;
                    var builder = new Android.App.AlertDialog.Builder(this);
                    builder.SetTitle(Resource.String.dlg_info);
                    builder.SetMessage(Resource.String.dlg_purchases_info);
                    builder.SetPositiveButton(Resource.String.dlg_btn_continue, delegate
                    {
                        builder.Dispose();
                        DirectPurchasing(products, LastPurchases[0]);
                    });
                    builder.SetNegativeButton(Resource.String.dialog_cancel, delegate
                    {
                        builder.Dispose();
                    });

                    builder.Show();
                }
                else
                {
                    DirectPurchasing(products, null);
                }
            };
        }