protected virtual void OnIOPortCapacitiveTouchStateChange(IOPortCapacitiveTouchEventArgs e) { IOPortCapacitiveTouchEventHandler handler = CapacitiveTouchStateChanged; if (handler != null) { handler(this, e); } }
/// <summary> /// Will be fired when capacitive touch interrupt state is changed. /// </summary> /// <param name="sender"></param> /// <param name="args"></param> private void CapacitiveTouch_ValueChanged(GpioPin sender, GpioPinValueChangedEventArgs args) { IOPortCapacitiveTouchEventArgs ea = new IOPortCapacitiveTouchEventArgs(1, true); OnIOPortCapacitiveTouchStateChange(ea); }