Exemplo n.º 1
0
        private string GetConflictFromCharacterConflict()
        {
            string conflict = null;

            if (!string.IsNullOrEmpty(CharacterConflict))
            {
                int startIndex = CharacterConflict.IndexOf(" who ");
                if (startIndex != -1)
                {
                    startIndex += 5;
                    int endIndex = CharacterConflict.LastIndexOf('.');

                    if (endIndex == -1)
                    {
                        conflict = CharacterConflict.Substring(startIndex);
                    }
                    else
                    {
                        conflict = CharacterConflict.Substring(startIndex, endIndex - startIndex);
                    }
                }
            }

            return(conflict);
        }
Exemplo n.º 2
0
        private string GetSupportingCharacterFromCharacterConflict()
        {
            string supportingCharacter = null;

            if (!string.IsNullOrEmpty(CharacterConflict))
            {
                int startIndex = CharacterConflict.IndexOf("Another character is ");
                if (startIndex != -1)
                {
                    startIndex += 21;
                    int endIndex = CharacterConflict.IndexOf(" who ");

                    if (endIndex == -1)
                    {
                        supportingCharacter = CharacterConflict.Substring(startIndex);
                    }
                    else
                    {
                        supportingCharacter = CharacterConflict.Substring(startIndex, endIndex - startIndex);
                    }
                }
            }

            return(supportingCharacter);
        }
Exemplo n.º 3
0
        private string GetProtagonistFromCharacterConflict()
        {
            string protagonist = null;

            if (!string.IsNullOrEmpty(CharacterConflict) &&
                CharacterConflict.StartsWith("The story starts when the protagonist "))
            {
                int endIndex = CharacterConflict.IndexOf('.');
                if (endIndex == -1)
                {
                    endIndex = CharacterConflict.IndexOf(Environment.NewLine);
                }

                if (endIndex == -1)
                {
                    protagonist = CharacterConflict.Substring(38);
                }
                else
                {
                    protagonist = CharacterConflict.Substring(38, endIndex - 38);
                }
            }

            return(protagonist);
        }
Exemplo n.º 4
0
        public override bool ContainsText(string text)
        {
            string matchText = text.ToLowerInvariant();

            return(Name.ToLowerInvariant().Contains(matchText) || PlotArchetype?.ToLowerInvariant().Contains(matchText) == true ||
                   PlotSubtype?.ToLowerInvariant().Contains(matchText) == true || PlotElement?.ToLowerInvariant().Contains(matchText) == true ||
                   CharacterConflict?.ToLowerInvariant().Contains(matchText) == true ||
                   Backgrounds?.ContainsText(matchText) == true || Resolutions?.ContainsText(matchText) == true ||
                   Traits?.ContainsText(matchText) == true || Settings?.ContainsText(matchText) == true ||
                   Themes?.ContainsText(matchText) == true || Genres?.ContainsText(matchText) == true);
        }
Exemplo n.º 5
0
        public override TextNote ConvertToTextNote()
        {
            TextNote newNote = new TextNote()
            {
                ExplicitName = this.ExplicitName,
                IsExpanded   = this.IsExpanded,
                IsSelected   = this.IsSelected
            };

            newNote.Ideas = Ideas;

            newNote.AddParagraph(GetPlotString());
            newNote.AddParagraph(string.Empty);
            foreach (var line in CharacterConflict.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
            {
                newNote.AddParagraph(line);
            }
            newNote.AddParagraph(string.Empty);
            foreach (var line in Backgrounds.GetSummary(0).Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
            {
                newNote.AddParagraph(line);
            }
            newNote.AddParagraph(string.Empty);
            foreach (var line in Resolutions.GetSummary(0).Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
            {
                newNote.AddParagraph(line);
            }
            newNote.AddParagraph(string.Empty);
            foreach (var line in Traits.GetSummary(0).Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
            {
                newNote.AddParagraph(line);
            }
            newNote.AddParagraph(string.Empty);
            foreach (var line in Settings.GetSummary(0).Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
            {
                newNote.AddParagraph(line);
            }
            newNote.AddParagraph(string.Empty);
            foreach (var line in Themes.GetSummary(0).Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
            {
                newNote.AddParagraph(line);
            }
            newNote.AddParagraph(string.Empty);
            foreach (var line in Genres.GetSummary(0).Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries))
            {
                newNote.AddParagraph(line);
            }

            return(newNote);
        }