Esempio n. 1
0
        public bool ProcessKeyPress(Keys keyVal)
        {
            switch (keyVal)
            {
            case (Keys.Up):
            case (Keys.Down):
            case (Keys.Left):
            case (Keys.Right):
            case ((Keys.Control | Keys.Left)):
            case ((Keys.Control | Keys.Down)):
            case ((Keys.Control | Keys.Up)):
            case ((Keys.Control | Keys.Right)):
            {
                return(this.ProcessDialogKey(keyVal));
            }

            default:
            {
                IKeyPressProcessor p = this.Parent as IKeyPressProcessor;
                if (p == null)
                {
                    return(false);
                }
                return(p.ProcessKeyPress(keyVal));
            }
            }
        }
        public bool ProcessKeyPress(Keys keyVal)
        {
            switch (keyVal)
            {
            case (Keys.Tab):
            case ((Keys.Left)):
            case ((Keys.Down)):
            case ((Keys.Up)):
            case ((Keys.Right)):
            case ((Keys.Control | Keys.Left)):
            case ((Keys.Control | Keys.Down)):
            case ((Keys.Control | Keys.Up)):
            case ((Keys.Control | Keys.Right)):
            {
                return(this.ProcessDialogKey(keyVal));
            }
            }
            //we dont know how to handle the key press
            //so, lets see if our parent want to
            IKeyPressProcessor p = this.Parent as IKeyPressProcessor;

            if (p == null)
            {
                return(false);
            }
            return(p.ProcessKeyPress(keyVal));
        }
        public bool ProcessKeyPress(Keys keyVal)
        {
            IKeyPressProcessor kpp = GetFocusedControl() as IKeyPressProcessor;

            if (kpp != null)
            {
                return(kpp.ProcessKeyPress(keyVal));
            }
            return(false);
        }
Esempio n. 4
0
        public bool ProcessKeyPress(Keys keyVal)
        {
            IKeyPressProcessor p = this.Parent as IKeyPressProcessor;

            if (p == null)
            {
                return(false);
            }
            return(p.ProcessKeyPress(keyVal));
        }
Esempio n. 5
0
            public virtual bool ProcessKeyPress(Keys keyVal)
            {
                switch (keyVal)
                {
                case (Keys.Up):
                case (Keys.Down):
                case (Keys.Left):
                case (Keys.Right):
                {
                    return(this.ProcessDialogKey(keyVal));
                }

                case (Keys.Enter):
                {
                    if (DeviceInfo.DevicePlatform == PlatformType.WinCE)
                    {
                        this.DroppedDown = true;
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }

                default:
                {
                    IKeyPressProcessor p = this.Parent as IKeyPressProcessor;
                    if (p == null)
                    {
                        return(false);
                    }
                    return(p.ProcessKeyPress(keyVal));
                }
                }
            }