From 1635e5b2e6d853ef5d89f6ca3ef18edece91e7b1 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 23 十一月 2021 10:31:11 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs | 130 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 126 insertions(+), 4 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
index 36b8206..1c7a8bd 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPage.cs
@@ -1,4 +1,5 @@
-锘縰sing System;
+锘� using System;
+using HDL_ON.DAL.Server;
using HDL_ON.UI;
using HDL_ON.UI.CSS;
using Shared;
@@ -161,6 +162,19 @@
Button btnAddResidenceScan;
#endregion
+
+ #region 涓汉閫夐」-浜鸿劯閫氳绠$悊
+ /// <summary>
+ /// 涓汉閫夐」-浜鸿劯閫氳绠$悊琛�
+ /// </summary>
+ FrameLayout faceManagementView;
+ /// <summary>
+ /// 浜鸿劯閫氳绠$悊鏂囨湰
+ /// </summary>
+ Button btnFaceManagementText;
+ #endregion
+
+
#endregion
#endregion
@@ -251,6 +265,12 @@
ScrollEnabled = false,
};
bodyScrolView.AddChidren(optionListView);
+
+ if(Entity.DB_ResidenceData.Instance.SupportFacePass)
+ {
+ optionListView.Height = Application.GetRealHeight(51 * (6 + 1));
+ }
+
#region 涓汉閫夐」-鍚嶅瓧鍖哄煙
/// <summary>
/// 涓汉閫夐」-鍚嶅瓧鍖哄煙
@@ -534,7 +554,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = CSS_Color.FirstLevelTitleColor,
TextSize = CSS_FontSize.SubheadingFontSize,
- TextID = StringId.AddResidence,
+ TextID = StringId.ScanQRCoden,
};
addResidenceView.AddChidren(btnAddResidenceText);
@@ -542,13 +562,115 @@
{
Scan.OpenScan((scanString) =>
{
- //鎵ц缁戝畾浣忓畢
- new BindingResidencePage().DoBindResidence(scanString);
+ if (scanString.StartsWith("source://bind/"))
+ {
+ var waitPage = new Loading();
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ Application.RunOnMainThread(() =>
+ {
+ waitPage.Start("Plaese wait...");
+ });
+ var sendString = scanString.Replace("source://bind/", "");
+ MainPage.Log($"缁戝畾source灞�:{sendString}");
+ //缁戝畾source灞�
+ var pack = new HttpServerRequest().BindSourcePanel(sendString);
+ Application.RunOnMainThread(() =>
+ {
+ var title = Language.StringByID(StringId.Tip);
+ var msg = "";
+ if(pack.Code == StateCode.SUCCESS)
+ {
+ if(Language.CurrentLanguage=="Chinese")
+ {
+ msg = "Source灞忕粦瀹氭垚鍔�.";
+ }
+ else
+ {
+ msg = "Source Hub binding succeeded";
+ }
+ new HDL_ON.UI.PublicAssmebly().TipMsg(title, msg);
+ }
+ else
+ {
+ if (Language.CurrentLanguage == "Chinese")
+ {
+ msg = $"Source灞忕粦瀹氬け璐�.({pack.Code})";
+ }
+ else
+ {
+ msg = "Source Hub binding failed";
+ }
+ new HDL_ON.UI.PublicAssmebly().TipMsg(title, msg);
+ }
+ });
+ }
+ catch(Exception ex)
+ { }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ waitPage.Hide();
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ }
+ else
+ {
+ //鎵ц缁戝畾浣忓畢
+ new BindingResidencePage().DoBindResidence(scanString);
+ }
});
};
#endregion
+ if (Entity.DB_ResidenceData.Instance.SupportFacePass)
+ {
+ #region 涓汉閫夐」-浜鸿劯閫氳绠$悊
+ optionListView.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+
+ faceManagementView = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(50),
+ };
+ optionListView.AddChidren(faceManagementView);
+
+ var btnFaceManagementRight = new Button()
+ {
+ X = Application.GetRealWidth(339),
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(16),
+ Height = Application.GetMinRealAverage(16),
+ UnSelectedImagePath = "Public/Right.png",
+ };
+ faceManagementView.AddChidren(btnFaceManagementRight);
+
+ btnFaceManagementText = new Button()
+ {
+ X = Application.GetRealWidth(16),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextID = StringId.FacePassageSetting,
+ };
+ faceManagementView.AddChidren(btnFaceManagementText);
+
+ btnFaceManagementText.MouseUpEventHandler = (sender, e) =>
+ {
+ var page = new FacePassagePage();
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+
+ #endregion
+
+ }
#endregion
--
Gitblit v1.8.0