예제 #1
0
 public void AddCommand(EditCommandBase command)
 {
     if (m_canCapture && command != null)
     {
         m_undoBuffer.Add(command);
         m_redoBuffer.Clear();
         Dirty = true;
     }
 }
예제 #2
0
        public bool DoRedo(IModel data)
        {
            if (m_redoBuffer.Count == 0)
            {
                return(false);
            }
            m_canCapture = false;
            EditCommandBase command = m_redoBuffer[m_redoBuffer.Count - 1];
            bool            result  = command.DoRedo(data);

            m_redoBuffer.RemoveAt(m_redoBuffer.Count - 1);
            m_undoBuffer.Add(command);
            m_canCapture = true;
            Dirty        = true;
            return(result);
        }
예제 #3
0
파일: Undo.cs 프로젝트: jjacksons/GLUE
 public void AddCommand(EditCommandBase command)
 {
     if (m_canCapture && command != null)
     {
         m_undoBuffer.Add(command);
         m_redoBuffer.Clear();
         Dirty = true;
     }
 }