public bool ProcessReturnKey()
        {
            IKeyPressProcessor kpp = GetFocusedControl() as IKeyPressProcessor;

            if (kpp != null)
            {
                return(kpp.ProcessReturnKey());
            }
            return(false);
        }
Esempio n. 2
0
        public bool ProcessReturnKey()
        {
            IKeyPressProcessor p = this.Parent as IKeyPressProcessor;

            if (p == null)
            {
                return(false);
            }
            return(p.ProcessReturnKey());
        }
Esempio n. 3
0
            private int _keyCounter = 0;//keeps track of the number of times the user hits enter on the control after it gains focus.
            //
            public virtual bool ProcessReturnKey()
            {
                if (this.DroppedDown == true)
                {
                    _keyCounter++;
                    EditableDataGrid dg = this.Parent as EditableDataGrid;

                    if (DeviceInfo.DevicePlatform == PlatformType.WinCE &&
                        (dg != null && _keyCounter == 3))
                    {
                        dg.MoveSeclection(Direction.Right);
                        return(true);
                    }

                    else if (dg != null && _keyCounter == 2)
                    {
                        dg.MoveSeclection(Direction.Right);
                        return(true);
                    }
                    else
                    {
                        return(false);
                    }
                }
                else
                {
                    _keyCounter = 0;

                    IKeyPressProcessor p = this.Parent as IKeyPressProcessor;
                    if (p == null)
                    {
                        return(false);
                    }
                    return(p.ProcessReturnKey());
                }
            }