Ejemplo n.º 1
0
        private void OnTargetUpdated(object sender, TypingTextEventArgs e)
        {
            var typing = e.Typing;

            TypingTextBox.Text            = typing.Text;
            TypingTextBox.SelectionStart  = typing.CaretStartIndex;
            TypingTextBox.SelectionLength = typing.CaretEndIndex - typing.CaretStartIndex;
        }
Ejemplo n.º 2
0
        private void DidConfirm(object sender, TypingTextEventArgs e)
        {
            _receivedCount = 0;
            _totalReceivedCount++;

            Input(e.Typing.Text);
            Input("\n");

            UpdateCounts();
        }
Ejemplo n.º 3
0
        private void DidReceive(object sender, TypingTextEventArgs e)
        {
            _receivedCount++;
            _totalReceivedCount++;

            Input(e.Typing.Text);

            try
            {
                // 阻止屏幕黑屏。
                UIApplication.SharedApplication.IdleTimerDisabled = true;
            }
            catch (Exception ex)
            {
                Debug(ex);
            }

            UpdateCounts();
        }
        private void DidConfirm(object sender, TypingTextEventArgs e)
        {
            BeginInvokeOnMainThread(() =>
            {
                try
                {
                    _receivedCount = 0;
                    _totalReceivedCount++;

                    Input(e.Typing.Text);
                    Input("\n");

                    UpdateCounts();
                }
                catch (Exception ex)
                {
                    Debug(ex);
                }
            });
        }
        private void DidReceive(object sender, TypingTextEventArgs e)
        {
            BeginInvokeOnMainThread(() =>
            {
                try
                {
                    _receivedCount++;
                    _totalReceivedCount++;

                    Input(e.Typing.Text);

                    // 阻止屏幕黑屏 https://github.com/walterlv/Walterlv.CloudKeyboard/issues/3
                    UIApplication.SharedApplication.IdleTimerDisabled = true;
                    UpdateCounts();
                }
                catch (Exception ex)
                {
                    Debug(ex);
                }
            });
        }