示例#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));
 }
 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));
 }