From eda3fb873e59544ff36301b51e05aef64f87b0f9 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期五, 27 八月 2021 13:21:21 +0800 Subject: [PATCH] Merge branch 'newBranch1' of http://172.16.1.23:6688/r/~wxr/HDL_APP_Project into newBranch1 --- HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 131 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 128 insertions(+), 3 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs index 558b9df..93b3af5 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs @@ -49,6 +49,7 @@ LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.SetTemp)); break; case FunctionAttributeKey.Mode: + LoadFunctionRow(sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Mode)); break; case FunctionAttributeKey.FanSpeed: @@ -138,6 +139,7 @@ // } // catch { } //} + if (temp != null) { temp = sceneFunction; @@ -188,6 +190,13 @@ { row.AddChidren(new Button() { X = Application.GetRealWidth(16), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor }); } + else + { + if(sceneStatus.value == "stop") + { + sceneStatus.value = "on"; + } + } Button btnRight = new Button() { X = Application.GetRealWidth(339), @@ -198,15 +207,72 @@ }; row.AddChidren(btnRight); + + var showCode = ""; + + if (sceneStatus.key == FunctionAttributeKey.Mode) + { + if (DB_ResidenceData.Instance.GatewayType == 0) + { + if (SPK.AcSpkList().Contains(sceneFunction.localFunction.spk)) + { + //0 鍒跺喎1鍒剁儹锛�2閫氶锛�3鑷姩锛�4闄ゆ箍 + switch (sceneStatus.value) + { + case "0": + showCode = "cool"; + break; + case "1": + showCode = "heat"; + break; + case "2": + showCode = "fan"; + break; + case "3": + showCode = "auto"; + break; + case "4": + showCode = "dry"; + break; + } + } + else if (SPK.FhSpkList().Contains(sceneFunction.localFunction.spk)) + { + //1:鏅��,2:鐧藉ぉ,3:澶滄櫄,4:绂诲紑,5:鏃堕棿 + switch (sceneStatus.value) + { + case "5": + showCode = "timer"; + break; + case "1": + showCode = "normal"; + break; + case "2": + showCode = "day"; + break; + case "3": + showCode = "night"; + break; + case "4": + showCode = "away"; + break; + } + } + } + } + var btnFunctionText = new Button() { Width = Application.GetRealWidth(330), TextAlignment = TextAlignment.CenterRight, TextColor = CSS_Color.PromptingColor1, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = sceneStatus.GetValueText() + sceneStatus.GetUintString() + Text = sceneStatus.GetValueText(showCode) + sceneStatus.GetUintString() }; row.AddChidren(btnFunctionText); + + + if (sceneStatus.key == FunctionAttributeKey.OnOff) { btnOnText = btnFunctionText; @@ -327,7 +393,7 @@ items.Add("60", "1min"); items.Add("120", "2min"); items.Add("300", "5min"); - new PublicAssmebly().SetSceneDelayDialog(items,action,sceneFunction.delay); + new PublicAssmebly().SetSceneDelayDialog(action, sceneFunction.delay); }; #endregion @@ -889,6 +955,65 @@ var lastText = ""; Dialog dialog = new Dialog(); + if(DB_ResidenceData.Instance.GatewayType == 0) + { + if (SPK.AcSpkList().Contains(sceneFunction.localFunction.spk)) + { + //0 鍒跺喎1鍒剁儹锛�2閫氶锛�3鑷姩锛�4闄ゆ箍 + for (int i = 0; i < statusList.Count; i++) + { + if (statusList[i] == "0") + { + statusList[i] = "cool"; + } + else if (statusList[i] == "1") + { + statusList[i] = "heat"; + } + else if (statusList[i] == "2") + { + statusList[i] = "fan"; + } + else if (statusList[i] == "3") + { + statusList[i] = "auto"; + } + else if (statusList[i] == "4") + { + statusList[i] = "dry"; + } + } + } + else if (SPK.FhSpkList().Contains(sceneFunction.localFunction.spk)) + { + //1:鏅��,2:鐧藉ぉ,3:澶滄櫄,4:绂诲紑,5:鏃堕棿 + for (int i = 0; i < statusList.Count; i++) + { + if (statusList[i] == "5") + { + statusList[i] = "timer"; + } + else if (statusList[i] == "1") + { + statusList[i] = "normal"; + } + else if (statusList[i] == "2") + { + statusList[i] = "day"; + } + else if (statusList[i] == "3") + { + statusList[i] = "night"; + } + else if (statusList[i] == "4") + { + statusList[i] = "away"; + } + } + + } + } + var pView = new FrameLayout() { BackgroundColor = CSS_Color.DialogTransparentColor1, @@ -995,7 +1120,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, Tag = m, - Text = trait.GetValueText() + Text = trait.GetValueText(m) }; row.AddChidren(btnPropertyTitle); -- Gitblit v1.8.0