public void RemoveGlossaryItem( GlossaryItem gi, String oldNameStartTag, String oldNameEndTag, String newNameStartTag, String newNameEndTag, Boolean dontMarkOccurrences) { if (!dontMarkOccurrences) { this.ChangeReferences( gi.Name, oldNameStartTag, oldNameEndTag, gi.Name, newNameStartTag, newNameEndTag, false); } foreach (GlossaryItem tmpGi in this.glossary) { if (tmpGi.ID > gi.ID) { tmpGi.ID -= 1; } } this.glossary.Remove(gi); }
public new void TextSearch( SearchBookmarkQueue sbq, String searchedText, String replacedText, Boolean wholeWordsOnly, Boolean caseSensitivity, Boolean executeReplaceAll) { Int32 counter; String expr; Regex regex; if (wholeWordsOnly) { expr = @"\b" + searchedText + @"\b"; } else { expr = searchedText; } if (caseSensitivity) { regex = new Regex(expr, RegexOptions.None); } else { regex = new Regex(expr, RegexOptions.IgnoreCase); } // GLOSSARY for (counter = 0; counter < this.glossary.Count; counter++) { GlossaryItem gi = (GlossaryItem)this.glossary[counter]; if (!executeReplaceAll) { foreach (Match match in regex.Matches(gi.Description)) { if (!executeReplaceAll) { this.AddBookmark(sbq, "Glossary", counter, match.Index, match.Length); } } } else { gi.Description = regex.Replace(gi.Description, replacedText); } } // STAKEHOLDERS for (counter = 0; counter < this.stakeholders.Count; counter++) { Stakeholder stakeholder = (Stakeholder)this.stakeholders[counter]; if (!executeReplaceAll) { foreach (Match match in regex.Matches(stakeholder.Description)) { if (!executeReplaceAll) { this.AddBookmark(sbq, "Stakeholders", counter, match.Index, match.Length); } } } else { stakeholder.Description = regex.Replace(stakeholder.Description, replacedText); } } base.TextSearch(sbq, searchedText, replacedText, wholeWordsOnly, caseSensitivity, executeReplaceAll); }
public void AddGlossaryItem(GlossaryItem gi) { gi.Owner = this; this.glossary.Add(gi); }
public GlossaryItem NewGlossaryItem(String name, String prefix, Int32 id) { GlossaryItem gi = new GlossaryItem(name, prefix, id, this); return(gi); }
public void RemoveGlossaryItem( GlossaryItem gi, String oldNameStartTag, String oldNameEndTag, String newNameStartTag, String newNameEndTag, Boolean dontMarkOccurrences) { if(!dontMarkOccurrences) { this.ChangeReferences( gi.Name, oldNameStartTag, oldNameEndTag, gi.Name, newNameStartTag, newNameEndTag, false); } foreach(GlossaryItem tmpGi in this.glossary) { if(tmpGi.ID > gi.ID) { tmpGi.ID -= 1; } } this.glossary.Remove(gi); }
public GlossaryItem NewGlossaryItem(String name, String prefix, Int32 id) { GlossaryItem gi = new GlossaryItem(name,prefix,id,this); return gi; }
public void AddGlossaryItem(GlossaryItem gi) { gi.Owner = this; this.glossary.Add(gi); }