Exemplo n.º 1
0
 private void Txt_Password_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyValue.ToString() == "13")
     {
         Btn_Ok.Focus();
     }
 }
        /// <summary>
        /// Loop to handle inpurt
        /// </summary>
        /// <param name="input">Input Manager</param>
        public override void HandleInput(vxInputManager input)
        {
            if (input.IsNewMouseButtonPress(MouseButtons.LeftButton))
            {
                if (TimeSinceLastClick < 20)
                {
                    if (CurrentlySelected == HighlightedItem_Previous)
                        Btn_Ok.Select();
                }
                else
                {
                    TimeSinceLastClick = 0;
                }

                HighlightedItem_Previous = CurrentlySelected;
            }
        }
        /// <summary>
        /// Responds to user input, accepting or cancelling the message box.
        /// </summary>
        public override void HandleInput(vxInputManager input)
        {
            //if (input.CurrentMouseState.LeftButton == Microsoft.Xna.Framework.Input.ButtonState.Pressed &&
            //    input.LastMouseState.LeftButton == Microsoft.Xna.Framework.Input.ButtonState.Released)
            if (input.IsNewMouseButtonPress(MouseButtons.LeftButton))
            {
                if (TimeSinceLastClick < 20)
                {
                    if (CurrentlySelected == HighlightedItem_Previous)
                    {
                        Btn_Ok.Select();
                    }
                }
                else
                {
                    TimeSinceLastClick = 0;
                }

                HighlightedItem_Previous = CurrentlySelected;
            }
        }