|
@@ -3,32 +3,43 @@ using ComPDFKitViewer.Helper;
|
|
|
|
|
|
namespace ComPDFKit.Tool.UndoManger
|
|
namespace ComPDFKit.Tool.UndoManger
|
|
{
|
|
{
|
|
- public class PDFEditHistory : IHistory
|
|
|
|
- {
|
|
|
|
- public CPDFEditPage EditPage { get; set; }
|
|
|
|
- public int PageIndex { get; set; }
|
|
|
|
- public bool Redo()
|
|
|
|
- {
|
|
|
|
- if(EditPage!=null && EditPage.IsValid())
|
|
|
|
- {
|
|
|
|
- return EditPage.Redo();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+ public class PDFEditHistory : IHistory
|
|
|
|
+ {
|
|
|
|
+ public CPDFEditPage EditPage { get; set; }
|
|
|
|
+ public int PageIndex { get; set; }
|
|
|
|
+ public bool Redo()
|
|
|
|
+ {
|
|
|
|
+ if (EditPage != null && EditPage.IsValid())
|
|
|
|
+ {
|
|
|
|
+ bool result = EditPage.Redo();
|
|
|
|
+ if (result)
|
|
|
|
+ {
|
|
|
|
+ EditPage.EndEdit();
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
- public bool Undo()
|
|
|
|
- {
|
|
|
|
- if(EditPage!=null && EditPage.IsValid())
|
|
|
|
- {
|
|
|
|
- return EditPage.Undo();
|
|
|
|
- }
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public bool Undo()
|
|
|
|
+ {
|
|
|
|
+ if (EditPage != null && EditPage.IsValid())
|
|
|
|
+ {
|
|
|
|
+ bool result = EditPage.Undo();
|
|
|
|
+ if (result)
|
|
|
|
+ {
|
|
|
|
+ EditPage.EndEdit();
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
|
|
- public void Check(IHistory changeItem, bool undo, bool redo, bool add)
|
|
|
|
|
|
+ public void Check(IHistory changeItem, bool undo, bool redo, bool add)
|
|
{
|
|
{
|
|
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|