コード例 #1
0
 public void OnPinValueChanged(PinValueChangedEventArgs args)
 {
     if (ValueRising != null && args.ChangeType == PinEventTypes.Rising)
     {
         ValueRising?.Invoke(this, args);
     }
     if (ValueFalling != null && args.ChangeType == PinEventTypes.Falling)
     {
         ValueFalling?.Invoke(this, args);
     }
 }
コード例 #2
0
 public void OnPinValueChanged(PinValueChangedEventArgs args, PinEventTypes detectionOfEventTypes)
 {
     if (detectionOfEventTypes == PinEventTypes.Rising && args.ChangeType == PinEventTypes.Rising)
     {
         ValueRising?.Invoke(this, args);
     }
     if (detectionOfEventTypes == PinEventTypes.Falling && args.ChangeType == PinEventTypes.Falling)
     {
         ValueFalling?.Invoke(this, args);
     }
 }