private void PlayerViewModel_PlayerChanged(object sender, EventArgs e) { HitDice.ReplaceRange(from h in Context.Player.GetHitDie() orderby h select new HitDieViewModel(this, h)); OnPropertyChanged(null); Skills.ReplaceRange(Context.Player.GetSkills()); Scores.Update(Context.Player); ShowClasses.ChangeCanExecute(); ShowRace.ChangeCanExecute(); ShowBackground.ChangeCanExecute(); UpdateAllConditions(); UpdateCondtions(); resources.Clear(); resources.AddRange(from r in Context.Player.GetResourceInfo(true).Values select new ResourceViewModel(r, this)); resources.AddRange(from r in Context.Player.GetBonusSpells(false) select new ResourceViewModel(r, this)); UpdateResources(); features = (from f in Context.Player.GetFeatures() where f.Name != "" && !f.Hidden select f).ToList(); UpdateFeatures(); proficiencies = new List <IXML>(); proficiencies.AddRange(Context.Player.GetLanguages()); proficiencies.AddRange(Context.Player.GetToolProficiencies()); proficiencies.AddRange(from p in Context.Player.GetToolKWProficiencies() select new Feature(p, "Proficiency")); proficiencies.AddRange(from p in Context.Player.GetOtherProficiencies() select new Feature(p, "Proficiency")); UpdateProficiencies(); UpdateItems(); UpdateSpellcasting(); UpdateInventoryChoices(); UpdateJournal(); UpdateNotes(); }
private void Parent_PlayerChanged(object sender, EventArgs e) { HitDice.ReplaceRange(from h in Context.Player.GetHitDie() orderby h select new HitDieViewModel(this, h)); Scores.Update(Context.Player); ShowClasses.ChangeCanExecute(); ShowRace.ChangeCanExecute(); ShowBackground.ChangeCanExecute(); }