From 488efb508eb0648773fe7b68e810e04bcd7ca075 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 11 十二月 2020 15:58:15 +0800
Subject: [PATCH] 20201211

---
 HDL_ON/Common/ImageUtlis.cs |   37 ++++++++++++++++---------------------
 1 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/HDL_ON/Common/ImageUtlis.cs b/HDL_ON/Common/ImageUtlis.cs
index 88f00e1..c85b61e 100644
--- a/HDL_ON/Common/ImageUtlis.cs
+++ b/HDL_ON/Common/ImageUtlis.cs
@@ -1,11 +1,6 @@
 锘縰sing System;
 using Shared;
-using HDL_ON;
-using HDL_ON.UI.CSS;
 using HDL_ON.DAL.Server;
-using HDL_ON.UI;
-using System.Threading;
-using HDL_ON.Entity;
 
 namespace HDL_ON
 {
@@ -106,19 +101,19 @@
                     {
                         imageView.ImageBytes = null;
                         imageView.ImagePath = imageKey;
-                        Utlis.WriteLine("imageKey 鍔犺浇鏈湴鍥剧墖鎴愬姛");
+                        //Utlis.WriteLine("imageKey 鍔犺浇鏈湴鍥剧墖鎴愬姛");
                     }
                 }
                 else
                 {
                     //2.鑷畾涔夊浘鐗囷紝妫�娴嬫槸鍚︽湰鍦扮紦瀛樿繃锛屾病鏈夊垯浜戠涓嬭浇鐒跺悗缂撳瓨
-                    if (!ignoreCache && FileUtils.Exists(imageKey))
+                    if (!ignoreCache && Common.FileUtlis.Files.Exists(imageKey))
                     {
                         //2.1 鏈湴鏈夌紦瀛樺苟涓斾笉蹇界暐缂撳瓨锛岀洿鎺ユ湰鍦拌鍙�
                         if (imageView != null)
                         {
-                            imageView.ImageBytes = FileUtils.ReadFile(imageKey);
-                            Utlis.WriteLine("imageKey 鍔犺浇鑷畾涔夌紦瀛樺浘鐗囨垚鍔�");
+                            imageView.ImageBytes = Common.FileUtlis.Files.ReadFile(imageKey);
+                            //Utlis.WriteLine("imageKey 鍔犺浇鑷畾涔夌紦瀛樺浘鐗囨垚鍔�");
                         }
                     }
                     else
@@ -129,21 +124,21 @@
                             byte[] imageBytes = GetImageDownloadUrl(imageKey);
                             if (imageBytes != null)
                             {
-                                FileUtils.WriteFileByBytes(imageKey, imageBytes);
+                                Common.FileUtlis.Files.WriteFileByBytes(imageKey, imageBytes);
                                 //2.3 涓嬭浇鎴愬姛锛屾樉绀哄苟缂撳瓨鏈湴
                                 Application.RunOnMainThread(() =>
                                 {
                                     if (imageView != null)
                                     {
                                         imageView.ImageBytes = imageBytes;
-                                        Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛");
+                                        //Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛");
                                     }
                                 });
                             }
                             else
                             {
                                 //2.4 涓嬭浇鏄惁锛屾槸鍚︿娇鐢ㄩ粯璁ゅ浘鐗�
-                                Utlis.WriteLine("imageKey 鍔犺浇浜戠鍥剧墖澶辫触");
+                                //Utlis.WriteLine("imageKey 鍔犺浇浜戠鍥剧墖澶辫触");
                             }
                         });
                     }
@@ -177,19 +172,19 @@
                     {
                         //imageView.ImageBytes = null;
                         frameLayout.BackgroundImagePath = imageKey;
-                        Utlis.WriteLine("imageKey 鍔犺浇鏈湴鍥剧墖鎴愬姛");
+                        //Utlis.WriteLine("imageKey 鍔犺浇鏈湴鍥剧墖鎴愬姛");
                     }
                 }
                 else
                 {
                     //2.鑷畾涔夊浘鐗囷紝妫�娴嬫槸鍚︽湰鍦扮紦瀛樿繃锛屾病鏈夊垯浜戠涓嬭浇鐒跺悗缂撳瓨
-                    if (!ignoreCache && FileUtils.Exists(imageKey))
+                    if (!ignoreCache && Common.FileUtlis.Files.Exists(imageKey))
                     {
                         //2.1 鏈湴鏈夌紦瀛樺苟涓斾笉蹇界暐缂撳瓨锛岀洿鎺ユ湰鍦拌鍙�
                         if (frameLayout != null)
                         {
                             frameLayout.BackgroundImagePath = imageKey;
-                            Utlis.WriteLine("imageKey 鍔犺浇鑷畾涔夌紦瀛樺浘鐗囨垚鍔�");
+                            //Utlis.WriteLine("imageKey 鍔犺浇鑷畾涔夌紦瀛樺浘鐗囨垚鍔�");
                         }
                     }
                     else
@@ -200,21 +195,21 @@
                             byte[] imageBytes = GetImageDownloadUrl(imageKey);
                             if (imageBytes != null)
                             {
-                                FileUtils.WriteFileByBytes(imageKey, imageBytes);
+                                Common.FileUtlis.Files.WriteFileByBytes(imageKey, imageBytes);
                                 //2.3 涓嬭浇鎴愬姛锛屾樉绀哄苟缂撳瓨鏈湴
                                 Application.RunOnMainThread(() =>
                                 {
                                     if (frameLayout != null)
                                     {
                                         frameLayout.BackgroundImagePath = imageKey;
-                                        Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛");
+                                        //Utlis.WriteLine("imageKey 鍔犺浇浜戠涓嬭浇鍥剧墖鎴愬姛");
                                     }
                                 });
                             }
                             else
                             {
                                 //2.4 涓嬭浇鏄惁锛屾槸鍚︿娇鐢ㄩ粯璁ゅ浘鐗�
-                                Utlis.WriteLine("imageKey 鍔犺浇浜戠鍥剧墖澶辫触");
+                                //Utlis.WriteLine("imageKey 鍔犺浇浜戠鍥剧墖澶辫触");
                             }
                         });
                     }
@@ -264,10 +259,10 @@
             {
                 var imageKey = GetHeadImageKey(userId);
                 byte[] imageBytes;
-                if (!ignoreCache && FileUtils.Exists(imageKey))
+                if (!ignoreCache && Common.FileUtlis.Files.Exists(imageKey))
                 {
                     //鏈湴鏈夌紦瀛�
-                    imageBytes = FileUtils.ReadFile(imageKey);
+                    imageBytes = Common.FileUtlis.Files.ReadFile(imageKey);
                 }
                 else
                 {
@@ -276,7 +271,7 @@
                     if(imageBytes != null)
                     {
                         //淇濆瓨鍒版湰鍦�
-                        FileUtils.WriteFileByBytes(imageKey, imageBytes);
+                        Common.FileUtlis.Files.WriteFileByBytes(imageKey, imageBytes);
                     }
                    
                 }

--
Gitblit v1.8.0