From d4811b7d34b45ff6b21b97f11da128b5572ec526 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 03 三月 2021 16:03:03 +0800 Subject: [PATCH] 20210303-1 --- 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