Пример #1
0
 public static int LoadConfig(bool isReload = true)
 {
     try
     {
         List <CaiShuZiConfig> _CaiShuZiCfgList;
         KFBoCaiConfigManager.LoadCaiShuZi(out _CaiShuZiCfgList);
         List <CaiDaXiaoConfig> _CaiDaXiaoCfgList;
         KFBoCaiConfigManager.LoadCaiDaXiao(out _CaiDaXiaoCfgList);
         List <DuiHuanShangChengConfig> _DuiHuanShangChengCgfList;
         KFBoCaiConfigManager.Load_DuiHuanShangCheng(out _DuiHuanShangChengCgfList);
         lock (KFBoCaiConfigManager.CaiShuZiCfgList)
         {
             KFBoCaiConfigManager.CaiShuZiCfgList = _CaiShuZiCfgList;
         }
         lock (KFBoCaiConfigManager.CaiDaXiaoCfgList)
         {
             KFBoCaiConfigManager.CaiDaXiaoCfgList = _CaiDaXiaoCfgList;
         }
         lock (KFBoCaiConfigManager.DuiHuanShangChengCgfList)
         {
             KFBoCaiConfigManager.DuiHuanShangChengCgfList = _DuiHuanShangChengCgfList;
         }
         if (isReload)
         {
             KFBoCaiCaiDaXiao.GetInstance().UpData(true);
             KFBoCaiCaiShuzi.GetInstance().UpData(true);
         }
         return(1);
     }
     catch (Exception ex)
     {
         LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl]{0}", ex.ToString()), null, true);
     }
     return(0);
 }
Пример #2
0
 private void InitConfig()
 {
     try
     {
         CaiDaXiaoConfig cfg = KFBoCaiConfigManager.GetCaiDaXiaoConfig();
         if (null != cfg)
         {
             this.Config                 = new CaiDaXiaoConfig();
             this.Config.ID              = cfg.ID;
             this.Config.HuoDongKaiQi    = cfg.HuoDongKaiQi;
             this.Config.HuoDongJieSu    = cfg.HuoDongJieSu;
             this.Config.MeiRiKaiQi      = cfg.MeiRiKaiQi;
             this.Config.MeiRiJieSu      = cfg.MeiRiJieSu;
             this.Config.ZhuShuShangXian = cfg.ZhuShuShangXian;
             this.OpenData.XiaoHaoDaiBi  = cfg.XiaoHaoDaiBi;
         }
         else
         {
             this.Config = null;
             LogManager.WriteLog(LogTypes.Error, "[ljl_caidaxiao_猜大小] KFBoCaiConfigManager.GetCaiShuZiConfig() == null", null, true);
         }
     }
     catch (Exception ex)
     {
         LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl_caidaxiao_猜大小]{0}", ex.ToString()), null, true);
     }
 }
Пример #3
0
 private void InitConfig()
 {
     try
     {
         CaiShuZiConfig cfg = KFBoCaiConfigManager.GetCaiShuZiConfig();
         if (null != cfg)
         {
             this.Config    = new CaiShuZiConfig();
             this.Config.ID = cfg.ID;
             this.Config.XiTongChouCheng = cfg.XiTongChouCheng;
             this.Config.BuChongTiaoJian = cfg.BuChongTiaoJian;
             this.Config.KaiQiShiJian    = cfg.KaiQiShiJian;
             this.Config.JieShuShiJian   = cfg.JieShuShiJian;
             this.Config.XiaoHaoDaiBi    = cfg.XiaoHaoDaiBi;
             this.Config.KaiJiangShiJian = cfg.KaiJiangShiJian;
             this.Config.ChuFaBiZhong    = cfg.ChuFaBiZhong;
             this.Config.AnNiuList       = new List <CaiShuZiAnNiu>();
             foreach (CaiShuZiAnNiu item in cfg.AnNiuList)
             {
                 CaiShuZiAnNiu temp = new CaiShuZiAnNiu();
                 temp.NO      = item.NO;
                 temp.Percent = item.Percent;
                 this.Config.AnNiuList.Add(temp);
             }
             this.OpenData.AllBalance   = Math.Max(this.OpenData.AllBalance, (long)this.Config.BuChongTiaoJian);
             this.OpenData.XiaoHaoDaiBi = this.Config.XiaoHaoDaiBi;
         }
         else
         {
             this.Config = null;
             LogManager.WriteLog(LogTypes.Error, "[ljl_CaiShuZi_猜数字] KFBoCaiConfigManager.GetCaiShuZiConfig() == null", null, true);
         }
     }
     catch (Exception ex)
     {
         LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl_CaiShuZi_猜数字]{0}", ex.ToString()), null, true);
     }
 }