public void TryConsumeKeypress(Keypress keypress)
 {
     if (keypress.IsReleased)
     {
         _keyRecord.Remove(keypress);
     }
 }
Exemple #2
0
 public void Set(Keypress del, char ch)
 {
     if (KeypadUWPLib.KeypadEventArgs.ValidKeys.Contains(ch))
     {
         Keypresses[ch] = del;
     }
 }
Exemple #3
0
 public void Action(char ch)
 {
     if (Keypresses[ch] != null)
     {
         Keypress del = Keypresses[ch];
         del();
     }
 }
Exemple #4
0
 /// <summary>
 /// 动画播放
 /// </summary>
 public void PlayerAni(string animation, Transform transone, Transform transtwo)
 {
     Keypress.GetComponent <Animator>().Play(animation);
     //Keypress.position = Camera.main.ScreenToWorldPoint(Input.mousePosition + new Vector3(0, 0, Camera.main.farClipPlane));
     Keypress.GetComponent <BoxCollider>().enabled = true;
     transone.GetComponent <BoxCollider>().enabled = false;
     transtwo.GetComponent <BoxCollider>().enabled = false;
 }
Exemple #5
0
        private Keypress MakeKeypress(string s)
        {
            var kp  = new Keypress(s, stylusTravel, stylusPosition);
            var sty = stylusProvider();

            if (sty != null)
            {
                sty.travel = Utils.Tuples.Orientation.Origin();
            }
            return(kp);
        }
Exemple #6
0
 private void Keyboard_keypress(object sender, Keypress e)
 {
     if (ActiveTextBox != null)
     {
         if (e.KeyCharecter == 8)
         {
             if (ActiveTextBox.Text.Length > 0)
             {
                 ActiveTextBox.Text = ActiveTextBox.Text.Remove(ActiveTextBox.Text.Length - 1, 1);
             }
         }
         else
         {
             ActiveTextBox.Text += e.KeyCharecter;
         }
         ActiveTextBox.Select(ActiveTextBox.Text.Length, 0);
     }
 }
            private bool TryFindKeypress(KeyCode key, out Keypress result)
            {
                for (int i = 0; i < _keyRecord.Count; i++)
                {
                    if (_keyRecord[i].IsReleased)
                    {
                        continue;
                    }

                    if (_keyRecord[i].Key == key)
                    {
                        result = _keyRecord[i];
                        return(true);
                    }
                }
                result = null;
                return(false);
            }
Exemple #8
0
 private async Task OnKeypress(KeyboardEventArgs args)
 {
     await Keypress.InvokeAsync(args).ConfigureAwait(true);
 }
 private void txtbuscar_KeyPress(object sender, KeyPressEventArgs e)
 {
     Keypress.SoloLetras(e);
 }
Exemple #10
0
 private void txtnom_cargo_KeyPress(object sender, KeyPressEventArgs e)
 {
     Keypress.Text(e, txtdescrip);
     Keypress.SoloLetras(e);
 }
 private void txtdias_KeyPress(object sender, KeyPressEventArgs e)
 {
     Keypress.SoloNumeros(e);
 }
Exemple #12
0
 private void txtuser_KeyPress(object sender, KeyPressEventArgs e)
 {
     //ESTAMOS BLOQUEANDO LA TECLA ENTER.
     Keypress.Text(e, txtuser);
 }
Exemple #13
0
 public void Move()
 {
     Keypress.Translate(-Movedir * Speed * Time.deltaTime);
 }
Exemple #14
0
 public void EnableTrue()
 {
     Keypress.GetComponent <BoxCollider>().enabled = true;
 }
Exemple #15
0
 public void PlayerAni(string animation)
 {
     Keypress.GetComponent <Animator>().Play(animation);
 }