示例#1
0
        internal void StartUndoGroup(String description)
        {
            UndoGroup ug = new UndoGroup(this, description);

            _currentUndoGroup = ug;
            _actions.Push(ug);
        }
示例#2
0
        internal void EndUndoGroup(bool keepChanges)
        {
            if (_currentUndoGroup == null)
            {
                return;
            }

            // group contains no items; or user doesn't want changes to part of undo
            //
            if (_currentUndoGroup.Count == 0 || !keepChanges)
            {
                UndoGroup ug = _actions.Pop() as UndoGroup;                     // get rid of the empty group
                if (ug != _currentUndoGroup)
                {
                    throw new Exception("Internal logic error: EndGroup doesn't match StartGroup");
                }
            }
            _currentUndoGroup = null;
        }
示例#3
0
文件: Undo.cs 项目: mnisl/OD
		internal void EndUndoGroup(bool keepChanges)
		{
			if (_currentUndoGroup == null)
				return;

			// group contains no items; or user doesn't want changes to part of undo
			//   
			if (_currentUndoGroup.Count == 0 || !keepChanges)	
			{
				UndoGroup ug = _actions.Pop() as UndoGroup;	// get rid of the empty group
				if (ug != _currentUndoGroup)		
					throw new Exception("Internal logic error: EndGroup doesn't match StartGroup");
			}
			_currentUndoGroup = null;
		}
示例#4
0
文件: Undo.cs 项目: mnisl/OD
		internal void StartUndoGroup(String description)
		{
			UndoGroup ug = new UndoGroup(this, description);
			_currentUndoGroup = ug;
			_actions.Push(ug);
		}