private void SendButtonEvent(int btnStatus) { if (firePenButtonEvent != null) { PenButtonEvent ev = new PenButtonEvent(); ev.status = btnStatus; firePenButtonEvent(this, ev); ev = null; } }
public async void OnPenButtonHandlerAsync(object sender, PenButtonEvent e) { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { switch (e.status) { case eBeamSDKLib.NEWPAGE_BUTTON_PRESSED: CharacteristicLatestValue.Text = "New Page Button Pressed\r\n\r\n\r\n\r\n"; drawCanvas.Children.Clear(); break; case eBeamSDKLib.NEWPAGE_BUTTON_LONG_PRESSED: CharacteristicLatestValue.Text = "New Page Button Long Pressed\r\n\r\n\r\n\r\n"; break; } }); }