예제 #1
0
        private void SetEnemyAttributes(object sender, ExecutedRoutedEventArgs e)
        {
            var dlg = new AttributeDialog {
                Owner = this
            };
            var result = dlg.ShowDialog();

            if (result == false)
            {
                return;
            }

            int attributeValue;

            Int32.TryParse(dlg.AttributeValue.Text, out attributeValue);
            SelectedEnemyRows.ToList().ForEach(x => x.SetAttributes(attributeValue));

            EnemyGrid.Items.Refresh();
        }
예제 #2
0
        private void SetEnemyAttributes(object sender, ExecutedRoutedEventArgs e)
        {
            var dlg = new AttributeDialog { Owner = this };
            var result = dlg.ShowDialog();
            if (result == false)
            {
                return;
            }

            int attributeValue;
            Int32.TryParse(dlg.AttributeValue.Text, out attributeValue);
            SelectedEnemyRows.ToList().ForEach(x => x.SetAttributes(attributeValue));

            EnemyGrid.Items.Refresh();
        }