From 54be52bc0ab6ce3207d421db4e5b05d14886b148 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 07 十一月 2023 16:46:53 +0800
Subject: [PATCH] UI优化
---
HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs | 67 +++++++++++++++++++++++++--------
1 files changed, 51 insertions(+), 16 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
index 9bfabf7..ae70c7a 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs
@@ -481,7 +481,6 @@
void LoadFunctionRow()
{
functionListView.RemoveAll();
- functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count);
for(int i =0;i<scene.functions.Count;)
{
var scenefunction = scene.functions[i];
@@ -490,6 +489,7 @@
scene.functions.Remove(scenefunction);
continue;
}
+ functionListView.Height = Application.GetRealWidth(65 * scene.functions.Count);
try
{
//灏唖pk瀹炰綋閲岄潰鐨刴in max鍊兼斁鍏ュ満鏅姛鑳藉疄浣撻噷锛岃涓嶇劧鏁版嵁浼氫涪澶� 2022-06-21 16:06:45
@@ -821,13 +821,21 @@
btnOn.MouseUpEventHandler = (sender, e) =>
{
dialog.Close();
- temp = new SceneFunction();
temp.type = "7";
- temp.status.Add(new SceneFunctionStatus()
+ var kv = temp.status.Find((obj) => obj.key == "enable");
+ if (kv != null)
{
- key = "enable",
- value = "true"
- });
+ kv.value = "true";
+ }
+ else
+ {
+ temp.status.Add(new SceneFunctionStatus()
+ {
+ key = "enable",
+ value = "true",
+ });
+ }
+
var waitPage = new Loading();
bodyView.AddChidren(waitPage);
waitPage.Start("");
@@ -840,6 +848,10 @@
if (code == "0")
{
btnTipText.TextID = StringId.OpenArm;
+ }
+ else
+ {
+ IMessageCommon.Current.ShowErrorInfoAlter(code);
}
});
}
@@ -860,13 +872,21 @@
btnOff.MouseUpEventHandler = (sender, e) =>
{
dialog.Close();
- temp = new SceneFunction();
temp.type = "7";
- temp.status.Add(new SceneFunctionStatus()
+
+ var kv = temp.status.Find((obj) => obj.key == "enable");
+ if (kv != null)
{
- key = "enable",
- value = "false"
- });
+ kv.value = "false";
+ }
+ else
+ {
+ temp.status.Add(new SceneFunctionStatus()
+ {
+ key = "enable",
+ value = "false",
+ });
+ }
var waitPage = new Loading();
bodyView.AddChidren(waitPage);
@@ -880,6 +900,10 @@
if (code == "0")
{
btnTipText.TextID = StringId.Close;
+ }
+ else
+ {
+ IMessageCommon.Current.ShowErrorInfoAlter(code);
}
});
}
@@ -948,11 +972,22 @@
void LoadEvent_ChangeFunctionList()
{
btnAddFunctionTitle.MouseUpEventHandler = (sender, e) => {
- //var sefp =new SceneFunctionListChoosePage(scene,refreshFunctionRowAction);
- var sefp = new SceneTargetTypeChoosePage(scene, refreshFunctionRowAction);
- MainPage.BasePageView.AddChidren(sefp);
- sefp.LoadPage();
- MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ if (DB_ResidenceData.Instance.HomeGateway.isSupportSceneEnableAutomation)
+ {
+ //var sefp =new SceneFunctionListChoosePage(scene,refreshFunctionRowAction);
+ var sefp = new SceneTargetTypeChoosePage(scene, refreshFunctionRowAction);
+ MainPage.BasePageView.AddChidren(sefp);
+ sefp.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ }
+ else
+ {
+ var sefp = new SceneFunctionListChoosePage(scene,refreshFunctionRowAction);
+ //var sefp = new SceneTargetTypeChoosePage(scene, refreshFunctionRowAction);
+ MainPage.BasePageView.AddChidren(sefp);
+ sefp.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ }
};
}
--
Gitblit v1.8.0