This class exists to decorate the main SDA for concordance views. It implements the Occurrences and OccurrencesCount properties for WfiWordform.
Inheritance: SIL.FieldWorks.FDO.Application.DomainDataByFlidDecoratorBase, ISetMediator, ISetRootHvo
Example #1
0
        /// <summary>
        /// Set up the current 'interesting texts' to include the part of Scripture (currently only 'all' is
        /// supported) specified byt the mediator property "LinkScriptureBooksWanted". Then remeove that property.
        /// </summary>
        void SetupLinkScripture()
        {
            string booksWanted = m_propertyTable.GetStringProperty("LinkScriptureBooksWanted", null);

            if (booksWanted == null)
            {
                return;
            }
            m_propertyTable.RemoveProperty("LinkScriptureBooksWanted");
            if (booksWanted != "all")
            {
                return;                 // Enhance JohnT: accept a list of books in some form or other.
            }
            var            books = Cache.LanguageProject.TranslatedScriptureOA.ScriptureBooksOS;
            List <IStText> texts = new List <IStText>(0);

            foreach (var book in books)
            {
                foreach (var section in book.SectionsOS)
                {
                    texts.Add(section.ContentOA);
                    texts.Add(section.HeadingOA);
                }
            }

            var interestingTexts = InterestingTextsDecorator.GetInterestingTextList(m_mediator, m_propertyTable, Cache.ServiceLocator);

            interestingTexts.SetInterestingTexts(texts);
        }
Example #2
0
 public void SetMediator(Mediator mediator, PropertyTable propertyTable)
 {
     Mediator           = mediator;
     PropTable          = propertyTable;
     m_interestingTexts = InterestingTextsDecorator.GetInterestingTextList(mediator, PropTable, m_services);
     m_interestingTexts.InterestingTextsChanged += m_interestingTexts_InterestingTextsChanged;
 }
Example #3
0
 public void SetMediator(Mediator mediator)
 {
     Mediator           = mediator;
     m_interestingTexts = InterestingTextsDecorator.GetInterestingTextList(mediator, m_services);
     m_interestingTexts.InterestingTextsChanged += m_interestingTexts_InterestingTextsChanged;
 }