Пример #1
0
 private void cmbxMonList_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (!String.IsNullOrEmpty(e.Source.ToString()) && mainDC != null)
     {
         string     selectedMon = e.AddedItems[0].ToString();
         SWData.Mon mon         = mainDC.GetMonster(selectedMon);
         lblHPBase.Content    = mon.b_hp.ToString();
         lblDefBase.Content   = mon.b_def.ToString();
         lblAtkBase.Content   = mon.b_atk.ToString();
         lblSpeedBase.Content = mon.b_spd.ToString();
         //lblTest.Content = e.AddedItems[0].ToString();
         List <SWData.Rune> runes = mainDC.GetMonsterRune(mon.name);
         lblTest.Content = runes.Count.ToString();
         SWData.Rune rune1 = runes.Find(x => x.slot == 1);
         txtblkRune1.Text = String.Format("{0} {1} {2} {3}", rune1.id, rune1.grade, rune1.set, rune1.slot);
     }
     else
     {
         lblHPBase.Content    = "";
         lblDefBase.Content   = "";
         lblAtkBase.Content   = "";
         lblSpeedBase.Content = "";
     }
 }
Пример #2
0
 public List <SWData.Rune> GetMonsterRune(string MonsterName)
 {
     SWData.Mon monster = GetMonster(MonsterName);
     return(this.optData.runes.FindAll(x => x.monster == monster.id));
 }