SIL.FieldWorks.XWorks.MorphologyEditor.InflAffixTemplateControl.HandleInsertAroundSlot C# (CSharp) Method

HandleInsertAroundSlot() private method

private HandleInsertAroundSlot ( bool fBefore, IMoInflAffixSlot chosenSlot, int &flid, int &ihvo ) : void
fBefore bool
chosenSlot IMoInflAffixSlot
flid int
ihvo int
return void
		private void HandleInsertAroundSlot(bool fBefore, IMoInflAffixSlot chosenSlot, out int flid, out int ihvo)
		{
			IFdoReferenceSequence<IMoInflAffixSlot> seq;
			int index;
			flid = GetAffixSequenceContainingSlot(m_obj as IMoInflAffixSlot, out seq, out index);
			int iOffset = (fBefore) ? 0 : 1;
			UndoableUnitOfWorkHelper.Do(MEStrings.ksUndoAddSlot, MEStrings.ksRedoAddSlot, Cache.ActionHandlerAccessor,
				() => seq.Insert(index + iOffset, chosenSlot));
			// The views system numbers visually, so adjust index for RTL vernacular writing system.
			ihvo = index + iOffset;
			if (IsRTL())
				ihvo = (seq.Count - 1) - ihvo;
		}