| | |
| | | string curQueryType = "hour"; |
| | | string queryTime; |
| | | Function function; |
| | | public AcstSubHistoryPage(Function temp) |
| | | string colorString; |
| | | public AcstSubHistoryPage(Function temp,string colorStr) |
| | | { |
| | | function = temp; |
| | | bodyView = this; |
| | | colorString = colorStr; |
| | | } |
| | | |
| | | |
| | |
| | | /// </summary> |
| | | public void LoadPage() |
| | | { |
| | | new TopViewDiv(bodyView, function.GetRoomListName()).LoadTopView(); |
| | | var topView = new TopViewDiv(bodyView, function.name); |
| | | topView.maginY = 10; |
| | | topView.LoadTopView(); |
| | | |
| | | bodyView.BackgroundColor = CSS_Color.BackgroundColor; |
| | | |
| | | //var contentView = new FrameLayout() |
| | |
| | | { |
| | | Y = Application.GetRealHeight(222), |
| | | Height = Application.GetRealHeight(34), |
| | | Text = "最近24小时的平均室内温度", |
| | | TextID = StringId.Temp, |
| | | TextSize = 10, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | { |
| | | Y = Application.GetRealHeight(222), |
| | | Height = Application.GetRealHeight(34), |
| | | Text = "最近24小时的平均室内湿度", |
| | | TextID = StringId.Humidity, |
| | | TextSize = 10, |
| | | TextColor = 0xFF798394, |
| | | TextAlignment = TextAlignment.Center, |
| | |
| | | humiEchartsView.ShowWithOption(opString2); |
| | | |
| | | #endif |
| | | |
| | | LoadEvent_ChangeSensorHistoryShowType(); |
| | | LoadMothed_GetHistoryData(); |
| | | } |
| | | |
| | | |
| | |
| | | btnShowHistroyData_Month.IsSelected = false; |
| | | btnShowHistroyData_Week.IsSelected = false; |
| | | curQueryType = "hour"; |
| | | tempEchartOption.YvalueText = ""; |
| | | humiEchartsOption.YvalueText = ""; |
| | | LoadMothed_GetHistoryData(); |
| | | }; |
| | | |
| | |
| | | btnShowHistroyData_Month.IsSelected = true; |
| | | btnShowHistroyData_Week.IsSelected = false; |
| | | curQueryType = "month"; |
| | | tempEchartOption.YvalueText = ""; |
| | | humiEchartsOption.YvalueText = ""; |
| | | LoadMothed_GetHistoryData(); |
| | | }; |
| | | btnShowHistroyData_Week.MouseUpEventHandler = (sender, e) => |
| | |
| | | btnShowHistroyData_Month.IsSelected = false; |
| | | btnShowHistroyData_Week.IsSelected = true; |
| | | curQueryType = "week"; |
| | | tempEchartOption.YvalueText = ""; |
| | | humiEchartsOption.YvalueText = ""; |
| | | LoadMothed_GetHistoryData(); |
| | | }; |
| | | |
| | |
| | | loadPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | }); |
| | | |
| | | var revertObj = new HttpServerRequest().GetSensorHistory( function.deviceId, curQueryType , "room_temp"); |
| | | var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, function.deviceId , "room_temp"); |
| | | if (revertObj != null) |
| | | { |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | |
| | | } |
| | | tempEchartOption.InitXdataText(vs); |
| | | } |
| | | tempEchartOption.InitYdataText("", revertData, "#FF80AEFF"); |
| | | tempEchartOption.InitYdataTextLinearGradient("(°C)", revertData, colorString); |
| | | |
| | | tempEchartOption.xTitle = Language.StringByID(StringId.timeMode); |
| | | var opString = tempEchartOption.InitOption(); |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | tempEchartsView.ShowWithOption(opString); |
| | | }); |
| | | } |
| | | } |
| | | tempEchartOption.xTitle = Language.StringByID(StringId.timeMode); |
| | | var opString = tempEchartOption.InitOption(); |
| | | |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | tempEchartsView.ShowWithOption(opString); |
| | | }); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | finally |
| | | { |
| | | inReadTempHistory = false; |
| | | if (!inReadHumiHistory) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | |
| | | loadPage.Start(Language.StringByID(StringId.PleaseWait)); |
| | | }); |
| | | |
| | | var revertObj = new HttpServerRequest().GetSensorHistory(function.deviceId, curQueryType, "room_humidity"); |
| | | var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType,function.deviceId, "room_humidity"); |
| | | if (revertObj != null) |
| | | { |
| | | if (revertObj.Code == StateCode.SUCCESS) |
| | |
| | | } |
| | | humiEchartsOption.InitXdataText(vs); |
| | | } |
| | | humiEchartsOption.InitYdataText("", revertData, "#FF80AEFF"); |
| | | humiEchartsOption.InitYdataTextLinearGradient("(%)", revertData, colorString); |
| | | } |
| | | } |
| | | humiEchartsOption.xTitle = Language.StringByID(StringId.timeMode); |
| | |
| | | } |
| | | finally |
| | | { |
| | | inReadHumiHistory = false; |
| | | if (!inReadTempHistory) |
| | | { |
| | | Application.RunOnMainThread(() => |