From 452e8cef1c740d18ee398be6971d9952e41dbd4a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 四月 2023 16:11:50 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI0-Public/TopViewDiv.cs | 103 +++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 95 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI0-Public/TopViewDiv.cs b/HDL_ON/UI/UI0-Public/TopViewDiv.cs
index 34c732e..8bcda0b 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);
@@ -250,6 +256,35 @@
}
/// <summary>
+ /// 鎴块棿鏍囬鍖哄煙
+ /// </summary>
+ /// <param name="room"></param>
+ /// <param name="skipAction"></param>
+ /// <param name="text"></param>
+ public void LoadTopView_SettingText(Action skipAction,string text)
+ {
+ LoadTopView();
+
+ var btnSetting = new Button()
+ {
+ X = Application.GetRealWidth(337-100),
+ Y = Application.GetRealHeight(29),
+ Width = Application.GetMinRealAverage(100),
+ Height = Application.GetMinRealAverage(28),
+ TextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.TextFontSize,
+ TextAlignment = TextAlignment.CenterRight,
+ Text = text,
+ };
+ contentView.AddChidren(btnSetting);
+ btnSetting.MouseUpEventHandler += (sender, e) =>
+ {
+ skipAction();
+ };
+ }
+
+
+ /// <summary>
/// 鍚慺ramelayout娣诲姞椤堕儴鍖哄煙,鎷ユ湁娣诲姞鍥炬爣鐨勬寜閽�
/// </summary>
/// <param name="frame"></param>
@@ -301,6 +336,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