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

HandleMove() private method

private HandleMove ( Command cmd, bool bLeft ) : void
cmd Command
bLeft bool
return void
		private void HandleMove(Command cmd, bool bLeft)
		{
			IFdoReferenceSequence<IMoInflAffixSlot> seq;
			int index;
			var slot = m_obj as IMoInflAffixSlot;
			GetAffixSequenceContainingSlot(slot, out seq, out index);
			UndoableUnitOfWorkHelper.Do(cmd.UndoText, cmd.RedoText, m_template,
				() =>
					{
						seq.RemoveAt(index);
						int iOffset = (bLeft) ? -1 : 1;
						seq.Insert(index + iOffset, slot);
					});
		}