Beispiel #1
0
 void INotifyDelegate.OnButtonRelease(string deviceId, string buttonName, float pressTime)
 {
     if (buttonEventDict.ContainsKey(deviceId))
     {
         var button = new DeviceButton {
             button = buttonName.ToButtonType(), pressTime = pressTime
         };
         context?.Post(_ => {
             buttonEventDict[deviceId].NotifyButtonRelease(button);
         }, null);
     }
 }
Beispiel #2
0
 void INotifyDelegate.OnButtonPush(string deviceId, string buttonName)
 {
     if (buttonEventDict.ContainsKey(deviceId))
     {
         var button = new DeviceButton {
             button = buttonName, pressTime = 0.0F
         };
         context?.Post(_ => {
             buttonEventDict[deviceId].NotifyButtonPush(button);
         }, null);
     }
 }
Beispiel #3
0
 void IButtonEventDelegate.NotifyButtonRelease(DeviceButton button)
 {
     ButtonReleaseEvent?.Invoke(button);
 }
Beispiel #4
0
 void IButtonEventDelegate.NotifyButtonPush(DeviceButton button)
 {
     ButtonPushEvent?.Invoke(button);
 }