当前位置: 首页>>代码示例>>C#>>正文


C# FdoCache.MakeVernTss方法代码示例

本文整理汇总了C#中SIL.FieldWorks.FDO.FdoCache.MakeVernTss方法的典型用法代码示例。如果您正苦于以下问题:C# FdoCache.MakeVernTss方法的具体用法?C# FdoCache.MakeVernTss怎么用?C# FdoCache.MakeVernTss使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SIL.FieldWorks.FDO.FdoCache的用法示例。


在下文中一共展示了FdoCache.MakeVernTss方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetDlgInfo

		/// <summary>
		/// Initialize an InsertEntryDlg from something like an "Insert Major Entry menu".
		/// </summary>
		/// <param name="cache">The FDO cache to use.</param>
		/// <param name="tssForm">The initial form to use.</param>
		/// <param name="mediator">The XCore.Mediator to use.</param>
		public void SetDlgInfo(FdoCache cache, ITsString tssForm, Mediator mediator)
		{
			CheckDisposed();

			m_mediator = mediator;
			if (m_types == null)
				m_types = new MoMorphTypeCollection(cache);
			string form = tssForm.Text;
			int clsidForm;
			IMoMorphType mmt;

			// Check whether the incoming form is vernacular or analysis.
			// (See LT-4074 and LT-7240.)
			int wsForm;
			bool fVern = IsFormWsInCurrentVernWs(cache, tssForm, out wsForm);
			// If form is empty (cf. LT-1621), use stem
			if (tssForm.Length == 0 || !fVern)
				mmt = m_types.Item(MoMorphType.kmtStem);
			else
				mmt = MoMorphType.FindMorphType(cache, m_types, ref form, out clsidForm);
			int wsVern = fVern ? wsForm : cache.DefaultVernWs;
			SetDlgInfo(cache, mmt, wsVern, MorphTypeFilterType.any);
			if (fVern)
			{
				TssForm = tssForm;
				TssGloss = cache.MakeAnalysisTss("");
				// The lexical form is already set, so shift focus to the gloss when
				// the form is activated.
				m_fLexicalFormInitialFocus = false;
			}
			else
			{
				TssForm = cache.MakeVernTss("");
				TssGloss = tssForm;
				// The gloss is already set, so shift the focus to the lexical form
				// when the form is activated.
				m_fLexicalFormInitialFocus = m_fLexicalFormChanged = true;
			}

			UpdateMatches();
		}
开发者ID:sillsdev,项目名称:WorldPad,代码行数:47,代码来源:InsertEntryDlg.cs


注:本文中的SIL.FieldWorks.FDO.FdoCache.MakeVernTss方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。