private void MController_Authenticated(IPenClient sender, object args) { _controller.RequestPenStatus(); _controller.AddAvailableNote(); _controller.RequestOfflineDataList(); // MController_Connected에 있으니 비밀번호 입력창이 뜰때 연결끊김 // 펜 세팅값으로 넣어줘야 할듯 cbColor.SelectedIndex = cbColor.Items.Count - 1; ShowToast("Device is connected"); }
private async void MController_Authenticated(IPenClient sender, object args) { _controller.RequestPenStatus(); _controller.AddAvailableNote(); _controller.RequestOfflineDataList(); await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { // MController_Connected에 있으니 비밀번호 입력창이 뜰때 연결끊김 // 펜 세팅값으로 넣어줘야 할듯 cbColor.SelectedIndex = cbColor.Items.Count - 1; CurrentStatus = AppStatus.Connected; ShowToast("Device is connected"); }); }
public void TestPenStatus() { bool result = false; _controller.PenStatusReceived += (IPenClient sender, PenStatusReceivedEventArgs args) => { result = true; _autoResetEvent.Set(); }; Task.Factory.StartNew(() => { _controller.RequestPenStatus(); }); _autoResetEvent.WaitOne(); Assert.IsTrue(result); }
private void MController_SensitivityChanged(IPenClient sender, SimpleResultEventArgs args) { _controller?.RequestPenStatus(); }