protected override void DoRedo(HCUndo Sender) { if (Sender.Data is HCUndoSize) { HCUndoSize vSizeAction = Sender.Data as HCUndoSize; this.Width = vSizeAction.NewWidth; this.Height = vSizeAction.NewHeight; } else { base.DoRedo(Sender); } }
// 撤销恢复相关方法 protected void Undo_Resize(int ANewWidth, int ANewHeight) { if (OwnerData.Style.EnableUndo) { Undo_StartRecord(); HCUndoList vUndoList = GetSelfUndoList(); HCUndo vUndo = vUndoList[vUndoList.Count - 1]; if (vUndo != null) { HCUndoSize vUndoSize = new HCUndoSize(); vUndoSize.OldWidth = this.Width; vUndoSize.OldHeight = this.Height; vUndoSize.NewWidth = ANewWidth; vUndoSize.NewHeight = ANewHeight; vUndo.Data = vUndoSize; } } }