private void CreateStorePrefab(StoreInfo info)
    {
        GameObject newGo = GameObject.Instantiate(StoreInfoPrefab);

        newGo.transform.SetParent(StoreInfoContent);
        newGo.transform.SetAsLastSibling();
        newGo.transform.localScale = Vector3.one;
        StoreInfoPrefabInfo prefabInfo = newGo.GetComponent <StoreInfoPrefabInfo>();

        prefabInfo.SetValue(info);
        storeInfoPrefabList.Add(prefabInfo);
        newGo.SetActive(true);
    }
Example #2
0
        public StoreInfo GetCurrentStore(HttpRequestBase request)
        {
            StoreInfo  result      = null;
            HttpCookie storeCookie = request.Cookies[COOKIE_STORE];

            if (storeCookie != null)
            {
                result           = new StoreInfo();
                result.StoreName = storeCookie.Values[COOKIE_STORE_STORENAME];
                result.StoreCode = storeCookie.Values[COOKIE_STORE_STORECODE];
            }
            return(result);
        }
Example #3
0
 public void Add(StoreInfo item)
 {
     if (db.StoreInfo.Any(e => e.StoreId == item.StoreId))
     {
         Console.WriteLine("Store with this store id exists");
     }
     else
     {
         db.StoreInfo.Add(item);
         db.SaveChanges();
         Console.WriteLine("Store craeted successfully");
     }
 }
Example #4
0
        //================================================================================
        // Site Areas
        //================================================================================

        public List <SiteArea> SiteAreasForStoreCode(String storecode)
        {
            List <SiteArea>  result = null;
            List <StoreInfo> stores = this.GetStoreInfoByStoreCode(storecode);

            if (stores.Count > 0)
            {
                StoreInfo      info           = stores.First();
                ProductService productService = WebServiceUtils.GetEndpointService <ProductService>(ProductServiceInfo.ENDPOINT_NAME);
                result = productService.SiteAreasForStoreCode(info);
            }
            return(result);
        }
 public ManageStoreViewModel(StoreInfo store)
 {
     if (store == null)
     {
         Store           = null;
         IsDeleteVisible = Visibility.Collapsed;
     }
     else
     {
         Store           = store;
         IsDeleteVisible = Visibility.Visible;
     }
 }
Example #6
0
        /// <summary>
        /// Get gateway settings
        /// </summary>
        /// <param name="portalID">The current portal ID</param>
        /// <returns>Gateway settings</returns>
        public string GetSettings(int portalID)
        {
            string gatewaySettings = string.Empty;

            StoreInfo storeInfo = StoreController.GetStoreInfo(portalID);

            if (storeInfo != null)
            {
                gatewaySettings = storeInfo.GatewaySettings;
            }

            return(gatewaySettings);
        }
Example #7
0
        public ActionResult SetStoreAdminer(int storeId = -1)
        {
            StoreInfo storeInfo = AdminStores.GetStoreById(storeId);

            if (storeInfo == null)
            {
                return(PromptView("店铺不存在"));
            }

            StoreAdminerModel model = new StoreAdminerModel();

            return(View(model));
        }
Example #8
0
 public StoreWPF GetStoreInfo(int StoreID)
 {
     try
     {
         StoreInfo store = lck.GetStoreInfoByID(StoreID);
         return(new StoreWPF(store));
     }
     catch (Exception ex)
     {
         Log("GetStoreInfo(int) - Error msg:" + ex.Message);
         return(null);
     }
 }
Example #9
0
 private void buttonUpdateStore_Click(object sender, EventArgs e)
 {
     if (lvStoreList.SelectedItems.Count > 0)
     {
         int             storeId         = Convert.ToInt32(lvStoreList.SelectedItems[0].SubItems[1].Text);
         StoreInfo       storeTemp       = storeDal.StoreSelectById(storeId);
         UpdateStoreForm updateStoreForm = new UpdateStoreForm(storeTemp);
         updateStoreForm.ShowDialog();
     }
     else
     {
         MessageBox.Show("请先选择要修改的店铺");
     }
 }
Example #10
0
        public override void RefreshSecondaryData()
        {
            if (_delivery.OidAlmacen != 0)
            {
                _delivery_store = StoreInfo.Get(_delivery.OidAlmacen, false, true);
            }
            PgMng.Grow();

            if (_delivery.OidExpediente != 0)
            {
                _delivery_expedient = ExpedientInfo.Get(_delivery.OidExpediente, false, true);
            }
            PgMng.Grow();
        }
Example #11
0
        /**
         * @{inheritDoc}
         */
        public override int give(int amount, bool notify)
        {
            VirtualCurrency currency = null;

            try {
                currency = (VirtualCurrency)StoreInfo.getVirtualItem(mCurrencyItemId);
            } catch (VirtualItemNotFoundException e) {
                SoomlaUtils.LogError(TAG, "VirtualCurrency with itemId: " + mCurrencyItemId
                                     + " doesn't exist! Can't give this pack." + " " + e.Message);
                return(0);
            }
            return(StorageManager.getVirtualCurrencyStorage().add(
                       currency, mCurrencyAmount * amount, notify));
        }
Example #12
0
        /**
         * Handles a cancelled purchase by either posting an event containing a
         * <code>PurchasableVirtualItem</code> corresponding to the given purchase, or an unexpected
         * error event if the item was not found.
         *
         * @param purchase cancelled purchase to handle.
         */
        private void handleCancelledPurchase(String productId, bool error)
        {
            SoomlaUtils.LogDebug(TAG, "TODO handleCancelledPurchase");

            try {
                PurchasableVirtualItem v = StoreInfo.getPurchasableItem(productId);
                StoreEvents.GetInstance().PostMarketPurchaseCancelledEvent(v);
            } catch (VirtualItemNotFoundException e) {
                SoomlaUtils.LogError(TAG, "(purchaseActionResultCancelled) ERROR : Couldn't find the "
                                     + "VirtualCurrencyPack OR MarketItem  with productId: " + productId
                                     + ". It's unexpected so an unexpected error is being emitted.");
                StoreEvents.GetInstance().PostUnexpectedStoreErrorEvent(e.Message);
            }
        }
Example #13
0
        /**
         * Takes upgrade from the user, or in other words DOWNGRADES the associated
         * <code>VirtualGood</code> (mGood).
         * Checks if the current Upgrade is really associated with the <code>VirtualGood</code> and:
         *
         *   if YES - downgrades to the previous upgrade (or remove upgrades in case of null).
         *   if NO  - returns 0 (does nothing).
         *
         * @param amount is NOT USED HERE!
         * @param notify see parent
         * @return see parent
         */
        public override int take(int amount, bool notify)
        {
            VirtualGood good = null;

            try {
                good = (VirtualGood)StoreInfo.getVirtualItem(mGoodItemId);
            } catch (VirtualItemNotFoundException e) {
                SoomlaUtils.LogError(TAG, "VirtualGood with itemId: " + mGoodItemId
                                     + " doesn't exist! Can't downgrade." + " " + e.Message);
                return(0);
            }

            UpgradeVG upgradeVG = StorageManager.getVirtualGoodsStorage().getCurrentUpgrade(good);

            // Case: Upgrade is not assigned to this Virtual Good
            if (upgradeVG != this)
            {
                SoomlaUtils.LogError(TAG, "You can't take an upgrade that's not currently assigned."
                                     + "The UpgradeVG " + getName() + " is not assigned to " + "the VirtualGood: "
                                     + good.getName());
                return(0);
            }

            if (!String.IsNullOrEmpty(mPrevItemId))
            {
                UpgradeVG prevUpgradeVG = null;
                // Case: downgrade is not possible because previous upgrade does not exist
                try {
                    prevUpgradeVG = (UpgradeVG)StoreInfo.getVirtualItem(mPrevItemId);
                } catch (VirtualItemNotFoundException e) {
                    SoomlaUtils.LogError(TAG, "Previous UpgradeVG with itemId: " + mPrevItemId
                                         + " doesn't exist! Can't downgrade." + " " + e.Message);
                    return(0);
                }
                // Case: downgrade is successful!
                SoomlaUtils.LogDebug(TAG, "Downgrading " + good.getName() + " to: "
                                     + prevUpgradeVG.getName());
                StorageManager.getVirtualGoodsStorage().assignCurrentUpgrade(good,
                                                                             prevUpgradeVG, notify);
            }

            // Case: first Upgrade in the series - so we downgrade to NO upgrade.
            else
            {
                SoomlaUtils.LogDebug(TAG, "Downgrading " + good.getName() + " to NO-UPGRADE");
                StorageManager.getVirtualGoodsStorage().removeUpgrades(good, notify);
            }

            return(base.take(amount, notify));
        }
Example #14
0
        public ActionResult AddStoreShipTemplate(int storeId = -1)
        {
            StoreInfo storeInfo = AdminStores.GetStoreById(storeId);

            if (storeInfo == null)
            {
                return(PromptView("店铺不存在"));
            }

            AddStoreShipTemplateModel model = new AddStoreShipTemplateModel();

            ViewData["referer"] = MallUtils.GetMallAdminRefererCookie();
            return(View(model));
        }
Example #15
0
        public ViewResult AddStoreClass(int storeId = -1)
        {
            StoreInfo storeInfo = AdminStores.GetStoreById(storeId);

            if (storeInfo == null)
            {
                return(PromptView("店铺不存在"));
            }

            StoreClassModel model = new StoreClassModel();

            LoadStoreClass(storeId);
            return(View(model));
        }
 /// <summary>
 /// 分页查询
 /// </summary>
 /// <param name="page"></param>
 /// <returns></returns>
 private void Query(int page)
 {
     try
     {
         SetDisbale(page);
         GridRoadManager.Title = GetLangStr("OneLisenceMulCar37", "当前") + (page + 1).ToString() + GetLangStr("OneLisenceMulCar38", "页,共") + totalpage.Value.ToString() + GetLangStr("OneLisenceMulCar39", "页");
         string _hphm;
         if (txtplate.Text != null && txtplate.Text != "")
         {
             _hphm = cboplate.VehicleText + txtplate.Value.ToString();
         }
         else
         {
             _hphm = "";
         }
         DataSet ds = bll.GetOneLisenceMulCarData(startdate, enddate, _hphm, page * 15, 15);
         dt_tp = bll.GetTpcl(startdate, enddate, _hphm);
         if (ds != null && ds.Tables[0].Rows.Count > 0)
         {
             StoreInfo.DataSource = ds.Tables[0];
             StoreInfo.DataBind();
             page = 0;
             hphm = ds.Tables[0].Rows[0]["hphm"].ToString();
             hpzl = ds.Tables[0].Rows[0]["hpzl"].ToString();
             RowSelectionModel sm = this.GridRoadManager.SelectionModel.Primary as RowSelectionModel;
             sm.SelectedRows.Clear();
             sm.SelectedRows.Add(new SelectedRow(0));
             sm.UpdateSelection();
             //showimg(1);
             SelectRow(hphm, hpzl);
         }
         else
         {
             this.Store1.DataSource = CreateTable();
             this.Store1.DataBind();
             StoreInfo.RemoveAll();
             StoreInfo.DataBind();
             this.lblCurpage.Text   = "1";
             this.lblAllpage.Text   = "0";
             this.lblRealcount.Text = "0";
             Notice(GetLangStr("OneLisenceMulCar31", "提示"), GetLangStr("OneLisenceMulCar36", "无套牌信息!"));
         }
     }
     catch (Exception ex)
     {
         ILog.WriteErrorLog(ex);
         logManager.InsertLogError("OneLisenceMulCar.aspx-Query", ex.Message + ";" + ex.StackTrace, "Query has an exception");
     }
 }
Example #17
0
 /// <summary>
 /// 场景点击投资弹框Todo:增加信息
 /// </summary>
 private void SceneInvestOnclick(string inType)
 {
     if (inType == "11" || inType == "21")
     {
         personGameObject.SetActive(false);
         componeyGameObject.SetActive(false);
         exactGameObject.SetActive(true);
         exactTax.text = CacheData.Instance().InvestData[inType].quotaTax.ToString("0.##%");;
     }
     else
     {
         personGameObject.SetActive(true);
         componeyGameObject.SetActive(true);
         exactGameObject.SetActive(false);
         personTax.text   = CacheData.Instance().InvestData[inType].personTax.ToString("0.##%");
         componeyTax.text = CacheData.Instance().InvestData[inType].enterpriseTax.ToString("0.##%");
     }
     imageStoreMenu.sprite = Resources.Load("UI/investImg/" + inType + "大@2x", typeof(Sprite)) as Sprite;
     imageStoreMenu.SetNativeSize();
     storeInfo                  = dicStores[inType];
     storeName.text             = storeInfo.投资名称;
     expectGetInterestTime.text = LanguageService.Instance.GetStringByKey("resultTime", string.Empty)
                                  .Replace("resultTime", CacheData.Instance().InvestData[inType].resultTime);
     investUSDT.text = CacheData.Instance().InvestData[inType].investMoney.ToString("#0.00");
     proIncome.text  = CacheData.Instance().InvestData[inType].expectIncome.ToString("#0.00");
     if (CacheData.Instance().InvestData[inType].openState == "Y")
     {
         btnExtract.gameObject.SetActive(true);
         UpdataState(btnExtract, CacheData.Instance().InvestData[inType].state, CacheData.Instance().InvestData[inType].investId.ToString());
         if (CacheData.Instance().InvestData[inType].state == 703)
         {
             amountIncome.gameObject.transform.parent.gameObject.SetActive(true);
             extractable.gameObject.transform.parent.gameObject.SetActive(true);
             extractable.text  = CacheData.Instance().InvestData[inType].extractable.ToString();
             amountIncome.text = CacheData.Instance().InvestData[inType].incomeLeft.ToString();
         }
         else
         {
             amountIncome.gameObject.transform.parent.gameObject.SetActive(false);
             extractable.gameObject.transform.parent.gameObject.SetActive(false);
         }
     }
     else
     {
         btnExtract.gameObject.SetActive(false);
         amountIncome.gameObject.transform.parent.gameObject.SetActive(false);
         extractable.gameObject.transform.parent.gameObject.SetActive(false);
     }
 }
Example #18
0
        public void ButQueryClick(object sender, DirectEventArgs e)
        {
            try
            {
                string departid = cbodepart.Value.ToString();
                string zqlx     = this.CmbCountType.Value.ToString();
                string rq       = "";
                switch (zqlx)
                {
                case "0":
                    //rq = string.Format("{0:D2}", int.Parse(CmbMonth.SelectedItem.Value));
                    rq = CmbYear.SelectedItem.Value + string.Format("{0:D2}", int.Parse(CmbMonth.SelectedItem.Value)) + string.Format("{0:D2}", int.Parse(CmbDay.SelectedItem.Value));
                    break;

                case "1":
                    rq = CmbYear.SelectedItem.Value + string.Format("{0:D2}", int.Parse(CmbMonth.SelectedItem.Value));
                    break;

                case "2":
                    rq = CmbWeek.SelectedItem.Value;
                    break;

                case "3":
                    rq = CmbYear.SelectedItem.Value;
                    break;
                }
                DataSet ds = bll.GetIllegalAnalyze(departid, zqlx, rq, cbonum.Value.ToString());
                this.ResourceManager1.RegisterAfterClientInitScript(" BMAP.ClearCircle();BMAP.ClearTempLine();BMAP.Clear();");
                if (ds != null && ds.Tables[0].Rows.Count > 0)
                {
                    StoreInfo.DataSource = ds.Tables[0];
                    StoreInfo.DataBind();
                    addstation(ds);
                    dsquery = ds;
                }
                else
                {
                    dsquery = null;
                    StoreInfo.RemoveAll();
                    StoreInfo.DataBind();
                    Notice("提示", "无违法信息!");
                }
            }
            catch (Exception ex)
            {
                ILog.WriteErrorLog(ex);
                logManager.InsertLogError("CarIllegalQuery.aspx-ButQueryClick", ex.Message + ";" + ex.StackTrace, "ButQueryClick has an exception");
            }
        }
Example #19
0
        public StoreInfo GetStoreByStoreId(int storeId)
        {
            StoreInfo result           = new StoreInfo();
            DbCommand sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM Ecshop_StoreManagement WHERE StoreId=@StoreId");

            this.database.AddInParameter(sqlStringCommand, "StoreId", DbType.Int32, storeId);
            using (IDataReader dataReader = this.database.ExecuteReader(sqlStringCommand))
            {
                if (dataReader.Read())
                {
                    result = DataMapper.PopulateStoreInfo(dataReader);
                }
            }
            return(result);
        }
Example #20
0
        public HttpResponseMessage IsInCart(int productID)
        {
            try
            {
                int       portalID      = PortalController.Instance.GetCurrentPortalSettings().PortalId;
                StoreInfo storeSettings = StoreController.GetStoreInfo(portalID);
                bool      isInCart      = CurrentCart.ProductIsInCart(portalID, storeSettings.SecureCookie, productID);

                return(Request.CreateResponse(HttpStatusCode.OK, isInCart));
            }
            catch
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, LocalizeString("Unexpected.Error")));
            }
        }
Example #21
0
        /// <summary>
        /// Implements call to Twofish method StoreBulkGet
        /// Retreive Twofish Store offers
        /// </summary>
        /// <param name="storeInfo">StoreName, IpAddress</param>
        /// <param name="commmonKeyValue">Twofish REST service common values</param>
        /// <param name="baseAddress">Twofish REST service base address</param>
        /// <returns>XML response document containing the Twofish CSV file listing all store offers</returns>
        public XmlDocument StoreBulkGet(StoreInfo storeInfo, CommmonKeyValues commmonKeyValue, BaseAddress baseAddress)
        {
            ServiceHandler rest = new ServiceHandler(baseAddress.BaseAddressValue);

            Dictionary <string, string> keyValues = commmonKeyValue.GetCommmonInfo(true);

            keyValues.Add("name", storeInfo.StoreName);
            keyValues.Add("ipAddress", storeInfo.IpAddress);

            DebugLog("StoreBulkGet", keyValues);

            string storeData = rest.GetStringRequest("store/bulk", keyValues);

            return(rest.WrapDataXML("Store", "StoreBulkGet", storeInfo.StoreName, storeData));
        }
Example #22
0
    public void OnClickBuy()
    {
        string itemName = itemTitle.text.ToString();

        float price;

        float.TryParse(StoreInfo.GetItem(itemName)[2], out price);

        if (GeneralData.Fossils > price && StoreInfo.GetItem(itemName)[3] == "unlocked" && StoreInfo.GetItem(itemName)[4] == "notpurchased")
        {
            print("Weapon purchased");
            GeneralData.Fossils -= price;
            //UNLOCK WEAPON HERE
        }
    }
Example #23
0
        public void Init(StoreUI owner, StoreInfo storeInfo)
        {
            this.owner     = owner;
            this.storeInfo = storeInfo;
            ItemInfo itemInfo = ItemDatabase.GetItemInfo(this.storeInfo.itemKey);

            // UI 셋팅
            this.iconImage.overrideSprite = SpriteManager.Get(SpritePath.Item_Path + this.storeInfo.itemKey);
            this.nameText.text            = itemInfo.itemName;


            // 가격표 갱신
            this.count = 1;
            UpdateData();
        }
Example #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (_storeInfo == null)
            {
                _storeInfo = StoreController.GetStoreInfo(PortalId);
            }
            if (_storeInfo.CurrencySymbol != string.Empty)
            {
                _localFormat.CurrencySymbol = _storeInfo.CurrencySymbol;
            }
            _moduleSettings = new ModuleSettings(ParentControl.ModuleId, ParentControl.TabId);
            _includeVAT     = _moduleSettings.MainCart.IncludeVAT;

            UpdateTaxTotal();
        }
Example #25
0
        /// <summary>
        /// Set store id
        /// </summary>
        /// <param name="id"></param>
        public void SetStoreId(int id)
        {
            var    store = new StoreState();
            string name  = string.Empty;

            if (store.StoreInfo != null)
            {
                name = store.StoreInfo.StoreName;
            }
            var info = new StoreInfo {
                StoreNumber = id, StoreName = name
            };

            store.StoreInfo = info;
        }
Example #26
0
        public static void StaticCctorOnStore(StoreInfo info, List <string> property_names)
        {
            if (!(info.RawObject is OpenArray))
            {
                return;
            }

            var arrayName = info.Argument;
            var array     = info.RawObject as OpenArray;

            if (arrayName.Contains("String"))
            {
                property_names.AddRange(array.Contents.Cast <string>());
            }
        }
Example #27
0
        protected virtual void SelectBatchAction()
        {
            BatchList list = BatchList.GetByProductStockList(_product.Oid, _provider.OidAcreedor, _provider.ETipoAcreedor, false);

            BatchSelectForm form = new BatchSelectForm(this, _serie, list);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                BatchInfo batch = form.Selected as BatchInfo;
                _entity.CopyFrom(_delivery, batch);

                SetStore(StoreInfo.Get(_entity.OidAlmacen, false, true));
                SetExpedient(ExpedientInfo.Get(_entity.OidExpediente, false, true));
            }
        }
Example #28
0
        /// <summary>
        /// Set store name
        /// </summary>
        /// <param name="name"></param>
        public void SetStoreName(string name)
        {
            var store = new StoreState();
            int?num   = null;

            if (store.StoreInfo != null)
            {
                num = store.StoreInfo.StoreNumber;
            }
            var info = new StoreInfo {
                StoreName = name, StoreNumber = num
            };

            store.StoreInfo = info;
        }
Example #29
0
        public  GetByIdTests()
        {
            _testStore = new StoreInfo();
            _store = new TestStore(); 
            dummyCars =  new Fixture().CreateMany<Car>().ToList();
            using (var session = _store.OpenSession())
            {
                foreach (var car in dummyCars)
                {
                    session.Store(car);
                }

                session.SaveChanges();
            }
        }
Example #30
0
        /// <summary>
        /// 商品咨询列表
        /// </summary>
        public ActionResult ProductConsultList()
        {
            int    pid            = WebHelper.GetQueryInt("pid");
            int    consultTypeId  = WebHelper.GetQueryInt("consultTypeId");
            string consultMessage = WebHelper.GetQueryString("consultMessage");
            int    page           = WebHelper.GetQueryInt("page");

            //判断商品是否存在
            PartProductInfo productInfo = Products.GetPartProductById(pid);

            if (productInfo == null)
            {
                return(PromptView("/", "你访问的商品不存在"));
            }

            if (!SecureHelper.IsSafeSqlString(consultMessage))
            {
                return(PromptView(WorkContext.UrlReferrer, "您搜索的内容不存在"));
            }

            //店铺信息
            StoreInfo storeInfo = Stores.GetStoreById(productInfo.StoreId);

            if (storeInfo.State != (int)StoreState.Open)
            {
                return(PromptView("/", "你访问的商品不存在"));
            }

            PageModel pageModel           = new PageModel(10, page, ProductConsults.GetProductConsultCount(pid, consultTypeId, consultMessage));
            ProductConsultListModel model = new ProductConsultListModel()
            {
                ProductInfo            = productInfo,
                CategoryInfo           = Categories.GetCategoryById(productInfo.CateId),
                BrandInfo              = Brands.GetBrandById(productInfo.BrandId),
                StoreInfo              = storeInfo,
                StoreKeeperInfo        = Stores.GetStoreKeeperById(storeInfo.StoreId),
                StoreRegion            = Regions.GetRegionById(storeInfo.RegionId),
                StoreRankInfo          = StoreRanks.GetStoreRankById(storeInfo.StoreRid),
                ConsultTypeId          = consultTypeId,
                ConsultMessage         = consultMessage,
                PageModel              = pageModel,
                ProductConsultList     = ProductConsults.GetProductConsultList(pageModel.PageSize, pageModel.PageNumber, pid, consultTypeId, consultMessage),
                ProductConsultTypeList = ProductConsults.GetProductConsultTypeList(),
                IsVerifyCode           = CommonHelper.IsInArray(WorkContext.PageKey, WorkContext.MallConfig.VerifyPages)
            };

            return(View(model));
        }
Example #31
0
		public void ShowAd(string placement) {
			if(GameUtility.Me.playerData.isRemoveAds && !placement.ToLower().Contains("free")) {
				MyDebug.Log("AdsMCG::ShowAd => Remove Ad purchsed");
				return;
			}

			if(CoreUtility.Me.settings.gameLaunchCount < GameUtility.Me.noAdUntilGameLunch
			|| CoreUtility.Me.settings.gamePlayCount < GameUtility.Me.noAdUntilGamePlay
			|| CoreUtility.Me.settings.gameOverCount < GameUtility.Me.noAdUntilGameOver) {
				MyDebug.Log("AdsMCG::ShowAds => Ad will not show becasue noAd rule applied\n" +
					"launch count: {0}, launch need: {1},\nplay count; {2}, play need: {3},\nover Count: {4}, over need: {5}\n\n",
					CoreUtility.Me.settings.gameLaunchCount,
					GameUtility.Me.noAdUntilGameLunch, CoreUtility.Me.settings.gamePlayCount, GameUtility.Me.noAdUntilGamePlay,
					CoreUtility.Me.settings.gamePlayCount, GameUtility.Me.noAdUntilGameOver);
				return;
			}
			if(!IsAdAvailable(placement)) {
				MyDebug.Log(false, "AdsMCG::ShowAd => ad not available for location {0}", placement);
				return;
			}

			AdLocation al = GetPlacement(placement);
			StoreInfo storeInfo = al.GetIdsFor(_store);
			if(null == storeInfo) {
				MyDebug.Log(false, "AdsMCG::ShowAd => There are not info of {0} store for {1} location", _store, al.Name);
				return;
			}

			storeInfo.requestCount++;
			if(storeInfo.requestCount % storeInfo.showAtEveryFrequency != 0) {
				MyDebug.Log(false, "AdsMCG::ShowAds => display Frequency not match for placement " + al.Name);
				return;
			}
			MyDebug.Log(false, "AdsMCG::ShowAds => Show Ad Called");
			switch(storeInfo.Type) {
			case AdType.Interstitial:
				ShowInterstitialAd(storeInfo);
				break;

			case AdType.RewardVideo:
				ShowRewardAd(storeInfo);
				break;

			case AdType.MoreApp:
				MyDebug.Warning(false, "AdsMCG::ShowAds => More App Wall Is not Integrated");
				break;
			}
		}
Example #32
0
        public LinqOrderByTests()
        {
            _testStore = new StoreInfo();
            _store = new TestStore();


            var carA = new Fixture().Build<Car>()
              .With(x => x.Make, "Mazda")
              .With(y => y.Model, "A")
              .Create();

            var carB = new Fixture().Build<Car>()
                .With(x => x.Make, "Mazda")
                .With(y => y.Model, "B")
                .Create();

            using (var session = _store.OpenSession())
            {
                session.Store<Car>(carA);
                session.Store<Car>(carB);
                session.SaveChanges();
            }
        }
Example #33
0
		public Order(OrderInfo orderInfo)
		{
			Name = orderInfo.Name;
			TermsAccepted = orderInfo.TermsAccepted;
			PaidDate = orderInfo.PaidDate;
		    FulfillDate = orderInfo.FulfillDate;
			ConfirmDate = orderInfo.ConfirmDate;
			OrderLines = orderInfo.OrderLines.Select(line => new OrderLine(line)).ToList();
			CouponCodes = orderInfo.CouponCodesData;
			CustomerInfo = orderInfo.CustomerInfo;
			ShippingInfo = orderInfo.ShippingInfo;
			PaymentInfo = orderInfo.PaymentInfo;
			StoreInfo = orderInfo.StoreInfo;
			CurrencyCode = orderInfo.Localization.CurrencyCode;
			// todo: onderstaand kan waarschijnlijk anders (geen check = dubbel)
			Discounts = orderInfo.Discounts.Select(discount => new OrderDiscount(orderInfo.Localization, discount, orderInfo)).ToList(); // todo: add/save used coupon code
			IncludingVAT = orderInfo.PricesAreIncludingVAT;

			VatCalculatedOverParts = orderInfo.VatCalculationStrategy is OverSmallestPartsVatCalculationStrategy;

			PaymentProviderPrice = orderInfo.PaymentProviderAmount;
			PaymentProviderOrderPercentage = orderInfo.PaymentProviderOrderPercentage;

			ShippingProviderPrice = orderInfo.ShippingProviderAmountInCents;
			RegionalVatAmount = orderInfo.RegionalVatInCents;

			VATCharged = orderInfo.VATCharged;
			ChargedAmount = orderInfo.ChargedAmountInCents;

			CorrespondingOrderDocumentId = orderInfo.OrderNodeId;

			RevalidateOrderOnLoad = orderInfo.RevalidateOrderOnLoad; // version 2.1 hack
			ReValidateSaveAction = orderInfo.ReValidateSaveAction; // version 2.1 hack

			StockUpdated = orderInfo.StockUpdated;
			CreatedInTestMode = orderInfo.CreatedInTestMode;
		}
Example #34
0
        static UccRuntime()
        {
            string dataDir = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) + "/CleanerData/";
            if (!Directory.Exists(dataDir))
                Directory.CreateDirectory(dataDir);
            if (!File.Exists(dataDir + "db.db") && File.Exists(AppDomain.CurrentDomain.BaseDirectory + "db.db"))
                File.Copy(AppDomain.CurrentDomain.BaseDirectory + "db.db", dataDir + "db.db");

            SqlConfig = new SqlConfig(DataDriverType.Sqlite, "UCC_", "", dataDir + "db.db");
            Dop = new DataOperator(SqlConfig);
            string path = AppDomain.CurrentDomain.BaseDirectory + "store.json";
            if (!File.Exists(path))
            {
                StoreInfo = new StoreInfo();
                StoreInfo.Name = "美国UCC国际洗衣";
                StoreInfo.PhoneNo = "13761561263";
                StoreInfo.Address = "闵行区金平路19号近鹤庆路";
                File.WriteAllText(path, Roo.Data.DataConverter.RenderJson(Roo.Data.DataConverter.ObjectToJson(StoreInfo)), Encoding.Default);
            }
            else
            {
                StoreInfo = DataConverter.JsonToObject<StoreInfo>(File.ReadAllText(path, Encoding.Default));
            }
        }
Example #35
0
		public BasketStore(StoreInfo info) : this(info.Store)
		{
			Alias = info.Alias;
		}
Example #36
0
        private void LoadHeaders(BinaryReader reader)
        {
            var magic = reader.ReadInt32();

            if (magic != Magic)
                throw new IOException("The magic number in the header is invalid.");

            var version = reader.ReadInt32();
            var lastModified = reader.ReadInt64();
            var storeCount = reader.ReadInt32();

            // the maximum number of the stores
            storeId = reader.ReadInt32();

            storeInfo = new Dictionary<int, StoreInfo>(storeCount);

            for (int i = 0; i < storeCount; i++) {
                var strLength = reader.ReadInt32();
                var nameChars = reader.ReadChars(strLength);

                var name = new string(nameChars);
                var id = reader.ReadInt32();
                var offset = reader.ReadInt64();
                var size = reader.ReadInt64();

                storeInfo[id] = new StoreInfo(name, id, offset, size);

                if (nameIdMap == null)
                    nameIdMap = new Dictionary<string, int>();

                nameIdMap[name] = id;
            }
        }
Example #37
0
 public  Tests()
 {
     _testStore = new StoreInfo();
     _store = new TestStore(); 
 }