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(); }
[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); } }
public Running(AccountUC accountform) { account = accountform; m_Openning = null; m_Leaving = null; m_Getting = null; m_CurrentPetIndex = 0; }
public Running() { m_Openning = null; m_Leaving = null; m_Getting = null; OnSafe = false; m_CurrentPetIndex = 0; }
public void LeavingFoodToSafe() { if (m_Leaving == null) { m_Leaving = new Leaving(account); } m_Leaving.Init(); }
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); }
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)); }
private void Scene_Leaving(object sender, EventArgs e) { Leaving?.Invoke(sender, e); }
public void TriggerLeaving() { Leaving?.Invoke(this, EventArgs.Empty); }