| | |
| | | #endif |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取传感器历史数据 |
| | | /// </summary> |
| | | /// <param name="subnetId"></param> |
| | | /// <param name="deviceId"></param> |
| | | /// <param name="bigClass"></param> |
| | | /// <param name="minClass"></param> |
| | | /// <param name="queryType"></param> |
| | | /// <param name="loopId"></param> |
| | | /// <param name="nowMonth"></param> |
| | | /// <param name="mac"></param> |
| | | /// <returns></returns> |
| | | public ResponsePack GetSensorHistory(int subnetId,int deviceId,int bigClass,int minClass,int queryType,int loopId,int nowMonth,string mac) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("SubnetID", subnetId); |
| | | d.Add("DeviceID", deviceId); |
| | | d.Add("LargeType", bigClass); |
| | | d.Add("SmallType", minClass); |
| | | d.Add("QueryType", queryType); |
| | | d.Add("loopId", loopId); |
| | | d.Add("NowMonth", nowMonth); |
| | | d.Add("MAC", DB_ResidenceData.residenceData.residenceGatewayMAC); |
| | | d.Add("LocalTimeZone", 8); |
| | | var jsonString = Newtonsoft.Json.JsonConvert.SerializeObject(d); |
| | | return RequestHttps("https://developer.hdlcontrol.com/api/GetSensorPushHistory", jsonString,true); |
| | | |
| | | } |
| | | |
| | | public string GetRequestResultMsg(string resultCode) |
| | | { |
| | | string result = ""; |
| | |
| | | MainPage.LoginUser.headImagePageBytes = headImageBytes; |
| | | var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/", "headImage.png"); |
| | | |
| | | #if DEBUG |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { CloseTime = 5, Text = filePath }.Show(MainPage.BasePageView); |
| | | }); |
| | | #endif |
| | | fs = new FileStream(filePath, FileMode.Create, FileAccess.Write); |
| | | fs.Write(headImageBytes, 0, headImageBytes.Length); |
| | | fs.Flush(); |