| | |
| | | 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: |
| | |
| | | // } |
| | | // catch { } |
| | | //} |
| | | |
| | | if (temp != null) |
| | | { |
| | | temp = sceneFunction; |
| | |
| | | { |
| | | 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), |
| | |
| | | }; |
| | | 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; |
| | |
| | | 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 |
| | | |
| | |
| | | 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, |
| | |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.TextFontSize, |
| | | Tag = m, |
| | | Text = trait.GetValueText() |
| | | Text = trait.GetValueText(m) |
| | | }; |
| | | row.AddChidren(btnPropertyTitle); |
| | | |