From 466d9904486acf9d1d5082298f1541579fff262d Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 09 七月 2021 12:24:11 +0800
Subject: [PATCH] 最后的版本
---
ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs | 2
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs | 21
ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs | 37
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll | 0
ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs | 4
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs | 24
ZigbeeApp/Shared/R.cs | 12
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs | 20
ZigbeeApp/Shared/Common/CommonPage.cs | 2
ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll | 0
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs | 32 +
ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs | 10
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs | 21
ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs | 13
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs | 26
ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs | 2
ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll | 0
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs | 119 +++
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.xml | 175 +++++
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs | 7
ZigbeeApp/Shared/Common/Device.cs | 80 ++
ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs | 6
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs | 12
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs | 8
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs | 20
ZigbeeApp/Shared/Phone/MainPage/AppNoticeForm.cs | 78 ++
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlCheckLogic.cs | 8
ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs | 38 +
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAirQualitySensorDetailCardForm.cs | 3
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs | 2
ZigbeeApp/Shared/DLL/Android/Shared.Droid.xml | 147 ++++
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs | 243 +++++++
ZigbeeApp/Shared/Shared.projitems | 4
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/FirmwareUpdateResourse.cs | 12
ZigbeeApp/Shared/Phone/MainPage/DeviceTemperatureHistoryForm.cs | 207 +++++-
/dev/null | 100 ---
ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs | 61 -
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll | 0
ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceTemperatureHumidityDetailCardForm.cs | 237 +++++++
ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs | 61 -
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs | 2
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs | 20
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs | 12
44 files changed, 1,502 insertions(+), 386 deletions(-)
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
index 6ea9f15..6aab059 100755
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -45,7 +45,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string CodeIDString = "1.1.0121011401";
+ public static string CodeIDString = "1.1.0121070801";
/// <summary>
/// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee)
/// </summary>
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index 182d93c..5ff29c8 100644
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -2852,6 +2852,58 @@
});
}
+ /// <summary>
+ /// 澶勭悊缃戝叧杩斿洖鐨勬箍搴﹀��
+ /// </summary>
+ /// <param name="value">缃戝叧杩斿洖鐨勫睘鎬у��</param>
+ public decimal AdjustHumidityValue(int value)
+ {
+ if (value == 0)
+ {
+ //0%
+ return 0;
+ }
+ //涓嶄細鍑虹幇璐熸暟
+ else
+ {
+ //灏忔暟鐐归渶瑕佷竴浣�
+ string strValue = value.ToString();
+ strValue = strValue.Substring(0, strValue.Length - 1);
+ //璁板綍娓╁害
+ return strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ }
+ }
+
+ /// <summary>
+ /// 澶勭悊缃戝叧杩斿洖鐨勬俯搴﹀��
+ /// </summary>
+ /// <param name="value">缃戝叧杩斿洖鐨勫睘鎬у��</param>
+ public decimal AdjustTemperatrueValue(int value)
+ {
+ if (value == 0)
+ {
+ //0鈩�
+ return 0;
+ }
+ else if (value > 32767)
+ {
+ //璐熸暟(鐗规畩澶勭悊)
+ string strValue = (value - 65536).ToString();
+ //灏忔暟鐐归渶瑕佷竴浣�
+ strValue = strValue.Substring(0, strValue.Length - 1);
+ //璁板綍娓╁害
+ return strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ }
+ else
+ {
+ //灏忔暟鐐归渶瑕佷竴浣�
+ string strValue = value.ToString();
+ strValue = strValue.Substring(0, strValue.Length - 1);
+ //璁板綍娓╁害
+ return strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ }
+ }
+
#endregion
//----------------------------------鍒嗗壊绾�(鑷畾涔夋帴鍙�)---------------------------------------------
@@ -3249,6 +3301,34 @@
((TemperatureSensor)mainDevice).SensorDiv = 1;
}
}
+ if (((TemperatureSensor)mainDevice).SensorDiv == 1)
+ {
+ //鍙樻洿涓�涓嬫俯搴︾殑鍊�
+ foreach (var data in mainDevice.AttributeStatus)
+ {
+ if (data.ClusterId == 1026
+ && data.AttributeId == (int)AttriButeId.MeasuredValue)
+ {
+ //澶勭悊缃戝叧杩斿洖鐨勬俯搴﹀��
+ decimal temperatrue = this.AdjustTemperatrueValue(data.AttributeData);
+ ((TemperatureSensor)mainDevice).currentTemperature = temperatrue;
+ }
+ }
+ }
+ else if (((TemperatureSensor)mainDevice).SensorDiv == 2)
+ {
+ //鍙樻洿涓�涓嬫箍搴︾殑鍊�
+ foreach (var data in mainDevice.AttributeStatus)
+ {
+ if (data.ClusterId == 1029
+ && data.AttributeId == (int)AttriButeId.MeasuredValue)
+ {
+ //澶勭悊缃戝叧杩斿洖鐨勬俯搴﹀��
+ decimal humidity = this.AdjustHumidityValue(data.AttributeData);
+ ((TemperatureSensor)mainDevice).currentHumidity = humidity;
+ }
+ }
+ }
}
}
diff --git a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll
index e2a1608..4153dfa 100755
--- a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll
+++ b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.HDLWidget.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll
index 87c636f..8ac3b4a 100755
--- a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll
+++ b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.xml b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.xml
index 8443fe6..3dc8941 100755
--- a/ZigbeeApp/Shared/DLL/Android/Shared.Droid.xml
+++ b/ZigbeeApp/Shared/DLL/Android/Shared.Droid.xml
@@ -1054,6 +1054,18 @@
<member name="P:Shared.VerticalScrolViewLayout.VerticalScrollBarEnabled">
<summary>鈥� /// 鏄惁鏄剧ず婊氬姩鏉♀�� /// </summary>
</member>
+ <member name="M:Shared.VerticalScrolViewLayout.ScrollToViewIndex(System.Int32)">
+ <summary>
+ 婊戝姩鍒版寚瀹歏iew
+ </summary>
+ <param name="viewIndex"> 鎸囧畾view鐨勭储寮曞��</param>
+ </member>
+ <member name="M:Shared.VerticalScrolViewLayout.ScrollToY(System.Int32)">
+ <summary>
+ 婊戝姩鍒版寚瀹氫綅缃� Y
+ </summary>
+ <param name="viewY"></param>
+ </member>
<member name="T:Shared.AndroidScrolView">
<summary>鈥� /// 绔栫洿鏂瑰悜婊戝姩鎺т欢鈥� /// </summary>鈥�
</member>
@@ -1331,6 +1343,13 @@
璁惧鎺т欢鑳屾櫙鍥�
</summary>
<param name="filePath"></param>
+ </member>
+ <member name="M:Shared.View.getDrawable(System.String)">
+ <summary>
+ 2020-12-23 褰摜鏂颁慨鏀规柟娉�
+ </summary>
+ <param name="filePath"></param>
+ <returns></returns>
</member>
<member name="P:Shared.View.Padding">
<summary>
@@ -2973,16 +2992,6 @@
</summary>
<value>鏄惁鍙互婊戝姩</value>
</member>
- <member name="P:Shared.CurtainSeekBar.CurtainPaddingLeftRight">
- <summary>
- 杩涘害鏉′笌宸﹀彸杈规杈硅窛
- </summary>
- </member>
- <member name="P:Shared.CurtainSeekBar.CurtainPaddingTop">
- <summary>
- 椤堕儴padding
- </summary>
- </member>
<member name="P:Shared.CurtainSeekBar.IsOffline">
<summary>
鏄惁绂荤嚎 绂荤嚎鐨勮瘽绂佹婊戝姩骞剁粯鍒惰儗鏅伄鎸″眰
@@ -4249,6 +4258,23 @@
Option鐨勯厤缃甁sonString
</summary>
</member>
+ <member name="M:Shared.MyEchartsViewOn.#ctor">
+ <summary>
+ MyEchartsViewOn
+ </summary>
+ </member>
+ <member name="F:Shared.MyEchartsViewOn.IsLoadEchartsNew">
+ <summary>
+ 鏄惁閲囩敤LoadEchartsNew鐨勬柟寮�
+ </summary>
+ </member>
+ <member name="M:Shared.MyEchartsViewOn.ShowWithOption(System.String)">
+ <summary>
+ 鍔犺浇Option閰嶇疆鍙傛暟
+ 鍒锋柊鍥捐〃
+ </summary>
+ <param name="option"></param>
+ </member>
<member name="M:Shared.MyEchartsViewOn.ShowWithOptionJsonString(System.String)">
<summary>
鍔犺浇Option閰嶇疆JsonString
@@ -4259,6 +4285,11 @@
<member name="M:Shared.MyEchartsViewOn.refreshEcharts">
<summary>
鍒锋柊鐣岄潰
+ </summary>
+ </member>
+ <member name="P:Shared.MyEchartsViewOn.webView">
+ <summary>
+ MyWebView
</summary>
</member>
<member name="T:Shared.WebView">
@@ -4302,6 +4333,102 @@
MyWebView
</summary>
</member>
+ <member name="T:Shared.CurtainSingleSeekBar">
+ <summary>
+ CurtainSingleSeekBar
+ 鍚戝乏鎴栬�呭悜鍙筹紝鍗曞悜鎵撳紑鐨勫紑鍚堝笜
+ IsRightOpenStyle
+ false锛氬彸婊戝叧闂紝杩涘害Progress 100-->0
+ true锛氬彸婊戞墦寮�锛岃繘搴rogress 0-->100
+ </summary>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.mHDLOACSingleCurtainSeekBar">
+ <summary>
+ 褰撳墠瑙嗗浘
+ </summary>
+ <value>The HDLOACSingleCurtainSeekBar.</value>
+ </member>
+ <member name="M:Shared.CurtainSingleSeekBar.#ctor">
+ <summary>
+ 鏋勯�犲嚱鏁�
+ </summary>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.ProgressBarUnitSring">
+ <summary>
+ 杩涘害鍊兼樉绀哄崟浣�
+ </summary>
+ <value>鍗曚綅瀛楃</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.MaxValue">
+ <summary>
+ 杩涘害鍊兼渶澶у��
+ </summary>
+ <value>鏈�澶у��</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.MinValue">
+ <summary>
+ 杩涘害鍊兼渶灏忓��
+ </summary>
+ <value>鏈�灏忓��</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.Progress">
+ <summary>
+ 褰撳墠杩涘害鍊�
+ </summary>
+ <value>杩涘害鍊�</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.ProgressTextColor">
+ <summary>
+ 褰撳墠杩涘害鍊兼樉绀虹殑鏂囧瓧棰滆壊
+ </summary>
+ <value>鏂囧瓧棰滆壊</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.ProgressTextSize">
+ <summary>
+ 褰撳墠杩涘害鍊兼樉绀虹殑鏂囧瓧澶у皬
+ </summary>
+ <value>鏂囧瓧澶у皬</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.IsClickable">
+ <summary>
+ 鏄惁鍙互婊戝姩
+ </summary>
+ <value>鏄惁鍙互婊戝姩</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.IsProgressTextShow">
+ <summary>
+ 鏄惁鍙互婊戝姩
+ </summary>
+ <value>鏄惁鍙互婊戝姩</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.IsOffline">
+ <summary>
+ 鏄惁绂荤嚎 绂荤嚎鐨勮瘽绂佹婊戝姩骞剁粯鍒惰儗鏅伄鎸″眰
+ </summary>
+ <value>鏄惁绂荤嚎</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.NowProgressX">
+ <summary>
+ 褰撳墠杩涘害鍊� X鍧愭爣
+ </summary>
+ <value>X鍧愭爣</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.IsRightOpenStyle">
+ <summary>
+ 鏄惁浠庡乏鍒板彸鎵撳紑鍒�100%锛岄粯璁alse
+ </summary>
+ <value>榛樿false</value>
+ </member>
+ <member name="F:Shared.CurtainSingleSeekBar.OnProgressChangedEvent">
+ <summary>
+ EventHandler
+ </summary>
+ </member>
+ <member name="F:Shared.CurtainSingleSeekBar.mOnProgressChangeListener">
+ <summary>
+ OnProgressChangeListener 缁ф壙鍝嶅簲浜嬩欢
+ </summary>
+ </member>
<member name="T:ViewFlow.ViewSwitchListener">
Receives call backs when a new {@link View} has been scrolled to.
</member>
diff --git a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll
index 270a453..817d908 100755
--- a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll
+++ b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll
index d96cc12..d400378 100755
--- a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll
+++ b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.TBL.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll
index 1575ccf..2155c2e 100755
--- a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll
+++ b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.xml b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.xml
index ff15121..7c2ae1b 100755
--- a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.xml
+++ b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.xml
@@ -1177,6 +1177,18 @@
<member name="P:Shared.VerticalScrolViewLayout.VerticalScrollBarEnabled">
<summary>鈥� /// 鏄惁鏄剧ず鍨傜洿婊氬姩鏉♀�� /// </summary>
</member>
+ <member name="M:Shared.VerticalScrolViewLayout.ScrollToY(System.Int32)">
+ <summary>
+ 婊戝姩鍒版寚瀹氫綅缃�
+ </summary>
+ <param name="viewY"></param>
+ </member>
+ <member name="M:Shared.VerticalScrolViewLayout.ScrollToViewIndex(System.Int32)">
+ <summary>
+ 婊戝姩鍒版寚瀹歏IEW
+ </summary>
+ <param name="viewIndex"></param>
+ </member>
<member name="T:Shared.VerticalSeekBar">
<summary>
浣嶇疆甯冨眬
@@ -3369,16 +3381,6 @@
</summary>
<value>杩涘害鍊�</value>
</member>
- <member name="P:Shared.CurtainSeekBar.CurtainPaddingLeftRight">
- <summary>
- 杩涘害鏉′笌宸﹀彸杈规杈硅窛
- </summary>
- </member>
- <member name="P:Shared.CurtainSeekBar.CurtainPaddingTop">
- <summary>
- 椤堕儴padding
- </summary>
- </member>
<member name="P:Shared.CurtainSeekBar.IsOffline">
<summary>
鏄惁绂荤嚎 绂荤嚎鐨勮瘽绂佹婊戝姩骞剁粯鍒惰儗鏅伄鎸″眰
@@ -5001,7 +5003,6 @@
<member name="T:Shared.MyEchartsViewOn">
<summary>
MyEchartsViewOn HDLON+
-
</summary>
</member>
<member name="F:Shared.MyEchartsViewOn.optionJsonString">
@@ -5014,15 +5015,47 @@
WKWebView鎺т欢
</summary>
</member>
+ <member name="M:Shared.MyEchartsViewOn.#ctor">
+ <summary>
+
+ </summary>
+ </member>
+ <member name="M:Shared.MyEchartsViewOn.LoadFileUrl">
+ <summary>
+ 鍔犺浇鏈湴HTML
+ </summary>
+ </member>
+ <member name="F:Shared.MyEchartsViewOn.htmlPathName">
+ <summary>
+
+ </summary>
+ </member>
+ <member name="F:Shared.MyEchartsViewOn.IsLoadEchartsNew">
+ <summary>
+ 鏄惁閲囩敤LoadEchartsNew鐨勬柟寮�
+ </summary>
+ </member>
+ <member name="M:Shared.MyEchartsViewOn.ShowWithOption(System.String)">
+ <summary>
+ 鍔犺浇Option閰嶇疆鍙傛暟
+ 鍒锋柊鍥捐〃
+ </summary>
+ <param name="option"></param>
+ </member>
<member name="M:Shared.MyEchartsViewOn.ShowWithOptionJsonString(System.String)">
<summary>
鍔犺浇Option閰嶇疆jsonString
</summary>
<param name="jsonString"></param>
</member>
- <member name="M:Shared.MyEchartsViewOn.LoadFileUrl">
+ <member name="M:Shared.MyEchartsViewOn.EvaluateJavascript">
<summary>
- 鍔犺浇鏈湴HTML
+ EvaluateJavascript
+ </summary>
+ </member>
+ <member name="T:Shared.MyEchartsViewOn.OnWKNavigationDelegate">
+ <summary>
+ OnWKNavigationDelegate
</summary>
</member>
<member name="T:Shared.WaveSeekBarOn">
@@ -5172,6 +5205,122 @@
EventHandler
</summary>
</member>
+ <member name="T:Shared.CurtainSingleSeekBar">
+ <summary>
+ CurtainSingleSeekBar
+ 鍚戝乏鎴栬�呭悜鍙筹紝鍗曞悜鎵撳紑鐨勫紑鍚堝笜
+ IsRightOpenStyle
+ false锛氬彸婊戝叧闂紝杩涘害Progress 100-->0
+ true锛氬彸婊戞墦寮�锛岃繘搴rogress 0-->100
+ </summary>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.mHDLOACSingleCurtainSeekBar">
+ <summary>
+ 褰撳墠瑙嗗浘
+ </summary>
+ <value>The HDLOACSingleCurtainSeekBar.</value>
+ </member>
+ <member name="M:Shared.CurtainSingleSeekBar.#ctor">
+ <summary>
+ 鏋勯�犲嚱鏁�
+ </summary>
+ </member>
+ <member name="M:Shared.CurtainSingleSeekBar.RefreshFrame">
+ <summary>
+ 鍒锋柊甯冨眬
+ </summary>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.Width">
+ <summary>
+ 鎺т欢瀹藉害
+ </summary>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.Height">
+ <summary>
+ 鎺т欢鐨勯珮搴�
+ </summary>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.X">
+ <summary>
+ 鎺т欢鐨刋鍧愭爣
+ </summary>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.Y">
+ <summary>
+ 鎺т欢鐨刋鍧愭爣
+ </summary>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.ProgressBarUnitSring">
+ <summary>
+ 杩涘害鍊兼樉绀哄崟浣�
+ </summary>
+ <value>鍗曚綅瀛楃</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.MaxValue">
+ <summary>
+ 杩涘害鍊兼渶澶у��
+ </summary>
+ <value>鏈�澶у��</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.MinValue">
+ <summary>
+ 杩涘害鍊兼渶灏忓��
+ </summary>
+ <value>鏈�灏忓��</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.Progress">
+ <summary>
+ 褰撳墠杩涘害鍊�
+ </summary>
+ <value>杩涘害鍊�</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.IsOffline">
+ <summary>
+ 鏄惁绂荤嚎 绂荤嚎鐨勮瘽绂佹婊戝姩骞剁粯鍒惰儗鏅伄鎸″眰
+ </summary>
+ <value>鏄惁绂荤嚎</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.ProgressTextColor">
+ <summary>
+ 褰撳墠杩涘害鍊兼樉绀虹殑鏂囧瓧棰滆壊
+ </summary>
+ <value>鏂囧瓧棰滆壊</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.ProgressTextSize">
+ <summary>
+ 褰撳墠杩涘害鍊兼樉绀虹殑鏂囧瓧澶у皬
+ </summary>
+ <value>鏂囧瓧澶у皬</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.IsClickable">
+ <summary>
+ 鏄惁鍙互婊戝姩
+ </summary>
+ <value>鏄惁鍙互婊戝姩</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.IsProgressTextShow">
+ <summary>
+ 鏄惁鏄剧ず杩涘害鏂囧瓧
+ </summary>
+ <value>鏄惁鏄剧ず杩涘害鏂囧瓧</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.NowProgressX">
+ <summary>
+ 褰撳墠杩涘害鍊� X鍧愭爣
+ </summary>
+ <value>X鍧愭爣</value>
+ </member>
+ <member name="P:Shared.CurtainSingleSeekBar.IsRightOpenStyle">
+ <summary>
+ 鏄惁浠庡乏鍒板彸鎵撳紑鍒�100%锛岄粯璁alse
+ </summary>
+ <value>榛樿false</value>
+ </member>
+ <member name="F:Shared.CurtainSingleSeekBar.OnProgressChangedEvent">
+ <summary>
+ EventHandler
+ </summary>
+ </member>
<member name="F:com.hdl.on.Volume.VolumeChange">
<summary>
澹伴煶鍙樺寲浜嬩欢
diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index 9e3b9e4..55ae1c5 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -536,6 +536,11 @@
{
cardContr = new Controls.DeviceAirQualitySensorRowControl();
}
+ else
+ {
+ //娓╂箍搴�
+ cardContr = new Controls.DeviceTemperatureRowControl();
+ }
}
//褰╃伅(璋冨厜鍣�)
else if (device.Type == DeviceType.DimmableLight)
@@ -546,11 +551,6 @@
else if (device.Type == DeviceType.IASZone)
{
cardContr = new Controls.DeviceSensorRowControl();
- }
- //娓╂箍搴�
- else if (device.Type == DeviceType.TemperatureSensor)
- {
- cardContr = new Controls.DeviceTemperatureRowControl();
}
//闂ㄩ攣
else if (device.Type == DeviceType.DoorLock)
@@ -563,7 +563,7 @@
cardContr = new Controls.DeviceColorTemperatureRowControl();
}
//鏃犳硶璇嗗埆
- else
+ if (cardContr == null)
{
cardContr = new Controls.DeviceRowCommon();
//娌℃湁鐘舵�佸姛鑳�
@@ -861,10 +861,13 @@
string mainKeys = LocalDevice.Current.GetDeviceMainKeys(report);
//鏅捐。鏋朵笂鎶ラ渶瑕佺壒娈婂鐞嗭紝鍏朵粬涓婃姤鐨勫洖璺粺涓�杞负绔偣1
var tempList = LocalDevice.Current.GetDevicesByMac(report.DeviceAddr);
- var tempDeviceEnum = LocalDevice.Current.GetMyDeviceEnumInfo(tempList);
- if (tempDeviceEnum.ConcreteType == Common.DeviceConcreteType.Airer)
+ if (tempList.Count > 0)
{
- mainKeys = report.DeviceAddr + "_" + 1;
+ var tempDeviceEnum = LocalDevice.Current.GetMyDeviceEnumInfo(tempList);
+ if (tempDeviceEnum.ConcreteType == Common.DeviceConcreteType.Airer)
+ {
+ mainKeys = report.DeviceAddr + "_" + 1;
+ }
}
if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true)
{
diff --git a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs
index 587d275..91daa81 100755
--- a/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/DeviceTemperatureRowControl.cs
@@ -12,6 +12,38 @@
{
#region 鈻� 鍒濆鍖朹____________________________
+ /// <summary>
+ /// 鍒濆鍖栨帶浠�
+ /// </summary>
+ /// <param name="i_device"></param>
+ public override void InitControl(CommonDevice i_device, Common.Room i_nowSelectRoom)
+ {
+ base.InitControl(i_device, i_nowSelectRoom);
+
+ //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+ this.AddDetailInfoEvent(i_device);
+ }
+
+ #endregion
+
+ #region 鈻� 娣卞害鍗$墖淇℃伅_______________________
+
+ /// <summary>
+ /// 娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+ /// </summary>
+ private void AddDetailInfoEvent(CommonDevice i_device)
+ {
+ //娣卞害鍗$墖淇℃伅
+ this.frameTable.ButtonClickEvent += (sender, e) =>
+ {
+ //娓╂箍搴︾被鍨嬬殑娣卞害鍗$墖鐣岄潰
+ var form = new MainPage.ControlForm.DeviceTemperatureHumidityDetailCardForm();
+ form.RowOrCardControl = this;
+ form.AddForm(i_device, this.nowSelectRoom, 965, 1316);
+ form.FormCloseEvent += this.CardDetailInfoBackEvent;
+ };
+ }
+
#endregion
#region 鈻� 鍙戦�佽幏鍙栫姸鎬佸懡浠__________________
diff --git a/ZigbeeApp/Shared/Phone/MainPage/AppNoticeForm.cs b/ZigbeeApp/Shared/Phone/MainPage/AppNoticeForm.cs
new file mode 100644
index 0000000..32156f3
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/MainPage/AppNoticeForm.cs
@@ -0,0 +1,78 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.MainPage
+{
+ /// <summary>
+ /// App鍏憡鐣岄潰
+ /// </summary>
+ public class AppNoticeForm : FrameLayout
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ /// <summary>
+ /// 缁撴潫浜嬩欢
+ /// </summary>
+ public Action FinishEvent = null;
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// App鍏憡鐣岄潰
+ /// </summary>
+ public void Show()
+ {
+ this.BackgroundColor = 0x7f000000;
+
+ //鐧借壊鑳屾櫙
+ var frameWhite = new FrameLayout();
+ frameWhite.Y = Application.GetRealHeight(252);
+ frameWhite.Height = Application.GetRealHeight(1255);
+ frameWhite.Width = Application.GetRealWidth(860);
+ frameWhite.BackgroundColor = UserCenter.UserCenterColor.Current.White;
+ frameWhite.Radius = (uint)Application.GetRealWidth(17);
+ frameWhite.Gravity = Gravity.CenterHorizontal;
+ this.AddChidren(frameWhite);
+
+ //鍏憡
+ var btnNotice = new UserCenter.NormalViewControl(frameWhite.Width, Application.GetRealHeight(65), false);
+ btnNotice.TextSize = 20;
+ btnNotice.TextAlignment = TextAlignment.Center;
+ btnNotice.TextID = R.MyInternationalizationString.uNotice;
+ btnNotice.Y = Application.GetRealHeight(48);
+ frameWhite.AddChidren(btnNotice);
+
+ //鍔犺浇鐨勫唴瀹�
+ var webView = new WebView();
+ webView.Y = btnNotice.Bottom + Application.GetRealHeight(70);
+ webView.Height = Application.GetRealHeight(868);
+ webView.Width = frameWhite.Width - Application.GetRealWidth(23) * 2;
+ webView.Gravity = Gravity.CenterHorizontal;
+ frameWhite.AddChidren(webView);
+#if Android
+ webView.LoadRequest("https://developer.hdlcontrol.com/AnnouncementAndriod.html");
+#endif
+#if iOS
+ webView.LoadRequest("https://developer.hdlcontrol.com/AnnouncementIos.html");
+#endif
+
+ //濂界殑
+ var btnOk = new UserCenter.BottomClickButton();
+ btnOk.Width = frameWhite.Width - Application.GetRealWidth(173);
+ btnOk.Y = webView.Bottom + Application.GetRealHeight(23);
+ btnOk.TextID = R.MyInternationalizationString.uWell;
+ frameWhite.AddChidren(btnOk);
+ btnOk.ButtonClickEvent += (sender, e) =>
+ {
+ this.RemoveFromParent();
+
+ this.FinishEvent?.Invoke();
+ this.FinishEvent = null;
+ };
+ }
+#endregion
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAirQualitySensorDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAirQualitySensorDetailCardForm.cs
index 5e10bfe..a4f8483 100644
--- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAirQualitySensorDetailCardForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceAirQualitySensorDetailCardForm.cs
@@ -98,7 +98,7 @@
frameWhiteBack.AddChidren(btnLight);
//璁剧疆LED鐏�
- btnSetLight = new NormalViewControl(175, 49, true);
+ btnSetLight = new NormalViewControl(175+94, 49, true);
btnSetLight.Y = Application.GetRealHeight(1270 - 35);
btnSetLight.TextID = R.MyInternationalizationString.SetAirQualitySensorLight;
btnSetLight.TextSize = 12;
@@ -215,7 +215,6 @@
frameTemperaturePic.X = Application.GetRealWidth(518);
frameTemperaturePic.Y = frameHumidityPic.Y;
frameTemperaturePic.Width = Application.GetMinRealAverage(321);
- frameTemperaturePic.BackgroundColor = 0xffff0000;
frameTemperaturePic.Height = Application.GetMinRealAverage(351);
frameTemperaturePic.BackgroundImagePath = "PM2.5Sensor/TemperaturePic.png";
frameWhiteBack.AddChidren(frameTemperaturePic);
diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceTemperatureHumidityDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceTemperatureHumidityDetailCardForm.cs
new file mode 100644
index 0000000..9d0e4a6
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceTemperatureHumidityDetailCardForm.cs
@@ -0,0 +1,237 @@
+锘縰sing ZigBee.Device;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Shared.Phone.UserCenter;
+
+namespace Shared.Phone.MainPage.ControlForm
+{
+ /// <summary>
+ /// 娓╂箍搴︿紶鎰熷櫒鐨勬繁搴﹀崱鐗囩晫闈�
+ /// </summary>
+ public class DeviceTemperatureHumidityDetailCardForm : DeviceDetailCardCommonForm
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ /// <summary>
+ /// 鍊兼樉绀烘帶浠�
+ /// </summary>
+ private NormalViewControl btnValue = null;
+ /// <summary>
+ /// 鍗曚綅鎺т欢
+ /// </summary>
+ private NormalViewControl btnUnit = null;
+ /// <summary>
+ /// 鍥剧墖鎺т欢鐨勫搴�
+ /// </summary>
+ private int picContrWidth = 0;
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 搴曞眰鍒濆鍖栦腑閮ㄦ帶浠跺畬鎴愪箣鍚�
+ /// </summary>
+ /// <param name="frameWhiteBack"></param>
+ public override void InitMiddleFrameAfter(FrameLayout frameWhiteBack)
+ {
+ //鍥剧墖鎺т欢鐨勫搴�
+ this.picContrWidth = this.GetPictrueRealSize(380);
+ //宸︽粦涓嶈兘
+ this.ScrollEnabled = false;
+
+ //婀垮害
+ if (((TemperatureSensor)this.device).SensorDiv == 2)
+ {
+ this.InitHumidityControl(frameWhiteBack);
+ }
+ //娓╁害
+ else if (((TemperatureSensor)this.device).SensorDiv == 1)
+ {
+ this.InitTemperatureControl(frameWhiteBack);
+ }
+
+ //鏌ョ湅鍘嗗彶璁板綍
+ var btnHistory = new NormalViewControl(207, 50, true);
+ btnHistory.Y = Application.GetRealHeight(1094);
+ btnHistory.TextSize = 12;
+ btnHistory.TextAlignment = TextAlignment.Center;
+ btnHistory.TextColor = UserCenterColor.Current.TextOrangeColor;
+ btnHistory.Text = Language.StringByID(R.MyInternationalizationString.CheckAirQualitySensorHistory);
+ btnHistory.Width = btnHistory.GetRealWidthByText();
+ btnHistory.Gravity = Gravity.CenterHorizontal;
+ frameWhiteBack.AddChidren(btnHistory);
+ //搴曠嚎
+ var btnLine = new NormalViewControl(btnHistory.Width, ControlCommonResourse.BottomLineHeight, false);
+ btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
+ btnLine.Gravity = Gravity.CenterHorizontal;
+ btnLine.Y = btnHistory.Bottom - Application.GetRealHeight(8);
+ frameWhiteBack.AddChidren(btnLine);
+ btnHistory.ButtonClickEvent += (sender, e) =>
+ {
+ //鏌ョ湅鍘嗗彶璁板綍浜嬩欢
+ var form = new DeviceTemperatureHistoryForm();
+ form.AddForm(this.device);
+ };
+ }
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖栨箍搴︾晫闈____________________
+
+ /// <summary>
+ /// 鍒濆鍖栨箍搴︾晫闈�
+ /// </summary>
+ /// <param name="frameWhiteBack"></param>
+ private void InitHumidityControl(FrameLayout frameWhiteBack)
+ {
+ //婀垮害瀹瑰櫒
+ var frameHumidityPic = new FrameLayout();
+ frameHumidityPic.Y = Application.GetRealHeight(351);
+ frameHumidityPic.Width = picContrWidth;
+ frameHumidityPic.Height = this.GetPictrueRealSize(426);
+ frameHumidityPic.BackgroundImagePath = "PM2.5Sensor/HumidityPic.png";
+ frameHumidityPic.Gravity = Gravity.CenterHorizontal;
+ frameWhiteBack.AddChidren(frameHumidityPic);
+
+ //婀垮害鏂囨湰
+ var btnHumidityText = new NormalViewControl(frameHumidityPic.Width, Application.GetRealHeight(60), false);
+ btnHumidityText.Y = Application.GetRealHeight(58);
+ btnHumidityText.TextID = R.MyInternationalizationString.Humidity;
+ btnHumidityText.TextColor = UserCenterColor.Current.White;
+ btnHumidityText.TextAlignment = TextAlignment.Center;
+ frameHumidityPic.AddChidren(btnHumidityText);
+
+ //婀垮害鏁版嵁
+ this.btnValue = new NormalViewControl(193, 120, true);
+ btnValue.Y = Application.GetRealHeight(214);
+ btnValue.Text = ((TemperatureSensor)this.device).currentHumidity.ToString();
+ btnValue.TextSize = 38;
+ btnValue.TextColor = UserCenterColor.Current.White;
+ btnValue.IsBold = true;
+ btnValue.TextAlignment = TextAlignment.BottomCenter;
+ btnValue.Width = btnValue.GetRealWidthByText();
+ frameHumidityPic.AddChidren(btnValue);
+
+ //婀垮害鍗曚綅
+ this.btnUnit = new NormalViewControl(60, 100, true);
+ btnUnit.X = btnValue.Right;
+ btnUnit.Y = btnValue.Y;
+ btnUnit.Text = "%";
+ btnUnit.TextSize = 17;
+ btnUnit.TextColor = UserCenterColor.Current.White;
+ btnUnit.TextAlignment = TextAlignment.BottomLeft;
+ btnUnit.IsBold = true;
+ frameHumidityPic.AddChidren(btnUnit);
+
+ //鍒锋柊鍊煎拰鍗曚綅鎺т欢鐨勫潗鏍囦綅缃�
+ this.RefreshValueAndUintLocation();
+ }
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖栨俯搴︾晫闈____________________
+
+ /// <summary>
+ /// 鍒濆鍖栨俯搴︾晫闈�
+ /// </summary>
+ /// <param name="frameWhiteBack"></param>
+ private void InitTemperatureControl(FrameLayout frameWhiteBack)
+ {
+ //娓╁害瀹瑰櫒
+ var frameHumidityPic = new FrameLayout();
+ frameHumidityPic.Y = Application.GetRealHeight(351);
+ frameHumidityPic.Width = picContrWidth;
+ frameHumidityPic.Height = this.GetPictrueRealSize(426);
+ frameHumidityPic.BackgroundImagePath = "PM2.5Sensor/TemperaturePic.png";
+ frameHumidityPic.Gravity = Gravity.CenterHorizontal;
+ frameWhiteBack.AddChidren(frameHumidityPic);
+
+ //娓╁害鏂囨湰
+ var btnTemperatureText = new NormalViewControl(frameHumidityPic.Width, Application.GetRealHeight(60), false);
+ btnTemperatureText.Y = Application.GetRealHeight(58);
+ btnTemperatureText.TextID = R.MyInternationalizationString.Temperature;
+ btnTemperatureText.TextColor = UserCenterColor.Current.White;
+ btnTemperatureText.TextAlignment = TextAlignment.Center;
+ frameHumidityPic.AddChidren(btnTemperatureText);
+
+ //娓╁害鏁版嵁
+ this.btnValue = new NormalViewControl(193, 120, true);
+ btnValue.Y = Application.GetRealHeight(214);
+ btnValue.Text = ((TemperatureSensor)this.device).currentTemperature.ToString();
+ btnValue.TextSize = 38;
+ btnValue.TextColor = UserCenterColor.Current.White;
+ btnValue.IsBold = true;
+ btnValue.TextAlignment = TextAlignment.BottomCenter;
+ btnValue.Width = btnValue.GetRealWidthByText();
+ frameHumidityPic.AddChidren(btnValue);
+
+ //娓╁害鍗曚綅
+ this.btnUnit = new NormalViewControl(60, 100, true);
+ btnUnit.X = btnValue.Right;
+ btnUnit.Y = btnValue.Y;
+ btnUnit.Text = "鈩�";
+ btnUnit.TextSize = 17;
+ btnUnit.TextColor = UserCenterColor.Current.White;
+ btnUnit.TextAlignment = TextAlignment.BottomLeft;
+ btnUnit.IsBold = true;
+ frameHumidityPic.AddChidren(btnUnit);
+
+ //鍒锋柊鍊煎拰鍗曚綅鎺т欢鐨勫潗鏍囦綅缃�
+ this.RefreshValueAndUintLocation();
+ }
+
+ #endregion
+
+
+ #region 鈻� 鏄惁鑾峰彇缃戝叧鍙嶉鐨勭粨鏋淿____________
+
+ /// <summary>
+ /// 妫�娴嬬綉鍏崇殑鍙嶉缁撴灉(灞炴�т笂鎶ョ殑瀵硅薄锛歞evice.DeviceStatusReport)
+ /// </summary>
+ /// <param name="comandDiv">鍛戒护鍖哄垎</param>
+ /// <param name="report">涓婃姤鏁版嵁</param>
+ /// <returns></returns>
+ public override bool CheckResponeResultStatu(ReceiveComandDiv comandDiv, CommonDevice report)
+ {
+ if (comandDiv == ReceiveComandDiv.A璁惧灞炴�т笂鎶�)
+ {
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //婀垮害
+ if (((TemperatureSensor)this.device).SensorDiv == 2)
+ {
+ this.btnValue.Text = ((TemperatureSensor)this.device).currentHumidity.ToString();
+ }
+ //娓╁害
+ else if (((TemperatureSensor)this.device).SensorDiv == 1)
+ {
+ this.btnValue.Text = ((TemperatureSensor)this.device).currentTemperature.ToString();
+ }
+ //鍒锋柊鍊煎拰鍗曚綅鎺т欢鐨勫潗鏍囦綅缃�
+ this.RefreshValueAndUintLocation();
+ });
+ return true;
+ }
+ return false;
+ }
+
+ #endregion
+
+ #region 鈻� 涓�鑸柟娉昣__________________________
+
+ /// <summary>
+ /// 鍒锋柊鍊煎拰鍗曚綅鎺т欢鐨勫潗鏍囦綅缃�
+ /// </summary>
+ private void RefreshValueAndUintLocation()
+ {
+ this.btnValue.Width = this.btnValue.GetRealWidthByText();
+ int xx = (this.picContrWidth - (this.btnUnit.Width + this.btnValue.Width)) / 2;
+ this.btnValue.X = xx;
+ this.btnUnit.X = this.btnValue.Right;
+ }
+
+ #endregion
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs
index 85f4a84..fdae6c7 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceTemperatureCardControl.cs
@@ -10,6 +10,44 @@
/// </summary>
public class DeviceTemperatureCardControl : DeviceCardCommon
{
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 鍒濆鍖栨帶浠�
+ /// </summary>
+ /// <param name="i_device"></param>
+ public override void InitControl(CommonDevice i_device, Common.Room i_nowSelectRoom)
+ {
+ base.InitControl(i_device, i_nowSelectRoom);
+
+ //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+ this.AddDetailInfoEvent(i_device);
+ }
+
+ #endregion
+
+ #region 鈻� 娣卞害鍗$墖淇℃伅_______________________
+
+ /// <summary>
+ /// 娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢
+ /// </summary>
+ private void AddDetailInfoEvent(CommonDevice i_device)
+ {
+ //娣卞害鍗$墖淇℃伅
+ this.ButtonClickEvent += (sender, e) =>
+ {
+ Common.CommonPage.Instance.IsDrawerLockMode = true;
+
+ //娓╂箍搴︾被鍨嬬殑娣卞害鍗$墖鐣岄潰
+ var form = new ControlForm.DeviceTemperatureHumidityDetailCardForm();
+ form.RowOrCardControl = this;
+ form.AddForm(i_device, this.nowSelectRoom, 965, 1316);
+ form.FormCloseEvent += this.CardDetailInfoBackEvent;
+ };
+ }
+
+ #endregion
+
#region 鈻� 鍙戦�佽幏鍙栫姸鎬佸懡浠__________________
/// <summary>
diff --git a/ZigbeeApp/Shared/Phone/MainPage/DeviceTemperatureHistoryForm.cs b/ZigbeeApp/Shared/Phone/MainPage/DeviceTemperatureHistoryForm.cs
index c2cecf2..d4cc522 100644
--- a/ZigbeeApp/Shared/Phone/MainPage/DeviceTemperatureHistoryForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/DeviceTemperatureHistoryForm.cs
@@ -65,8 +65,14 @@
//鍥犱负鏇茬嚎鍥惧緢瀹�,鎵�浠ヤ娇鐢ㄥ乏鍙虫粦鍔ㄧ殑鎺т欢
this.horizontalScrolView = new HorizontalScrolViewLayout();
- horizontalScrolView.Y = Application.GetRealHeight(230);
- horizontalScrolView.Height = bodyFrameLayout.Height - Application.GetRealHeight(230);
+#if Android
+ horizontalScrolView.Y = Application.GetRealHeight(243);
+ horizontalScrolView.Height = bodyFrameLayout.Height - Application.GetRealHeight(243);
+#endif
+#if iOS
+ horizontalScrolView.Y = Application.GetRealHeight(300);
+ horizontalScrolView.Height = bodyFrameLayout.Height - Application.GetRealHeight(300);
+#endif
bodyFrameLayout.AddChidren(horizontalScrolView);
//鍒濆鍖栫被鍒帶浠�
@@ -170,23 +176,27 @@
};
}
- //CO虏
- //frameCo2 = this.CreatTypeSelectControl("CO虏");
- //frameCo2.X = framePm.Right + defultSpace;
- //frameCo2.ButtonClickEvent += (sender, e) =>
+ //妫�娴嬭璁惧鏄惁鎷ユ湁CO虏鐨勫姛鑳�
+ //if (this.CheckDeviceHadCO2(myType) == true)
//{
- // //鍚屼竴涓笢瑗�,涓嶅鐞�
- // if (nowSelectObjType == 4) { return; }
- // nowSelectObjType = 4;
+ // //CO虏
+ // frameCo2 = this.CreatTypeSelectControl("CO虏");
+ // frameCo2.X = framePm.Right + defultSpace;
+ // frameCo2.ButtonClickEvent += (sender, e) =>
+ // {
+ // //鍚屼竴涓笢瑗�,涓嶅鐞�
+ // if (nowSelectObjType == 4) { return; }
+ // nowSelectObjType = 4;
- // //璁剧疆閫夋嫨鎺т欢鐨勭姸鎬�(鍘熸潵鐨勫彉鏇翠负鍙栨秷)
- // this.SetSelectControlStatu(nowBtnSelect, false, 0);
- // nowBtnSelect = frameCo2.GetChildren(0) as NormalViewControl;
- // //璁剧疆閫夋嫨鎺т欢鐨勭姸鎬�(褰撳墠鍙樻洿涓洪�夋嫨)
- // this.SetSelectControlStatu(nowBtnSelect, true, 4);
- // 鍒锋柊Echart鎺т欢
- // this.RefreshEchartControl();
- //};
+ // //璁剧疆閫夋嫨鎺т欢鐨勭姸鎬�(鍘熸潵鐨勫彉鏇翠负鍙栨秷)
+ // this.SetSelectControlStatu(nowBtnSelect, false, 0);
+ // nowBtnSelect = frameCo2.GetChildren(0) as NormalViewControl;
+ // //璁剧疆閫夋嫨鎺т欢鐨勭姸鎬�(褰撳墠鍙樻洿涓洪�夋嫨)
+ // this.SetSelectControlStatu(nowBtnSelect, true, 4);
+ // //鍒锋柊Echart鎺т欢
+ // this.RefreshEchartControl();
+ // };
+ //}
//榛樿鍒濆閫夋嫨
if (frameTemperatrue != null)
@@ -207,6 +217,12 @@
nowBtnSelect = framePm.GetChildren(0) as NormalViewControl;
this.SetSelectControlStatu(nowBtnSelect, true, 3);
}
+ //else if (frameCo2 != null)
+ //{
+ // this.nowSelectObjType = 4;
+ // nowBtnSelect = frameCo2.GetChildren(0) as NormalViewControl;
+ // this.SetSelectControlStatu(nowBtnSelect, true, 4);
+ //}
}
/// <summary>
@@ -301,7 +317,7 @@
dicText["3"] = "1" + Language.StringByID(R.MyInternationalizationString.uOneMonth1);
var menuContr = new TextGroupMenuControl(dicText);
- menuContr.Y = Application.GetRealHeight(100);
+ menuContr.Y = Application.GetRealHeight(98);
bodyFrameLayout.AddChidren(menuContr);
menuContr.SelectEvent += (selectKey, selectText) =>
{
@@ -524,16 +540,16 @@
string mark = string.Empty;
if (info.Hour == "0:00")
{
- mark = markTextSample.Replace("{0}", info.Day).Replace("{1}", "0:00~11:59").Replace("{2}", info.Value.ToString());
+ mark = markTextSample.Replace("{0}", info.Day).Replace("{1}", "0:00~11:59").Replace("{2}", info.deValue.ToString());
}
else
{
- mark = markTextSample.Replace("{0}", info.Day).Replace("{1}", "12:00~23:59").Replace("{2}", info.Value.ToString());
+ mark = markTextSample.Replace("{0}", info.Day).Replace("{1}", "12:00~23:59").Replace("{2}", info.deValue.ToString());
}
//鐗规畩澶勭悊PM2.5鐨勬樉绀�
this.AdjustPM25TipText(ref mark, info.deValue);
- valueText += "{value:" + info.Value + ",mark:" + mark + "},\r\n";
+ valueText += "{value:" + info.deValue + ",mark:" + mark + "},\r\n";
}
//娌℃湁鏁版嵁鍒欒缃负null
else
@@ -688,11 +704,11 @@
//鎸変互涓嬫牸寮忔樉绀�
//2019-12-16
//婀垮害:68%
- var mark = markTextSample.Replace("{0}", info.Day).Replace("{1}", string.Empty).Replace("{2}", info.Value.ToString());
+ var mark = markTextSample.Replace("{0}", info.Day).Replace("{1}", string.Empty).Replace("{2}", info.deValue.ToString());
//鐗规畩澶勭悊PM2.5鐨勬樉绀�
this.AdjustPM25TipText(ref mark, info.deValue);
- valueText += "{value:" + info.Value + ",mark:" + mark + "},\r\n";
+ valueText += "{value:" + info.deValue + ",mark:" + mark + "},\r\n";
}
//娌℃湁鏁版嵁鍒欒缃负null
else
@@ -841,6 +857,7 @@
//{2}:Y杞寸殑鍗曚綅鏍煎紡
//{3}:X杞寸粍鍛樺搴旂殑鍊�
//{4}:鏇茬嚎鐨勯鑹�
+#if Android
return @"{
color: ['#73A0FA', '#73DEB3', '#FFB761'],
tooltip: {
@@ -919,15 +936,106 @@
type: 'line',
smooth: true,
symbol:'emptyCircle',
- symbolSize:8,
+ symbolSize:6,
connectNulls:true,
color:{4},
data: {3}
}
]
}";
+#endif
+#if iOS
+ return @"{
+ color: ['#73A0FA', '#73DEB3', '#FFB761'],
+ backgroundColor:'#f5f6fa',
+ tooltip: {
+ trigger: 'axis',
+ backgroundColor:'#777779',
+ axisPointer: {
+ type: 'line',
+ lineStyle: {
+ type: 'dashed',
+ color:{0}
+ }
+ },
+ textStyle: {
+ fontSize: 36
+ },
+ formatter:function(pra){
+ return pra[0].data.mark;
}
-
+ },
+ dataZoom:
+ {
+ type: 'inside',
+ show: true,
+ start: 0,
+ end: 50
+ },
+ grid: {
+ left: '10',
+ right: '0',
+ bottom: '25',
+ top: '45',
+ containLabel: true
+ },
+ xAxis: {
+ type: 'category',
+ boundaryGap:true,
+ axisLabel:{
+ color: '#666666',
+ textStyle: {
+ fontSize: 30
+ },
+ },
+ data: {1},
+ splitLine: {
+ show: false
+ },
+ axisTick: {
+ show: false
+ },
+ axisLine: {
+ show: false
+ },
+ },
+ yAxis: {
+ type: 'value',
+ axisLabel: {
+ color: '#666666',
+ formatter:'{value}{2}',
+ textStyle: {
+ fontSize: 30
+ },
+ },
+ splitLine: {
+ show: true,
+ lineStyle: {
+ color: '#CCCCCC',
+ width:1,
+ type:'dashed'
+ }
+ },
+ axisTick: {
+ show: false
+ },
+ axisLine: {
+ show: false
+ },
+ },
+ series: [{
+ type: 'line',
+ smooth: true,
+ symbol:'emptyCircle',
+ symbolSize:15,
+ connectNulls:true,
+ color:{4},
+ data: {3}
+ }
+ ]
+}";
+#endif
+ }
#endregion
#region 鈻� 鑾峰彇浜戠鏁版嵁_______________________
@@ -945,10 +1053,10 @@
}
gwMacmark = ZbGateway.GateWayBaseInfomations[this.device.CurrentGateWayId].MacMark;
- //1026锛氭俯搴︼紱 1037锛欳o2锛� 1066锛歅M2.5锛� 1029锛氭俯搴�
+ //1026锛氭俯搴︼紱 1037锛欳o2锛� 1066锛歅M2.5锛� 1029锛氭箍搴�
int dataType = 0;
- if (this.nowSelectObjType == 1) { dataType = 1029; }
- else if (this.nowSelectObjType == 2) { dataType = 1026; }
+ if (this.nowSelectObjType == 1) { dataType = 1026; }
+ else if (this.nowSelectObjType == 2) { dataType = 1029; }
else if (this.nowSelectObjType == 3) { dataType = 1066; }
else if (this.nowSelectObjType == 4) { dataType = 1037; }
@@ -1112,6 +1220,12 @@
var text = Language.StringByID(R.MyInternationalizationString.uHumidity);
return "'{0} {1}<br/>" + text + ":{2}" + this.GetEchartUint() + "<br/>{3}'";
}
+ //CO虏
+ else if (this.nowSelectObjType == 4)
+ {
+ var text = "CO虏";
+ return "'{0} {1}<br/>" + text + ":{2}" + this.GetEchartUint() + "'";
+ }
return "''";
}
@@ -1212,44 +1326,63 @@
}
/// <summary>
+ /// 妫�娴嬭璁惧鏄惁鎷ユ湁CO虏鐨勫姛鑳�
+ /// </summary>
+ /// <param name="enumInfo"></param>
+ /// <returns></returns>
+ private bool CheckDeviceHadCO2(DeviceEnumInfo enumInfo)
+ {
+ //PM2.5鍜岀┖姘旇川閲忎紶鎰熷櫒閮芥湁CO虏鐨勫姛鑳�
+ if (enumInfo.ConcreteType == DeviceConcreteType.Sensor_PMTwoPointFive
+ || enumInfo.ConcreteType == DeviceConcreteType.AirQualitySensor)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ /// <summary>
/// 杞崲缁撴灉鍊�
/// </summary>
/// <param name="data"></param>
private void ConvertHistoryDataValue(HistoryData data)
{
+ //浜戠杩斿洖鐨勬暟鎹彲鑳藉甫灏忔暟鐐�,鎵�浠ラ渶瑕佹妸灏忔暟鐐圭粰鍘绘帀(寮鸿浆涓篿nt浼氭姤閿�)
+ int intValue = (int)Convert.ToDecimal(data.Value);
//娓╁害,闇�瑕侀櫎浠�100(浼氬嚭鐜拌礋鏁�)
if (this.nowSelectObjType == 1)
{
- int shortData = Convert.ToInt32(data.Value);
- if (shortData > 32767)
+ if (intValue > 32767)
{
//璐熸暟(鐗规畩澶勭悊)
- string strValue = (shortData - 65536).ToString();
+ string strValue = (intValue - 65536).ToString();
//灏忔暟鐐归渶瑕佷竴浣�(鍏堟妸鏈�鍚庝竴浣嶅幓鎺�)
strValue = strValue.Substring(0, strValue.Length - 1);
//鐒跺悗鍐嶆彃鍏ヤ竴涓皬鏁扮偣
- data.deValue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ data.deValue = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
}
else
{
//灏忔暟鐐归渶瑕佷竴浣�(鍏堟妸鏈�鍚庝竴浣嶅幓鎺�)
- string strValue = data.Value.Substring(0, data.Value.Length - 1);
+ string strValue = intValue.ToString();
+ strValue = strValue.Substring(0, strValue.Length - 1);
//鐒跺悗鍐嶆彃鍏ヤ竴涓皬鏁扮偣
- data.deValue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ data.deValue = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
}
}
//婀垮害,闇�瑕侀櫎浠�100(涓嶄細鍑虹幇璐熸暟)
else if (this.nowSelectObjType == 2)
{
//灏忔暟鐐归渶瑕佷竴浣�(鍏堟妸鏈�鍚庝竴浣嶅幓鎺�)
- string strValue = data.Value.Substring(0, data.Value.Length - 1);
+ string strValue = intValue.ToString();
+ strValue = strValue.Substring(0, strValue.Length - 1);
//鐒跺悗鍐嶆彃鍏ヤ竴涓皬鏁扮偣
- data.deValue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ data.deValue = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
}
else
{
//鍏朵粬閮戒笉鐢ㄥ彉
- data.deValue = Convert.ToDecimal(data.Value);
+ data.deValue = Convert.ToDecimal(intValue);
}
}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
index a5bfc72..ae83791 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -84,6 +84,8 @@
this.AddSensorDeviceReportEvent();
//寮�鍚紶鎰熷櫒鐘舵�佽繕鍘熺殑绾跨▼
this.StartRecoverSenorStatuThread();
+ //鏄剧ずApp鍏憡
+ this.ShowAppNotice();
}
/// <summary>
@@ -658,7 +660,6 @@
else
{
cardContr = new Controls.DeviceTemperatureCardControl();
-
}
}
//闂ㄩ攣
@@ -672,7 +673,7 @@
cardContr = new Controls.DeviceColorTemperatureCardControl();
}
//鏃犳硶璇嗗埆
- else
+ if (cardContr == null)
{
cardContr = new Controls.DeviceCardCommon();
}
@@ -1140,10 +1141,13 @@
//鏅捐。鏋朵笂鎶ラ渶瑕佺壒娈婂鐞嗭紝鍏朵粬涓婃姤鐨勫洖璺粺涓�杞负绔偣1
var tempList = LocalDevice.Current.GetDevicesByMac(report.DeviceAddr);
- var tempDeviceEnum = LocalDevice.Current.GetMyDeviceEnumInfo(tempList);
- if (tempDeviceEnum.ConcreteType == Common.DeviceConcreteType.Airer)
+ if (tempList.Count > 0)
{
- mainKeys = report.DeviceAddr + "_" + 1;
+ var tempDeviceEnum = LocalDevice.Current.GetMyDeviceEnumInfo(tempList);
+ if (tempDeviceEnum.ConcreteType == Common.DeviceConcreteType.Airer)
+ {
+ mainKeys = report.DeviceAddr + "_" + 1;
+ }
}
if (this.dicDeviceCardControl.ContainsKey(mainKeys) == true)
@@ -1312,6 +1316,109 @@
return true;
}
+ /// <summary>
+ /// 鏄剧ずApp鍏憡
+ /// </summary>
+ private void ShowAppNotice()
+ {
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ if (HdlFirmwareUpdateLogic.CheckCanShowNotice() == true)
+ {
+ while (this.IsFormOpen("HdlAutoBackupForm") == true)
+ {
+ //鑷姩澶囦唤鐨勭晫闈㈡鍦ㄦ墦寮�涓�
+ System.Threading.Thread.Sleep(1000);
+ }
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //鍔犺浇绯荤粺鍏憡
+ var form2 = new AppNoticeForm();
+ UserView.UserPage.Instance.AddChidren(form2);
+ form2.Show();
+ form2.FinishEvent += () =>
+ {
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ System.Threading.Thread.Sleep(1000);
+ //鏄剧ずApp鍗囩骇鐨勫脊绐�
+ this.ShowUpdateAppDialog();
+
+ }, ShowErrorMode.NO);
+ };
+
+ }, ShowErrorMode.NO);
+ }
+ else
+ {
+ //鏄剧ずApp鍗囩骇鐨勫脊绐�
+ this.ShowUpdateAppDialog();
+ }
+ }, ShowErrorMode.NO);
+ }
+
+ /// <summary>
+ /// 鏄剧ずApp鍗囩骇鐨勫脊绐�
+ /// </summary>
+ private void ShowUpdateAppDialog()
+ {
+ //App鍗囩骇鎻愮ず
+ if (string.IsNullOrEmpty(FirmwareUpdateResourse.AppNeedUpdateUrl) == false)
+ {
+ //鏁翠簡涓�娆′箣鍚庡氨涓嶆暣浜�
+ string updateUrl = FirmwareUpdateResourse.AppNeedUpdateUrl;
+ FirmwareUpdateResourse.AppNeedUpdateUrl = string.Empty;
+
+ while (this.IsFormOpen("HdlAutoBackupForm") == true)
+ {
+ //鑷姩澶囦唤鐨勭晫闈㈡鍦ㄦ墦寮�涓�
+ System.Threading.Thread.Sleep(1000);
+ }
+ //鍙戠幇APP鏂扮増鏈�,椹笂鍗囩骇{0}寮�鍚柊浣撻獙鍝
+ this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uAppUpdateMsg1).Replace("{0}", "\r\n"), () =>
+ {
+#if iOS
+ Uri url = new Uri(updateUrl);
+ UIKit.UIApplication.SharedApplication.OpenUrl(url);
+#endif
+#if Android
+ HDLUtils.OpenUrl(updateUrl);
+#endif
+ }, Language.StringByID(R.MyInternationalizationString.uLevelUp));
+ //App鍗囩骇鎻愮ず浼樺厛
+ return;
+ }
+ //缃戝叧鍗囩骇鎻愮ず
+ if (FirmwareUpdateResourse.ListGatewayNeedUpdate.Count > 0)
+ {
+ //鏁村畬涔嬪悗灏辨竻绌�
+ var listGateway = new List<string>();
+ listGateway.AddRange(FirmwareUpdateResourse.ListGatewayNeedUpdate);
+ FirmwareUpdateResourse.ListGatewayNeedUpdate = new List<string>();
+
+ while (this.IsFormOpen("HdlAutoBackupForm") == true)
+ {
+ //鑷姩澶囦唤鐨勭晫闈㈡鍦ㄦ墦寮�涓�
+ System.Threading.Thread.Sleep(1000);
+ }
+ foreach (var gwId in listGateway)
+ {
+ //鐩墠鍙暣涓�涓�
+ if (HdlGatewayLogic.Current.IsGatewayExist(gwId) == true)
+ {
+ //鍙戠幇缃戝叧鏂扮増鏈�,椹笂鍗囩骇{0}寮�鍚柊浣撻獙鍝
+ this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uGatewayUpdateMsg1).Replace("{0}", "\r\n"), () =>
+ {
+ var form = new UserCenter.GatewayUpdate.GatewayFirmwareUpdateForm();
+ form.AddForm(HdlGatewayLogic.Current.GetLocalGateway(gwId));
+ });
+ break;
+ }
+ }
+ return;
+ }
+ }
+
#endregion
#region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________
@@ -1325,6 +1432,6 @@
return 1;
}
- #endregion
+#endregion
}
}
diff --git a/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs b/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs
index 232b642..ccb4c64 100755
--- a/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs
+++ b/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs
@@ -241,6 +241,12 @@
if (device == null)
continue;
+ //鍒ゆ柇璇ヨ澶囨槸鍚﹀彲浠ユ樉绀哄湪涓婚〉
+ if (LocalDevice.Current.CanShowInHomeHomeMainPage(device) == false)
+ {
+ continue;
+ }
+
SmartSound.Device smartDevice = new SmartSound.Device();
smartDevice.DeviceAddress = device.DeviceAddr;//璁惧 MAC
smartDevice.Epoint = device.DeviceEpoint;//璁惧绔彛
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
index 7c14bee..6d04527 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs
@@ -42,12 +42,13 @@
/// <summary>
/// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
/// </summary>
- public void ShowForm()
+ /// <param name="autoUpdate">鎵撳紑鐣岄潰涔嬪悗,濡傛灉鏈夋柊鐗堟湰,鏄惁鐩存帴鍗囩骇</param>
+ public void ShowForm(bool autoUpdate)
{
//璁剧疆鏍囬淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAboutMe));
//鍒濆鍖栦腑閮ㄦ帶浠�
- this.InitMiddleFrame();
+ this.InitMiddleFrame(autoUpdate);
}
/// <summary>
/// Closes the form.
@@ -65,7 +66,8 @@
/// <summary>
/// 鍒濆鍖栦腑閮ㄦ帶浠�
/// </summary>
- private void InitMiddleFrame()
+ /// <param name="autoUpdate">鎵撳紑鐣岄潰涔嬪悗,濡傛灉鏈夋柊鐗堟湰,鏄惁鐩存帴鍗囩骇</param>
+ private void InitMiddleFrame(bool autoUpdate)
{
//澶撮儴鐧借壊鑳屾櫙
var frameLogo = new FrameLayoutBase();
@@ -157,6 +159,11 @@
//鏇存柊鏈�鏂扮増
btnRightView.TextID = R.MyInternationalizationString.Update;
rowUpdate.CanClick = true;
+ if (autoUpdate == true)
+ {
+ //鐩存帴鍗囩骇
+ rowUpdate.ButtonClickEvent?.Invoke(null, null);
+ }
}
else
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
index 1b0fe89..098a278 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -829,6 +829,9 @@
return false;
}
+ //鍏堣幏鍙栨湰鍦板叏閮ㄧ綉鍏崇殑鐗堟湰淇℃伅
+ var listOldGateway = HdlGatewayLogic.Current.GetAllLocalGateway();
+
//娓呯┖鍏ㄩ儴鎴块棿
HdlRoomLogic.Current.DeleteAllRoom();
//娓呯┖鏈湴鍏ㄩ儴鐨勫満鏅暟鎹�
@@ -848,6 +851,27 @@
//鍒锋柊鏈湴缂撳瓨
UserCenterLogic.RefreshAllMemory();
+ //閲嶆柊鍔犺浇缂撳瓨涔嬪悗,鍐嶈繕鍘熺綉鍏崇殑鐗堟湰淇℃伅
+ foreach (var gw in listOldGateway)
+ {
+ var newGw = HdlGatewayLogic.Current.GetLocalGateway(gw.GwId);
+ if (newGw != null)
+ {
+ //杩樺師鐗堟湰淇℃伅
+ newGw.GwName = gw.GwName;
+ newGw.GwIP = gw.GwIP;
+ newGw.LinuxHardVersion = gw.LinuxHardVersion;
+ newGw.LinuxImageType = gw.LinuxImageType;
+ newGw.LinuxFirmwareVersion = gw.LinuxFirmwareVersion;
+ newGw.CoordinatorFirmwareVersion = gw.CoordinatorFirmwareVersion;
+ newGw.CoordinatorHardVersion = gw.CoordinatorHardVersion;
+ newGw.CoordinatorImageId = gw.CoordinatorImageId;
+ newGw.DriveCodeList.Clear();
+ newGw.DriveCodeList.AddRange(gw.DriveCodeList);
+ newGw.ReSave();
+ }
+ }
+
//鍏抽棴杩涘害鏉�
ProgressFormBar.Current.Close();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlCheckLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlCheckLogic.cs
index 6a47baf..b4fab42 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlCheckLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlCheckLogic.cs
@@ -191,22 +191,22 @@
else if (errorCode == 2)
{
//鍗忚皟鍣ㄦ鍦ㄥ崌绾ф垨澶囦唤鎴栨仮澶嶆暟鎹腑
- string msg = Language.StringByID(R.MyInternationalizationString.uCoordinatorIsUpOrBackupOrRecovering);
+ return Language.StringByID(R.MyInternationalizationString.uCoordinatorIsUpOrBackupOrRecovering);
}
else if (errorCode == 3)
{
//鐩爣璁惧涓嶅瓨鍦�
- string msg = Language.StringByID(R.MyInternationalizationString.uTargetDeviceIsNotExsit);
+ return Language.StringByID(R.MyInternationalizationString.uTargetDeviceIsNotExsit);
}
else if (errorCode == 4)
{
//鍑虹幇鏈煡閿欒,璇风◢鍚庡啀璇�
- string msg = Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndResetAgain);
+ return Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndResetAgain);
}
else if (errorCode == 5)
{
//鏁版嵁浼犺緭閿欒,璇风◢鍚庡啀璇�
- string msg = Language.StringByID(R.MyInternationalizationString.uDataTransmissionFailAndResetAgain);
+ return Language.StringByID(R.MyInternationalizationString.uDataTransmissionFailAndResetAgain);
}
return null;
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
index f660dcb..7381751 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -252,9 +252,11 @@
list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐑熼浘浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鐕冩皵浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍚搁《鐕冩皵浼犳劅鍣�, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
+ list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡, RoomId = floorKey + "_ChuFang", DeviceCount = 1 });
//璧板粖
list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A4鎸夐敭闈㈡澘, RoomId = floorKey + "_ZouLang", DeviceCount = 1 });
+ list.Add(new AddDevicePra { DeviceType = VirtualDeviceEnum.A娓╂箍搴︿紶鎰熷櫒, RoomId = floorKey + "_ZouLang", DeviceCount = 1 });
}
return list;
}
@@ -932,6 +934,23 @@
}
}
+ public void Zigbee娓╂箍搴︿紶鎰熷櫒(int i_DeviceCount, string i_RoomId)
+ {
+ for (int i = 0; i < i_DeviceCount; i++)
+ {
+ //婀垮害
+ var device1 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1, SensorDiv = 2 };
+ //璁剧疆璁惧鐨勫熀鏈俊鎭�
+ this.SetBaseDataToDevice(device1, 1308, 1308, "MTH01/M-ZB.10", i_RoomId);
+ //娓╁害
+ var device2 = new TemperatureSensor() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 2, SensorDiv = 1 };
+ //璁剧疆璁惧鐨勫熀鏈俊鎭�
+ this.SetBaseDataToDevice(device2, 1308, 1308, "MTH01/M-ZB.10", i_RoomId);
+
+ this.DeviceNumber++;
+ }
+ }
+
/// <summary>
/// 璁剧疆璁惧鐨勫熀鏈俊鎭�
/// </summary>
@@ -1015,6 +1034,7 @@
A鏂规偊鏂伴灏忔ā鍧� = 26,
A鍚搁《鐕冩皵浼犳劅鍣� = 27,
A鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡 = 28,
+ A娓╂箍搴︿紶鎰熷櫒 = 29,
}
#endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs
index 17e781e..30dd911 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFirmwareUpdateLogic.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Collections.Generic;
+using System.Linq;
using System.Text;
using ZigBee.Device;
@@ -693,6 +694,246 @@
#endregion
+ #region 鈻� 璇诲彇App鏈�浣庣増鏈琠___________________
+
+ /// <summary>
+ /// 璇诲彇App鏈�浣庣増鏈�
+ /// </summary>
+ public static void ReadAppLestVersion()
+ {
+ if (FirmwareUpdateResourse.AppNeedUpdateUrl != null)
+ {
+ //宸茬粡璇诲彇杩囦簡,鍒欎笉鍐嶈鍙�
+ return;
+ }
+ var pra = new Dictionary<string, string>();
+ pra["version"] = Common.CommonPage.CodeIDString;
+ pra["appName"] = "EvoyoHome";
+ var bodyData = GetSignRequestJson(Newtonsoft.Json.JsonConvert.SerializeObject(pra));
+ //var url = "https://china-gateway.hdlcontrol.com/smart-footstone/app/appVersion/check";
+ var url = "https://test-gz.hdlcontrol.com/smart-footstone/app/appVersion/check";
+ var byteData = Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(url, Encoding.UTF8.GetBytes(bodyData), null);
+ if (byteData == null)
+ {
+ return;
+ }
+ try
+ {
+ var jobject = Newtonsoft.Json.Linq.JObject.Parse(Encoding.UTF8.GetString(byteData));
+ if (jobject["code"].ToString() != "0")
+ {
+ return;
+ }
+ var strData = jobject["data"].ToString();
+ FirmwareUpdateResourse.AppNeedUpdateUrl = string.Empty;
+ if (string.IsNullOrEmpty(strData) == true) { return; }
+
+ var jobData = Newtonsoft.Json.Linq.JObject.Parse(strData);
+ //濡傛灉鏄己鍒跺崌绾х殑璇�
+ if (jobData["isEnforce"].ToString().ToLower() == "true")
+ {
+#if iOS
+ FirmwareUpdateResourse.AppNeedUpdateUrl = jobData["iosUrl"].ToString();
+#endif
+#if Android
+ FirmwareUpdateResourse.AppNeedUpdateUrl = jobData["androidUrl"].ToString();
+#endif
+ }
+ }
+ catch { }
+ }
+
+ #endregion
+
+ #region 鈻� 璇诲彇缃戝叧鏈�浣庣増鏈琠__________________
+
+ /// <summary>
+ /// 璇诲彇缃戝叧鏈�浣庣増鏈�
+ /// </summary>
+ public static void ReadGatewayLestVersion()
+ {
+ //姣忔鍒囨崲浣忓畢,閮戒細鍘昏鍙栦竴娆�
+ FirmwareUpdateResourse.ListGatewayNeedUpdate = new List<string>();
+
+ var listGateway = HdlGatewayLogic.Current.GetAllLocalGateway();
+ foreach (var gw in listGateway)
+ {
+ var pra = new Dictionary<string, string>();
+ pra["hardwareId"] = gw.LinuxHardVersion.ToString();
+ pra["imagesId"] = gw.LinuxImageType.ToString();
+ pra["version"] = gw.LinuxFirmwareVersion.ToString();
+ var bodyData = GetSignRequestJson(Newtonsoft.Json.JsonConvert.SerializeObject(pra));
+ //var url = "https://china-gateway.hdlcontrol.com/smart-footstone/app/appVersion/check";
+ var url = "https://test-gz.hdlcontrol.com/smart-footstone/app/gateway-hardware/check";
+ var byteData = Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(url, Encoding.UTF8.GetBytes(bodyData), null);
+ if (byteData == null)
+ {
+ return;
+ }
+ try
+ {
+ var jobject = Newtonsoft.Json.Linq.JObject.Parse(Encoding.UTF8.GetString(byteData));
+ if (jobject["code"].ToString() != "0")
+ {
+ continue;
+ }
+ var strData = jobject["data"].ToString();
+ if (string.IsNullOrEmpty(strData) == true) { return; }
+
+ var jobData = Newtonsoft.Json.Linq.JObject.Parse(strData);
+ //濡傛灉鏄己鍒跺崌绾х殑璇�
+ if (jobData["isEnforce"].ToString().ToLower() == "true")
+ {
+ FirmwareUpdateResourse.ListGatewayNeedUpdate.Add(gw.GwId);
+ }
+ }
+ catch { }
+ }
+ }
+
+ #endregion
+
+ #region 鈻� 妫�娴嬭兘澶熸樉绀哄叕鍛奯__________________
+
+ /// <summary>
+ /// 妫�娴嬭兘澶熸樉绀哄叕鍛�
+ /// </summary>
+ public static bool CheckCanShowNotice()
+ {
+ //涓嶇鎴愪笉鎴愬姛,璇昏繃涓�娆′箣鍚庡氨涓嶅啀璇诲彇
+ if (FirmwareUpdateResourse.ReadedNotice == true)
+ {
+ return false;
+ }
+ FirmwareUpdateResourse.ReadedNotice = true;
+#if Android
+ var url = "https://developer.hdlcontrol.com/AnnouncementAndriod.html";
+#endif
+#if iOS
+ var url = "https://developer.hdlcontrol.com/AnnouncementIos.html";
+#endif
+
+ var byteData = Common.CommonPage.Instance.DoRequestZigbeeHttpsInterface(url, null, null, "GET");
+ if (byteData == null)
+ {
+ //濡傛灉鏄�404,鍒欒繑鍥瀎alse
+ return false;
+ }
+ //鍔犺浇绯荤粺鍏憡
+ var fileData = HdlFileLogic.Current.ReadFileTextContent(DirNameResourse.AppNoticeFile);
+ if (fileData == null) { fileData = string.Empty; }
+
+ //鍔犱笂褰撳ぉ鏃ユ湡
+ var strNotice = DateTime.Now.ToString("yyyyMMdd") + "\r\n" + Encoding.UTF8.GetString(byteData);
+ if (fileData == strNotice)
+ {
+ //鍏憡鍐呭涓�鑷�,鍒欎笉鎻愮ず
+ return false;
+ }
+ //濡傛灉鍏憡涓嶄竴鑷�,鎴栬�呭凡缁忚繃浜嗕竴澶�,鍒欐樉绀�
+ HdlFileLogic.Current.SaveTextToFile(DirNameResourse.AppNoticeFile, strNotice);
+
+ return true;
+ }
+
+ #endregion
+
+ #region 鈻� 鏂颁簯绔闂瘑鍖檁____________________
+
+ /// <summary>
+ /// appKey(璁块棶浜戠鍥哄畾鐨勪笢瑗�)
+ /// </summary>
+ private const string APP_KEY = "HDL-HOME-APP-TEST";
+ /// <summary>
+ /// 鎴戜篃涓嶇煡閬撹繖鏄粈涔堥涓滆タ
+ /// </summary>
+ private const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
+ /// <summary>
+ /// 鑾峰彇褰撳墠鏃堕棿鎴冲��(璁块棶浜戠浣跨敤)
+ /// </summary>
+ /// <returns></returns>
+ private static string GetTimestamp()
+ {
+ System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 褰撳湴鏃跺尯
+ return ((long)(DateTime.Now - startTime).TotalSeconds).ToString(); // 鐩稿樊绉掓暟
+ }
+
+ /// <summary>
+ /// MD5鍔犲瘑
+ /// </summary>
+ /// <param name="signstr"></param>
+ /// <returns></returns>
+ private static string SignMD5Encrypt(string s)
+ {
+ byte[] sign = System.Security.Cryptography.MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(s));
+ string signstr = string.Empty;
+ foreach (byte item in sign)
+ {
+ signstr += item.ToString("X2");
+ }
+ return signstr.ToLower();
+ }
+
+ /// <summary>
+ /// 鍩虹鏈嶅姟鐨勬帴鍙i兘瑕佹牎楠宻ign,璁$畻sign绛惧悕
+ /// </summary>
+ /// <param name="i_BodyData">body鐨勬暟鎹�</param>
+ /// <returns></returns>
+ private static string GetSignRequestJson(string i_BodyData)
+ {
+ try
+ {
+ //1. 灏唌odel瀹炰綋杞负Dictionary<string, object>
+ var paramDictionary = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, object>>(i_BodyData);
+ //2. 璁$畻sign
+ if (paramDictionary != null)
+ {
+ paramDictionary.Add("appKey", APP_KEY);
+ paramDictionary.Add("timestamp", GetTimestamp());
+ //2.1 瀛楀吀鍗囧簭
+ paramDictionary = paramDictionary.OrderBy(o => o.Key).ToDictionary(o => o.Key, p => p.Value);
+ //2.2 鎷兼帴鎸塙RL閿�煎
+ string str = string.Empty;
+ foreach (KeyValuePair<string, object> item in paramDictionary)
+ {
+ if (item.Value == null)
+ {
+ //涓嶆牎楠�
+ continue;
+ }
+ string myValue = item.Value.ToString();
+ if (myValue == string.Empty)
+ {
+ //绌哄瓧绗︿篃涓嶆牎楠�
+ continue;
+ }
+ if (item.Value is bool)
+ {
+ //浜戠閭e府娌欓洉璇碽ool绫诲瀷蹇呴』鐢ㄥ皬鍐�
+ myValue = myValue.ToLower();
+ }
+ str += item.Key + "=" + myValue + "&";
+ }
+ //2.3 鎷兼帴SECRET_KEY
+ str = str.Substring(0, str.Length - 1) + SECRET_KEY;
+ //2.4 MD5杞崲+杞皬鍐�
+ var signstr = SignMD5Encrypt(str);
+ paramDictionary.Add("sign", signstr);
+ return Newtonsoft.Json.JsonConvert.SerializeObject(paramDictionary);
+ }
+ else
+ {
+ return "";
+ }
+ }
+ catch
+ {
+ return "";
+ }
+ }
+
+ #endregion
+
#region 鈻� 涓�鑸柟娉昣__________________________
/// <summary>
@@ -711,6 +952,6 @@
Info.UpdateContent.AddRange(Arry);
}
- #endregion
+#endregion
}
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
index 83441a5..b261ec2 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -1493,7 +1493,7 @@
/// <param name="saveFile">鏄惁淇濆瓨鏂囦欢</param>
private void SetGatewayDataToLocalMemmory(ZbGateway localWay, ZbGatewayData.GetGwData data, bool saveFile = true)
{
- if (data == null) { return; }
+ if (localWay == null || data == null) { return; }
localWay.GwId = data.GwId;
localWay.GwName = data.GwName;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
index 2396186..facd31c 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs
@@ -252,11 +252,14 @@
}
var tempList = Common.LocalDevice.Current.GetDevicesByMac(report.DeviceAddr, false);
- var res = Common.LocalDevice.Current.GetMyDeviceEnumInfo(tempList);
- if (res.ConcreteType == Common.DeviceConcreteType.Airer)
+ if (tempList.Count > 0)
{
- //鏅捐。鏋剁壒娈婂鐞嗭紝鏈湴鍙瓨浜嗙鐐�1锛屽叾浣�2锝�5绔偣閮戒笉瀛�
- deviceEpoint = 1;
+ var res = Common.LocalDevice.Current.GetMyDeviceEnumInfo(tempList);
+ if (res.ConcreteType == Common.DeviceConcreteType.Airer)
+ {
+ //鏅捐。鏋剁壒娈婂鐞嗭紝鏈湴鍙瓨浜嗙鐐�1锛屽叾浣�2锝�5绔偣閮戒笉瀛�
+ deviceEpoint = 1;
+ }
}
//澶勭悊缃戝叧涓婃姤鐨勬暟鎹�,鐒跺悗鍙樻洿鏈湴缂撳瓨
var locadevice = Common.LocalDevice.Current.GetDevice(deviceAddr, deviceEpoint);
@@ -642,7 +645,7 @@
//灏忔暟鐐归渶瑕佷竴浣�
string strValue = Convert.ToInt16(receiptData, 16).ToString();
strValue = strValue.Substring(0, strValue.Length - 1);
- temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ temperatrue = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
}
//鏃犵鍙�(涓嶄細鍑虹幇璐熸暟)
else if (attData.AttriButeDataType == 32 || attData.AttriButeDataType == 33)
@@ -654,14 +657,14 @@
string strValue = (shortData - 65536).ToString();
//灏忔暟鐐归渶瑕佷竴浣�
strValue = strValue.Substring(0, strValue.Length - 1);
- temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ temperatrue = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
}
else
{
//灏忔暟鐐归渶瑕佷竴浣�
string strValue = shortData.ToString();
strValue = strValue.Substring(0, strValue.Length - 1);
- temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ temperatrue = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
}
}
@@ -706,7 +709,7 @@
//灏忔暟鐐归渶瑕佷竴浣�
string strValue = Convert.ToInt16(receiptData, 16).ToString();
strValue = strValue.Substring(0, strValue.Length - 1);
- humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ humidity = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
}
//鏃犵鍙�(涓嶄細鍑虹幇璐熸暟)
else if (attData.AttriButeDataType == 32 || attData.AttriButeDataType == 33)
@@ -714,7 +717,7 @@
//灏忔暟鐐归渶瑕佷竴浣� 婀垮害涓嶄細鍑虹幇璐熸暟
string strValue = Convert.ToUInt16(receiptData, 16).ToString();
strValue = strValue.Substring(0, strValue.Length - 1);
- humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
+ humidity = strValue == string.Empty ? 0m : Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
}
//婀垮害浼犳劅鍣�
if (locadevice is TemperatureSensor)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
index 6aee9ce..9d6f45a 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs
@@ -38,13 +38,14 @@
{
get
{
- string myId = this.SSID;
+ //string myId = this.SSID;
- if (myId != null && myId.StartsWith("hdlZigbeeGW") == true)
- {
- return true;
- }
- return false;
+ //if (myId != null && myId.StartsWith("hdlZigbeeGW") == true)
+ //{
+ // return true;
+ //}
+ //2021.03.22 涓汉鍐冲畾,涓嶅啀妫�娴嬭繖涓笢瑗�
+ return true;
}
}
@@ -55,13 +56,14 @@
{
get
{
- string myId = this.SSID;
+ //string myId = this.SSID;
- if (myId != null && myId.StartsWith("hdlZigbeeGW-") == true)
- {
- return true;
- }
- return false;
+ //if (myId != null && myId.StartsWith("hdlZigbeeGW-") == true)
+ //{
+ // return true;
+ //}
+ //2021.03.22 涓汉鍐冲畾,涓嶅啀妫�娴嬭繖涓笢瑗�
+ return true;
}
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
index 336f2e7..6d38457 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -815,7 +815,7 @@
if (hadNet == 1)
{
//璇诲彇闅愬尶閰嶇疆
- HdlBackupLogic.Current.LoadHideOption();
+ //HdlBackupLogic.Current.LoadHideOption();
//璋冭瘯锛氬己鍒跺紑鍚悗鍙拌皟璇旳pp鍔熻兘
if (UserCenterResourse.HideOption.StartDebugApp == 1)
{
@@ -862,6 +862,11 @@
//鍚屾浜戠鐨勭綉鍏砳d锛屽鏋滄湰鍦版嫢鏈変簯绔笉瀛樺湪鐨刬d锛屽垯琛ㄧず搴旇琚崲缁戜簡锛岀洿鎺ュ垹闄�
HdlGatewayLogic.Current.SynchronizeDbGateway();
+
+ //璇诲彇App鏈�浣庣増鏈�
+ HdlFirmwareUpdateLogic.ReadAppLestVersion();
+ //璇诲彇缃戝叧鏈�浣庣増鏈�
+ HdlFirmwareUpdateLogic.ReadGatewayLestVersion();
}
//鏂紑杩滅▼Mqtt杩炴帴,閲嶆柊杩炴帴
@@ -893,7 +898,6 @@
{
//浣忓畢鍒囨崲鏃�,妫�娴嬬綉鍏宠繛鎺ユ儏鍐�
CheckGatewayConnection();
-
}
UserCenterResourse.DicReceiveGatewayTest = null;
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
index 2bea4e0..cf99f5d 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/DirectoryFileNameResourse.cs
@@ -266,6 +266,13 @@
{
get { return System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, "cd8f75492cb65ef0951442460336db62"); }
}
+ /// <summary>
+ /// App鍏憡鐨勬爣璇嗐�愭枃浠躲��
+ /// </summary>
+ public static string AppNoticeFile
+ {
+ get { return System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, "1e1a366c154c6c1ea10d7c5655af8b9c"); }
+ }
//------------------------浠ヤ笅涓鸿緟鍔╂枃浠�------------------------
/// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/FirmwareUpdateResourse.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/FirmwareUpdateResourse.cs
index ba18d6b..999c4cb 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/FirmwareUpdateResourse.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/FirmwareUpdateResourse.cs
@@ -10,6 +10,18 @@
public class FirmwareUpdateResourse
{
/// <summary>
+ /// App闇�瑕佸崌绾х殑URL杩炴帴 null:杩樻病鏈夎鍙栬繃鐗堟湰 string.Empty:涓嶉渶瑕佸崌绾� 鏈塽rl:闇�瑕佸崌绾�
+ /// </summary>
+ public static string AppNeedUpdateUrl = null;
+ /// <summary>
+ /// 缃戝叧闇�瑕佸崌绾х殑瀵硅薄鍒楄〃
+ /// </summary>
+ public static List<string> ListGatewayNeedUpdate = new List<string>();
+ /// <summary>
+ /// 鏄惁宸茬粡璇诲彇鍏憡
+ /// </summary>
+ public static bool ReadedNotice = false;
+ /// <summary>
/// 鍥轰欢鐨勫崌绾т俊鎭�
/// </summary>
public static Dictionary<FirmwareLevelType, Dictionary<string, FirmwareHardInfo>> dicFirmwareInfo = new Dictionary<FirmwareLevelType, Dictionary<string, FirmwareHardInfo>>();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
index 9164acd..891aeeb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs
@@ -105,7 +105,7 @@
this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1368);
}
}
- else
+ if (this.listview == null)
{
this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1128);
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs
index dbac75a..e531000 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Relay/RelayNationalBackLightSettionForm.cs
@@ -25,6 +25,10 @@
/// </summary>
private List<CommonDevice> listDevice = null;
/// <summary>
+ /// 璁惧绫诲瀷
+ /// </summary>
+ private DeviceEnumInfo deviceEnumInfo = null;
+ /// <summary>
/// 鏁版嵁鏄惁鍙樻洿
/// </summary>
private bool valueChanged = false;
@@ -41,6 +45,7 @@
this.ScrollEnabled = false;
this.listDevice = Common.LocalDevice.Current.GetDevicesByMac(i_deviceMac);
+ this.deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(this.listDevice);
//璁剧疆澶撮儴淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uBackLight));
@@ -74,15 +79,20 @@
//鍚勭鑳屽厜鐏殑瀹瑰櫒
var frameLinght = new FrameLayout();
- frameLinght.Height = Application.GetRealHeight(748);
+ frameLinght.Height = Application.GetRealHeight(311 + 23);
frameLinght.Y = Application.GetRealHeight(279);
frameLinght.BackgroundColor = UserCenterColor.Current.White;
bodyFrameLayout.AddChidren(frameLinght);
//娣诲姞1-6骞叉帴鐐圭殑鑳屽厜鐏繘搴︽潯
this.AddSixDryContactProgress(frameLinght);
- //绗竷骞叉帴鐐圭殑鑳屽厜鐏繘搴︽潯
- this.AddSevenDryContactProgress(frameLinght);
+ //濡傛灉鏄浗鏍�3璺�10A缁х數鍣ㄥ皬妯″潡,瀹冩病鏈夌涓冨共鎺ョ偣
+ if (this.deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.Relay_NationalThreeLoadTenA)
+ {
+ //绗竷骞叉帴鐐圭殑鑳屽厜鐏繘搴︽潯
+ frameLinght.Height = Application.GetRealHeight(748);
+ this.AddSevenDryContactProgress(frameLinght);
+ }
//娣诲姞鑺傝兘妯″紡
this.AddEnergyConservationRow(btnClickStatu, frameLinght);
@@ -340,6 +350,11 @@
btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1;
btnProgress1.Text = linghtLevelInfo.panelDirectionsLevel + "%";
frameLinght.AddChidren(btnProgress1);
+ //濡傛灉鏄浗鏍�3璺�10A缁х數鍣ㄥ皬妯″潡,鍒欎负1-4
+ if (this.deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.Relay_NationalThreeLoadTenA)
+ {
+ btnProgressView1.Text = "Dry1-4";
+ }
//杩涘害鏉�
var seekBar1 = new SeekBarControl();
@@ -372,12 +387,16 @@
btnTemp2.Text = "100%";
frameLinght.AddChidren(btnTemp2);
- //绾�
- var btnLine = new NormalViewControl(Application.GetRealWidth(965), ControlCommonResourse.BottomLineHeight, false);
- btnLine.Y = Application.GetRealHeight(311);
- btnLine.Gravity = Gravity.CenterHorizontal;
- btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
- frameLinght.AddChidren(btnLine);
+ //濡傛灉涓嶆槸鍥芥爣3璺�10A缁х數鍣ㄥ皬妯″潡
+ if (this.deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.Relay_NationalThreeLoadTenA)
+ {
+ //绾�
+ var btnLine = new NormalViewControl(Application.GetRealWidth(965), ControlCommonResourse.BottomLineHeight, false);
+ btnLine.Y = Application.GetRealHeight(311);
+ btnLine.Gravity = Gravity.CenterHorizontal;
+ btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine;
+ frameLinght.AddChidren(btnLine);
+ }
//濡傛灉褰撳墠鏄睍绀烘ā鏉�
if (Common.Config.Instance.Home.IsShowTemplate == true)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs
index 34581b6..ab998db 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection2Form.cs
@@ -38,12 +38,12 @@
btnNext.ButtonClickEvent += (sender, e) =>
{
//濡傛灉涓嶆槸鐑偣妯″紡
- if (HdlWifiLogic.Current.IsMiniGatewayHotspot == false)
- {
- //璇烽�夋嫨hdlZigbeeGW-xxxx缃戠粶
- this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uPleaseSelectGatewayXXNet));
- return;
- }
+ //if (HdlWifiLogic.Current.IsMiniGatewayHotspot == false)
+ //{
+ // //璇烽�夋嫨hdlZigbeeGW-xxxx缃戠粶
+ // this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uPleaseSelectGatewayXXNet));
+ // return;
+ //}
var errorMsg = HdlWifiLogic.Current.StartApTcpConnection();
if (errorMsg != null)
{
@@ -56,10 +56,10 @@
form.AddForm();
};
//濡傛灉涓嶆槸Mini缃戝叧鐑偣
- if (HdlWifiLogic.Current.IsMiniGatewayHotspot == false)
- {
- btnNext.Visible = false;
- }
+ //if (HdlWifiLogic.Current.IsMiniGatewayHotspot == false)
+ //{
+ // btnNext.Visible = false;
+ //}
//鍥剧墖
var framePic = new FrameLayout();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs
index 6b33c67..6ba380d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs
@@ -42,12 +42,12 @@
btnNext.ButtonClickEvent += (sender, e) =>
{
//濡傛灉杩樻槸鐑偣妯″紡
- if (HdlWifiLogic.Current.IsMiniGatewayHotspot == true)
- {
- //璇烽摼鎺ュ搴璚ifi
- this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseLinkHomeWifi));
- return;
- }
+ //if (HdlWifiLogic.Current.IsMiniGatewayHotspot == true)
+ //{
+ // //璇烽摼鎺ュ搴璚ifi
+ // this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseLinkHomeWifi));
+ // return;
+ //}
this.CloseForm();
var form = new MiniGatewaySearchForm();
form.AddForm();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs
index 37e0226..6f9c403 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs
@@ -38,12 +38,12 @@
btnNext.ButtonClickEvent += (sender, e) =>
{
//濡傛灉涓嶆槸鐑偣妯″紡
- if (HdlWifiLogic.Current.IsGatewayHotspot == false)
- {
- //閫夋嫨hdlZigbeeGW-xxxx缃戠粶
- this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseSelectGatewayXXNet));
- return;
- }
+ //if (HdlWifiLogic.Current.IsGatewayHotspot == false)
+ //{
+ // //閫夋嫨hdlZigbeeGW-xxxx缃戠粶
+ // this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseSelectGatewayXXNet));
+ // return;
+ //}
var errorMsg = HdlWifiLogic.Current.StartApTcpConnection();
if (errorMsg != null)
{
@@ -55,10 +55,10 @@
this.AddFromAndRemoveNowForm(form);
};
//濡傛灉涓嶆槸缃戝叧鐑偣
- if (HdlWifiLogic.Current.IsGatewayHotspot == false)
- {
- btnNext.Visible = false;
- }
+ //if (HdlWifiLogic.Current.IsGatewayHotspot == false)
+ //{
+ // btnNext.Visible = false;
+ //}
//鍥剧墖
var framePic = new FrameLayout();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs
index f3489ed..848d79f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection3Form.cs
@@ -42,12 +42,12 @@
btnNext.ButtonClickEvent += (sender, e) =>
{
//濡傛灉杩樻槸鐑偣妯″紡
- if (HdlWifiLogic.Current.IsGatewayHotspot == true)
- {
- //璇烽摼鎺ュ搴璚ifi
- this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseLinkHomeWifi));
- return;
- }
+ //if (HdlWifiLogic.Current.IsGatewayHotspot == true)
+ //{
+ // //璇烽摼鎺ュ搴璚ifi
+ // this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseLinkHomeWifi));
+ // return;
+ //}
var form = new WirelessApSearchForm();
this.AddFromAndRemoveNowForm(form);
};
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/AndroidBluetoothTestForm1.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/AndroidBluetoothTestForm1.cs
deleted file mode 100644
index f832b45..0000000
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/AndroidBluetoothTestForm1.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Shared.Phone.UserCenter.HideOption
-{
- public class AndroidBluetoothTestForm1 : EditorCommonForm
- {
- #region 鈻� 鍙橀噺澹版槑___________________________
-
- private VerticalListControl ListView = null;
- private List<HdlAndroidBluetoothLogic.BluetoothInfo> listBluetoothInfo = new List<HdlAndroidBluetoothLogic.BluetoothInfo>();
-
- #endregion
-
- #region 鈻� 鍒濆鍖朹____________________________
-
- /// <summary>
- /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
- /// </summary>
- public void ShowForm()
- {
- //璁剧疆澶撮儴淇℃伅
- base.SetTitleText("钃濈墮鍒楄〃");
-
- //鍒濆鍖栦腑閮ㄤ俊鎭�
- this.InitMiddleFrame();
-
- string ssid = HdlWifiLogic.Current.SSID;
- }
-
- /// <summary>
- /// 鍒濆鍖栦腑閮ㄤ俊鎭�
- /// </summary>
- private void InitMiddleFrame()
- {
- //娓呯┖bodyFrame
- this.ClearBodyFrame();
-
- this.ListView = new VerticalListControl(23);
- bodyFrameLayout.AddChidren(ListView);
-
- var btnSearch = new BottomClickButton();
- btnSearch.Text = "鎼滅储钃濈墮";
- bodyFrameLayout.AddChidren(btnSearch);
- btnSearch.ButtonClickEvent += (sender, e) =>
- {
- this.ListView.RemoveAll();
- this.listBluetoothInfo.Clear();
-
- HdlAndroidBluetoothLogic.Current.ScanBluetooth(3, (listData) =>
- {
- foreach (var data in listData)
- {
- this.listBluetoothInfo.Add(data);
- }
- HdlThreadLogic.Current.RunMain(() =>
- {
- foreach (var data in listData)
- {
- if (data.Name != string.Empty)
- {
- this.AddRowControl(data);
- }
- }
- this.ListView.AdjustRealHeightByBottomButton(Application.GetRealHeight(46));
- });
- });
- };
- }
-
- private void AddRowControl(HdlAndroidBluetoothLogic.BluetoothInfo bluetooth)
- {
- var rowControl = new RowLayoutControl(this.ListView.rowSpace / 2);
- this.ListView.AddChidren(rowControl);
-
- rowControl.frameTable.AddTopView(bluetooth.Name == string.Empty ? "瀹冪殑鍚嶅瓧鏄痭ull" : bluetooth.Name, 700);
- rowControl.frameTable.AddBottomView(bluetooth.Address, 700);
-
- var btnConnet = rowControl.AddEditorControl();
- btnConnet.Text = "閾炬帴";
- btnConnet.ButtonClickEvent += (sender, e) =>
- {
- this.ShowMassage(ShowMsgType.Confirm, "鏄惁閾炬帴?", () =>
- {
- HdlAndroidBluetoothLogic.Current.ContectBluetooth(bluetooth, (result) =>
- {
- if (result != 1)
- {
- this.ShowMassage(ShowMsgType.Tip, "閾炬帴澶辫触");
- }
- else
- {
- this.ShowMassage(ShowMsgType.Tip, "閾炬帴鎴愬姛");
- HdlThreadLogic.Current.RunMain(() =>
- {
- var form = new AndroidBluetoothTestForm2();
- form.AddForm();
- });
- }
- });
- });
- };
- }
-
- #endregion
-
- #region 鈻� 涓�鑸柟娉昣__________________________
-
- #endregion
- }
-}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/AndroidBluetoothTestForm2.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/AndroidBluetoothTestForm2.cs
deleted file mode 100644
index a411918..0000000
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/AndroidBluetoothTestForm2.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Shared.Phone.UserCenter.HideOption
-{
- public class AndroidBluetoothTestForm2 : EditorCommonForm
- {
- #region 鈻� 鍙橀噺澹版槑___________________________
-
- #endregion
-
- #region 鈻� 鍒濆鍖朹____________________________
-
- /// <summary>
- /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
- /// </summary>
- public void ShowForm()
- {
- //璁剧疆澶撮儴淇℃伅
- base.SetTitleText("鑷畾涔夊彂閫佸唴瀹�");
-
- //鍒濆鍖栦腑閮ㄤ俊鎭�
- this.InitMiddleFrame();
- }
-
- /// <summary>
- /// 鍒濆鍖栦腑閮ㄤ俊鎭�
- /// </summary>
- private void InitMiddleFrame()
- {
- //娓呯┖bodyFrame
- this.ClearBodyFrame();
-
- var txtInput = new EditTextView();
- txtInput.Width = bodyFrameLayout.Width - ControlCommonResourse.XXLeft * 2;
- txtInput.Height = Application.GetRealHeight(470);
- txtInput.Y = Application.GetRealHeight(32);
- txtInput.TextAlignment = TextAlignment.TopLeft;
- txtInput.Gravity = Gravity.CenterHorizontal;
- txtInput.TextColor = UserCenterColor.Current.TextColor1;
- bodyFrameLayout.AddChidren(txtInput);
-
- var mySendData = new SendData();
- mySendData.ssid = HdlWifiLogic.Current.SSID;
- txtInput.Text = Newtonsoft.Json.JsonConvert.SerializeObject(mySendData);
-
- var btnSend = new BottomClickButton();
- btnSend.Text = "鍙戦��";
- bodyFrameLayout.AddChidren(btnSend);
- btnSend.ButtonClickEvent += (sender, e) =>
- {
- btnSend.CanClick = false;
- string sendData = txtInput.Text.Trim();
- HdlThreadLogic.Current.RunThread(() =>
- {
- if (HdlAndroidBluetoothLogic.Current.SendData(sendData, 1) == true)
- {
- this.ShowMassage(ShowMsgType.Tip, "鍙戦�佹垚鍔�");
- }
- else
- {
- this.ShowMassage(ShowMsgType.Tip, "鍙戦�佸け璐�");
- }
- HdlThreadLogic.Current.RunMain(() =>
- {
- btnSend.CanClick = true;
- });
- });
-
- };
- }
-
- #endregion
-
- #region 鈻� 鐣岄潰鍏抽棴___________________________
-
- public override void CloseFormBefore()
- {
- HdlAndroidBluetoothLogic.Current.DisContectBluetooth();
-
- base.CloseFormBefore();
- }
-
- #endregion
-
- #region 鈻� 缁撴瀯浣揰____________________________
-
- private class SendData
- {
- public string id = "id010203";
- public string ssid = string.Empty;
- public string password = "hdl1985..";
- public string gatewayIp = "172.16.2.209";
- public int port = 8888;
- }
-
- #endregion
- }
-}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
index 8cf8634..678df88 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs
@@ -336,16 +336,6 @@
});
};
- row1 = new FrameRowControl(listView.rowSpace / 2);
- listView.AddChidren(row1);
- row1.AddLeftCaption("钃濈墮娴嬭瘯", 500);
- row1.AddRightArrow();
- row1.ButtonClickEvent += (sender, e) =>
- {
- var form = new AndroidBluetoothTestForm1();
- form.AddForm();
- };
-
listView.AdjustRealHeight(Application.GetRealHeight(23));
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
index d7b0a71..e61460f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
@@ -358,8 +358,7 @@
&& data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
{
//澶勭悊缃戝叧杩斿洖鐨勬俯搴﹀��
- decimal temperatrue = 0;
- this.AdjustTemperatrueValue(data.AttributeData, ref temperatrue);
+ decimal temperatrue = Common.LocalDevice.Current.AdjustTemperatrueValue(data.AttributeData);
device.GetType().InvokeMember("currentTemperature", System.Reflection.BindingFlags.SetField, null, device, new object[] { temperatrue });
device.ReSave();
@@ -377,37 +376,6 @@
}
}
});
- }
-
- /// <summary>
- /// 澶勭悊缃戝叧杩斿洖鐨勬俯搴﹀��
- /// </summary>
- /// <param name="value">缃戝叧杩斿洖鐨勫睘鎬у��</param>
- /// <param name="temperatrue">杞崲鎴愮殑娓╁害鍊�</param>
- private void AdjustTemperatrueValue(int value, ref decimal temperatrue)
- {
- if (value == 0)
- {
- //0鈩�
- temperatrue = 0;
- }
- else if (value > 32767)
- {
- //璐熸暟(鐗规畩澶勭悊)
- string strValue = (value - 65536).ToString();
- //灏忔暟鐐归渶瑕佷竴浣�
- strValue = strValue.Substring(0, strValue.Length - 1);
- //璁板綍娓╁害
- temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
- }
- else
- {
- //灏忔暟鐐归渶瑕佷竴浣�
- string strValue = value.ToString();
- strValue = strValue.Substring(0, strValue.Length - 1);
- //璁板綍娓╁害
- temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
- }
}
#endregion
@@ -524,8 +492,7 @@
&& data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
{
//澶勭悊缃戝叧杩斿洖鐨勬箍搴﹀��
- decimal humidity = 0;
- this.AdjustHumidityValue(data.AttributeData, ref humidity);
+ decimal humidity = Common.LocalDevice.Current.AdjustHumidityValue(data.AttributeData);
device.GetType().InvokeMember("currentHumidity", System.Reflection.BindingFlags.SetField, null, device, new object[] { humidity });
device.ReSave();
@@ -543,30 +510,6 @@
}
}
});
- }
-
- /// <summary>
- /// 澶勭悊缃戝叧杩斿洖鐨勬箍搴﹀��
- /// </summary>
- /// <param name="value">缃戝叧杩斿洖鐨勫睘鎬у��</param>
- /// <param name="temperatrue">杞崲鎴愮殑婀垮害鍊�</param>
- /// <param name="valueText">杞崲鎴愮殑婀垮害鍊肩殑缈昏瘧鏂囨湰</param>
- private void AdjustHumidityValue(int value, ref decimal humidity)
- {
- if (value == 0)
- {
- //0%
- humidity = 0;
- }
- //涓嶄細鍑虹幇璐熸暟
- else
- {
- //灏忔暟鐐归渶瑕佷竴浣�
- string strValue = value.ToString();
- strValue = strValue.Substring(0, strValue.Length - 1);
- //璁板綍娓╁害
- humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
- }
}
#endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
index 6ab3291..cf138ae 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
@@ -452,8 +452,7 @@
&& data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
{
//澶勭悊缃戝叧杩斿洖鐨勬俯搴﹀��
- decimal temperatrue = 0;
- this.AdjustTemperatrueValue(data.AttributeData, ref temperatrue);
+ decimal temperatrue = Common.LocalDevice.Current.AdjustTemperatrueValue(data.AttributeData);
device.GetType().InvokeMember("currentTemperature", System.Reflection.BindingFlags.SetField, null, device, new object[] { temperatrue });
device.ReSave();
@@ -471,37 +470,6 @@
}
}
});
- }
-
- /// <summary>
- /// 澶勭悊缃戝叧杩斿洖鐨勬俯搴﹀��
- /// </summary>
- /// <param name="value">缃戝叧杩斿洖鐨勫睘鎬у��</param>
- /// <param name="temperatrue">杞崲鎴愮殑娓╁害鍊�</param>
- private void AdjustTemperatrueValue(int value, ref decimal temperatrue)
- {
- if (value == 0)
- {
- //0鈩�
- temperatrue = 0;
- }
- else if (value > 32767)
- {
- //璐熸暟(鐗规畩澶勭悊)
- string strValue = (value - 65536).ToString();
- //灏忔暟鐐归渶瑕佷竴浣�
- strValue = strValue.Substring(0, strValue.Length - 1);
- //璁板綍娓╁害
- temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
- }
- else
- {
- //灏忔暟鐐归渶瑕佷竴浣�
- string strValue = value.ToString();
- strValue = strValue.Substring(0, strValue.Length - 1);
- //璁板綍娓╁害
- temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
- }
}
#endregion
@@ -619,8 +587,7 @@
&& data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
{
//澶勭悊缃戝叧杩斿洖鐨勬箍搴﹀��
- decimal humidity = 0;
- this.AdjustHumidityValue(data.AttributeData, ref humidity);
+ decimal humidity = Common.LocalDevice.Current.AdjustHumidityValue(data.AttributeData);
device.GetType().InvokeMember("currentHumidity", System.Reflection.BindingFlags.SetField, null, device, new object[] { humidity });
device.ReSave();
@@ -638,30 +605,6 @@
}
}
});
- }
-
- /// <summary>
- /// 澶勭悊缃戝叧杩斿洖鐨勬箍搴﹀��
- /// </summary>
- /// <param name="value">缃戝叧杩斿洖鐨勫睘鎬у��</param>
- /// <param name="temperatrue">杞崲鎴愮殑婀垮害鍊�</param>
- /// <param name="valueText">杞崲鎴愮殑婀垮害鍊肩殑缈昏瘧鏂囨湰</param>
- private void AdjustHumidityValue(int value, ref decimal humidity)
- {
- if (value == 0)
- {
- //0%
- humidity = 0;
- }
- //涓嶄細鍑虹幇璐熸暟
- else
- {
- //灏忔暟鐐归渶瑕佷竴浣�
- string strValue = value.ToString();
- strValue = strValue.Substring(0, strValue.Length - 1);
- //璁板綍娓╁害
- humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
- }
}
#endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
index b4ace58..aa3f637 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -473,7 +473,7 @@
rowAbount.ButtonClickEvent += (sender, e) =>
{
var form = new Abount.AbountForm();
- form.AddForm();
+ form.AddForm(false);
};
if (UserCenterResourse.HideOption.CenterHideMenu == 1)
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs
index 7e236ae..241f251 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/TemperatureSensor.cs
@@ -220,13 +220,13 @@
}
else
{
- if (co2Quality == 1)
+ if (pmQuality == 1)
{
curQuality = 1;
}
else
{
- if (co2Quality > 2)
+ if (pmQuality > 2)
{
curQuality = 3;
}
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
index 376af66..eccff57 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
@@ -26,7 +26,7 @@
/// <summary>
/// 涓荤綉鍏�
/// </summary>
- /// <value>The main gate way.</value>
+ [Newtonsoft.Json.JsonIgnore]
public static ZbGateway MainGateWay
{
get
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index e46417b..51024bf 100755
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -6988,6 +6988,18 @@
/// 涓湀
/// </summary>
public const int uOneMonth1 = 16230;
+ /// <summary>
+ /// 鍙戠幇APP鏂扮増鏈�,椹笂鍗囩骇{0}寮�鍚柊浣撻獙鍝
+ /// </summary>
+ public const int uAppUpdateMsg1 = 16231;
+ /// <summary>
+ /// 鍙戠幇缃戝叧鏂扮増鏈�,椹笂鍗囩骇{0}寮�鍚柊浣撻獙鍝
+ /// </summary>
+ public const int uGatewayUpdateMsg1 = 16232;
+ /// <summary>
+ /// 鍏憡
+ /// </summary>
+ public const int uNotice = 16233;
//鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
index c984a45..e1cbcc9 100755
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -70,6 +70,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountResetPWDSuccess.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\Controls\PhoneEmailSelectControl.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\PhoneEmailForm.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\AppNoticeForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceAcDetailCardMethord.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Category\SelectFloorForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Category\SelectHouseForm.cs" />
@@ -111,6 +112,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceMiniLightDetailCardForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DevicePmSensorDetailCardForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceRelayDetailCardForm.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DeviceTemperatureHumidityDetailCardForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DeviceAirQualitySensorCardControl.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DeviceColorTemperatureCardControl.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DeviceFreshAirCardControl.cs" />
@@ -309,8 +311,6 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Guide\GuideRoomForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HdlBackup\HdlAutoBackupForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HdlBackup\HdlBackupListForm.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HideOption\AndroidBluetoothTestForm1.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HideOption\AndroidBluetoothTestForm2.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HideOption\HideOptionDirectoryListForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HideOption\HideOptionFileContentForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\HideOption\HideOptionGatewayInfoMenuForm.cs" />
--
Gitblit v1.8.0