From cbc156bc38d8b8eae7aef60cb186ab2b52fa701f Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期二, 16 七月 2024 13:59:56 +0800
Subject: [PATCH] 增加全部挂断

---
 HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs |   78 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
index 6622d1c..d9ae722 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -72,11 +72,14 @@
         public void LoadPage(bool locationSetting = true)
         {
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
-            new TopViewDiv(bodyView, Language.StringByID(StringId.Setting)).LoadTopView();
+            var topView = new TopViewDiv(bodyView, Language.StringByID(StringId.Setting));
+            topView.maginY = 10;
+            topView.LoadTopView();
+
 
             var contentView = new VerticalScrolViewLayout()
             {
-                Y = Application.GetRealHeight(64),
+                Y = Application.GetRealHeight(64+10),
                 Height = Application.GetRealHeight(600),
                 ScrollEnabled = false,
             };
@@ -465,6 +468,7 @@
 
                 EventHandler<MouseEventArgs> ClickEvent = (sener, e) =>
                 {
+
                     new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () =>
                     {
                         UI2.FuntionControlView.VideoDoorLock.VideDoorLockSend.Current.DelDevice(this.function, (isBool) =>
@@ -498,6 +502,76 @@
 
             }
             #endregion
+
+            #region 鍒犻櫎娴蜂俊鐢佃璁惧 
+            if (this.function.spk == SPK.ElectricalTvHisense)
+            {
+                contentView.AddChidren(new Button()
+                {
+                    Height = Application.GetRealWidth(8),
+                });
+
+                #region 鍒犻櫎璁惧琛�
+                contentView.AddChidren(new Button()
+                {
+                    Height = Application.GetRealHeight(48),
+                });
+
+                var delTextBtn = new Button()
+                {
+                    Gravity = Gravity.CenterHorizontal,
+                    Width = Application.GetRealWidth(220),
+                    Height = Application.GetRealWidth(44),
+                    TextAlignment = TextAlignment.Center,
+                    TextColor = CSS_Color.WarningColor,
+                    TextSize = CSS_FontSize.SubheadingFontSize,
+                    TextID = StringId.jiebangshebei,
+                    Radius = (uint)Application.GetRealWidth(22),
+                    BackgroundColor = CSS_Color.MainBackgroundColor,
+                };
+                //濡傛灉鏄垚鍛橀殣钘忔敹钘忓姛鑳�
+                if (!DB_ResidenceData.Instance.CurrentRegion.isOtherShare)
+                {
+                    contentView.AddChidren(delTextBtn);
+                }
+
+
+                EventHandler<MouseEventArgs> ClickEvent = (sener, e) =>
+                {
+
+                    new HDL_ON.UI.Music.View.TipView().TipBox(-1, StringId.AreYouSureToDeleteThisDevice, () =>
+                    {
+                        HDL_ON.UI.UI2.FuntionControlView.HisenseTV.Send.Current.DelDevice(this.function.deviceId, (isBool) =>
+                            {
+                                Application.RunOnMainThread(() =>
+                                {
+                                    if (!isBool)
+                                    {
+                                        new Tip()
+                                        {
+                                            CloseTime = 1,
+                                            Text = Language.StringByID(StringId.delFail),
+                                            Direction = AMPopTipDirection.None,
+                                        }.Show(bodyView);
+                                        return;
+                                    }
+                                //鍒犻櫎鏈湴鏂囦欢                                  
+                                UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.DeleteFunction(this.function);
+                                    this.RemoveFromParent();
+                                    this.actionDel?.Invoke();
+                                });
+
+                            });
+
+                    });
+                };
+                delTextBtn.MouseUpEventHandler = ClickEvent;
+
+                #endregion
+
+
+            }
+            #endregion
 #if stage2
             #region 娣诲姞鍒版闈�
             var addToDesktopView = new FrameLayout()

--
Gitblit v1.8.0