Esempio n. 1
0
        [NotNull] public IScope Leave()
        {
            lock (mLock)
            {
                if (mStateStack.Count <= 0)
                {
                    return(this);
                }

                if (LeaveTrigger == ScopeLeaveTrigger.Leaving)
                {
                    mOnLeave?.Invoke();
                }

                LeavingOverride();
                Leaving?.Invoke(this, new EventArgs());

                mStateStack.Pop();

                Left?.Invoke(this, new EventArgs());
                LeftOverride();

                if (LeaveTrigger == ScopeLeaveTrigger.Left)
                {
                    mOnLeave?.Invoke();
                }

                return(this);
            }
        }
Esempio n. 2
0
        public override void MoveElement(Size formSize)
        {
            // Query whether the pipe is outside the playing field
            if (Right < 0)
            {
                Leaving?.Invoke(this);
            }

            // Move Pipe
            base.MoveElement(formSize);
        }
Esempio n. 3
0
 private void Scene_Leaving(object sender, EventArgs e)
 {
     Leaving?.Invoke(sender, e);
 }
Esempio n. 4
0
 public void TriggerLeaving()
 {
     Leaving?.Invoke(this, EventArgs.Empty);
 }