예제 #1
0
 /// <summary>
 /// Called when [stack changed].
 /// </summary>
 protected virtual void OnStackChanged()
 {
     if (StackChanged != null)
     {
         StackChanged.Invoke(this, EventArgs.Empty);
     }
 }
 public new void Push(T item)
 {
     base.Push(item);
     StackChanged?.Invoke(this, new StackChangedEventArgs <T>()
     {
         Item = item, EventType = StackChangedEvent.Push
     });
 }
예제 #3
0
 private void OnStackChanged(OperationStackChangedEvent eventType)
 {
     Debug.Assert(_preStackChangedCall == 1, ErrorMessages.InvalidOperation);
     _preStackChangedCall--;
     StackChanged?.Invoke(this, new OperationStackChangedEventArgs()
     {
         EventType = eventType
     });
 }
        public new T Pop()
        {
            T item = base.Pop();

            StackChanged?.Invoke(this, new StackChangedEventArgs <T>()
            {
                Item = item, EventType = StackChangedEvent.Pop
            });
            return(item);
        }
예제 #5
0
 private static void NotifyOfStackChange()
 {
     StackChanged?.Invoke(null, new StackChangeEventArgs(UndoStack.Count, RedoStack.Count));
 }
예제 #6
0
 private void OnStackChanged()
 {
     Debug.Assert(_preStackChangedCall == 1, "不正な呼び出し");
     _preStackChangedCall--;
     StackChanged?.Invoke(this, new EventArgs());
 }
예제 #7
0
 protected virtual void OnStackChanged(Stack <Token> stack, PrecedenceRelation relation,
                                       ArraySegment <Token> inputTokens, List <Token> prn)
 {
     StackChanged?.Invoke(stack, relation, inputTokens, prn);
 }
예제 #8
0
 public void ChangeStack(int stack)
 {
     StackCount = Math.Max(1, stack);
     StackChanged?.Invoke(this);
 }
 void UpdateStack()
 {
     StackChanged.Invoke(this, new StackChangedEventArgs(Stack.Items.Count));
 }