예제 #1
0
        protected override void OnAsyncCommitCompleted(bool success)
        {
            base.OnAsyncCommitCompleted(success);
            if (!success)
            {
                return;
            }
            BillingOffer selectedBillingOffer = this.State.SelectBillingOfferStep.SelectedBillingOffer;

            if (selectedBillingOffer != null)
            {
                if (selectedBillingOffer.OfferType == EBillingOfferType.Points)
                {
                    this._finishStep.ClosingMessage = string.Format(Shell.LoadString(StringId.IDS_BILLING_BUY_POINTS_SUCCESS), selectedBillingOffer.Points);
                }
                else
                {
                    this._finishStep.ClosingMessage = string.Format(Shell.LoadString(StringId.IDS_BILLING_BUY_PASS_SUCCESS), selectedBillingOffer.OfferName);
                }
            }
            else
            {
                this._finishStep.ClosingMessage = Shell.LoadString(StringId.IDS_ACCOUNT_PURCHASE_SUCCESS_DESC);
            }
        }
예제 #2
0
        public static bool IsSubscribed(BillingOffer offer)
        {
            bool flag = false;

            if (offer != null && ZuneApplication.Service.IsSignedInWithSubscription())
            {
                flag = (long)SignIn.Instance.SubscriptionId == (long)offer.Id;
            }
            return(flag);
        }
예제 #3
0
        public void Purchase(BillingOffer billingOffer, PaymentInstrument paymentInstrument)
        {
            this.ErrorCode = HRESULT._S_OK;
            if (billingOffer == null)
            {
                return;
            }
            AsyncCompleteHandler callback = billingOffer.OfferType != EBillingOfferType.Points ? new AsyncCompleteHandler(this.OnPurchaseSubscriptionComplete) : new AsyncCompleteHandler(this.OnPurchasePointsComplete);

            ZuneApplication.Service.PurchaseBillingOffer(billingOffer, paymentInstrument, callback);
        }
예제 #4
0
 public int PurchaseBillingOffer(BillingOffer offer, PaymentInstrument paymentInstrument)
 {
     throw new NotImplementedException();
 }
예제 #5
0
 public int PurchaseBillingOffer(BillingOffer offer, PaymentInstrument paymentInstrument, AsyncCompleteHandler callback)
 {
     throw new NotImplementedException();
 }