public override void OnAfterDelete() { if (_Timer != null) { _Timer.Stop(); } _Timer = null; base.OnAfterDelete(); }
public override void OnAfterDelete() { base.OnAfterDelete(); if (m_Timer != null) { m_Timer.Stop(); m_Timer = null; } if (!Deleted) { Delete(); } }
/// <summary> /// Finishes the targetting and send the Request gump /// </summary> /// <param name="from">Mobile doing the targetting</param> /// <param name="o">Object that is targetted</param> protected override void OnTarget(Mobile from, object o) { m_InTime.Stop(); if (o is Mobile) { Mobile target = (Mobile)o as Mobile; if (m_Owner.GetDistanceToSqrt(target) <= 5) { target.SendGump(new DuelConfirmGump(m_Owner, target, m_Stone)); } else { m_Owner.SendMessage("Your target is too far away."); } } }
/// <summary> /// 终止。 /// </summary> public void Terminate() { lock (_timer) _timer.Stop(); }
/// <summary> /// Stop Timer. /// </summary> public void Stop() { InternalTimer.Stop(); }
/// <summary> /// Pause the timer /// </summary> public void Pause() { InternalTimer.Stop(); m_PausedTimeLeft = m_EndTime.Subtract(DateTime.Now); }
/// <summary> /// Init internal timer. /// </summary> private void initTimer() { InternalTimer.Stop(); InternalTimer.AutoReset = true; InternalTimer.Interval = m_RefreshInterval; }