Add() public method

public Add ( Part part, object>.Dictionary map ) : void
part Part
map object>.Dictionary
return void
示例#1
0
        private void StartPayment(Dictionary <string, object> dict, bool isSandbox)
        {
            Logger.Log("Request prepared");
            currentPurchase.Add(ActivePurchase.Part.TOKEN, dict);
            IsSandbox = isSandbox;
            if (isSimple)
            {
                CheckUnfinished();
            }
            Payment.UtilsRecieved += RecieveUtils;

            Payment.FormReceived   += (form) => ShowPaymentForm(Utils, form);
            Payment.StatusReceived += (status, form) => {
                //TODO make better solution
                FillPurchase(ActivePurchase.Part.XPS, form.GetXpsMap());
                ShowPaymentStatus(Utils.GetTranslations(), status);
            };
            Payment.ApplyCouponeCodeReceived += (form) => ApplyPromoCouponeCode(form);
            Payment.StatusChecked            += (status) => WaitingStatus(status);

            Payment.QuickPaymentMethodsRecieved += (quickpayments) => ShowQuickPaymentsList(Utils, quickpayments);
            Payment.PaymentMethodsRecieved      += ShowPaymentsList;
            Payment.SavedPaymentMethodsRecieved += ShowSavedPaymentsList;
            Payment.CountriesRecieved           += ShowCountries;

            Payment.PricepointsRecieved += (pricepoints) => ShowPricepoints(Utils, pricepoints);
            Payment.GoodsGroupsRecieved += (goods) => ShowGoodsGroups(goods);
            Payment.GoodsRecieved       += (goods) => UpdateGoods(goods);

            Payment.CustomAmountCalcRecieved += (calcRes) => UpdateCustomAmount(calcRes);

            Payment.VirtualPaymentSummaryRecieved += (summary) => ShowVPSummary(Utils, summary);
            Payment.VirtualPaymentProceedError    += (error) => ShowVPError(Utils, error);
            Payment.VirtualPaymentStatusRecieved  += (status) => ShowVPStatus(Utils, status);

            Payment.CouponProceedErrorRecived       += (proceed) => GetCouponErrorProceed(proceed);
            Payment.PaymentManagerMethods           += (savedMethods, addState) => PaymentManagerRecieved(savedMethods, addState);
            Payment.DeleteSavedPaymentMethodRespond += () => DeleteSavedPaymentMethodRecieved();
            Payment.WaitChangeSavedMethods          += () => WaitChangeSavedMethod();
            Payment.SubsManagerListRecived          += (SubsList) => SubsManagerListRecived(SubsList);

            Payment.ErrorReceived += ShowPaymentError;
            Payment.SetModeSandbox(isSandbox);
            Payment.InitPaystation(currentPurchase.GetMergedMap());
        }
 private void FillPurchase(ActivePurchase.Part part, Dictionary <string, object> items)
 {
     if (currentPurchase == null)
     {
         currentPurchase = new ActivePurchase();
         currentPurchase.Add(part, new Dictionary <string, object>(items));
     }
     else
     {
         currentPurchase.Remove(part);
         currentPurchase.Add(part, new Dictionary <string, object>(items));
     }
 }
        private void StartPayment(Dictionary <string, object> dict, bool isSandbox)
        {
            Logger.Log("Request prepared");
            currentPurchase.Add(ActivePurchase.Part.TOKEN, dict);
            IsSandbox = isSandbox;
            CheckUnfinished();
            Payment.UtilsRecieved += RecieveUtils;

            Payment.FormReceived   += (form) => ShowPaymentForm(Utils, form);
            Payment.StatusReceived += (status) => ShowPaymentStatus(Utils.GetTranslations(), status);
            Payment.StatusChecked  += (status, elapsedTime) => WaitingStatus(status, elapsedTime);

            Payment.QuickPaymentMethodsRecieved += (quickpayments) => ShowQuickPaymentsList(Utils, quickpayments);
            Payment.PaymentMethodsRecieved      += ShowPaymentsList;
            Payment.CountriesRecieved           += ShowCountries;

            Payment.PricepointsRecieved += (pricepoints) => ShowPricepoints(Utils, pricepoints);
            Payment.GoodsGroupsRecieved += (goods) => ShowGoodsGroups(goods);
            Payment.GoodsRecieved       += (goods) => UpdateGoods(goods);

            Payment.ErrorReceived += ShowPaymentError;
            Payment.SetModeSandbox(isSandbox);
            Payment.InitPaystation(currentPurchase.GetMergedMap());
        }