示例#1
0
 public void AddStack(CmdStack Stack)
 {
     if (!m_Stacks.Contains(Stack))
     {
         m_Stacks.Add(Stack);
         Stack.EventCanRedoChanged += new EventHandler <BoolEventArgs>(Stack_EventCanRedoChanged);
         Stack.EventCanUndoChanged += new EventHandler <BoolEventArgs>(Stack_EventCanUndoChanged);
         Stack.EventUpdate         += new EventHandler <EventArgs>(Stack_EventUpdate);
     }
 }
示例#2
0
 public void SetActiveStack(CmdStack Stack)
 {
     if (m_Stacks.Contains(Stack))
     {
         m_ActiveStack = Stack;
         FireCanRedoChanged();
         FireCanUndoChanged();
         FireUpdateEvent();
     }
 }
示例#3
0
 public void RemoveStack(CmdStack Stack)
 {
     if (m_Stacks.Contains(Stack))
     {
         Stack.EventUpdate         -= Stack_EventUpdate;
         Stack.EventCanRedoChanged -= Stack_EventCanRedoChanged;
         Stack.EventCanUndoChanged -= Stack_EventCanUndoChanged;
         m_Stacks.Remove(Stack);
     }
     ;
     if (m_ActiveStack == Stack)
     {
         m_ActiveStack = null;
     }
 }