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


C# ILexEntry.ReplaceMoForm方法代码示例

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


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

示例1: SwapValues

		private void SwapValues(ILexEntry entry, IMoForm origForm, IMoForm newForm, IMoMorphType type,
			List<IMoMorphSynAnalysis> rgmsaOld)
		{
			DataTree dtree = Slice.ContainingDataTree;
			int idx = Slice.IndexInContainer;
			dtree.DoNotRefresh = true;	// don't let the datatree repeatedly redraw itself...
			entry.ReplaceMoForm(origForm, newForm);
			newForm.MorphTypeRA = type;
			entry.ReplaceObsoleteMsas(rgmsaOld);
			// Dispose of any obsolete slices: new ones will replace them automatically in a moment
			// when the datatree is redrawn.
			foreach (Slice slice in Slice.ContainingDataTree.Slices.ToArray())
			{
				if (slice.IsDisposed)
					continue;
				if (slice.Object is IMoMorphSynAnalysis && rgmsaOld.Contains(slice.Object as IMoMorphSynAnalysis))
					slice.Dispose();
				else if (slice is MSAReferenceComboBoxSlice)
					slice.Dispose();
			}
			// now fix the record list, since it may be showing MoForm dependent columns (e.g. MorphType, Homograph, etc...)
			dtree.FixRecordList();
			dtree.DoNotRefresh = false;
			Slice sliceT = dtree.Slices[idx];
			if (sliceT != null && sliceT is MorphTypeAtomicReferenceSlice)
			{
				// When the new slice is created, the launch button is placed in the middle of
				// the slice rather than at the end.  This fiddling with the slice width seems
				// to fix that.  Then setting the index restores focus to the new slice.
				sliceT.Width += 1;
				sliceT.Width -= 1;
				dtree.GotoNextSliceAfterIndex(idx - 1);
			}
		}
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:34,代码来源:MorphTypeAtomicLauncher.cs


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