protected void UndoAction_ItemSelf(int aItemNo, int aOffset) { HCUndoList vUndoList = GetUndoList(); if ((vUndoList != null) && vUndoList.Enable) { HCUndo vUndo = vUndoList.Last; if (vUndo != null) { vUndo.ActionAppend(HCAction.actItemSelf, aItemNo, aOffset, Items[aItemNo].ParaFirst); } } }
protected void UndoAction_ItemMirror(int aItemNo, int aOffset) { HCUndoList vUndoList = GetUndoList(); if ((vUndoList != null) && vUndoList.Enable) { HCUndo vUndo = vUndoList.Last; if (vUndo != null) { HCItemUndoAction vItemAction = vUndo.ActionAppend(HCAction.actItemMirror, aItemNo, aOffset, Items[aItemNo].ParaFirst) as HCItemUndoAction; SaveItemToStreamAlone(vItemAction.ItemStream, Items[aItemNo]); } } }
/// <summary> 插入Item到指定位置 </summary> /// <param name="AItemNo">操作发生时的ItemNo</param> /// <param name="AOffset">操作发生时的Offset</param> protected void UndoAction_InsertItem(int aItemNo, int aOffset) { HCUndoList vUndoList = GetUndoList(); if ((vUndoList != null) && vUndoList.Enable) { HCUndo vUndo = vUndoList.Last; if (vUndo != null) { HCItemUndoAction vItemAction = vUndo.ActionAppend(UndoActionTag.uatInsertItem, aItemNo, aOffset, Items[aItemNo].ParaFirst) as HCItemUndoAction; SaveItemToStreamAlone(Items[aItemNo], vItemAction.ItemStream); } } }
protected void UndoAction_InsertText(int aItemNo, int aOffset, string aText) { HCUndoList vUndoList = GetUndoList(); if ((vUndoList != null) && vUndoList.Enable) { HCUndo vUndo = vUndoList.Last; if (vUndo != null) { HCTextUndoAction vTextAction = vUndo.ActionAppend(HCAction.actInsertText, aItemNo, aOffset, Items[aItemNo].ParaFirst) as HCTextUndoAction; vTextAction.Text = aText; } } }
protected void UndoAction_SetItemText(int aItemNo, int aOffset, string aNewText) { HCUndoList vUndoList = GetUndoList(); if ((vUndoList != null) && vUndoList.Enable) { HCUndo vUndo = vUndoList.Last; if (vUndo != null) { HCSetItemTextUndoAction vTextAction = vUndo.ActionAppend(UndoActionTag.uatSetItemText, aItemNo, aOffset, Items[aItemNo].ParaFirst) as HCSetItemTextUndoAction; vTextAction.NewText = aNewText; } } }