nature_net.user_controls.v_keyboard.virtual_numpad.keyboard_TouchDown C# (CSharp) Method

keyboard_TouchDown() public method

public keyboard_TouchDown ( object sender, System.Windows.Input.TouchEventArgs e ) : void
sender object
e System.Windows.Input.TouchEventArgs
return void
        void keyboard_TouchDown(object sender, TouchEventArgs e)
        {
            e.TouchDevice.Capture(sender as IInputElement);
            Point p = e.GetTouchPoint(sender as IInputElement).Position;
            KeyAssignment key_code = get_key(p.X, p.Y, e.TouchDevice);
            if (key_code == null) return;

            click_sound.Play();
            if (key_code.UnshiftedCodePoint == 0x0008) { this.DoBackspace(); return; }
            if (key_code.UnshiftedCodePoint == 0x000A && this.submit_hit_handler != null) { submit_hit_handler(); return; }
            if (is_shifted)
                this.Inject(((char)key_code.ShiftedCodePoint).ToString());
            else
                this.Inject(((char)key_code.UnshiftedCodePoint).ToString());
            if (parent_frame != null)
                window_manager.UpdateZOrder(parent_frame, true);
        }