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); }
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); } }
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); }