예제 #1
0
        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();
        }
예제 #2
0
        private void SetEnemySkills(object sender, ExecutedRoutedEventArgs e)
        {
            var dlg = new SkillDialog {
                Owner = this, ProfessionSkills = { IsChecked = false, IsEnabled = false }
            };
            var result = dlg.ShowDialog();

            if (result == false)
            {
                return;
            }

            int skillValue;

            Int32.TryParse(dlg.SkillValue.Text, out skillValue);

            if (dlg.MilitarySkills.IsChecked == true)
            {
                SelectedEnemyRows.ToList().ForEach(x => x.SetMilitarySkills(skillValue));
            }

            EnemyGrid.Items.Refresh();
        }
예제 #3
0
        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();
        }
예제 #4
0
        private void SetEnemySkills(object sender, ExecutedRoutedEventArgs e)
        {
            var dlg = new SkillDialog { Owner = this, ProfessionSkills = { IsChecked = false, IsEnabled = false } };
            var result = dlg.ShowDialog();
            if (result == false)
            {
                return;
            }

            int skillValue;
            Int32.TryParse(dlg.SkillValue.Text, out skillValue);

            if (dlg.MilitarySkills.IsChecked == true)
            {
                SelectedEnemyRows.ToList().ForEach(x => x.SetMilitarySkills(skillValue));
            }

            EnemyGrid.Items.Refresh();
        }