From 9508510f0b27da3278fa1161eb2ba3dd1e3e2030 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 26 七月 2023 13:14:00 +0800
Subject: [PATCH] 2023年07月26日13:12:21

---
 HDL_ON/UI/UI0-Public/TopViewDiv.cs |  105 ++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 97 insertions(+), 8 deletions(-)

diff --git a/HDL_ON/UI/UI0-Public/TopViewDiv.cs b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
index 34c732e..572cffe 100644
--- a/HDL_ON/UI/UI0-Public/TopViewDiv.cs
+++ b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
@@ -26,6 +26,7 @@
         /// </summary>
         Button btnBack;
 
+        public Button btnTilte;
         /// <summary>
         /// 鏍囬鍚嶇О
         /// </summary>
@@ -79,12 +80,12 @@
         /// </summary>
         /// <param name="frame"></param>
         /// <param name="tilte"></param>
-        public void LoadTopView()
+        public void LoadTopView(uint color = CSS_Color.TopViewColor)//,Action<List<Function> action
         {
             contentView = new FrameLayout()
             {
                 Height = Application.GetRealHeight(64),
-                BackgroundColor = CSS_Color.TopViewColor,
+                BackgroundColor = color,
             };
             baseView.AddChidren(contentView);
 
@@ -98,7 +99,7 @@
             };
             contentView.AddChidren(btnBackIcon);
 
-            Button btnTilte = new Button()
+            btnTilte = new Button()
             {
                 Gravity = Gravity.CenterHorizontal,
                 Y = Application.GetRealHeight(30),
@@ -110,6 +111,7 @@
                 Text = title
             };
             contentView.AddChidren(btnTilte);
+           
 
 
             btnBack = new Button()
@@ -169,11 +171,15 @@
 
             var btnSetting = new Button()
             {
-                X = Application.GetRealWidth(337),
-                Y = Application.GetRealHeight(29),
-                Width = Application.GetMinRealAverage(28),
-                Height = Application.GetMinRealAverage(28),
-                UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png",
+                X = Application.GetRealWidth(337-37),
+                Y = Application.GetRealHeight(20),
+                Width = Application.GetMinRealAverage(28+37),
+                Height = Application.GetMinRealAverage(28+19),
+                TextID = StringId.CombinedDimming,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextColor = CSS_Color.MainColor,
+                IsMoreLines = true
+                //UnSelectedImagePath = "FunctionIcon/Light/LightScene/SetLightSceneIcon.png",
             };
 
             contentView.AddChidren(btnSetting);
@@ -219,6 +225,8 @@
             };
         }
 
+
+
         /// <summary>
         /// 鎴块棿鏍囬鍖哄煙
         /// </summary>
@@ -248,6 +256,35 @@
                 skipAction();
             };
         }
+
+        /// <summary>
+        /// 鎴块棿鏍囬鍖哄煙
+        /// </summary>
+        /// <param name="room"></param>
+        /// <param name="skipAction"></param>
+        /// <param name="text"></param>
+        public void LoadTopView_SettingText(Action skipAction,string text,bool isDelColor = false)
+        {
+            LoadTopView();
+            
+            var btnSetting = new Button()
+            {
+                X = Application.GetRealWidth(355-100),
+                Y = Application.GetRealHeight(29),
+                Width = Application.GetMinRealAverage(100),
+                Height = Application.GetMinRealAverage(28),
+                TextColor = isDelColor ?CSS_Color.WarningColor: CSS_Color.MainColor,
+                TextSize = CSS_FontSize.TextFontSize,
+                TextAlignment = TextAlignment.CenterRight,
+                Text = text,
+            };
+            contentView.AddChidren(btnSetting);
+            btnSetting.MouseUpEventHandler += (sender, e) =>
+            {
+                skipAction();
+            };
+        }
+
 
         /// <summary>
         /// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙,鎷ユ湁娣诲姞鍥炬爣鐨勬寜閽�
@@ -301,6 +338,58 @@
         }
 
         /// <summary>
+        /// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙,娣诲姞绗笁鏂瑰钩鍙�
+        /// </summary>
+        /// <param name="frame"></param>
+        /// <param name="tilte"></param>
+        public void LoadTopView_Add3tyIot( Action<string, string> callBack)
+        {
+            LoadTopView(CSS_Color.MainBackgroundColor);
+
+            var btnAddIcon = new Button()
+            {
+                X = Application.GetRealWidth(337),
+                Y = Application.GetRealHeight(29),
+                Width = Application.GetMinRealAverage(28),
+                Height = Application.GetMinRealAverage(28),
+                UnSelectedImagePath = "Public/LinkIotIcon.png",
+            };
+            contentView.AddChidren(btnAddIcon);
+
+            btnAddIcon.MouseUpEventHandler += (sender, e) =>
+            {
+                var page = new Iot_BrandListPage();
+                MainPage.BasePageView.AddChidren(page);
+                page.LoadPage();
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            };
+        }
+
+
+        /// <summary>
+        /// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙,绗笁鏂瑰钩鍙�
+        /// </summary>
+        public void LoadTopView_3tyIot(Action action)
+        {
+            LoadTopView(CSS_Color.MainBackgroundColor);
+
+            var btnAddIcon = new Button()
+            {
+                X = Application.GetRealWidth(337),
+                Y = Application.GetRealHeight(29),
+                Width = Application.GetMinRealAverage(28),
+                Height = Application.GetMinRealAverage(28),
+                UnSelectedImagePath = "Public/Iot_agreement_icon.png",
+            };
+            contentView.AddChidren(btnAddIcon);
+
+            btnAddIcon.MouseUpEventHandler += (sender, e) =>
+            {
+                action();
+            };
+        }
+
+        /// <summary>
         /// 妤煎眰绠$悊椤堕儴鏍�
         /// </summary>
         public void LoadTopView_FloorTopView(Action<string> callBack, Action action)

--
Gitblit v1.8.0