예제 #1
0
 private void RegisterActionEvent <T>(ESDSDKEventType eventType, StreamDeckDispatchTypedActionMessageFunc <T> dispatchMessage) where T : IStreamDeckEventMessage
 {
     eventTypeInfo.Add(eventType, new EventTypeInfo
     {
         MessageType           = typeof(T),
         DispatchActionMessage = (action, message) => dispatchMessage(action, (T)message)
     });
 }
예제 #2
0
 private void RegisterGlobalEvent <T>(ESDSDKEventType eventType, StreamDeckDispatchTypedGlobalEventMessageFunc <T> dispatchMessage) where T : IStreamDeckEventMessage
 {
     eventTypeInfo.Add(eventType, new EventTypeInfo
     {
         MessageType = typeof(T),
         DispatchGlobalEventMessage = (globalEvent, message) => dispatchMessage(globalEvent, (T)message)
     });
 }
 /// <inheritdoc />
 public void MessageNoEventHandler(IStreamDeckEventMessage message, ESDSDKEventType eventType)
 {
     Log($"Message event type is not yet handled by the StreamDeck.NET library: {eventType}");
 }
예제 #4
0
 /// <inheritdoc />
 public void MessageNoEventHandler(IStreamDeckEventMessage message, ESDSDKEventType eventType)
 {
 }
예제 #5
0
 private Type CreateEventMessage(ESDSDKEventType eventType)
 {
     return(eventTypeInfo.TryGetValue(eventType, out var eventInfo) ? eventInfo.MessageType : null);
 }