Пример #1
0
        static Task <string> _soterDevice_EnterPinCallback(PinMatrixRequestType pinType)
        {
            Console.WriteLine("Enter Pin Number:");
            Console.WriteLine("    7    8    9");
            Console.WriteLine("    4    5    6");
            Console.WriteLine("    1    2    3");
            var passStr = Console.ReadLine();

            return(Task.FromResult(passStr));
        }
Пример #2
0
        public static async Task <String> Device_EnterPinCallback(PinMatrixRequestType pinType)
        {
            var waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset);
            var pinPage    = new PinPage(pinType);

            pinPage.Disappearing += (sender, e) => { waitHandle.Set(); };
            await _parentPage.Navigation.PushModalAsync(pinPage);

            await Task.Run(() => waitHandle.WaitOne());

            return(PinPage.PIN);
        }
Пример #3
0
        public PinPage(PinMatrixRequestType type)
        {
            InitializeComponent();
            PIN = String.Empty;
            switch (type)
            {
            case PinMatrixRequestType.PinMatrixRequestTypeCurrent:
                titleLabel.Text = AppResources.EnterCurrentPin;
                break;

            case PinMatrixRequestType.PinMatrixRequestTypeNewFirst:
                titleLabel.Text = AppResources.EnterNewPin;
                break;

            case PinMatrixRequestType.PinMatrixRequestTypeNewSecond:
                titleLabel.Text = AppResources.ReEnterCurrentPin;
                break;
            }
        }
Пример #4
0
 Task <string> HandleEnterPinArgs(PinMatrixRequestType pinType)
 {
     throw new Exception("Needs PIN!");
 }