old mode 100755
new mode 100644
| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string CodeIDString = "1.0.19121201"; |
| | | public static string CodeIDString = "1.0.20011001"; |
| | | /// <summary> |
| | | /// 注册来源(0:HDL On 1:Zigbee) |
| | | /// </summary> |
| | |
| | | /// 11 |
| | | /// </summary> |
| | | public static int PlaceHolderTextSize = 11; |
| | | /// <summary>
|
| | | /// 安卓的系统返回按键能否按下(比如在备份还原时,不能按下返回键)
|
| | | /// <summary> |
| | | /// 安卓的系统返回按键能否按下(比如在备份还原时,不能按下返回键) |
| | | /// </summary> |
| | | public static bool BackKeyCanClick = true; |
| | | |
| | |
| | | public async System.Threading.Tasks.Task<string> RequestHttpsZigbeeResultAsync(string requestUrl, byte[] byteData) |
| | | { |
| | | var result = await RequestHttpsZigbeeBytesResultAsync(requestUrl, byteData); |
| | | if (result != null)
|
| | | {
|
| | | return Encoding.UTF8.GetString(result);
|
| | | if (result != null) |
| | | { |
| | | return Encoding.UTF8.GetString(result); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | /// <summary> |
| | | /// <pra>请求服务器方法,指定一个Url,和请求方法,数据,Cookie,得到响应的数据</pra> |
| | | /// <pra>注意!!此方法仅限【拥有管理员权限的成员】调用</pra> |
| | | /// </summary>
|
| | | /// </summary> |
| | | /// <param name="requestUrl">请求Url</param> |
| | | /// <param name="byteData">请求的的数据</param> |
| | | /// <param name="requestMethod">POST 或者 GET 等等</param> |
| | | /// <returns>得到响应的数据</returns> |
| | | public async System.Threading.Tasks.Task<byte[]> RequestZigbeeHttpsByAdmin(string requestUrl, byte[] byteData, string requestMethod = "POST") |
| | | {
|
| | | { |
| | | //请求Url的完成路径 |
| | | var fullUrl = $"{Config.Instance.AdminRequestBaseUrl}/{requestUrl}";
|
| | | var fullUrl = $"{Config.Instance.AdminRequestBaseUrl}/{requestUrl}"; |
| | | return await this.DoRequestZigbeeHttpsInterface(fullUrl, byteData, Config.Instance.AdminRequestToken, requestMethod); |
| | | } |
| | |
|
| | | |
| | | /// <summary> |
| | | /// 请求服务器方法 |
| | | /// 指定一个Url,和请求方法,数据,Cookie,得到响应的数据 |
| | |
| | | { |
| | | //初始化新的webRequst |
| | | //1. 创建httpWebRequest对象 |
| | | HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(new Uri(requestFullUrl));
|
| | | HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(new Uri(requestFullUrl)); |
| | | |
| | | //2. 初始化HttpWebRequest对象 |
| | | webRequest.Method = requestMethod; |
| | |
| | | var response = (HttpWebResponse)webRequest.GetResponse(); |
| | | using (var stream = response.GetResponseStream()) |
| | | { |
| | | if (stream == null)
|
| | | if (stream == null) |
| | | { |
| | | return null; |
| | | } |