Пример #1
0
        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);
            }
        }
Пример #2
0
        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);
            }
        }
Пример #4
0
        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;
            }
        }
Пример #5
0
        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);
            }
        }
Пример #6
0
        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;
                }
            }
        }