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; }
public void ShowNodeTime(string str) { TimeEventHandler handler = TimeLabelEvent; EventsClass.StatusEventArgs e = new EventsClass.StatusEventArgs(str); if (handler != null) { handler(this, e); } }
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); }
static void Call() { invoke = new TimeEventHandler(); invoke.ToInvokeMethod += delegate { Console.WriteLine(DateTime.Now); }; invoke.Start(500); }