Esempio n. 1
0
        public DiscourseTestHelper(FdoCache cache)
        {
            m_cache = cache;

            #region Load Factories and Repositories

            m_servLoc        = m_cache.ServiceLocator;
            m_tsf            = cache.TsStrFactory;
            m_wAnalysisFact  = m_servLoc.GetInstance <IWfiAnalysisFactory>();
            m_wGlossFact     = m_servLoc.GetInstance <IWfiGlossFactory>();
            m_rowFact        = m_servLoc.GetInstance <IConstChartRowFactory>();
            m_wordGrpFact    = m_servLoc.GetInstance <IConstChartWordGroupFactory>();
            m_ccTagFact      = m_servLoc.GetInstance <IConstChartTagFactory>();
            m_mtmFact        = m_servLoc.GetInstance <IConstChartMovedTextMarkerFactory>();
            m_clauseMrkrFact = m_servLoc.GetInstance <IConstChartClauseMarkerFactory>();
            m_partRepo       = m_servLoc.GetInstance <IConstituentChartCellPartRepository>();
            m_rowRepo        = m_servLoc.GetInstance <IConstChartRowRepository>();

            #endregion

            m_text = m_servLoc.GetInstance <ITextFactory>().Create();
            //Cache.LangProject.TextsOC.Add(m_text);
            m_stText          = m_servLoc.GetInstance <IStTextFactory>().Create();
            m_text.ContentsOA = m_stText;
            m_allOccurrences  = new Dictionary <IStTxtPara, AnalysisOccurrence[]>();
            m_firstPara       = MakeParagraph();
        }
Esempio n. 2
0
		public ConstChartVc(ConstChartBody chart)
			: base(chart.Cache)
		{
			m_chart = chart;
			m_cache = m_chart.Cache;
			m_tssFact = m_cache.TsStrFactory;
			m_tssSpace = m_tssFact.MakeString(" ", m_cache.DefaultAnalWs);
			m_rowRepo = m_cache.ServiceLocator.GetInstance<IConstChartRowRepository>();
			m_wordGrpRepo = m_cache.ServiceLocator.GetInstance<IConstChartWordGroupRepository>();
			m_partRepo = m_cache.ServiceLocator.GetInstance<IConstituentChartCellPartRepository>();
			m_sMovedTextBefore = m_tssFact.MakeString(DiscourseStrings.ksMovedTextBefore,
													m_cache.DefaultUserWs);
			m_sMovedTextAfter = m_tssFact.MakeString(DiscourseStrings.ksMovedTextAfter,
													m_cache.DefaultUserWs);
			LoadFormatProps();
		}
Esempio n. 3
0
		/// <summary>
		/// Make one.
		/// </summary>
		/// <param name="baseObj"></param>
		/// <param name="cache"></param>
		/// <param name="vwenv"></param>
		/// <param name="hvo"></param>
		public MakeCellsMethod(ConstChartVc baseObj, FdoCache cache, IVwEnv vwenv, int hvo)
		{
			m_this = baseObj;
			m_cache = cache;
			m_rowRepo = m_cache.ServiceLocator.GetInstance<IConstChartRowRepository>();
			m_partRepo = m_cache.ServiceLocator.GetInstance<IConstituentChartCellPartRepository>();

			// Decorator makes sure that things get put out in the right order if chart is RtL
			m_chart = baseObj.m_chart;
			//var sPopFormatting = m_cache.TsStrFactory.MakeString(Convert.ToString(m_chart.PDF), m_cache.DefaultAnalWs);
			m_vwenv = new ChartRowEnvDecorator(vwenv);

			m_hvoRow = hvo;
			m_row = m_rowRepo.GetObject(m_hvoRow);
		}