Esempio n. 1
0
 private void ReadSkillBonuds(SQLiteHelper db, HeroesTextHelper HeroesText)
 {
     using (DbDataReader reader = db.GetReader("select * from synthesisskillbonus order by classRestriction;"))
     {
         // MessageBox.Show("count=" + HeroesText.SynSkillBonuds.Count);
         while (reader != null && reader.Read())
         {
             SkillBonusInfo info = new SkillBonusInfo(reader, HeroesText);
             if (!SynthesisSkillBonues.ContainsKey(info.ID))
             {
                 SynthesisSkillBonues.Add(info.ID, info);
             }
         }
     }
 }
Esempio n. 2
0
        public static void HideSkillBouns(this MainForm main, ToolStripDropDownItem menuitem, User user)
        {
            if (user == null || skilllastClass == user.Class)
            {
                return;
            }
            skilllastClass = user.Class;
            ToolStripItemCollection items = menuitem.DropDownItems;

            foreach (ToolStripItem _item in items)
            {
                var item = _item as ToolStripMenuItem;
                if (item == null)
                {
                    continue;
                }
                SkillBonusInfo info = item.Tag as SkillBonusInfo;
                if (info != null)
                {
                    item.Visible = skilllastClass.IsEnable(info.ClassRestriction);
                }
            }
        }