From 32a8370517ce75caac836edc82f62614d5f9b187 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 23 十一月 2022 10:19:31 +0800
Subject: [PATCH] 科技系统优化、大华摄像头功能
---
HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 59 insertions(+), 1 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
index 048ce36..a03c335 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/DeviceListPage.cs
@@ -108,12 +108,70 @@
bool isFrist = true;
foreach (var device in deviceList)
{
- FrameLayout row = new FrameLayout()
+ var row = new RowLayout()
{
Height = Application.GetRealHeight(50),
BackgroundColor = CSS_Color.MainBackgroundColor,
+ LineColor = 0x00000000,
};
contentView.AddChidren(row);
+ if(device.spk == SPK.IpCam_Imou)
+ {
+ var btnDel = new Button()
+ {
+ TextColor = CSS_Color.TextualColor,
+ BackgroundColor = CSS_Color.WarningColor,
+ TextID = StringId.Del,
+ TextAlignment = TextAlignment.Center,
+ };
+ row.AddRightView(btnDel);
+
+ btnDel.MouseUpEventHandler = (sender, e) => {
+ Action action = () => {
+ var waitPage = new Loading();
+ this.AddChidren(waitPage);
+ waitPage.Start("");
+ new System.Threading.Thread(() =>
+ {
+ try
+ {
+ var http = new HttpServerRequest();
+ var result = http.Delete3tyDevice("3452daf");// device.deviceId);
+ if (result.Code == StateCode.SUCCESS)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ Load3tyBrandDeviceList();
+ });
+ }
+ else
+ {
+ Application.RunOnMainThread(() =>
+ {
+ new PublicAssmebly().TipMsgAutoClose(Language.StringByID(StringId.OperationFailed)+$"\r\n({result.Code})", true);
+ });
+ }
+ }catch (Exception ex)
+ {
+ MainPage.Log($"鍒犻櫎绗笁鏂硅澶囧け璐�:{ex.Message}");
+ }
+ finally
+ {
+ Application.RunOnMainThread(() =>
+ {
+ if(waitPage!= null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
+ });
+ }
+ })
+ { IsBackground = true }.Start();
+ };
+ new PublicAssmebly().TipOptionMsg(StringId.Tip, Language.StringByID(StringId.AreYouSureToDeleteThisDevice), action);
+ };
+ }
if (isFrist)
{
--
Gitblit v1.8.0