From f16fd06aa226e9f97a27858624d4ea7cf8975d25 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 07 五月 2024 17:24:38 +0800
Subject: [PATCH] 增加了萤石摄像头

---
 HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
index 505447f..f069cc9 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/FaceManagement/FacePassagePage.cs
@@ -1,4 +1,5 @@
 锘縰sing System;
+using System.IO;
 using System.Threading;
 using HDL_ON.DAL.Server;
 using HDL_ON.Entity;
@@ -171,6 +172,12 @@
                 TextID = StringId.AboutFaceIdAndPrivacy
             };
             contentView.AddChidren(btnTip);
+            btnTip.MouseUpEventHandler += (sender2, e2) =>
+            {
+                string url = "https://developer.hdlcontrol.com/FaceProtocolSantam.html";
+                new WebViewDialog().LoadPage(Language.StringByID(StringId.GetFaceProtocol), url);
+
+            };
 
 
             btnSetFaceId = new Button()
@@ -534,6 +541,39 @@
             {
                 //1.璇诲彇瑁佸壀鍚庣殑鍥剧墖锛岀劧鍚庡垹闄�
                 var imageBytes = Shared.IO.FileUtils.ReadFile(selectImagePath);
+
+
+                System.IO.FileStream fs = null;
+                try
+                {
+                    if (System.IO.File.Exists(System.IO.Path.Combine(Application.RootPath, selectImagePath)))
+                    {
+                        fs = new FileStream(System.IO.Path.Combine(Application.RootPath, selectImagePath), FileMode.Open, FileAccess.Read);
+                    }
+                    else if (System.IO.File.Exists(selectImagePath))
+                    {
+                        fs = new FileStream(selectImagePath, FileMode.Open, FileAccess.Read);
+                    }
+                    else
+                    {
+                    }
+                    byte[] bytes = new byte[fs.Length];
+                    fs.Read(bytes, 0, bytes.Length);
+                }
+                catch(Exception ex)
+                {
+                    Console.WriteLine(ex.Message);
+                }
+                finally
+                {
+                    if (fs != null)
+                    {
+                        fs.Close();
+                    }
+
+                }
+
+
                 System.IO.File.Delete(selectImagePath);
 
                 var waitPage = new Loading();
@@ -545,6 +585,7 @@
                     try
                     {
                         string base64string = Convert.ToBase64String(imageBytes);
+                Console.WriteLine("wxr" + base64string);
                         //Utlis.WriteLine("涓婁紶鍥剧墖Length:" + imageBytes.Length + " base64锛�" + base64string);
                         var pack = new HttpServerRequest().FaceSetting(base64string);
                         if (pack != null)

--
Gitblit v1.8.0