From 3f6685c77beeb12baf840733fb890860f4c26e7c Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 25 七月 2024 17:25:59 +0800
Subject: [PATCH] 2024年07月25日17:24:45

---
 HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingPage.cs |   74 +++++++++++++++++++++++++------------
 1 files changed, 50 insertions(+), 24 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingPage.cs
index bd6fc26..b7ef627 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/UnlockSettingPage.cs
@@ -92,7 +92,7 @@
             faceUnlockSettingView.AddChidren(btnFaceText);
 
             btnFaceText.MouseUpEventHandler = (sender, e) => {
-                var page = new UnlockSettingFacePage();
+                var page = new UnlockSettingFacePage(device);
                 MainPage.BasePageView.AddChidren(page);
                 page.LoadPage();
                 MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
@@ -338,6 +338,10 @@
                         {
                             if (!string.IsNullOrEmpty(pack.message))
                             {
+                                if (string.IsNullOrEmpty(pack.message))
+                                {
+                                    pack.message = Language.StringByID(StringId.OperationFailed);
+                                }
                                 var tip = new Tip()
                                 {
                                     MaxWidth = Application.GetRealWidth(300),
@@ -366,17 +370,18 @@
                         //澶辫触鎻愮ず
                         Application.RunOnMainThread(() =>
                         {
-                            if (!string.IsNullOrEmpty(pack.message))
+                            if (string.IsNullOrEmpty(pack.message))
                             {
-                                var tip = new Tip()
-                                {
-                                    MaxWidth = Application.GetRealWidth(300),
-                                    Text = $"{pack.message}({pack.Code})",
-                                    CloseTime = 3,
-                                    Direction = AMPopTipDirection.None
-                                };
-                                tip.Show(MainPage.BaseView);
+                                pack.message = Language.StringByID(StringId.OperationFailed);
                             }
+                            var tip = new Tip()
+                            {
+                                MaxWidth = Application.GetRealWidth(300),
+                                Text = $"{pack.message}({pack.Code})",
+                                CloseTime = 3,
+                                Direction = AMPopTipDirection.None
+                            };
+                            tip.Show(MainPage.BaseView);
                         });
                     }
                     #endregion
@@ -403,17 +408,18 @@
                         //澶辫触鎻愮ず
                         Application.RunOnMainThread(() =>
                         {
-                            if (!string.IsNullOrEmpty(pack.message))
+                            if (string.IsNullOrEmpty(pack.message))
                             {
-                                var tip = new Tip()
-                                {
-                                    MaxWidth = Application.GetRealWidth(300),
-                                    Text = $"{pack.message}({pack.Code})",
-                                    CloseTime = 3,
-                                    Direction = AMPopTipDirection.None
-                                };
-                                tip.Show(MainPage.BaseView);
+                                pack.message = Language.StringByID(StringId.OperationFailed);
                             }
+                            var tip = new Tip()
+                            {
+                                MaxWidth = Application.GetRealWidth(300),
+                                Text = $"{pack.message}({pack.Code})",
+                                CloseTime = 3,
+                                Direction = AMPopTipDirection.None
+                            };
+                            tip.Show(MainPage.BaseView);
                         });
                     }
                     #endregion
@@ -436,7 +442,11 @@
                         //澶辫触鎻愮ず
                         Application.RunOnMainThread(() =>
                         {
-                            if (!string.IsNullOrEmpty(pack.message))
+
+                            if (string.IsNullOrEmpty(pack.message))
+                            {
+                                pack.message = Language.StringByID(StringId.OperationFailed);
+                            }
                             {
                                 var tip = new Tip()
                                 {
@@ -493,7 +503,11 @@
                             //澶辫触鎻愮ず
                             Application.RunOnMainThread(() =>
                             {
-                                if (!string.IsNullOrEmpty(pack.message))
+
+                                if (string.IsNullOrEmpty(pack.message))
+                                {
+                                    pack.message = Language.StringByID(StringId.OperationFailed);
+                                }
                                 {
                                     var tip = new Tip()
                                     {
@@ -545,7 +559,11 @@
                             //澶辫触鎻愮ず
                             Application.RunOnMainThread(() =>
                             {
-                                if (!string.IsNullOrEmpty(pack.message))
+
+                                if (string.IsNullOrEmpty(pack.message))
+                                {
+                                    pack.message = Language.StringByID(StringId.OperationFailed);
+                                }
                                 {
                                     var tip = new Tip()
                                     {
@@ -599,7 +617,11 @@
                             //澶辫触鎻愮ず
                             Application.RunOnMainThread(() =>
                             {
-                                if (!string.IsNullOrEmpty(pack.message))
+
+                                if (string.IsNullOrEmpty(pack.message))
+                                {
+                                    pack.message = Language.StringByID(StringId.OperationFailed);
+                                }
                                 {
                                     var tip = new Tip()
                                     {
@@ -652,7 +674,11 @@
                             //澶辫触鎻愮ず
                             Application.RunOnMainThread(() =>
                             {
-                                if (!string.IsNullOrEmpty(pack.message))
+
+                                if (string.IsNullOrEmpty(pack.message))
+                                {
+                                    pack.message = Language.StringByID(StringId.OperationFailed);
+                                }
                                 {
                                     var tip = new Tip()
                                     {

--
Gitblit v1.8.0