Beispiel #1
0
 public void clearInterval(UITimer timer)
 {
     if (timer != null)
     {
         timer.Stop();
     }
 }
Beispiel #2
0
        /// <summary>Called before the game/scene is unloaded to remove any timers.</summary>
        public static void OnUnload(Document document)
        {
            if (FirstActive != null)
            {
                int     count   = 0;
                UITimer current = FirstActive;
                FirstActive = null;

                while (current != null)
                {
                    if (document == null || current.Document == document)
                    {
                        count++;
                        current.Stop();
                    }

                    current = current.Next;
                }

                if (count != 0)
                {
                    Dom.Log.Add("Cleared " + count + " leaked interval timers. This message is harmless but can help discover if you have accidentally left setInterval running (note: marquee uses these timers too).");
                }
            }
        }
Beispiel #3
0
        /// <summary>Call this to stop a scrolling marquee.</summary>
        public void Stop()
        {
            if (!Active)
            {
                return;
            }

            // Doesn't bubble:
            Dom.Event e = new Dom.Event("stop");
            e.SetTrusted(false);

            if (dispatchEvent(e))
            {
                Active = false;

                // Stop and clear the timer:
                Timer.Stop();

                Timer = null;
            }
        }
Beispiel #4
0
        /// <summary>Call this to stop a scrolling marquee.</summary>
        public void Stop()
        {
            if (!Active)
            {
                return;
            }

            Active = false;

            // Stop and clear the timer:
            Timer.Stop();

            Timer = null;

            Element.Run("onstop");
        }