示例#1
0
        public MonsterThemeForm(MonsterTheme theme)
        {
            InitializeComponent();

            Application.Idle += new EventHandler(Application_Idle);

            fTheme = theme.Copy();

            foreach (string skill_name in Skills.GetSkillNames())
            {
                ListViewItem lvi = SkillList.Items.Add(skill_name);

                bool present = false;
                foreach (Pair <string, int> pair in fTheme.SkillBonuses)
                {
                    if (pair.First == skill_name)
                    {
                        present = true;
                    }
                }
                lvi.Checked = present;
            }

            NameBox.Text = fTheme.Name;

            update_powers();
        }
示例#2
0
 public MonsterThemeForm(MonsterTheme theme)
 {
     this.InitializeComponent();
     Application.Idle += new EventHandler(this.Application_Idle);
     this.fTheme       = theme.Copy();
     foreach (string skillName in Skills.GetSkillNames())
     {
         ListViewItem listViewItem = this.SkillList.Items.Add(skillName);
         bool         flag         = false;
         foreach (Pair <string, int> skillBonuse in this.fTheme.SkillBonuses)
         {
             if (skillBonuse.First != skillName)
             {
                 continue;
             }
             flag = true;
         }
         listViewItem.Checked = flag;
     }
     this.NameBox.Text = this.fTheme.Name;
     this.update_powers();
 }