Exemple #1
0
 public async void Redo()
 {
     if (m_CurTask != null)
     {
         await m_CurTask;
     }
     m_CurTask = Task.Run(() =>
     {
         lock (m_UndoStack)
         {
             if (m_RedoStack.Count == 0)
             {
                 return;
             }
             RedoUndoCommandBase cmm = m_RedoStack.Pop();
             if (cmm.CanInvoke)
             {
                 cmm.RedoInvoke();
             }
             else
             {
                 cmm.Redo();
             }
             m_UndoStack.Push(cmm);
         }
     });
 }
Exemple #2
0
 public async void PushCommand(RedoUndoCommandBase cmm)
 {
     if (m_CurTask != null)
     {
         await m_CurTask;
     }
     m_CurTask = Task.Run(() =>
     {
         lock (m_UndoStack)
         {
             m_UndoStack.Push(cmm);
             m_RedoStack.Clear();
         }
     });
 }
		public async void PushCommand(RedoUndoCommandBase cmm)
		{
            if (m_CurTask != null)
            {
                await m_CurTask;
            }
            m_CurTask = Task.Run(() =>
			{
				lock (m_UndoStack)
				{
					m_UndoStack.Push(cmm);
					m_RedoStack.Clear();
				}
			});
		}