コード例 #1
0
        protected override int InsertNC(IPhNaturalClass nc, SelectionHelper sel, out int cellIndex, out IPhSimpleContextNC ctxt)
        {
            ctxt = m_cache.ServiceLocator.GetInstance <IPhSimpleContextNCFactory>().Create();
            var cellId = InsertContext(ctxt, sel, out cellIndex);

            ctxt.FeatureStructureRA = nc;
            return(cellId);
        }
コード例 #2
0
		private static XElement ExportNaturalClass(IPhNaturalClass naturalClass, Icu.UNormalizationMode mode)
		{
			return new XElement(naturalClass.ClassName,
								new XAttribute("Id", naturalClass.Hvo),
								ExportBestAnalysis(naturalClass.Name, "Name", mode),
								ExportBestAnalysis(naturalClass.Description, "Description", mode),
								ExportBestAnalysis(naturalClass.Abbreviation, "Abbreviation", mode),
								(naturalClass is IPhNCFeatures)
									? ExportNaturalClassContents(naturalClass as IPhNCFeatures)
									: ExportNaturalClassContents(naturalClass as IPhNCSegments));
		}
コード例 #3
0
		protected override int InsertNC(IPhNaturalClass nc, SelectionHelper sel, out int cellIndex, out IPhSimpleContextNC ctxt)
		{
			ctxt = m_cache.ServiceLocator.GetInstance<IPhSimpleContextNCFactory>().Create();
			var cellId = InsertContext(ctxt, sel, out cellIndex);
			ctxt.FeatureStructureRA = nc;
			return cellId;
		}
コード例 #4
0
ファイル: HCLoaderTests.cs プロジェクト: sillsdev/FieldWorks
		private IPhSimpleContextNC AddNCContext(IPhNaturalClass nc)
		{
			IPhSimpleContextNC ncCtxt = Cache.ServiceLocator.GetInstance<IPhSimpleContextNCFactory>().Create();
			Cache.LanguageProject.PhonologicalDataOA.ContextsOS.Add(ncCtxt);
			ncCtxt.FeatureStructureRA = nc;
			return ncCtxt;
		}
コード例 #5
0
		/// <summary>
		/// Inserts an item from a natural class.
		/// </summary>
		/// <param name="nc">The natural class.</param>
		/// <param name="sel">The selection.</param>
		/// <param name="cellIndex">Index of the new item.</param>
		/// <param name="ctxt">The new context.</param>
		/// <returns>
		/// The ID of the cell that the item was inserted into
		/// </returns>
		protected virtual int InsertNC(IPhNaturalClass nc, SelectionHelper sel, out int cellIndex, out IPhSimpleContextNC ctxt)
		{
			throw new NotImplementedException();
		}
コード例 #6
0
		private int InsertNC(IPhNaturalClass nc, SelectionHelper sel, out int cellIndex)
		{
			IPhSimpleContextNC ctxt;
			return InsertNC(nc, sel, out cellIndex, out ctxt);
		}