コード例 #1
0
 private static bool LoadStrengthen(Dictionary <int, StrengthenInfo> strengthen, Dictionary <int, StrengthenInfo> RefineryStrengthen, Dictionary <int, StrengThenExpInfo> StrengthenExp, Dictionary <int, StrengthenGoodsInfo> StrengthensGoods)
 {
     using (ProduceBussiness produceBussiness = new ProduceBussiness())
     {
         StrengthenInfo[]      allStrengthen          = produceBussiness.GetAllStrengthen();
         StrengthenInfo[]      allRefineryStrengthen  = produceBussiness.GetAllRefineryStrengthen();
         StrengThenExpInfo[]   allStrengThenExp       = produceBussiness.GetAllStrengThenExp();
         StrengthenGoodsInfo[] allStrengthenGoodsInfo = produceBussiness.GetAllStrengthenGoodsInfo();
         StrengthenInfo[]      array = allStrengthen;
         for (int i = 0; i < array.Length; i++)
         {
             StrengthenInfo strengthenInfo = array[i];
             if (!strengthen.ContainsKey(strengthenInfo.StrengthenLevel))
             {
                 strengthen.Add(strengthenInfo.StrengthenLevel, strengthenInfo);
             }
         }
         StrengthenInfo[] array2 = allRefineryStrengthen;
         for (int j = 0; j < array2.Length; j++)
         {
             StrengthenInfo strengthenInfo2 = array2[j];
             if (!RefineryStrengthen.ContainsKey(strengthenInfo2.StrengthenLevel))
             {
                 RefineryStrengthen.Add(strengthenInfo2.StrengthenLevel, strengthenInfo2);
             }
         }
         StrengThenExpInfo[] array3 = allStrengThenExp;
         for (int k = 0; k < array3.Length; k++)
         {
             StrengThenExpInfo strengThenExpInfo = array3[k];
             if (!StrengthenExp.ContainsKey(strengThenExpInfo.Lv))
             {
                 StrengthenExp.Add(strengThenExpInfo.Lv, strengThenExpInfo);
             }
         }
         StrengthenGoodsInfo[] array4 = allStrengthenGoodsInfo;
         for (int l = 0; l < array4.Length; l++)
         {
             StrengthenGoodsInfo strengthenGoodsInfo = array4[l];
             if (!StrengthensGoods.ContainsKey(strengthenGoodsInfo.ID))
             {
                 StrengthensGoods.Add(strengthenGoodsInfo.ID, strengthenGoodsInfo);
             }
         }
     }
     return(true);
 }
コード例 #2
0
        private static bool LoadStrengthen(Dictionary <int, StrengthenInfo> strengthen, Dictionary <int, StrengthenInfo> RefineryStrengthen)
        {
            using (ProduceBussiness db = new ProduceBussiness())
            {
                StrengthenInfo[] infos = db.GetAllStrengthen();

                StrengthenInfo[] Refineryinfos = db.GetAllRefineryStrengthen();

                StrengthenGoodsInfo[] StrengthGoodInfos = db.GetAllStrengthenGoodsInfo();

                foreach (StrengthenInfo info in infos)
                {
                    if (!strengthen.ContainsKey(info.StrengthenLevel))
                    {
                        strengthen.Add(info.StrengthenLevel, info);
                    }
                }
                foreach (StrengthenInfo info in Refineryinfos)
                {
                    if (!RefineryStrengthen.ContainsKey(info.StrengthenLevel))
                    {
                        RefineryStrengthen.Add(info.StrengthenLevel, info);
                    }
                }

                foreach (StrengthenGoodsInfo info in StrengthGoodInfos)
                {
                    if (!Strengthens_Goods.ContainsKey(info.ID))
                    {
                        Strengthens_Goods.Add(info.ID, info);
                    }
                }
            }

            return(true);
        }