private void SetSkills(object sender, ExecutedRoutedEventArgs e) { EndGnomeEdit(); var dlg = new SkillDialog { Owner = this }; var result = dlg.ShowDialog(); if (result == false) { return; } int skillValue; Int32.TryParse(dlg.SkillValue.Text, out skillValue); if (dlg.MilitarySkills.IsChecked == true) { SelectedGnomeRows.ToList().ForEach(x => x.SetMilitarySkills(skillValue)); } if (dlg.ProfessionSkills.IsChecked == true) { SelectedGnomeRows.ToList().ForEach(x => x.SetProfessionSkills(skillValue)); } GnomeGrid.Items.Refresh(); }
private void SetAttributes(object sender, ExecutedRoutedEventArgs e) { EndGnomeEdit(); var dlg = new AttributeDialog { Owner = this }; var result = dlg.ShowDialog(); if (result == false) { return; } int attributeValue; Int32.TryParse(dlg.AttributeValue.Text, out attributeValue); SelectedGnomeRows.ToList().ForEach(x => x.SetAttributes(attributeValue)); GnomeGrid.Items.Refresh(); }