From 17fd00c16951b025952001c0d815203bb57bd4d9 Mon Sep 17 00:00:00 2001
From: Davin <591807572@qq.com>
Date: 星期一, 31 七月 2023 18:41:38 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' of http://59.41.255.150:6688/r/~wxr/OnPro into Dev-Branch
---
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs
index e718b92..16705c7 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorlockUserManagerPage.cs
@@ -24,7 +24,6 @@
VideoDoorlockUser doorlockUser;
public Action delCallBackAction;
- Loading waitPage;
public VideoDoorlockUserManagerPage(Function function,VideoDoorlockUser user)
{
@@ -32,9 +31,7 @@
device = function;
doorlockUser = user;
BackgroundColor = CSS_Color.BackgroundColor;
- waitPage = new Loading();
- bodyView.AddChidren(waitPage);
- waitPage.Hide();
+
}
public void LoadPage()
@@ -115,7 +112,7 @@
{
return;
}
- if (System.Text.Encoding.Default.GetBytes(str).Length > 20)
+ if (System.Text.Encoding.UTF8.GetBytes(str).Length > 20)
{
new Tip()
{
@@ -125,7 +122,9 @@
}.Show(bodyView);
return;
}
+ var waitPage = new Loading();
waitPage.Start(Language.StringByID(StringId.PleaseWait));
+ bodyView.AddChidren(waitPage);
new System.Threading.Thread(() =>
{
try
@@ -143,7 +142,10 @@
//澶辫触鎻愮ず
Application.RunOnMainThread(() =>
{
- if (!string.IsNullOrEmpty(pack.message))
+ if (string.IsNullOrEmpty(pack.message))
+ {
+ pack.message = Language.StringByID(StringId.OperationFailed);
+ }
{
var tip = new Tip()
{
@@ -166,13 +168,18 @@
Application.RunOnMainThread(() =>
{
waitPage.Hide();
+ if(waitPage!= null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
{ IsBackground = true }.Start();
};
var pa = new PublicAssmebly();
- pa.entryMaxLength = 30;
+ pa.entryMaxLength = 20;
pa.LoadDialog_EditParater(StringId.ChangeName, "", callBack, StringId.UesrNameCannotBeEmpty, 0, new List<string>());
};
btnUserName.MouseUpEventHandler = eventHandler;
@@ -330,7 +337,9 @@
fingerprintView.AddChidren(btnClearFingerprints);
btnClearFingerprints.MouseUpEventHandler = (sender, e) =>
{
+ var waitPage = new Loading();
waitPage.Start(Language.StringByID(StringId.PleaseWait));
+ bodyView.AddChidren(waitPage);
new System.Threading.Thread(() =>
{
try
@@ -371,6 +380,11 @@
Application.RunOnMainThread(() =>
{
waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
@@ -440,7 +454,9 @@
digitalPasswordView.AddChidren(btnClearDigitalPassword);
btnClearDigitalPassword.MouseUpEventHandler = (sender, e) =>
{
+ var waitPage = new Loading();
waitPage.Start(Language.StringByID(StringId.PleaseWait));
+ bodyView.AddChidren(waitPage);
new System.Threading.Thread(() =>
{
try
@@ -481,6 +497,11 @@
Application.RunOnMainThread(() =>
{
waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
@@ -549,7 +570,9 @@
};
nfcView.AddChidren(btnClearNfc);
btnClearNfc.MouseUpEventHandler = (sender, e) => {
+ var waitPage = new Loading();
waitPage.Start(Language.StringByID(StringId.PleaseWait));
+ bodyView.AddChidren(waitPage);
new System.Threading.Thread(() =>
{
try
@@ -589,6 +612,11 @@
Application.RunOnMainThread(() =>
{
waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
@@ -657,7 +685,9 @@
};
faceView.AddChidren(btnClearFace);
btnClearFace.MouseUpEventHandler = (sender, e) => {
+ var waitPage = new Loading();
waitPage.Start(Language.StringByID(StringId.PleaseWait));
+ bodyView.AddChidren(waitPage);
new System.Threading.Thread(() =>
{
try
@@ -697,6 +727,11 @@
Application.RunOnMainThread(() =>
{
waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
@@ -737,6 +772,7 @@
{
new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteDoorlockUserTip, () =>
{
+ var waitPage = new Loading();
waitPage.Start(Language.StringByID(StringId.PleaseWait));
new System.Threading.Thread(() =>
{
@@ -758,6 +794,9 @@
{
Application.RunOnMainThread(() =>
{
+ if (string.IsNullOrEmpty(pack.message)) {
+ pack.message = Language.StringByID(StringId.OperationFailed);
+ }
//澶辫触鎻愮ず
var tip = new Tip()
{
@@ -779,6 +818,11 @@
Application.RunOnMainThread(() =>
{
waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
--
Gitblit v1.8.0