Beispiel #1
0
 /// <summary>
 /// 加载公众号二维码
 /// </summary>
 private void LoadMyQrCode()
 {
     myQrCode.Image = Resources.loading;
     new System.Threading.Thread(() =>
     {
         string url = HotJavaApi.SubscribeForBind(MyUserInfo.LoginToken);
         if (!string.IsNullOrEmpty(url))
         {
             var bytes = HttpRequestService.GetNetWorkImageData(url);
             if (bytes != null)
             {
                 SetQrCodeImage(Image.FromStream(new MemoryStream(bytes)), false);
             }
             else
             {
                 SetQrCodeImage(Resources.loading);
             }
         }
     })
     {
         IsBackground = true
     }.Start();
 }