예제 #1
0
        public override void Dispose()
        {
            Core.Environment.Scene.OnLoaded -= Scene_OnLoaded;
            constructDevice = null;
            if (Leaving != null)
            {
                Leaving.Dispose();
            }
            if (Entering != null)
            {
                Entering.Dispose();
            }

            arrow.Dispose();

            if (Assemblies != null)
            {
                foreach (Assembly assembly in this.Assemblies)
                {
                    assembly.Dispose();
                }
            }

            base.Dispose();
        }
예제 #2
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);
            }
        }
예제 #3
0
 public Running(AccountUC accountform)
 {
     account           = accountform;
     m_Openning        = null;
     m_Leaving         = null;
     m_Getting         = null;
     m_CurrentPetIndex = 0;
 }
예제 #4
0
 public Running()
 {
     m_Openning        = null;
     m_Leaving         = null;
     m_Getting         = null;
     OnSafe            = false;
     m_CurrentPetIndex = 0;
 }
예제 #5
0
        public void LeavingFoodToSafe()
        {
            if (m_Leaving == null)
            {
                m_Leaving = new Leaving(account);
            }

            m_Leaving.Init();
        }
예제 #6
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);
        }
예제 #7
0
        public ActionResult LeavingRequest(Leaving leave)
        {
            Leaving leaving = new Leaving();

            leaving.LeaveRequest = leave.LeaveRequest;
            leaving.RollNo       = leave.RollNo;
            leaving.Time         = DateTime.Now.TimeOfDay;
            leaving.Date         = DateTime.Now.ToLocalTime();
            leaving.LeaveState   = Enum.GetName(typeof(States), 0);
            db.Leavings.Add(leaving);
            db.SaveChanges();
            return(RedirectToAction("Index", "Employee", null));
        }
예제 #8
0
 private void Scene_Leaving(object sender, EventArgs e)
 {
     Leaving?.Invoke(sender, e);
 }
예제 #9
0
 public void TriggerLeaving()
 {
     Leaving?.Invoke(this, EventArgs.Empty);
 }