From b800fbdf874cdc75ddc137ea2c22ac2c25d8b45c Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 26 十一月 2019 10:10:37 +0800
Subject: [PATCH] 2019.11.26
---
ZigbeeApp/Shared/Common/CommonPage.cs | 65 +++++++++++++++++++-------------
1 files changed, 39 insertions(+), 26 deletions(-)
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
old mode 100755
new mode 100644
index bf1c822..5ba11b2
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -7,7 +7,7 @@
using Shared.Phone.UserCenter.Abount;
namespace Shared.Common
{
- public class CommonPage : FrameLayout
+ public class CommonPage : UIDrawerLayout
{
static CommonPage commonPage;
public static CommonPage Instance
@@ -43,6 +43,11 @@
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";
@@ -53,11 +58,11 @@
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.19111201";
/// <summary>
/// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee)
/// </summary>
@@ -74,11 +79,11 @@
/// <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>
@@ -130,9 +135,9 @@
/// </summary>
public static int Navigation_Height = 220;
/// <summary>
- /// 搴曡竟鏍忛珮搴� 160
+ /// 搴曡竟鏍忛珮搴�
/// </summary>
- public static int TabbarHeight = 160;
+ public const int TabbarHeight = 141;
/// <summary>
/// 绾挎潯鐨勯珮搴�--瀹為檯鍍忕礌3
/// </summary>
@@ -177,8 +182,15 @@
/// 褰撳墠缃戠粶杩炴帴鐨勬ā寮� 0:娌℃湁缃戠粶 1锛氳繙绋嬭繛鎺ワ紝涔熷彨3G,4G 2锛歐IFI
/// </summary>
public static int nowNetworkMode = 0;
-
-
+ /// <summary>
+ /// 鍗犱綅瀛椾綋澶у皬
+ /// 11
+ /// </summary>
+ public static int PlaceHolderTextSize = 11;
+ /// <summary>
+ /// 瀹夊崜鐨勭郴缁熻繑鍥炴寜閿兘鍚︽寜涓�(姣斿鍦ㄥ浠借繕鍘熸椂,涓嶈兘鎸変笅杩斿洖閿�)
+ /// </summary>
+ public static bool BackKeyCanClick = true;
/// <summary>
/// 璇锋眰鏈嶅姟鍣ㄦ柟娉�
@@ -215,9 +227,9 @@
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;
}
@@ -240,18 +252,18 @@
/// <summary>
/// <pra>璇锋眰鏈嶅姟鍣ㄦ柟娉�,鎸囧畾涓�涓猆rl,鍜岃姹傛柟娉曪紝鏁版嵁锛孋ookie锛屽緱鍒板搷搴旂殑鏁版嵁</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>
/// 璇锋眰鏈嶅姟鍣ㄦ柟娉�
/// 鎸囧畾涓�涓猆rl,鍜岃姹傛柟娉曪紝鏁版嵁锛孋ookie锛屽緱鍒板搷搴旂殑鏁版嵁
@@ -262,12 +274,12 @@
/// <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")
- {
+ {
try
{
//鍒濆鍖栨柊鐨剋ebRequst
//1锛� 鍒涘缓httpWebRequest瀵硅薄
- HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(new Uri(requestFullUrl));
+ HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(new Uri(requestFullUrl));
//2锛� 鍒濆鍖朒ttpWebRequest瀵硅薄
webRequest.Method = requestMethod;
@@ -294,7 +306,7 @@
var response = (HttpWebResponse)webRequest.GetResponse();
using (var stream = response.GetResponseStream())
{
- if (stream == null)
+ if (stream == null)
{
return null;
}
@@ -373,18 +385,19 @@
}
var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponseEntity.ApkInfoRes>(result.ResponseData.ToString());
- if (responeData == null || responeData.pageData == null || responeData.pageData.Count==0)
+ if (responeData == null || responeData.pageData == null || responeData.pageData.Count == 0)
{
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;
}
}
@@ -519,7 +532,7 @@
{
try
{
- Application.RunOnMainThread( () =>
+ Application.RunOnMainThread(() =>
{
//璁惧畾涓�涓椂闂�
Config.Instance.LoginDateTime = new DateTime(1970, 1, 1);
@@ -590,4 +603,4 @@
}
}
}
-}
+}
\ No newline at end of file
--
Gitblit v1.8.0