old mode 100755
new mode 100644
| | |
| | | using Shared.Phone.UserCenter.Abount; |
| | | namespace Shared.Common |
| | | { |
| | | public class CommonPage : FrameLayout |
| | | public class CommonPage : UIDrawerLayout |
| | | { |
| | | static CommonPage commonPage; |
| | | public static CommonPage Instance |
| | |
| | | Application.MainPage.AddChidren(Loading); |
| | | //} |
| | | Phone.UserView.HomePage.Instance.InitPage(); |
| | | |
| | | var roomList = new Shared.Phone.Device.Room.RoomManagement(); |
| | | |
| | | Instance.AddLeftView(roomList); |
| | | roomList.Show(); |
| | | } |
| | | |
| | | public static string SoftTitle = "ZigBee"; |
| | |
| | | public static string LogoString = @"Logo/Logo.png"; |
| | | public static string RegisterLogoString = @"Logo/Register_logo.png"; |
| | | public static string RequestHttpsHost = "https://global.hdlcontrol.com/HangZhouHdlCloudApi"; |
| | | //public static string RequestHttpsHost = "http://172.16.2.225:13061"; |
| | | //public static string RequestHttpsHost = "http://172.16.2.192:13061"; |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string CodeIDString = "1.0.19071501"; |
| | | public static string CodeIDString = "1.0.19112901"; |
| | | /// <summary> |
| | | /// 注册来源(0:HDL On 1:Zigbee) |
| | | /// </summary> |
| | |
| | | /// <summary> |
| | | /// 请求版本号 |
| | | /// </summary> |
| | | public static string RequestVersion = "1.0"; |
| | | public static string RequestVersion = "2.0"; |
| | | /// <summary> |
| | | /// 左边距离屏幕的宽度--50 |
| | | /// 左边距离屏幕的宽度--58 |
| | | /// </summary> |
| | | public static int XLeft = 50; |
| | | public static int XLeft = 58; |
| | | /// <summary> |
| | | /// button高度--110 |
| | | /// </summary> |
| | |
| | | /// </summary> |
| | | public static int Navigation_Height = 220; |
| | | /// <summary> |
| | | /// 底边栏高度 160 |
| | | /// 底边栏高度 |
| | | /// </summary> |
| | | public static int TabbarHeight = 160; |
| | | public const int TabbarHeight = 141; |
| | | /// <summary> |
| | | /// 线条的高度--实际像素3 |
| | | /// </summary> |
| | |
| | | /// 当前网络连接的模式 0:没有网络 1:远程连接,也叫3G,4G 2:WIFI |
| | | /// </summary> |
| | | public static int nowNetworkMode = 0; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 占位字体大小 |
| | | /// 11 |
| | | /// </summary> |
| | | public static int PlaceHolderTextSize = 11; |
| | | /// <summary>
|
| | | /// 安卓的系统返回按键能否按下(比如在备份还原时,不能按下返回键)
|
| | | /// </summary> |
| | | public static bool BackKeyCanClick = true; |
| | | |
| | | /// <summary> |
| | | /// 请求服务器方法 |
| | |
| | | /// <param name="token">token</param> |
| | | /// <param name="requestMethod">POST 或者 GET 等等</param> |
| | | /// <returns>得到响应的数据</returns> |
| | | private async System.Threading.Tasks.Task<byte[]> DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST") |
| | | public async System.Threading.Tasks.Task<byte[]> DoRequestZigbeeHttpsInterface(string requestFullUrl, byte[] byteData, string token, string requestMethod = "POST") |
| | | {
|
| | | try |
| | | { |
| | |
| | | //2. 初始化HttpWebRequest对象 |
| | | webRequest.Method = requestMethod; |
| | | webRequest.Timeout = 10 * 1000; |
| | | webRequest.Headers.Add(HttpRequestHeader.Authorization, token); |
| | | if (token != null)
|
| | | {
|
| | | //对应微信网址
|
| | | webRequest.Headers.Add(HttpRequestHeader.Authorization, token);
|
| | | } |
| | | if (requestMethod == "GET") |
| | | { |
| | | //webRequest.ContentType = "text/html"; |
| | |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | System.Console.WriteLine(e.Message); |
| | | {
|
| | | #if DEBUG |
| | | System.Console.WriteLine(e.Message);
|
| | | #endif |
| | | return null; |
| | | } |
| | | } |
| | |
| | | return null; |
| | | } |
| | | int MaxIndex = 0; |
| | | int NewID = 0; |
| | | int NewVersion = 0; |
| | | for (int i = 0; i < responeData.pageData.Count; i++) |
| | | { |
| | | var apkInfo = responeData.pageData[i]; |
| | | if (int.Parse(apkInfo.Id) > NewID) |
| | | var version = int.Parse(apkInfo.FirmwareVersion.Replace(".", "")); |
| | | if (version > NewVersion) |
| | | { |
| | | NewID = int.Parse(apkInfo.Id); |
| | | NewVersion = version; |
| | | MaxIndex = i; |
| | | } |
| | | } |