public void MoveDown(KGFEventSequenceEntry theElementToMoveDown) { int anIndex = itsEntries.IndexOf(theElementToMoveDown); if (anIndex >= itsEntries.Count - 1) { KGFEvent.LogWarning("cannot move down element at end index", itsEventCategory, this); return; } Delete(theElementToMoveDown); itsEntries.Insert(anIndex + 1, theElementToMoveDown); }
public void MoveUp(KGFEventSequenceEntry theElementToMoveUp) { int anIndex = itsEntries.IndexOf(theElementToMoveUp); if (anIndex <= 0) { KGFEvent.LogWarning("cannot move up element at 0 index", itsEventCategory, this); return; } Delete(theElementToMoveUp); itsEntries.Insert(anIndex - 1, theElementToMoveUp); }