コード例 #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();
        }
コード例 #2
0
		private readonly int m_wsLineNumber; // ws to use for line numbers.

		public DiscourseExporter(FdoCache cache, XmlWriter writer, int hvoRoot, IVwViewConstructor vc,
			int wsLineNumber)
			: base(null, cache.MainCacheAccessor, hvoRoot)
		{
			m_cache = cache;
			m_writer = writer;
			m_vc = vc;
			m_wsLineNumber = wsLineNumber;
			m_chart = m_cache.ServiceLocator.GetInstance<IDsConstChartRepository>().GetObject(hvoRoot);
			m_rowRepo = m_cache.ServiceLocator.GetInstance<IConstChartRowRepository>();
		}
コード例 #3
0
        private readonly int m_wsLineNumber;         // ws to use for line numbers.

        public DiscourseExporter(FdoCache cache, XmlWriter writer, int hvoRoot, IVwViewConstructor vc,
                                 int wsLineNumber)
            : base(null, cache.MainCacheAccessor, hvoRoot)
        {
            m_cache        = cache;
            m_writer       = writer;
            m_vc           = vc;
            m_wsLineNumber = wsLineNumber;
            m_chart        = m_cache.ServiceLocator.GetInstance <IDsConstChartRepository>().GetObject(hvoRoot);
            m_rowRepo      = m_cache.ServiceLocator.GetInstance <IConstChartRowRepository>();
        }
コード例 #4
0
ファイル: ConstChartBody.cs プロジェクト: sillsdev/FieldWorks
		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();
		}
コード例 #5
0
ファイル: ConstChartBody.cs プロジェクト: sillsdev/FieldWorks
		/// <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);
		}