Esempio n. 1
0
        private async void GetCaptchaImage()
        {
            var captcha = await DataRequester.GetCaptchaImage();

            if (captcha == null)
            {
                PopupMessage.DisplayMessage(StringUtil.GetString("GetCaptchaFailed"));
                CaptchaImage.Source = new BitmapImage(new Uri("ms-appx:///Assets/CaptchaFailed.png"));
                return;
            }

            if (!string.IsNullOrEmpty(captcha.Img_Base64))
            {
                NeedCaptcha = true;
                ResUtil.SetBase64ToImage((BitmapSource)CaptchaImage.Source, captcha.Img_Base64);
            }
            else
            {
                NeedCaptcha = false;
            }
        }