Inheritance: ICharacterReceivedEventArgs, ICoreWindowEventArgs
#pragma warning disable CC0091 // Use static method
#pragma warning disable CC0057 // Unused parameters
        public static void OnCharacterReceived(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.CharacterReceivedEventArgs args)
#pragma warning restore CC0057 // Unused parameters
#pragma warning restore CC0091 // Use static method
        {
            //System.Diagnostics.Debug.WriteLine("HardwareKeyPageRenderer.OnCharacterReceived");
            ProcessCharacter(HardwareKeyPage.FocusedElement ?? HardwareKeyPage.DefaultFocusedElement, (char)args.KeyCode);
        }
Example #2
0
 private void CoreWindow_CharacterReceived(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.CharacterReceivedEventArgs args)
 {
     if (args.KeyCode == 27) //Escape
     {
         // your code here fore Escape key
     }
     if (args.KeyCode == 13) //Enter
     {
         // your code here fore Enter key
     }
 }
Example #3
0
 private void CoreWindow_CharacterReceived(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.CharacterReceivedEventArgs args)
 {
     System.Diagnostics.Debug.WriteLine("KeyDown: " + args.KeyCode.ToString());
     if (args.Handled)
     {
         return;
     }
     if (args.KeyCode == 48)
     {
         contentFrame.Navigate(typeof(Pages.Settings.Root));
     }
     else if (args.KeyCode == 49)
     {
         SwitchToPageByTag("Play");
     }
     else if (args.KeyCode == 50)
     {
         SwitchToPageByTag("Install");
     }
 }
Example #4
0
 private void OnCharacterReceived(CoreWindow window, CharacterReceivedEventArgs args)
 {
     //throw new NotImplementedException();
 }
Example #5
0
		private void Window_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
		{
			OnTextInput(sender, new TextInputEventArgs((char)args.KeyCode));
		}
Example #6
0
        /// <summary>
        /// Receives user input from the system.
        /// </summary>
        /// <param name="sender">The event source.</param>
        /// <param name="args">The event data.</param>
        void Terminal_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
        {
            if (!this.terminal.IsConnected)
            {
                return;
            }

            // This method receives all input that represents "characters".
            // It does not receive: Return, Cursor keys (Up, Down, Left, Right), Tabulator, Function keys (F1 - F12), 
            this.terminal.ProcessKeyPress((char)args.KeyCode);
            args.Handled = true;
        }
Example #7
0
        private void CoreWindow_CharacterReceived(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.CharacterReceivedEventArgs args)
        {
            if (ready == true)//Only runs if user has start a game
            {
                errorMessage("");
                switch (args.KeyCode)
                {
                case 13:    //Enter key
                    lDS.rollAll(0);
                    rDS.rollAll(0);
                    Display();
                    break;

                case 49:    //1 key
                    updateSaved(true, 0);
                    break;

                case 50:    //2 key
                    updateSaved(true, 1);
                    break;

                case 51:    //3 key
                    updateSaved(true, 2);
                    break;

                case 52:    //4 key
                    updateSaved(true, 3);
                    break;

                case 53:    //5 key
                    updateSaved(true, 4);
                    break;

                case 54:    //6 key
                    updateSaved(true, 5);
                    break;

                case 55:    //7 key
                    movedSaved(true);
                    break;

                case 98:    //b key
                    updateSaved(false, 0);
                    break;

                case 110:    //n key
                    updateSaved(false, 1);
                    break;

                case 109:    //m key
                    updateSaved(false, 2);
                    break;

                case 44:    //, key
                    updateSaved(false, 3);
                    break;

                case 46:    //. key
                    updateSaved(false, 4);
                    break;

                case 47:    /// key
                    updateSaved(false, 5);
                    break;

                case 118:    //v key
                    movedSaved(false);
                    break;

                default:
                    break;
                }
            }
        }
 public void OnCharacterReceived(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.CharacterReceivedEventArgs args)
 {
     System.Diagnostics.Debug.WriteLine("HardwareKeyPageRenderer.OnCharacterReceived");
     ProcessCharacter(HardwareKeyPage.FocusedElement ?? HardwareKeyPage.DefaultFocusedElement, (char)args.KeyCode);
 }