示例#1
0
        public eViewStatus Input()
        {
            foreach (var field in _fields)
            {
                field.Draw();
            }

            int iCurrentFiend = 0;

            var currentFiend = _fields[iCurrentFiend];

            eInputFieldResult inputFieldResult = currentFiend.Input();

            while (inputFieldResult != eInputFieldResult.Ok && inputFieldResult != eInputFieldResult.Cancel)
            {
                if (inputFieldResult == eInputFieldResult.PrevField)
                {
                    iCurrentFiend = iCurrentFiend > 0 ? iCurrentFiend - 1 : _fields.Count - 1;
                }
                else
                {
                    iCurrentFiend = iCurrentFiend >= _fields.Count - 1 ? 0 : iCurrentFiend + 1;
                }

                currentFiend = _fields[iCurrentFiend];

                inputFieldResult = currentFiend.Input();
            }

            return(inputFieldResult == eInputFieldResult.Ok ? eViewStatus.Ok : eViewStatus.Cancel);
        }
示例#2
0
        public override eInputFieldResult Input()
        {
            eInputFieldResult inputFieldResult = ProtectedInput().AsInputFieldResult();

            SetValue(_chooseConvert(Value));

            return(inputFieldResult);
        }