public void AddEvent(TimeEvent eventToAdd, TimeEventHandler eventHandler)
    {
        eventToAdd.frame   = currentFrame;
        eventToAdd.handler = eventHandler;
        TimeEventGameObject go = GetTimeEventGameObject(eventHandler.gameObject);

        go.timeEvents.Add(eventToAdd);
        go.nonPlayerObject = eventHandler.nonPlayerHandler;
    }
Example #2
0
        public void ShowNodeTime(string str)
        {
            TimeEventHandler handler = TimeLabelEvent;

            EventsClass.StatusEventArgs e = new EventsClass.StatusEventArgs(str);
            if (handler != null)
            {
                handler(this, e);
            }
        }
Example #3
0
        public WinRegBasedTimer(TimeSpan time, TimeEventHandler handler, Window parent)
        {
            _TimeInterval = time;
            _TimeHasCome += handler;

            parent.Closed += Close_Handler;

            using (RegistryKey key = Registry.CurrentUser.OpenSubKey("Software", true).OpenSubKey(_appName))
            {
                if (key == null) //create new
                {
                    SetStartTime();
                }
            }
            _th = new Thread(CheckTime);
            _th.Start();
        }
 public void AddEventHandler(TimeEventHandler eventHandler)
 {
     timeEventHandlers.Add(eventHandler);
 }
Example #5
0
 static void Call()
 {
     invoke = new TimeEventHandler();
     invoke.ToInvokeMethod += delegate { Console.WriteLine(DateTime.Now); };
     invoke.Start(500);
 }