| | |
| | | /// </summary> |
| | | public static void LoadEvent_RefreshAir() |
| | | { |
| | | if (bodyView != null) |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | bodyView.btnTempValues.Text = MainPage.cityInfo.temperature == null ? "--" : MainPage.cityInfo.temperature + "°"; |
| | | bodyView.btnHumidityValues.Text = MainPage.cityInfo.humidity == null ? "--" : MainPage.cityInfo.humidity + "%"; |
| | | bodyView.btnPm25Values.Text = MainPage.cityInfo.pm25 == null ? "--" : MainPage.cityInfo.pm25; |
| | | } |
| | | if (bodyView != null) |
| | | { |
| | | bodyView.btnTempValues.Text = MainPage.cityInfo.temperature == null ? "--" : MainPage.cityInfo.temperature + "°"; |
| | | bodyView.btnHumidityValues.Text = MainPage.cityInfo.humidity == null ? "--" : MainPage.cityInfo.humidity + "%"; |
| | | bodyView.btnPm25Values.Text = MainPage.cityInfo.pm25 == null ? "--" : MainPage.cityInfo.pm25; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新安防状态 |
| | | /// </summary> |
| | | public static void LoadEvent_RefreshSecurityStatus() |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (bodyView != null) |
| | | { |
| | | //foreach(var temp in FunctionList.List.securities) |
| | | //{ |
| | | // if(temp.status == "enable") |
| | | // { |
| | | // bodyView.btnSecurityStatus.IsSelected = true; |
| | | // return; |
| | | // } |
| | | //} |
| | | bodyView.btnSecurityStatus.IsSelected = SecurityCenter.Ins.InDefense; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (bodyView != null) |
| | | { |
| | | var humiSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorHumidity); |
| | | var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorEnvironment); |
| | | var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => SPK.EvironmentSensorList().Contains(obj.spk )); |
| | | foreach (var enviTemp in enviSensorList) |
| | | { |
| | | var tempAttr = enviTemp.attributes.Find((obj) => obj.key == "humidity"); |
| | |
| | | if (bodyView != null) |
| | | { |
| | | var tempSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorTemperature); |
| | | var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => obj.spk == SPK.SensorEnvironment); |
| | | var enviSensorList = FunctionList.List.GetEnvirSensorsList().FindAll((obj) => SPK.EvironmentSensorList().Contains(obj.spk)); |
| | | foreach (var enviTemp in enviSensorList) |
| | | { |
| | | var tempAttr = enviTemp.attributes.Find((obj) => obj.key == "temperature"); |