private void collButton_Click(object sender, RoutedEventArgs e) { Xceed.Wpf.Toolkit.CollectionControlDialog ccd = new Xceed.Wpf.Toolkit.CollectionControlDialog { ItemsSource = propListMust.Union(propListCustom).Union(propListExtra).Union(propListImportant).Union(propListNotUsed), Title = "Megjegyzések, limitek megadása" }; ccd.ShowDialog(); if (ccd.DialogResult == true) { saveListsToDb(); } }
private void button_EditPlot_Click(object sender, RoutedEventArgs e) { if (((StoryNote)DataContext).RootSaveFile?.Template?.StoryTemplate?.PlotArchetypes == null) { MessageBox.Show("Error: Current Story Template not found, or missing data.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } Xceed.Wpf.Toolkit.CollectionControlDialog editDialog = new Xceed.Wpf.Toolkit.CollectionControlDialog(typeof(PlotArchetypeNoteOption)); editDialog.NewItemTypes = new List <Type>() { typeof(PlotArchetypeNoteOption) }; editDialog.ItemsSource = ((StoryNote)DataContext).RootSaveFile.Template.StoryTemplate.PlotArchetypes.ChildOptions; editDialog.ShowDialog(); ((StoryNote)DataContext).RootSaveFile.Template.Save(); ((StoryNote)DataContext).RefreshTemplate(); }
private void button_EditAges_Click(object sender, RoutedEventArgs e) { if (((CharacterNote)DataContext).RootSaveFile?.Template?.CharacterTemplate?.Ages == null) { MessageBox.Show("Error: Current Character Template not found, or missing data.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } ((CharacterNote)DataContext).RootSaveFile.Template.CharacterTemplate.Ages.DeselectAllChildren(); Xceed.Wpf.Toolkit.CollectionControlDialog editDialog = new Xceed.Wpf.Toolkit.CollectionControlDialog(typeof(CharacterAgeOption)); editDialog.NewItemTypes = new List <Type>() { typeof(CharacterAgeOption) }; editDialog.ItemsSource = ((CharacterNote)DataContext).RootSaveFile.Template.CharacterTemplate.Ages.ChildOptions; editDialog.ShowDialog(); ((CharacterNote)DataContext).RootSaveFile.Template.Save(); ((CharacterNote)DataContext).RefreshTemplate(); }
private void button_EditPlot_Click(object sender, RoutedEventArgs e) { if (((StoryNote)DataContext).RootSaveFile?.Template?.StoryTemplate?.PlotArchetypes == null) { MessageBox.Show("Error: Current Story Template not found, or missing data.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); return; } Xceed.Wpf.Toolkit.CollectionControlDialog editDialog = new Xceed.Wpf.Toolkit.CollectionControlDialog(typeof(PlotArchetypeNoteOption)); editDialog.NewItemTypes = new List<Type>() { typeof(PlotArchetypeNoteOption) }; editDialog.ItemsSource = ((StoryNote)DataContext).RootSaveFile.Template.StoryTemplate.PlotArchetypes.ChildOptions; editDialog.ShowDialog(); ((StoryNote)DataContext).RootSaveFile.Template.Save(); ((StoryNote)DataContext).RefreshTemplate(); }
public void EditRelationships() { Xceed.Wpf.Toolkit.CollectionControlDialog relationshipDialog = new Xceed.Wpf.Toolkit.CollectionControlDialog(typeof(CharacterRelationshipOption)); relationshipDialog.ItemsSource = Template.CharacterTemplate.Relationships.ChildOptions; relationshipDialog.NewItemTypes = new List<Type>() { typeof(CharacterRelationshipOption) }; relationshipDialog.ShowDialog(); Template.Save(); }