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

HandleInsertAroundStem() private method

private HandleInsertAroundStem ( bool fBefore, IMoInflAffixSlot chosenSlot, int &flid, int &ihvo ) : void
fBefore bool
chosenSlot IMoInflAffixSlot
flid int
ihvo int
return void
		private void HandleInsertAroundStem(bool fBefore, IMoInflAffixSlot chosenSlot, out int flid, out int ihvo)
		{
			if (fBefore)
			{
				flid = MoInflAffixTemplateTags.kflidPrefixSlots;
				// The views system numbers visually, so adjust index for RTL vernacular writing system.
				if (IsRTL())
					ihvo = 0;
				else
					ihvo = m_template.PrefixSlotsRS.Count;
				UndoableUnitOfWorkHelper.Do(MEStrings.ksUndoAddSlot, MEStrings.ksRedoAddSlot, Cache.ActionHandlerAccessor,
					() => m_template.PrefixSlotsRS.Add(chosenSlot));
			}
			else
			{
				flid = MoInflAffixTemplateTags.kflidSuffixSlots;
				// The views system numbers visually, so adjust index for RTL vernacular writing system.
				if (IsRTL())
					ihvo = m_template.SuffixSlotsRS.Count;
				else
					ihvo = 0;
				UndoableUnitOfWorkHelper.Do(MEStrings.ksUndoAddSlot, MEStrings.ksRedoAddSlot, Cache.ActionHandlerAccessor,
					() => m_template.SuffixSlotsRS.Insert(0, chosenSlot));
			}
		}