示例#1
0
		internal bool OnRedo(object args)
		{
			if (Cache.CanRedo)
			{
				using (UndoRedoSyncTextAndSandbox syncHelper = new UndoRedoSyncTextAndSandbox(this))
				{
					UndoResult ures;
					Cache.Redo(out ures);
				}
				return true;
			}
			return false;
		}
示例#2
0
		public bool OnUndo(object args)
		{
			if (Cache.CanUndo)
			{
				using (UndoRedoSyncTextAndSandbox syncHelper = new UndoRedoSyncTextAndSandbox(this))
				{
					UndoResult ures;
					Cache.Undo(out ures);
					// Apparently Undo/Redo for making/breaking phrases depends upon being able to survive with kuresRefresh.
					//Debug.Assert(ures != UndoResult.kuresRefresh,
					//             "Undo/Redo indicates that the display needs to refresh, so the display and the cache is out of date. " +
					//             "In general, we want to write Undo/Redo tasks that are able to undo/redo without refreshing. " +
					//             "A common cause for this is calling DeleteObjects and inadvertently setting fRequiresFullRefreshOfViewInUndoRedo to true. " +
					//             "Please investigate further.");
				}
				return true;
			}
			return false;
		}