| | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | this.VerticalScrollBarEnabled = false; |
| | | |
| | | #if DEBUG |
| | | DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl = true; |
| | | #endif |
| | | |
| | | #if __IOS__ |
| | | //自动偏移取消 |
| | | if (UIKit.UIDevice.CurrentDevice.CheckSystemVersion(11, 0)) |
| | |
| | | deviceId = enviTemp.deviceId, |
| | | attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = humiAttr.state, curValue = humiAttr.curValue } }, |
| | | }; |
| | | humiSensorList.Add(newTemp); |
| | | humiSensorList.Add(newTemp);//020103CF594C3E00051F0001051F// 1650546588519424001 |
| | | } |
| | | var tempAttr = enviTemp.attributes.Find((obj) => obj.key == "temperature"); |
| | | if (tempAttr != null) |
| | |
| | | deviceId = enviTemp.deviceId, |
| | | attributes = new List<FunctionAttributes> { new FunctionAttributes { key = "value", state = tempAttr.state, curValue = tempAttr.curValue } }, |
| | | }; |
| | | tempSensorList.Add(newTemp); |
| | | tempSensorList.Add(newTemp);//020103CF594C3E00051F0001051F |
| | | } |
| | | } |
| | | |
| | |
| | | foreach (var temp in tempSensorList) |
| | | { |
| | | double tempValue = 0; |
| | | double.TryParse(temp.GetAttrState("temperature"), out tempValue); |
| | | if (temp.GetAttribute("temperature") != null) |
| | | double.TryParse(temp.GetAttrState("temperature"), out tempValue); |
| | | else |
| | | double.TryParse(temp.GetAttrState("value"), out tempValue); |
| | | if (tempValue > 0) |
| | | { |
| | | tempTotalValues += tempValue; |
| | |
| | | foreach (var humi in humiSensorList) |
| | | { |
| | | double humiValue = 0; |
| | | double.TryParse(humi.GetAttrState("humidity"), out humiValue); |
| | | if (humi.GetAttribute("temperature") != null) |
| | | double.TryParse(humi.GetAttrState("humidity"), out humiValue); |
| | | else |
| | | double.TryParse(humi.GetAttrState("value"), out humiValue); |
| | | if (humiValue > 0) |
| | | { |
| | | humiTotalValues += humiValue; |
| | |
| | | }; |
| | | btnPm25Values.Width = btnPm25Values.GetTextWidth(); |
| | | environmentalView.AddChidren(btnPm25Values); |
| | | #endregion |
| | | #endregion |
| | | |
| | | |
| | | btnSecurityStatus = new Button() |
| | | { |
| | |
| | | TextAlignment = TextAlignment.Center, |
| | | }; |
| | | changeView.AddChidren(btnChangeScene); |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region ContextView |
| | | #region ContextView |
| | | contentView = new PageLayout() |
| | | { |
| | | //Y = changeView.Bottom, |
| | |
| | | |
| | | LoadContentView(); |
| | | |
| | | #endregion |
| | | #endregion |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | /// </summary> |
| | | void LoadContentView() |
| | | { |
| | | |
| | | if (!Common.ApiUtlis.Ins.DownloadDataComplete && !MainPage.NoLoginMode) |
| | | { |
| | | var waitPage = new Loading(); |
| | |
| | | btnIcon.UnSelectedImagePath = UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect); |
| | | //btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; |
| | | } |
| | | else if (function.spk == SPK.GroupControl) |
| | | { |
| | | btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png"; |
| | | btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png"; |
| | | } |
| | | //else if (function.spk == SPK.GroupControl) |
| | | //{ |
| | | // btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png"; |
| | | // btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png"; |
| | | //} |
| | | else |
| | | { |
| | | Button btnSwitch; |