استخدام ميزة التراجع والإعادة
Contents
[
Hide
]
ميزة GridDesktop’s Undo / Redo مفيدة للغاية. يشرح الاسم وظائفه بنفسه ، ويسمح لك بالتراجع / إعادة الإجراء (الإجراءات) الأخير في ورقة العمل. على سبيل المثال ، إذا تم حذف صيغة عن طريق الخطأ أو قمت بتحرير بيانات في خلية لا تريدها بالفعل ، فيمكن تصحيح هذه الإجراءات باستخدام عمليتي التراجع والإعادة التي يوفرها عنصر التحكم.
تنفيذ عملية التراجع والإعادة
تتوفر للمهمة واجهات برمجة التطبيقات التالية. الوصف معطى مع كل API ، يرجى التحقق منها.
- GridDesktop.EnableUndo - السمة: تشير إلى تمكين وظيفة التراجع ، والقيمة الافتراضية هي “خطأ”.
- التراجع عن المدير - فئة: تستخدم لإدارة عملية التراجع / الإعادة.
- GridDesktop.UndoManager - السمة: تحصل على مثيلالتراجع عن المدير موضوع.
- UndoManager.Undo - الطريقة: تقوم بعملية تراجع.
- UndoManager.Redo - الطريقة: تقوم بعملية الإعادة.
- UndoManager.ClearStack - الطريقة: يمسح مكدس التراجع / الإعادة.
- UndoManager.UndoStepsCount - السمة: تحصل على عدد خطوات التراجع المتوفرة حاليًا.
- UndoManager.RedoStepsCount - السمة: تحصل على عدد خطوات الإعادة المتاحة الحالية.
- UndoManager.UndoStackSize - السمة: تحصل على / تحدد حجم مكدس التراجع.
الغاء التحميل
يُظهر نموذج التعليمات البرمجية التالي كيفية تنفيذ عملية التراجع باستخدام GridDesktop API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Enable the Undo operation | |
gridDesktop1.EnableUndo = true; | |
// Create the UndoManager object | |
UndoManager um = gridDesktop1.UndoManager; | |
// Perform Undo operation | |
um.Undo(); |
إعادة
يوضح نموذج التعليمات البرمجية التالي كيفية تنفيذ عملية الإعادة باستخدام GridDesktop API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Create the UndoManager object | |
UndoManager um = gridDesktop1.UndoManager; | |
// Perform Redo operation | |
um.Redo(); |
حاليًا ، تشير عملية التراجع / الإعادة إلى التغيير في قيمة الخلية.