示例#1
0
 public void KeypadTrigger(UIKeypad keypad, UIKeypadButtonEventArgs args)
 {
     if (args.EventType == ButtonEventType.Pressed)
     {
         this[string.Format("call.pinpad.{0}", args.StringValue)].Trigger();
     }
 }
示例#2
0
        private void KeypadOnButtonEvent(UIKeypad keypad, UIKeypadButtonEventArgs args)
        {
            if (TypedValue == null)
            {
                return;
            }
            if (args.EventType == ButtonEventType.Held && args.KeypadButtonType == UIKeypadButtonType.Key0)
            {
                TypedValue(ButtonEventType.Tapped, '+');
            }
            else if (args.EventType == ButtonEventType.Tapped)
            {
                switch (args.KeypadButtonType)
                {
                case UIKeypadButtonType.Key0:
                case UIKeypadButtonType.Key1:
                case UIKeypadButtonType.Key2:
                case UIKeypadButtonType.Key3:
                case UIKeypadButtonType.Key4:
                case UIKeypadButtonType.Key5:
                case UIKeypadButtonType.Key6:
                case UIKeypadButtonType.Key7:
                case UIKeypadButtonType.Key8:
                case UIKeypadButtonType.Key9:
                    TypedValue(args.EventType, (char)('0' + args.Value));
                    break;

                case UIKeypadButtonType.Star:
                    TypedValue(args.EventType, '*');
                    break;

                case UIKeypadButtonType.Hash:
                    TypedValue(args.EventType, '#');
                    break;
                }
            }
        }