Beispiel #1
0
        public void RemoveStakeholder(
            Stakeholder stakeholder,
            String oldNameStartTag,
            String oldNameEndTag,
            String newNameStartTag,
            String newNameEndTag,
            Boolean dontMarkOccurrences)
        {
            this.PurgeReferences(
                stakeholder,
                null,
                oldNameStartTag,
                oldNameEndTag,
                newNameStartTag,
                newNameEndTag,
                dontMarkOccurrences);

            foreach (Stakeholder tmpStakeholder in this.stakeholders)
            {
                if (tmpStakeholder.ID > stakeholder.ID)
                {
                    tmpStakeholder.ID -= 1;
                }
            }
            this.stakeholders.Remove(stakeholder);
        }
Beispiel #2
0
        public void AddBeneficiary(Stakeholder stakeholder)
        {
            ReferencedObject refobj = new ReferencedObject();

            refobj.UniqueID = stakeholder.UniqueID;
            this.Beneficiaries.Add(refobj);
        }
Beispiel #3
0
        public void AddProponent(Stakeholder stakeholder)
        {
            ReferencedObject refobj = new ReferencedObject();

            refobj.UniqueID = stakeholder.UniqueID;
            this.Proponents.Add(refobj);
        }
Beispiel #4
0
        public void RemoveBeneficiary(Stakeholder stakeholder)
        {
            ReferencedObject refobj = (ReferencedObject)this.Beneficiaries.FindByUniqueID(stakeholder.UniqueID);

            if (refobj != null)
            {
                this.Beneficiaries.Remove(refobj);
            }
        }
Beispiel #5
0
        public void RemoveProponent(Stakeholder stakeholder)
        {
            ReferencedObject refobj = (ReferencedObject)this.Proponents.FindByUniqueID(stakeholder.UniqueID);

            if (refobj != null)
            {
                this.Proponents.Remove(refobj);
            }
        }
 public void RemoveProponent(Stakeholder stakeholder)
 {
     ReferencedObject refobj = (ReferencedObject)this.Proponents.FindByUniqueID(stakeholder.UniqueID);
     if(refobj != null)
     {
         this.Proponents.Remove(refobj);
     }
 }
 public void RemoveBeneficiary(Stakeholder stakeholder)
 {
     ReferencedObject refobj = (ReferencedObject)this.Beneficiaries.FindByUniqueID(stakeholder.UniqueID);
     if(refobj != null)
     {
         this.Beneficiaries.Remove(refobj);
     }
 }
 public void AddProponent(Stakeholder stakeholder)
 {
     ReferencedObject refobj = new ReferencedObject();
     refobj.UniqueID = stakeholder.UniqueID;
     this.Proponents.Add(refobj);
 }
 public void AddBeneficiary(Stakeholder stakeholder)
 {
     ReferencedObject refobj = new ReferencedObject();
     refobj.UniqueID = stakeholder.UniqueID;
     this.Beneficiaries.Add(refobj);
 }
Beispiel #10
0
        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);
        }
Beispiel #11
0
 public void AddStakeholder(Stakeholder stakeholder)
 {
     stakeholder.Owner = this;
     this.stakeholders.Add(stakeholder);
 }
Beispiel #12
0
        public Stakeholder NewStakeholder(String name, String prefix, Int32 id)
        {
            Stakeholder stakeholder = new Stakeholder(name, prefix, id, this);

            return(stakeholder);
        }
Beispiel #13
0
        public void RemoveStakeholder(
            Stakeholder stakeholder,
            String oldNameStartTag,
            String oldNameEndTag,
            String newNameStartTag,
            String newNameEndTag,
            Boolean dontMarkOccurrences)
        {
            this.PurgeReferences(
                stakeholder,
                null,
                oldNameStartTag,
                oldNameEndTag,
                newNameStartTag,
                newNameEndTag,
                dontMarkOccurrences);

            foreach(Stakeholder tmpStakeholder in this.stakeholders)
            {
                if(tmpStakeholder.ID > stakeholder.ID)
                {
                    tmpStakeholder.ID -= 1;
                }
            }
            this.stakeholders.Remove(stakeholder);
        }
Beispiel #14
0
 public Stakeholder NewStakeholder(String name, String prefix, Int32 id)
 {
     Stakeholder stakeholder = new Stakeholder(name, prefix, id, this);
     return stakeholder;
 }
Beispiel #15
0
 public void AddStakeholder(Stakeholder stakeholder)
 {
     stakeholder.Owner = this;
     this.stakeholders.Add(stakeholder);
 }