/// <summary> /// 组装二级页面三要素 /// </summary> /// <returns></returns> private SystemThreeElementsViewEntity AppendSecondElements(string type) { SystemThreeElementsViewEntity res = Cache.Factory.CacheFactory.Cache().GetCache <SystemThreeElementsViewEntity>(CacheKeyEnum.SystemThreeElements.ToString() + "__" + type + "__"); if (res == null) { res = new SystemThreeElementsViewEntity(); string keywordTemplate = ConfigHelper.GetValue("SystemElementsKeywords"); string descTemplate = ConfigHelper.GetValue("SystemElementsDescription"); //获取当前彩种配置信息 SCCConfig config = LotteryConfig.FirstOrDefault(s => s.EnumCode.Equals(type)); if (config != null) { res.Keywords = keywordTemplate.Replace("$Name$", config.LotteryName); res.Description = descTemplate.Replace("$Name$", config.LotteryName); } else { bool isSucc = Enum.TryParse <SCCLottery>(type, true, out SCCLottery lottery); //SCCLottery type = (SCCLottery)Enum.Parse(typeof(SCCLottery), arg.EnumCode, true); if (isSucc) { res.Keywords = keywordTemplate.Replace("$Name$", lottery.GetEnumDescription()); res.Description = descTemplate.Replace("$Name$", lottery.GetEnumDescription()); } } Cache.Factory.CacheFactory.Cache().WriteCache(res, CacheKeyEnum.SystemThreeElements.ToString() + "__" + type + "__", DateTimeHelper.Now.AddDays(30)); } return(res); }
/// <summary> /// 获取转盘公共配置 /// </summary> /// <returns></returns> public LotteryConfig GetLotteryConfig() { string sqlQuery = string.Format("SELECT * FROM LotteryConfig(NOLOCK) WHERE ID=1"); LotteryConfig config = Database.ExecuteObject <LotteryConfig>(sqlQuery); return(config); }
static int ReadConfig(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 1); LotteryConfig obj = (LotteryConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "LotteryConfig"); obj.ReadConfig(); return(0); }
static int GetLottery(IntPtr L) { LuaScriptMgr.CheckArgsCount(L, 3); LotteryConfig obj = (LotteryConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "LotteryConfig"); uint arg0 = (uint)LuaScriptMgr.GetNumber(L, 2); uint arg1 = (uint)LuaScriptMgr.GetNumber(L, 3); fogs.proto.config.LotteryConfig o = obj.GetLottery(arg0, arg1); LuaScriptMgr.PushObject(L, o); return(1); }
private void BindData() { LotteryConfig model = FacadeManage.aideTreasureFacade.GetLotteryConfig(1); if (model == null) { return; } CtrlHelper.SetText(txtFreeCount, model.FreeCount.ToString()); CtrlHelper.SetText(txtChargeFee, model.ChargeFee.ToString()); cbIsCharge.Checked = model.IsCharge == 0 ? false : true; }
void OnZhuihao(ZhuihaoOrderObj zobj) { LotteryConfig lcfg = zobj.cfirmObj.lCfg; NetworkManager.Instance.GetZhuihaoQshu(lcfg.lotteryId); GameObject asset = (GameObject)AssetManager.Instance.LoadPrefab("ZhuihaoPanel"); GameObject ItemObj = Instantiate(asset) as GameObject; ItemObj.transform.parent = UIRootFinder.uiRootTran; ItemObj.transform.localScale = Vector3.one; _zhPanelscript = ItemObj.GetComponent <ZhuihaoPanel>(); _zhPanelscript.SetZhuihaoObj(zobj); _zhPanelscript.gameObject.SetActive(false); }
static int _CreateLotteryConfig(IntPtr L) { int count = LuaDLL.lua_gettop(L); if (count == 0) { LotteryConfig obj = new LotteryConfig(); LuaScriptMgr.PushObject(L, obj); return(1); } else { LuaDLL.luaL_error(L, "invalid arguments to method: LotteryConfig.New"); } return(0); }
protected void btnSave_Click(object sender, EventArgs e) { AuthUserOperationPermission(Permission.Edit); LotteryConfig model = FacadeManage.aideTreasureFacade.GetLotteryConfig(1); model.FreeCount = CtrlHelper.GetInt(txtFreeCount, 0); model.ChargeFee = CtrlHelper.GetInt(txtChargeFee, 0); model.IsCharge = (byte)(cbIsCharge.Checked ? 1 : 0); try { FacadeManage.aideTreasureFacade.UpdateLotteryConfig(model); ShowInfo("更新成功"); } catch { ShowError("更新失败"); } }
void test1() { LotteryConfigLoader xl = new LotteryConfigLoader(); xl.lotteryConfigs = new List <LotteryConfig>(); for (int i = 0; i < 2; ++i) { LotteryConfig scfg = new LotteryConfig(); scfg.lotteryId = 100; scfg.name = "时时彩"; scfg.modecfgs = new List <LotteryModeCfg>(); for (int j = 0; j < 2; ++j) { LotteryModeCfg sub = new LotteryModeCfg(); sub.modeId = 56; sub.name = "五星"; sub.subModecfgs = new List <LotterySubModeCfg>(); for (int k = 0; k < 2; ++k) { LotterySubModeCfg submode = new LotterySubModeCfg(); submode.subModeId = 666; submode.name = "五星直选"; submode.isShowTwo = false; sub.subModecfgs.Add(submode); } scfg.modecfgs.Add(sub); } xl.lotteryConfigs.Add(scfg); } XmlHelper.XmlSerializeToFile(xl, "G:/UnityProject/LotterySvn/trunk/Assets/test.xml", System.Text.Encoding.UTF8); }
/// <summary> /// 界面显示时初始化数据 /// </summary> protected override void OnShow(INotification notification) { LoadSprite.LoaderImage(m_Panel.beijing, "bg/qiuchang", false); backType = BackType.Main; m_Panel.PieceGrid.enabled = true; m_Panel.PieceGrid.BindCustomCallBack(UpdatePieceGrid); m_Panel.PieceGrid.StartCustom(); m_Panel.rewardGrid.enabled = true; m_Panel.rewardGrid.BindCustomCallBack(UpdateRewardGrid); m_Panel.rewardGrid.StartCustom(); freeInfo = LotteryConfig.GetLotteryInfoByType(1); diamondInfo = LotteryConfig.GetLotteryInfoByType(2); tenInfo = LotteryConfig.GetLotteryInfoByType(3); m_Panel.orangedesc.text = TextManager.GetUIString("UICard3"); m_Panel.orangeCount.text = tenInfo.capitalValue.ToString(); if (cardMediator == null) { cardMediator = Facade.RetrieveMediator("CardMediator") as CardMediator; } m_Panel.freeTimes.text = string.Format(TextManager.GetUIString("UICard7"), freeInfo.freeCount - cardInfo.euroFreeTimes); UpdateView(CardType.First); }
//请求开奖记录 public void GetRecord(int lId) { LotteryConfig lcfg = ConfigManager.Instance.GetLotteryCfgLoader().GetLotteryConfig(lId); socket.SendMessage(120, (uint)lcfg.recordResId); }
//请求时间期数 public void GetQishuTime(int lId) { LotteryConfig lcfg = ConfigManager.Instance.GetLotteryCfgLoader().GetLotteryConfig(lId); socket.SendMessage(120, (uint)lcfg.timeResId); }
public void LoadConfig() { AnnouncementConfigData = new AnnouncementConfig(); BadgeAttrConfigData = new BadgeAttrConfig(); ConstStringConfigData = new ConstStringConfig(); CommonConfig = new CommonConfig(); AttrNameConfigData = new AttrNameConfig(); RoleBaseConfigData2 = new BaseDataConfig2(); AttrDataConfigData = new AttrDataConfig(); TeamLevelConfigData = new TeamLevelConfig(); RoleLevelConfigData = new RoleLevelConfig(); NPCConfigData = new NPCDataConfig(); SkillConfig = new SkillConfig(); GoodsConfigData = new GoodsConfig(); StoreGoodsConfigData = new StoreGoodsConfig(); BaseDataBuyConfigData = new BaseDataBuyConfig(); TaskConfigData = new TaskDataConfig(); AwardPackConfigData = new AwardPackDataConfig(); PractiseConfig = new PractiseConfig(); PracticePveConfig = new PracticePveConfig(); PractiseStepConfig = new PractiseStepConfig(); GameModeConfig = new GameModeConfig(); TrainingConfig = new TrainingConfig(); TattooConfig = new TattooConfig(); EquipmentConfigData = new EquipmentConfig(); TourConfig = new TourConfig(); GuideConfig = new GuideConfig(); FunctionConditionConfig = new FunctionConditionConfig(); RoleShapeConfig = new RoleShapeConfig(); FashionConfig = new FashionConfig(); FashionShopConfig = new FashionShopConfig(); VipPrivilegeConfig = new VipPrivilegeConfig(); pushConfig = new PushConfig(); presentHpConfigData = new PresentHpConfig(); LotteryConfig = new LotteryConfig(); starAttrConfig = new StarAttrConfig(); qualityAttrCorConfig = new QualityAttrCorConfig(); skillUpConfig = new SkillUpConfig(); RankConfig = new RankConfig(); signConfig = new SignConfig(); NewComerSignConfig = new NewComerSignConfig(); FightingCapacityConfig = new FightingCapacityConfig(); BodyInfoListConfig = new BodyInfoListConfig(); BadgeSlotsConfig = new BadgeSlotConfig(); GoodsComposeNewConfigData = new GoodsComposeNewConfig(); SceneConfig = new SceneConfig(); ReboundAttrConfigData = new ReboundAttrConfig(); CareerConfigData = new CareerConfig(); PotientialEffectConfig = new PotientialEffectConfig(); PVPPointConfig = new PVPPointConfig(); WinningStreakAwardConfig = new WinningStreakAwardConfig(); ArticleStrengthConfig = new ArticleStrengthConfig(); PhRegainConfig = new PhRegainConfig(); MatchAchievementConfig = new MatchAchievementConfig(); SpecialActionConfig = new SpecialActionConfig(); StealConfig = new StealConfig(); CurveRateConfig = new CurveRateConfig(); DunkRateConfig = new DunkRateConfig(); AIConfig = new AIConfig(); AttrReduceConfig = new AttrReduceConfig(); qualifyingConfig = new QualifyingConfig(); qualifyingNewConfig = new QualifyingNewConfig(); qualifyingNewerConfig = new QualifyingNewerConfig(); bullFightConfig = new BullFightConfig(); HedgingConfig = new HedgingConfig(); roleGiftConfig = new RoleGiftConfig(); DebugConfig = new DebugConfig(); shootGameConfig = new ShootGameConfig(); MapConfig = new MapConfig(); activityConfig = new ActivityConfig(); trialConfig = new TrialConfig(); gameMatchConfig = new GameMatchConfig(); shootSolutionManager = new ShootSolutionManager(); talentConfig = new TalentConfig(); ladderConfig = new LadderConfig(); matchSoundConfig = new MatchSoundConfig(); matchMsgConfig = new MatchMsgConfig(); MatchPointsConfig = new MatchPointsConfig(); AnimationSampleManager.Instance.LoadXml(); }
public void UpdateLotteryConfig(LotteryConfig model) { this.aideTreasureData.UpdateLotteryConfig(model); }
public void InitIcons(LotteryConfigLoader cfgLoader) { if (cfgLoader == null) { return; } lotteryCfgLoader = cfgLoader; List <LotteryConfig> temp = new List <LotteryConfig>(); if (panelScript.mainToggle [0].value) { toggleState = 1; for (int i = 0; i < cfgLoader.lotteryConfigs.Count; ++i) { if (cfgLoader.lotteryConfigs [i].lotteryType == 1 || cfgLoader.lotteryConfigs [i].lotteryType == 4) { temp.Add(cfgLoader.lotteryConfigs [i]); } } } else if (panelScript.mainToggle [1].value) { toggleState = 2; for (int i = 0; i < cfgLoader.lotteryConfigs.Count; ++i) { if (cfgLoader.lotteryConfigs [i].lotteryType == 2) { temp.Add(cfgLoader.lotteryConfigs [i]); } } } else if (panelScript.mainToggle [2].value) { toggleState = 3; for (int i = 0; i < cfgLoader.lotteryConfigs.Count; ++i) { if (cfgLoader.lotteryConfigs [i].lotteryType == 3) { temp.Add(cfgLoader.lotteryConfigs [i]); } } } else { toggleState = 4; if (comNameInfoList != null) { foreach (ComNameInfo gameInfo in comNameInfoList) { LotteryConfig fakeCfg = new LotteryConfig(); fakeCfg.lotteryId = (int)gameInfo.uNameID; fakeCfg.iconName = "icon_" + gameInfo.uNameID.ToString(); temp.Add(fakeCfg); } } } panelScript.CreateIcons(temp); for (int i = 0; i < panelScript.Icons.Count; ++i) { UIEventListener.Get(panelScript.Icons[i]).onClick = OnClickIcon; } }