Esempio n. 1
0
 public static void TriggerEvent(GenericEventType type)
 {
     if (m_genericEvents.ContainsKey(type))
     {
         m_genericEvents[type].Raise();
     }
 }
        public static void SendEvent(string windowId, GenericEventType category, string name = null, string message = null, string description = null, long durationInMs = 0)
        {
            var e = GenericEvent.Create(windowId, category, name);

            e.message     = message;
            e.description = description;
            e.duration    = durationInMs;
            Send(EventName.quickSearchGeneric, e);
        }
Esempio n. 3
0
 /// <summary>
 /// Converts a command result into a new more specialized generic event.
 /// </summary>
 /// <param name="result"></param>
 /// <param name="eventType"></param>
 /// <returns></returns>
 public static GenericEvent ConvertToGenericEvent(ICommandResult result, GenericEventType eventType) {
     return new GenericEvent() {
         GenericEventType = eventType,
         Message = result.Message,
         Stamp = result.Stamp,
         Scope = result.Scope,
         Then = result.Then,
         Now = result.Now
     };
 }
 public static GenericEvent Create(string windowId, GenericEventType type, string name = null)
 {
     return(new GenericEvent()
     {
         windowId = windowId,
         category = type.ToString(),
         categoryId = (int)type,
         name = name
     });
 }
 private static void SendEvent(GenericEventType category, string name, string message, string description, long durationInMs)
 {
 }
 public static void Trigger(GenericEventType eventName, GameObject originator)
 {
     e.EventType  = eventName;
     e.Originator = originator;
     EventManager.Trigger(e);
 }
 public GenericEvent(GenericEventType eventName, GameObject originator)
 {
     EventType  = eventName;
     Originator = originator;
 }