示例#1
0
        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");
        }
示例#2
0
        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");
            });
        }
示例#3
0
        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);
        }
示例#4
0
 private void MController_SensitivityChanged(IPenClient sender, SimpleResultEventArgs args)
 {
     _controller?.RequestPenStatus();
 }