Пример #1
0
        private void DeleteButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            FrameworkElement el = (FrameworkElement)sender;

            ParsedFeat feat = (ParsedFeat)el.DataContext;

            _CurrentFeats.Remove(feat);
            _Monster.RemoveFeat(feat.Text);
        }
Пример #2
0
        private void RemoveButton_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            ParsedFeat feat = (ParsedFeat)CurrentFeatsBox.SelectedItem;

            if (feat != null)
            {
                _CurrentFeats.Remove(feat);
                _Monster.RemoveFeat(feat.Text);
            }
        }
Пример #3
0
        private void TextBox_TextChanged(object sender, System.Windows.Controls.TextChangedEventArgs e)
        {
            FrameworkElement el = (FrameworkElement)sender;

            ParsedFeat feat = (ParsedFeat)el.DataContext;

            _Monster.RemoveFeat(feat.FeatSource);
            feat.FeatSource = feat.Text;
            _Monster.AddFeat(feat.FeatSource);
        }