From 84fa7c9665d9bed9aef79237be9c5eb57c49f13d Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期五, 05 三月 2021 10:54:37 +0800
Subject: [PATCH] Merge branch 'CJL' into ez-test
---
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 59 ++++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 38 insertions(+), 21 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
index edad55f..173cb69 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -70,33 +70,36 @@
//LoadFunctionRow(sceneFunction.localFunction.trait_on_off);
//switch (sceneFunction.localFunction.functionType)
//{
- // case FunctionType.AC:
+ // case SPK.AcStandard:
// LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "set_temp"));
// LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "mode"));
// LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "fan"));
// break;
- // case FunctionType.FloorHeating:
+ // case SPK.FloorHeatStandard:
// LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "set_temp"));
// LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "mode"));
// break;
- // case FunctionType.Curtain:
+ // case SPK.CurtainSwitch:
// //鏃犳搷浣�
// break;
- // case FunctionType.MotorCurtain:
- // case FunctionType.RollingShutter:
+ // case SPK.CurtainTrietex:
+ // case SPK.CurtainRoller:
// LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "percent"));
// break;
- // case FunctionType.Relay:
+ // case SPK.LightSwitch:
// //鏃犳搷浣�
// break;
- // case FunctionType.Dimmer:
- // case FunctionType.RGB:
+ // case SPK.LightDimming:
+ // case SPK.LightRGB:
// LoadFunctionRow(sceneFunction.localFunction.attributes.Find((obj) => obj.key == "brightness"));
// break;
//}
- //鍔犺浇寤舵椂Row
- LoadDelayRow();
+ if (DB_ResidenceData.Instance.GatewayType != 0)
+ {
+ //鍔犺浇寤舵椂Row
+ LoadDelayRow();
+ }
var bottomView = new FrameLayout()
{
@@ -126,15 +129,15 @@
btnConfrim.MouseUpEventHandler = (sender, e) =>
{
var temp = scene.functions.Find((obj) => obj.sid == sceneFunction.sid);
- if (sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness) != null)
- {
- try
- {
- //涓�绔彛涓嶆敮鎸佸紑鍏冲�间笌浜害鍊间竴璧峰鐞嗭紝闇�瑕佸皢寮�鍏冲�肩Щ闄ゆ帀
- sceneFunction.status.Remove(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff));
- }
- catch { }
- }
+ //if (sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness) != null)
+ //{
+ // try
+ // {
+ // //涓�绔彛涓嶆敮鎸佸紑鍏冲�间笌浜害鍊间竴璧峰鐞嗭紝闇�瑕佸皢寮�鍏冲�肩Щ闄ゆ帀
+ // sceneFunction.status.Remove(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff));
+ // }
+ // catch { }
+ //}
if (temp != null)
{
temp = sceneFunction;
@@ -206,7 +209,7 @@
{
btnOnText = btnFunctionText;
}
- else if (sceneStatus.key == FunctionAttributeKey.Brightness)
+ else if (sceneStatus.key == FunctionAttributeKey.Brightness || sceneStatus.key == FunctionAttributeKey.Percent)
{
btnBrightnessText = btnFunctionText;
}
@@ -317,12 +320,18 @@
sceneFunction.delay = obj;
btnDelayInfo.Text = FunctionList.List.GetDelayText(obj);
};
- new PublicAssmebly().SetSceneDelayDialog(action,sceneFunction.delay);
+ Dictionary<string, string> items = new Dictionary<string, string>();
+ items.Add("30", "30s");
+ items.Add("60", "1min");
+ items.Add("120", "2min");
+ items.Add("300", "5min");
+ new PublicAssmebly().SetSceneDelayDialog(items,action,sceneFunction.delay);
};
#endregion
}
+
#endregion
#region 灞炴�ч�夋嫨寮圭獥
@@ -417,6 +426,10 @@
btn.Text = FunctionList.List.GetValueText(trait.key, trait.value) + FunctionList.List.GetUintString(trait.key);
var temp = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness);
+ if (temp == null)
+ {
+ temp = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Percent);
+ }
if (temp != null)
{
if (temp.value == "0")
@@ -433,6 +446,10 @@
btn.Text= FunctionList.List.GetValueText(trait.key,trait.value) + FunctionList.List.GetUintString(trait.key);
var temp = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Brightness);
+ if(temp == null)
+ {
+ temp = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Percent);
+ }
if (temp != null)
{
if (temp.value != "0")
--
Gitblit v1.8.0