public bool OnMoveUpObjectInSequence(object cmd)
{
Slice slice = m_dataEntryForm.CurrentSlice;
Debug.Assert(slice != null, "No slice was current");
Debug.Assert(!slice.IsDisposed, "The current slice is already disposed??");
if (slice != null)
{
var cache = m_dataEntryForm.Cache;
var obj = slice.Object.Owner;
int flid = slice.Object.OwningFlid;
int ihvo = cache.DomainDataByFlid.GetObjIndex(obj.Hvo, (int)flid, slice.Object.Hvo);
if (ihvo > 0)
{
// The slice might be invalidated by the MoveOwningSequence, so we get its
// values first. See LT-6670.
XmlNode caller = slice.CallerNode;
XmlNode config = slice.ConfigurationNode;
int clid = slice.Object.ClassID;
Control parent = slice.Parent;
// We found it in the sequence, and it isn't already the first.
UndoableUnitOfWorkHelper.Do(xWorksStrings.UndoMoveItem, xWorksStrings.RedoMoveItem, cache.ActionHandlerAccessor,
()=>cache.DomainDataByFlid.MoveOwnSeq(obj.Hvo, (int)flid, ihvo, ihvo,
obj.Hvo, (int)flid, ihvo - 1));
}
}
return true; //we handled this.
}