From 9d3d08ba960fc739498b0648d57eaf2c50a40fd1 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 17 六月 2020 19:17:54 +0800
Subject: [PATCH] '登录'

---
 WindowsFormsApp1/utils/ui/ImageUtil.cs |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/WindowsFormsApp1/utils/ui/ImageUtil.cs b/WindowsFormsApp1/utils/ui/ImageUtil.cs
index 9bd7884..2af78a4 100644
--- a/WindowsFormsApp1/utils/ui/ImageUtil.cs
+++ b/WindowsFormsApp1/utils/ui/ImageUtil.cs
@@ -14,8 +14,12 @@
 
         //灞曠ず缃戠粶鍥剧墖
         public static void DisplayImage(PictureBox pictureBox,String url) {
-            Image pic = Image.FromStream(WebRequest.Create(url).GetResponse().GetResponseStream());
-            pictureBox.Image = pic;
+            try {
+                Image pic = Image.FromStream(HttpUtil.HttpGetImage(url));
+                pictureBox.Image = pic;
+            } catch (Exception e) { 
+            }
+          
         }
     }
 }

--
Gitblit v1.8.0