private void AddConflict_Executed(object sender, ExecutedRoutedEventArgs e) { string response = PromptDialog.Prompt("Enter a term for the new conflict:", "New Conflict", false); if (!string.IsNullOrWhiteSpace(response)) { ((StoryTemplate)DataContext).Conflicts.Add(response); } }
private void AddSupportingCharacter_Executed(object sender, ExecutedRoutedEventArgs e) { string response = PromptDialog.Prompt("Enter a term for the new supporting character:", "New Supporting Character", false); if (!string.IsNullOrWhiteSpace(response)) { ((StoryTemplate)DataContext).SupportingCharacters.Add(response); } }
private void AddSuffix_Executed(object sender, ExecutedRoutedEventArgs e) { string response = PromptDialog.Prompt("Enter the new suffix:", "New Suffix", false); if (!string.IsNullOrWhiteSpace(response)) { ((CharacterTemplate)DataContext).Suffixes.Add(response); } }
private void button_AddCustomBackground_Click(object sender, RoutedEventArgs e) { string response = PromptDialog.Prompt("Enter your custom value:", "Custom Value", false); if (!string.IsNullOrWhiteSpace(response)) { NoteOption custom = new NoteOption(response); ((StoryNote)DataContext).Backgrounds.AddChild(custom); custom.IsChecked = true; } }
private void button_AddCustomTrait_Click(object sender, RoutedEventArgs e) { string response = PromptDialog.Prompt("Enter your custom value:", "Custom Value", false); if (!string.IsNullOrWhiteSpace(response)) { CharacterNoteOption custom = new CharacterNoteOption(response) { IsChecked = true }; ((CharacterNote)DataContext).Traits.AddChild(custom); } }
private void AddCustomChildCommand(object sender, ExecutedRoutedEventArgs e) { TreeView treeView = (TreeView)e.Parameter; NoteOption noteOption = (NoteOption)treeView.SelectedItem; if (noteOption != null) { string response = PromptDialog.Prompt("Enter your custom value:", "Custom Value", false); if (!string.IsNullOrWhiteSpace(response)) { NoteOption custom = new NoteOption(response); noteOption.AddChild(custom); custom.IsChecked = true; } } }