コード例 #1
0
        private void Enter_Click(object sender, RoutedEventArgs e)
        {
            if (_passcodeService.TryUnlock(Field.Password))
            {
                Unlock();
            }
            else
            {
                Lock();

                CoreInputView.GetForCurrentView().TryShow();
            }
        }
コード例 #2
0
ファイル: EmojiCommand.cs プロジェクト: MarcAnt01/Quick-Pad
        public EmojiCommand()
        {
            Executioner = viewModel =>
            {
                viewModel.InvokeFocusTextBox();

                try //More error here
                {
                    CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji);
                }
                catch (Exception ex)
                {
                    Analytics.TrackEvent($"Attempting to open emoji keyboard\r\n{ex.Message}");
                }

                return(Task.CompletedTask);
            };
        }
コード例 #3
0
        private async void OnLoaded(object sender, RoutedEventArgs e)
        {
            Window.Current.Activated   += Window_Activated;
            Window.Current.SizeChanged += Window_SizeChanged;

            UpdateView();

            if (_passcodeService.IsBiometricsEnabled && await KeyCredentialManager.IsSupportedAsync())
            {
                Biometrics.Visibility = Visibility.Visible;

                if (_biometrics)
                {
                    Biometrics_Click(null, null);
                }
            }
            else
            {
                Field.Focus(FocusState.Keyboard);
                CoreInputView.GetForCurrentView().TryShow();
            }
        }
コード例 #4
0
 private void AppBarButton_Click(object sender, RoutedEventArgs e)
 {
     CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji);
 }
コード例 #5
0
 void TextBox_GotFocus(object sender, RoutedEventArgs e)
 {
     CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji);
 }
コード例 #6
0
        private void DisplayEmojiSelector()
        {
            // Ensure to be on Main UI Thread
            if (!MainThread.IsMainThread)
            {
                MainThread.BeginInvokeOnMainThread(() => DisplayEmojiSelector());
                return;
            }

            if (inputInjector == null)
            {
                try
                {
                    inputInjector = InputInjector.TryCreate();
                }
                catch
                {
                    // Nothing to do
                }
            }

            // If we cannot create InputInjector, we display Emoji Selector in a different way
            if (inputInjector == null)
            {
                CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji);
                return;
            }

            // If necessary create first input keyboard info
            if (leftWindowsDown == null)
            {
                leftWindowsDown            = new InjectedInputKeyboardInfo();
                leftWindowsDown.VirtualKey = (ushort)(VirtualKey.LeftWindows);
                leftWindowsDown.KeyOptions = InjectedInputKeyOptions.None;
            }

            if (leftWindowsUp == null)
            {
                leftWindowsUp            = new InjectedInputKeyboardInfo();
                leftWindowsUp.VirtualKey = (ushort)(VirtualKey.LeftWindows);
                leftWindowsUp.KeyOptions = InjectedInputKeyOptions.KeyUp;
            }

            if (periodDown == null)
            {
                periodDown            = new InjectedInputKeyboardInfo();
                periodDown.VirtualKey = 0xBE;
                periodDown.KeyOptions = InjectedInputKeyOptions.None;
            }

            if (periodUp == null)
            {
                periodUp            = new InjectedInputKeyboardInfo();
                periodUp.VirtualKey = 0xBE;
                periodUp.KeyOptions = InjectedInputKeyOptions.KeyUp;
            }


            // Send keyboard inputs
            inputInjector.InjectKeyboardInput(new[] { leftWindowsDown, periodDown, periodUp, leftWindowsUp });
        }
コード例 #7
0
 /// <summary>
 ///     Обработка нажатия на кнопку эмоджи
 /// </summary>
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     MessageBox.Focus(FocusState.Programmatic);
     CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji);
 }
コード例 #8
0
 private void EmojiHolder_Tapped(object sender, TappedRoutedEventArgs e)
 {
     CoreInputView.GetForCurrentView().TryShow(CoreInputViewKind.Emoji);
 }