From 23420922845c9e77019a55c3b3e3271eb1ec261e Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 13 七月 2020 11:42:18 +0800
Subject: [PATCH] 新版本
---
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60_60.png | 0
ZigbeeApp/Home.Ios/AppDelegate.cs | 180 +++-
ZigbeeApp/GateWay.Droid/Assets/Language.ini | 7
ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs | 14
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs | 2
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs | 15
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 71 +
ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs | 5
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs | 22
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180_180.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960-1.png | 0
ZigbeeApp/Shared/Phone/UserView/UserPage.cs | 30
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs | 10
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-1.png | 0
ZigbeeApp/Shared/Phone/Category/AdjustTargetAddSceneForm.cs | 83 +
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152_152.png | 0
ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs | 15
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs | 72 -
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs | 33
ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs | 13
ZigbeeApp/Home.Ios/mono_crash.115869ea88.0.json | 152 +-
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-1.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2008.png | 0
ZigbeeApp/Home.Ios/ESVideo.cs | 84 +
ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs | 275 ++++++
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs | 8
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048-1.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2208-1.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167_167.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768-1.png | 0
ZigbeeApp/Home.Ios/Resources/Phone/Item/SynchronizationSelected.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SynchronizationSelected.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs | 60
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercom.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2688_1242.png | 0
ZigbeeApp/Home.Ios/Info.plist | 2
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs | 2
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76_76.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536-1.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2688_XS Max.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1792_828.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1496.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024-1.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20_20.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs | 4
ZigbeeApp/Shared/Shared.projitems | 1
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1004.png | 0
ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs | 4
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightFloorMenuControl.cs | 10
ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs | 9
ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercomNext.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/828_1792_XR.png | 0
ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs | 24
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/320_480.png | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs | 2
ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs | 29
ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj | 9
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120.png | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs | 2
ZigbeeApp/Shared/Common/CommonPage.cs | 2
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 8
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionAddTargetsForm.cs | 201 ---
ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs | 41
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768.png | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs | 2
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87_87.png | 0
ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml | 2
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs | 11
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs | 30
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs | 608 +++++++------
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29_29.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136-1.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40.png | 0
ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercom.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs | 13
ZigbeeApp/Shared/Phone/MainPage/LeftListRoomViewFrom.cs | 19
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs | 2
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs | 20
ZigbeeApp/Home.Ios/MainViewController.cs | 6
ZigbeeApp/Home.Ios/Resources/Language.ini | 6
ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs | 5
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_2732-1.png | 0
ZigbeeApp/Home.Ios/Home.IOS.csproj | 7
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_748.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58-1.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs | 2
ZigbeeApp/Shared/R.cs | 19
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024_1024.png | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs | 2
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-1.png | 0
ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs | 96 +
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-2.png | 0
ZigbeeApp/Shared/Common/Device.cs | 86 +
ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048.png | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs | 2
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs | 2
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2436_1125.png | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs | 8
ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs | 9
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1125_2436.png | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs | 2
ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs | 13
ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs | 107 ++
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2208_1242.png | 0
ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/750_1334.png | 0
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs | 2
ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs | 4
ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercomNext.png | 0
ZigbeeApp/Shared/Common/House.cs | 27
116 files changed, 1,753 insertions(+), 860 deletions(-)
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
old mode 100755
new mode 100644
index bb3d578..c9a3528
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -337,6 +337,8 @@
333=涓嶇粦瀹氫换浣曠洰鏍�
334= 鐫$湢鏃堕棿
335=璀﹀憡锛佹暟鎹嚭閿欙紝蹇呴』鍒锋柊鍒楄〃锛屽惁鍒欐帶鍒剁幇璞¢敊涔�
+336=鍚屾
+337=鍚屾澶辫触
5097=鍙栨秷
5098=纭畾
@@ -625,6 +627,10 @@
5411=鏆梴\r\n} 0lux
5412=浜畕\r\n} 100lux
5413=鍦ㄥ鍐呮潯浠朵笅,榛戞殫鐓у害鍊肩害涓�0.02lux,榛勬槒鐓у害鍊納\r\n}绾︿负10lux,闃村ぉ鐓у害鍊肩害涓�5~50lux,璇锋牴鎹疄闄厈\r\n}闇�瑕佽繘琛岃皟鑺�
+5414=鍙瀵硅
+5415=鏍�
+5416=鍗曞厓
+5417=瀹ゅ鏈�
@@ -1867,6 +1873,7 @@
16134=璁剧疆璁惧鍔熻兘绫诲瀷澶辫触
16135=鑾峰彇鍦烘櫙鍒楄〃澶辫触,缃戝叧鍥炲瓒呮椂
16136=闇�閲嶆柊缁戝畾
+16137=鍑虹幇鎰忓鎯呭喌,鏁版嵁涓㈠け
;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
18004=鎸囧畾缃戝叧宸茬粡琚粦瀹�
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SynchronizationSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SynchronizationSelected.png
new file mode 100755
index 0000000..f3c2262
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SynchronizationSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercom.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercom.png
new file mode 100755
index 0000000..5adf153
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercom.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercomNext.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercomNext.png
new file mode 100755
index 0000000..df52c60
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/videoIntercomNext.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
index 1899ef6..d986e89 100644
--- a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
+++ b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
@@ -2320,6 +2320,15 @@
<ItemGroup>
<AndroidAsset Include="Assets\Phone\Item\BatterySelected.png" />
</ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\videoIntercom.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\videoIntercomNext.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\SynchronizationSelected.png" />
+ </ItemGroup>
<Import Project="..\Shared\Shared.projitems" Label="Shared" Condition="Exists('..\Shared\Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\packages\Xamarin.Android.Support.Annotations.26.0.2\build\MonoAndroid80\Xamarin.Android.Support.Annotations.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Annotations.26.0.2\build\MonoAndroid80\Xamarin.Android.Support.Annotations.targets')" />
diff --git a/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml b/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
index f26006a..76a3a2b 100644
--- a/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
+++ b/ZigbeeApp/GateWay.Droid/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="0120070901" android:installLocation="auto" android:versionName="1.1.0120070901">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.hdl.home" android:versionCode="0120071301" android:installLocation="auto" android:versionName="1.1.0120071301">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="26" />
<permission android:name="com.hdl.home.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
diff --git a/ZigbeeApp/Home.Ios/AppDelegate.cs b/ZigbeeApp/Home.Ios/AppDelegate.cs
old mode 100644
new mode 100755
index 0498c00..5f7c60e
--- a/ZigbeeApp/Home.Ios/AppDelegate.cs
+++ b/ZigbeeApp/Home.Ios/AppDelegate.cs
@@ -53,26 +53,42 @@
NSString key_hiddenJson = new NSString("HiddenJson");
if (userInfo.ContainsKey(key_hiddenJson))
{
- NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
- if (hiddenJsonDic != null)
- {
- NSString key_Offline = new NSString("Offline");
- if (hiddenJsonDic.ContainsKey(key_Offline))
- {
- string signOut = hiddenJsonDic["Offline"].ToString();
-
- if (signOut == "0")
+ var hiddenJson = userInfo["HiddenJson"].ToString();
+ if (!string.IsNullOrEmpty(hiddenJson))
+ {
+ if (hiddenJson.Contains("cmtID"))
+ {
+
+ ///鐩墠鏍规嵁杩欎釜鍒ゆ柇鏄惁鏄彲瑙嗗璁叉暟鎹�
+ // VideoMethod(hiddenJson);
+ }
+ else
+ {
+
+ NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
+ if (hiddenJsonDic != null)
{
- //涓嶄笅绾�
- }
- else
- {
- //鏍囪涓嬬嚎
- haveToSignOut = true;
- }
- }
+ NSString key_Offline = new NSString("Offline");
+ if (hiddenJsonDic.ContainsKey(key_Offline))
+ {
+ string signOut = hiddenJsonDic["Offline"].ToString();
+ if (signOut == "0")
+ {
+ //涓嶄笅绾�
+ }
+ else
+ {
+ //鏍囪涓嬬嚎
+ haveToSignOut = true;
+ }
+ }
+
+ }
+ }
}
+
+
}
}
@@ -100,25 +116,41 @@
NSString key_hiddenJson = new NSString("HiddenJson");
if (userInfo.ContainsKey(key_hiddenJson))
{
- NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
- if (hiddenJsonDic == null)
- {
- return;
- }
- NSString key_Offline = new NSString("Offline");
- if (hiddenJsonDic.ContainsKey(key_Offline))
- {
- string signOut = hiddenJsonDic["Offline"].ToString();
-
- if (signOut == "0")
+ var hiddenJson = userInfo["HiddenJson"].ToString();
+ if (string.IsNullOrEmpty(hiddenJson))
+ {
+ return;
+ }
+
+ if (hiddenJson.Contains("cmtID"))
+ {
+
+ ///鐩墠鏍规嵁杩欎釜鍒ゆ柇鏄惁鏄彲瑙嗗璁叉暟鎹�
+ VideoMethod(hiddenJson);
+ }
+ else
+ {
+
+ NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
+ if (hiddenJsonDic == null)
{
- //涓嶄笅绾�
+ return;
}
- else
+ NSString key_Offline = new NSString("Offline");
+ if (hiddenJsonDic.ContainsKey(key_Offline))
{
- //寮哄埗涓嬬嚎
- CommonPage.Instance.SingOut();
- CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.uHadBeenLoginAndOffLine);
+ string signOut = hiddenJsonDic["Offline"].ToString();
+
+ if (signOut == "0")
+ {
+ //涓嶄笅绾�
+ }
+ else
+ {
+ //寮哄埗涓嬬嚎
+ CommonPage.Instance.SingOut();
+ CommonPage.Instance.ShowErrorInfoAlert(Shared.R.MyInternationalizationString.uHadBeenLoginAndOffLine);
+ }
}
}
}
@@ -128,30 +160,82 @@
NSString key_hiddenJson = new NSString("HiddenJson");
if (userInfo.ContainsKey(key_hiddenJson))
{
- NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
- if (hiddenJsonDic == null)
- {
- return;
- }
- NSString key_Offline = new NSString("Offline");
- if (hiddenJsonDic.ContainsKey(key_Offline))
- {
- string signOut = hiddenJsonDic["Offline"].ToString();
-
- if (signOut == "0")
+
+ var hiddenJson = userInfo["HiddenJson"].ToString();
+ if (string.IsNullOrEmpty(hiddenJson)) {
+ return;
+ }
+
+ if (hiddenJson.Contains("cmtID"))
+ {
+ ///鐩墠鏍规嵁杩欎釜鍒ゆ柇鏄惁鏄彲瑙嗗璁叉暟鎹�
+ VideoMethod(hiddenJson);
+ }
+ else
+ {
+
+ NSDictionary hiddenJsonDic = userInfo["HiddenJson"] as NSDictionary;
+ if (hiddenJsonDic == null)
{
- //涓嶄笅绾�
+ return;
}
- else
+ NSString key_Offline = new NSString("Offline");
+ if (hiddenJsonDic.ContainsKey(key_Offline))
{
- //鏍囪涓嬬嚎
- haveToSignOut = true;
+ string signOut = hiddenJsonDic["Offline"].ToString();
+
+ if (signOut == "0")
+ {
+ //涓嶄笅绾�
+ }
+ else
+ {
+ //鏍囪涓嬬嚎
+ haveToSignOut = true;
+ }
}
}
}
}
completionHandler(UIBackgroundFetchResult.NewData);
+ }
+ /// <summary>
+ /// ios閫氱煡鏍忕偣鍑绘墦寮�鍙瀵硅鐨勬柟娉�
+ /// </summary>
+ /// <param name="hiddenJson">浜戠鎺ㄨ繃鏉ョ殑鏁版嵁</param>
+ private void VideoMethod(string hiddenJson)
+ {
+
+ var json = Newtonsoft.Json.Linq.JObject.Parse(hiddenJson);
+ if (json == null)
+ {
+ return;
+ }
+ GateWay.Ios.ESVideoInfo eSVideoInfo = new GateWay.Ios.ESVideoInfo();
+ if (json["uuid"].ToString().Contains(","))
+ {
+ var uuid = json["uuid"].ToString().Split(',');
+ eSVideoInfo.ESVideoUUID = uuid[0];
+ }
+ else
+ {
+ eSVideoInfo.ESVideoUUID = json["uuid"].ToString();
+ }
+
+ eSVideoInfo.DeviceName = Language.StringByID(Shared.R.MyInternationalizationString.theOutdoorUnit);
+ eSVideoInfo.ESRoomID = int.Parse(json["roomno"].ToString());
+ if (!string.IsNullOrEmpty(json["unitno"].ToString()))
+ {
+ string str = json["unitno"].ToString();
+ string str1 = str.Substring(0, 2).TrimStart('0');
+ string str2 = str.Substring(2, 2).TrimStart('0');
+ eSVideoInfo.RoomName = str1 + Language.StringByID(Shared.R.MyInternationalizationString.dong) + str2 + Language.StringByID(Shared.R.MyInternationalizationString.unit);
+ }
+ GateWay.Ios.ESVideo.ShowESvideoVideoIntercom(eSVideoInfo);
+
+ //var url = "https://global.hdlcontrol.com/HangZhouHdlCloudApi/VideoIntercom/Answer";
+ //var dd=await Shared.Phone.Device.Logic.Send.HttpWebRequest(url, json.ToString(), "POST", 3, true);
}
public override void ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024*1024.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024_1024.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024*1024.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/1024_1024.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120*120.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/120_120.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152*152.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152_152.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152*152.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/152_152.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167*167.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167_167.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167*167.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/167_167.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180*180.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180_180.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180*180.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/180_180.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20*20.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20_20.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20*20.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/20_20.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29*29.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29_29.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29*29.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/29_29.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40-2.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-2.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40-2.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40-2.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40*40.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/40_40.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58*58.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/58_58.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60*60.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60_60.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60*60.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/60_60.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76*76.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76_76.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76*76.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/76_76.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80*80.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/80_80.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87*87.png b/ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87_87.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87*87.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/AppIcon.appiconset/87_87.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024*748.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_748.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024*748.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_748.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024*768-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024*768-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024*768.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024*768.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1024_768.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1125*2436.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1125_2436.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1125*2436.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1125_2436.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242*2208-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2208-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242*2208-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2208-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242*2688_XS Max.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2688_XS Max.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242*2688_XS Max.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1242_2688_XS Max.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536*2008.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2008.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536*2008.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2008.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536*2048-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536*2048-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536*2048.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536*2048.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1536_2048.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1792*828.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1792_828.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1792*828.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/1792_828.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048*1496.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1496.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048*1496.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1496.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048*1536-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048*1536-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048*1536.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048*1536.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_1536.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048*2732-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_2732-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048*2732-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2048_2732-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2208*1242.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2208_1242.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2208*1242.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2208_1242.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2436*1125.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2436_1125.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2436*1125.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2436_1125.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2688*1242.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2688_1242.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2688*1242.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/2688_1242.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/320*480.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/320_480.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/320*480.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/320_480.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640*1136-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640*1136-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640*1136.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640*1136.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_1136.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640*960-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640*960-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640*960.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640*960.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/640_960.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/750*1334.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/750_1334.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/750*1334.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/750_1334.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768*1004.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1004.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768*1004.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1004.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768*1024-1.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024-1.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768*1024-1.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024-1.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768*1024.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768*1024.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/768_1024.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/828*1792_XR.png b/ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/828_1792_XR.png
old mode 100644
new mode 100755
similarity index 100%
rename from ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/828*1792_XR.png
rename to ZigbeeApp/Home.Ios/Assets.xcassets/LaunchImage.launchimage/828_1792_XR.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/ESVideo.cs b/ZigbeeApp/Home.Ios/ESVideo.cs
new file mode 100755
index 0000000..9045787
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/ESVideo.cs
@@ -0,0 +1,84 @@
+锘縰sing System;
+using Shared.IOS.ESVideoPhoneSDK;
+
+namespace GateWay.Ios
+{
+ public static class ESVideo
+ {
+ //public ESVideo()
+ //{
+
+ //}
+
+ public static void InitESVideoSDK()
+ {
+ ESVideo.InitESVideoSDK();
+ }
+
+ /// <summary>
+ /// 鐩戞帶椤甸潰
+ /// </summary>
+ /// <param name="mESVideoInfo"></param>
+ public static void ShowESVideoMonitor(ESVideoInfo mESVideoInfo)
+ {
+ ESVideoMonitorViewController mESVideoMonitorViewController = new ESVideoMonitorViewController();
+
+ mESVideoMonitorViewController.MESVideoID = mESVideoInfo.ESVideoUUID;
+ mESVideoMonitorViewController.MESRoomID = mESVideoInfo.ESRoomID;
+ mESVideoMonitorViewController.DeviceName = mESVideoInfo.DeviceName;
+ mESVideoMonitorViewController.RoomName = mESVideoInfo.RoomName;
+ mESVideoMonitorViewController.IsCollect = mESVideoInfo.IsCollect;
+
+ Shared.Application.currentVC.NavigationController.PushViewController(mESVideoMonitorViewController, true);
+ }
+
+
+
+ /// <summary>
+ /// 琚懠鍙〉闈�
+ /// </summary>
+ /// <param name="mESVideoInfo"></param>
+ public static void ShowESvideoVideoIntercom(ESVideoInfo mESVideoInfo)
+ {
+ ESvideoVideoIntercomViewController mESvideoVideoIntercomViewController = new ESvideoVideoIntercomViewController();
+ mESvideoVideoIntercomViewController.MESVideoID = mESVideoInfo.ESVideoUUID;
+ mESvideoVideoIntercomViewController.MESRoomID = mESVideoInfo.ESRoomID;
+ mESvideoVideoIntercomViewController.DeviceName = mESVideoInfo.DeviceName;
+ mESvideoVideoIntercomViewController.RoomName = mESVideoInfo.RoomName;
+ mESvideoVideoIntercomViewController.IsCollect = mESVideoInfo.IsCollect;
+
+ Shared.Application.currentVC.NavigationController.PushViewController(mESvideoVideoIntercomViewController, true);
+ }
+ }
+
+ public class ESVideoInfo
+ {
+ /// <summary>
+ /// 瀹ゅ鏈虹殑UUID
+ /// 渚嬶細JJY000007FSEYX
+ /// </summary>
+ public string ESVideoUUID=string.Empty;
+ /// <summary>
+ /// 褰撳墠鐢ㄦ埛鐨勬埧闂碔D
+ /// 渚嬶細0801
+ /// </summary>
+ public int ESRoomID;
+ /// <summary>
+ /// 瀹ゅ鏈虹殑鍚嶇О
+ /// 渚嬶細瀹ゅ鏈�
+ /// </summary>
+ public string DeviceName = string.Empty;
+ /// <summary>
+ /// 鎴块棿鍛藉悕
+ /// 渚嬶細8鏍�1鍗曞厓0801
+ /// </summary>
+ public string RoomName = string.Empty;
+ /// <summary>
+ /// 鏄惁鏀惰棌
+ /// </summary>
+ public bool IsCollect;
+
+ }
+
+
+}
diff --git a/ZigbeeApp/Home.Ios/Home.IOS.csproj b/ZigbeeApp/Home.Ios/Home.IOS.csproj
index 0a54106..3ff7737 100644
--- a/ZigbeeApp/Home.Ios/Home.IOS.csproj
+++ b/ZigbeeApp/Home.Ios/Home.IOS.csproj
@@ -87,6 +87,9 @@
<HintPath>..\packages\BouncyCastle.Crypto.dll.1.8.1\lib\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http" />
+ <Reference Include="Shared.IOS.ESVideoPhoneSDK">
+ <HintPath>..\Shared\DLL\IOS\Shared.IOS.ESVideoPhoneSDK.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Essentials" Version="1.2.0" />
@@ -132,6 +135,7 @@
<Compile Include="ViewControllerBase.cs" />
<Compile Include="Reachability.cs" />
<Compile Include="ZXingOverlayView.cs" />
+ <Compile Include="ESVideo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Elian.iOS\Elian.iOS.csproj">
@@ -562,6 +566,7 @@
<BundleResource Include="Resources\Phone\Item\ShardMenu.png" />
<BundleResource Include="Resources\Phone\Item\UnLockFail.png" />
<BundleResource Include="Resources\Phone\Item\ProgressMsg.png" />
+ <BundleResource Include="Resources\Phone\Item\SynchronizationSelected.png" />
<BundleResource Include="Resources\Phone\Item\BottomButtonGround.png" />
<BundleResource Include="Resources\Phone\Item\AutoBackup.png" />
<BundleResource Include="Resources\Phone\Item\BatterySelected.png" />
@@ -581,7 +586,9 @@
<BundleResource Include="Resources\Phone\Item\GwSwitchIcon.png" />
<BundleResource Include="Resources\Phone\Item\DeleteIcon1.png" />
<BundleResource Include="Resources\Phone\Item\HouseSelected.png" />
+ <BundleResource Include="Resources\Phone\Item\videoIntercomNext.png" />
<BundleResource Include="Resources\Phone\Item\Floor.png" />
+ <BundleResource Include="Resources\Phone\Item\videoIntercom.png" />
<BundleResource Include="Resources\Phone\Item\MinusSign2.png" />
<BundleResource Include="Resources\Phone\Item\NotAuthority.png" />
<BundleResource Include="Resources\Phone\Item\IndoorUnitGround.png" />
diff --git a/ZigbeeApp/Home.Ios/Info.plist b/ZigbeeApp/Home.Ios/Info.plist
index ed1176d..6e30abb 100755
--- a/ZigbeeApp/Home.Ios/Info.plist
+++ b/ZigbeeApp/Home.Ios/Info.plist
@@ -85,5 +85,7 @@
<string>location</string>
<string>remote-notification</string>
</array>
+ <key>NSMicrophoneUsageDescription</key>
+ <string>闇�瑕佷娇鐢ㄩ害鍏嬮锛岀敤浜庡彲瑙嗗璁�</string>
</dict>
</plist>
diff --git a/ZigbeeApp/Home.Ios/MainViewController.cs b/ZigbeeApp/Home.Ios/MainViewController.cs
index 8304520..902e55c 100644
--- a/ZigbeeApp/Home.Ios/MainViewController.cs
+++ b/ZigbeeApp/Home.Ios/MainViewController.cs
@@ -83,15 +83,15 @@
internetStatus = Reachability.InternetConnectionStatus();
if (internetStatus == NetworkStatus.NotReachable)//娌℃湁缃戠粶杩炴帴 0
{
- Shared.Common.CommonPage.nowNetworkMode = 0;
+ //Shared.Common.CommonPage.nowNetworkMode = 0;
}
else if (internetStatus == NetworkStatus.ReachableViaCarrierDataNetwork)//3,4G鐨勭綉缁滆繛鎺� 1
{
- Shared.Common.CommonPage.nowNetworkMode = 1;
+ //Shared.Common.CommonPage.nowNetworkMode = 1;
}
else if (internetStatus == NetworkStatus.ReachableViaWiFiNetwork)
{ //wifi鐨勭綉缁滆繛鎺� 2
- Shared.Common.CommonPage.nowNetworkMode = 2;
+ //Shared.Common.CommonPage.nowNetworkMode = 2;
}
}
}
diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini
index bb3d578..093e27f 100755
--- a/ZigbeeApp/Home.Ios/Resources/Language.ini
+++ b/ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -337,6 +337,8 @@
333=涓嶇粦瀹氫换浣曠洰鏍�
334= 鐫$湢鏃堕棿
335=璀﹀憡锛佹暟鎹嚭閿欙紝蹇呴』鍒锋柊鍒楄〃锛屽惁鍒欐帶鍒剁幇璞¢敊涔�
+336=鍚屾
+337=鍚屾澶辫触
5097=鍙栨秷
5098=纭畾
@@ -625,6 +627,10 @@
5411=鏆梴\r\n} 0lux
5412=浜畕\r\n} 100lux
5413=鍦ㄥ鍐呮潯浠朵笅,榛戞殫鐓у害鍊肩害涓�0.02lux,榛勬槒鐓у害鍊納\r\n}绾︿负10lux,闃村ぉ鐓у害鍊肩害涓�5~50lux,璇锋牴鎹疄闄厈\r\n}闇�瑕佽繘琛岃皟鑺�
+5414=鍙瀵硅
+5415=鏍�
+5416=鍗曞厓
+5417=瀹ゅ鏈�
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Item/SynchronizationSelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Item/SynchronizationSelected.png
new file mode 100755
index 0000000..f3c2262
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Item/SynchronizationSelected.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercom.png b/ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercom.png
new file mode 100755
index 0000000..5adf153
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercom.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercomNext.png b/ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercomNext.png
new file mode 100755
index 0000000..df52c60
--- /dev/null
+++ b/ZigbeeApp/Home.Ios/Resources/Phone/Item/videoIntercomNext.png
Binary files differ
diff --git a/ZigbeeApp/Home.Ios/mono_crash.115869ea88.0.json b/ZigbeeApp/Home.Ios/mono_crash.115869ea88.0.json
index 759f137..11af46f 100644
--- a/ZigbeeApp/Home.Ios/mono_crash.115869ea88.0.json
+++ b/ZigbeeApp/Home.Ios/mono_crash.115869ea88.0.json
@@ -15,13 +15,13 @@
"suspend" : "hybrid"
},
"memory" : {
- "Resident Size" : "156639232",
- "Virtual Size" : "4818821120",
- "minor_gc_time" : "3344349",
- "major_gc_time" : "1878887",
- "minor_gc_count" : "4",
- "major_gc_count" : "8",
- "major_gc_time_concurrent" : "0"
+ "Resident Size" : "181604352",
+ "Virtual Size" : "4929044480",
+ "minor_gc_time" : "2036527",
+ "major_gc_time" : "156293362",
+ "minor_gc_count" : "13",
+ "major_gc_count" : "873",
+ "major_gc_time_concurrent" : "3505547"
},
"threads" : [
{
@@ -29,72 +29,72 @@
"offset_free_hash" : "0x0",
"offset_rich_hash" : "0x0",
"crashed" : false,
- "native_thread_id" : "0x70000685a000",
- "thread_info_addr" : "0x7fea5c83bc00",
+ "native_thread_id" : "0x700003271000",
+ "thread_info_addr" : "0x7f98c903a000",
"thread_name" : "Finalizer",
"ctx" : {
- "IP" : "0x7fff61571266",
- "SP" : "0x700006859da8",
- "BP" : "0x700006859e50"
+ "IP" : "0x7fff77af4266",
+ "SP" : "0x700003270da8",
+ "BP" : "0x700003270e50"
},
"unmanaged_frames" : [
{
"is_managed" : "false",
- "native_address" : "0x10ff50156",
+ "native_address" : "0x10c9d2156",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f6775",
+ "native_address" : "0x10cb78775",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f64a7",
+ "native_address" : "0x10cb784a7",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x10ffbaf3c",
+ "native_address" : "0x10ca3cf3c",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff61627b5d",
+ "native_address" : "0x7fff77baab5d",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fea5be0c040",
+ "native_address" : "0x30",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f7373",
+ "native_address" : "0x10cb79373",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff616302eb",
+ "native_address" : "0x7fff77bb32eb",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff61633249",
+ "native_address" : "0x7fff77bb6249",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff6162f40d",
+ "native_address" : "0x7fff77bb240d",
"native_offset" : "0x00000"
}
@@ -105,90 +105,90 @@
"offset_free_hash" : "0x0",
"offset_rich_hash" : "0x0",
"crashed" : false,
- "native_thread_id" : "0x11281b5c0",
- "thread_info_addr" : "0x7fea5c801800",
+ "native_thread_id" : "0x110e995c0",
+ "thread_info_addr" : "0x7f98c9006000",
"thread_name" : "tid_307",
"ctx" : {
- "IP" : "0x7fff6157486a",
- "SP" : "0x7ffedfd62c98",
- "BP" : "0x7ffedfd62d20"
+ "IP" : "0x7fff77af786a",
+ "SP" : "0x7ffee32e0c98",
+ "BP" : "0x7ffee32e0d20"
},
"unmanaged_frames" : [
{
"is_managed" : "false",
- "native_address" : "0x10ff50156",
+ "native_address" : "0x10c9d2156",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f6775",
+ "native_address" : "0x10cb78775",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f64a7",
+ "native_address" : "0x10cb784a7",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x10ffbaf3c",
+ "native_address" : "0x10ca3cf3c",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff61627b5d",
+ "native_address" : "0x7fff77baab5d",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x10ff525b6",
+ "native_address" : "0x10c9d45b6",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1101a07c0",
+ "native_address" : "0x10cc227c0",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1101bb2e1",
+ "native_address" : "0x10cc3d2e1",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f3774",
+ "native_address" : "0x10cb75774",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f358a",
+ "native_address" : "0x10cb7558a",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x10ff156c2",
+ "native_address" : "0x10c9976c2",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x10fe9f848",
+ "native_address" : "0x10c921848",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff6143c3d5",
+ "native_address" : "0x7fff779bf3d5",
"native_offset" : "0x00000"
}
@@ -199,13 +199,13 @@
"offset_free_hash" : "0x115869ea88",
"offset_rich_hash" : "0x115869ee42",
"crashed" : true,
- "native_thread_id" : "0x700006fec000",
- "thread_info_addr" : "0x7fea5c45ac00",
+ "native_thread_id" : "0x700003980000",
+ "thread_info_addr" : "0x7f98c94d5600",
"thread_name" : "Thread Pool Worker",
"ctx" : {
- "IP" : "0x7fff615772c6",
- "SP" : "0x700006fea548",
- "BP" : "0x700006fea580"
+ "IP" : "0x7fff77afa2c6",
+ "SP" : "0x70000397e548",
+ "BP" : "0x70000397e580"
},
"managed_frames" : [
{
@@ -486,115 +486,115 @@
"unmanaged_frames" : [
{
"is_managed" : "false",
- "native_address" : "0x10ff50156",
+ "native_address" : "0x10c9d2156",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f6775",
+ "native_address" : "0x10cb78775",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f6dfa",
+ "native_address" : "0x10cb78dfa",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x10ffbbf46",
+ "native_address" : "0x10ca3df46",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x10ff54c65",
+ "native_address" : "0x10c9d6c65",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x10ffbb2db",
+ "native_address" : "0x10ca3d2db",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff61627b5d",
+ "native_address" : "0x7fff77baab5d",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x110221439",
+ "native_address" : "0x10cca3439",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff614e16a6",
+ "native_address" : "0x7fff77a646a6",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1101c5cb7",
+ "native_address" : "0x10cc47cb7",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1101a6b2f",
+ "native_address" : "0x10cc28b2f",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1101c603e",
+ "native_address" : "0x10cc4803e",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1101c61bf",
+ "native_address" : "0x10cc481bf",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x110060e76",
+ "native_address" : "0x10cae2e76",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x110061478",
+ "native_address" : "0x10cae3478",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1101b419f",
+ "native_address" : "0x10cc3619f",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1101b44b0",
+ "native_address" : "0x10cc364b0",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100637ab",
+ "native_address" : "0x10cae57ab",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x110086675",
+ "native_address" : "0x10cb08675",
"native_offset" : "0x00000"
}
,
@@ -644,25 +644,25 @@
,
{
"is_managed" : "false",
- "native_address" : "0x10feb062d",
+ "native_address" : "0x10c93262d",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100cffa4",
+ "native_address" : "0x10cb51fa4",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100d43a6",
+ "native_address" : "0x10cb563a6",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x11006b6f4",
+ "native_address" : "0x10caed6f4",
"native_offset" : "0x00000"
}
,
@@ -723,49 +723,49 @@
,
{
"is_managed" : "false",
- "native_address" : "0x10feb062d",
+ "native_address" : "0x10c93262d",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100cffa4",
+ "native_address" : "0x10cb51fa4",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f9ec0",
+ "native_address" : "0x10cb7bec0",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x11002c28c",
+ "native_address" : "0x10caae28c",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x1100f7373",
+ "native_address" : "0x10cb79373",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff616302eb",
+ "native_address" : "0x7fff77bb32eb",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff61633249",
+ "native_address" : "0x7fff77bb6249",
"native_offset" : "0x00000"
}
,
{
"is_managed" : "false",
- "native_address" : "0x7fff6162f40d",
+ "native_address" : "0x7fff77bb240d",
"native_offset" : "0x00000"
}
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
index 814ad33..6acd388 100755
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -42,7 +42,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string CodeIDString = "1.1.0120070901";
+ public static string CodeIDString = "1.1.0120071301";
/// <summary>
/// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee)
/// </summary>
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index 9ba510c..1435f45 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -434,7 +434,7 @@
if (Common.Config.Instance.Home.IsVirtually == true)
{
//淇敼璁惧鍚嶅瓧鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- Phone.UserView.UserPage.Instance.RefreshForm = true;
+ Phone.UserView.UserPage.Instance.RefreshAllForm = true;
return true;
}
@@ -458,7 +458,7 @@
}
}
//淇敼璁惧鍚嶅瓧鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- Phone.UserView.UserPage.Instance.RefreshForm = true;
+ Phone.UserView.UserPage.Instance.RefreshAllForm = true;
return true;
}
@@ -719,7 +719,7 @@
public void DeleteMemmoryDevice(CommonDevice device, bool deleteRoom = true)
{
//鍒犻櫎缂撳瓨璁惧鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- Phone.UserView.UserPage.Instance.RefreshForm = true;
+ Phone.UserView.UserPage.Instance.RefreshAllForm = true;
if (deleteRoom == true)
{
@@ -796,6 +796,35 @@
#endregion
+ #region 鈻� 鍚屾璁惧___________________________
+ /// <summary>
+ /// 鍚屾璁惧骞朵笖鍒锋柊缂撳瓨(鍚屾澶辫触鏃讹紝浼氭樉绀轰俊鎭�)
+ /// </summary>
+ /// <param name="litdevice">璁惧瀵硅薄(MAC鍦板潃蹇呴』瑕佺浉鍚�)</param>
+ public async Task<bool> SynchronizationDevice(List<CommonDevice> listdevice)
+ {
+ //铏氭嫙浣忓畢鐨勮瘽,涓嶉渶瑕佸垹闄ょ綉鍏崇殑璁惧
+ if (Config.Instance.Home.IsVirtually == false)
+ {
+ //鍚屾
+ var result = await listdevice[0].SyncMsgToBindSource(listdevice[0].DeviceAddr, listdevice[0].DeviceEpoint);
+ if (result == null || result.result != 0)
+ {
+ //鍚屾鍒犻櫎澶辫触
+ string msg = Language.StringByID(R.MyInternationalizationString.SynchronizationFailed);
+ //鎷兼帴涓娿�愮綉鍏冲洖澶嶈秴鏃躲�戠殑Msg
+ msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result);
+
+ this.ShowErrorMsg(msg);
+ return false;
+ }
+ }
+ return true;
+ }
+ #endregion
+
+
+
#region 鈻� 娴嬭瘯璁惧___________________________
/// <summary>
@@ -831,6 +860,11 @@
//浼犳劅鍣ㄩ櫎浜哖ir閮芥病鏈夊畾浣嶅姛鑳�
return true;
}
+ else if (myTypeInfo.ConcreteType == DeviceConcreteType.Sensor_SphericalMotion)
+ {
+ //鐞冨瀷绉诲姩浼犳劅鍣ㄨ櫧鐒舵槸鐢垫睜璁惧,浣嗘槸瀹冩湁瀹氫綅鍔熻兘
+ return true;
+ }
return false;
}
@@ -841,6 +875,22 @@
{
return true;
}
+ }
+ return false;
+ }
+
+ /// <summary>
+ /// 妫�娴嬭澶囨槸鍚︽嫢鏈変竴閿悓姝ュ姛鑳�
+ /// </summary>
+ /// <param name="device"></param>
+ /// <returns></returns>
+ public bool DeviceIsCanSynchronization(CommonDevice device)
+ {
+ //鑾峰彇璁惧绫诲瀷鐨�
+ var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+ if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
+ {
+ return true;
}
return false;
}
@@ -1044,8 +1094,9 @@
if (sort == false)
{
return list;
- }
- list.Sort((obj1, obj2) => {
+ }
+ list.Sort((obj1, obj2) =>
+ {
if (obj1.DeviceEpoint > obj2.DeviceEpoint)
{
@@ -1110,7 +1161,7 @@
public List<string> GetAllDeviceFile()
{
List<string> listDeviceFile = new List<string>();
- List<string> listAllFile = Global.FileListByHomeId();
+ List<string> listAllFile = HdlFileLogic.Current.GetRootPathListFile();
foreach (string file in listAllFile)
{
@@ -2461,15 +2512,6 @@
return false;
}
}
- //濡傛灉鏄柊椋庨潰鏉跨殑鏂伴璁惧,鍒欎笉鏄剧ず
- else if (i_device.Type == DeviceType.FreshAir)
- {
- var myInfoType = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { i_device });
- if (myInfoType.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
- {
- return false;
- }
- }
//2020.03.30杩藉姞寮忔牱:濡傛灉鏄潰鏉跨殑娓╁害鎺㈠ご,涓嶆樉绀�
else if (i_device.Type == DeviceType.TemperatureSensor && ((TemperatureSensor)i_device).SensorDiv == 1)
{
@@ -2484,6 +2526,20 @@
//鏂伴鐨勬箍搴︿紶鎰熷櫒涓嶆樉绀�
return false;
}
+
+ //濡傛灉鏄柊椋庨潰鏉挎垨鐜闈㈡澘,鍒欓兘涓嶆樉绀轰换浣曞洖璺�
+ var myInfoTypeTemp = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { i_device });
+ if (myInfoTypeTemp.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir || myInfoTypeTemp.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
+ {
+ return false;
+ }
+ else if (myInfoTypeTemp.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
+ {
+ if (i_device.Type != DeviceType.OnOffOutput)
+ {
+ return false;
+ }
+ }
return true;
}
diff --git a/ZigbeeApp/Shared/Common/House.cs b/ZigbeeApp/Shared/Common/House.cs
index dc7e878..e726972 100755
--- a/ZigbeeApp/Shared/Common/House.cs
+++ b/ZigbeeApp/Shared/Common/House.cs
@@ -65,10 +65,6 @@
/// value:FloorName
/// </summary>
public Dictionary<string,string> FloorDics = new Dictionary<string,string> { };
- /// <summary>
- /// 褰撳墠妤煎眰Id
- /// </summary>
- public string CurrentFloorId = string.Empty;
#endregion
@@ -82,26 +78,15 @@
public string GetCurrentFloorName
{
get
- {
+ {
return HdlResidenceLogic.Current.GetFloorNameById(CurrentFloorId);
}
- }
-
- /// <summary>
- /// 璁剧疆褰撳墠妤煎眰鐨処D
+ }
+ /// <summary>
+ /// 褰撳墠妤煎眰ID
/// </summary>
- public void SetCurrentFloorId()
- {
- if (Config.Instance.Home.FloorDics.Count > 0 && string.IsNullOrEmpty(CurrentFloorId))
- {
- foreach (var floor in Config.Instance.Home.FloorDics)
- {
- CurrentFloorId = floor.Key;
- Save(false);
- return;
- }
- }
- }
+ [Newtonsoft.Json.JsonIgnore]
+ public string CurrentFloorId = string.Empty;
#endregion
diff --git a/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll
new file mode 100755
index 0000000..270a453
--- /dev/null
+++ b/ZigbeeApp/Shared/DLL/IOS/Shared.IOS.ESVideoPhoneSDK.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
index a51a0e1..9655afe 100755
--- a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
@@ -823,7 +823,7 @@
this.editorScene.Save();
//鏂板缓鍦烘櫙,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
HdlThreadLogic.Current.RunMain(() =>
{
@@ -902,7 +902,7 @@
this.editorScene.Save();
//缂栬緫鍦烘櫙,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
HdlThreadLogic.Current.RunMain(() =>
{
diff --git a/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs b/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs
index 9e3167a..540e15e 100755
--- a/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddDeviceForm.cs
@@ -42,6 +42,10 @@
/// 璁惧鍒楄〃鎺т欢
/// </summary>
private VerticalListControl listDeviceView = null;
+ /// <summary>
+ /// 褰撳墠閫夋嫨鐨勬ゼ灞�
+ /// </summary>
+ private string nowSelectFloorId = string.Empty;
#endregion
@@ -57,6 +61,8 @@
//璁剧疆澶撮儴淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.AddFunction));
+ //鍒濆鍖栧彸涓婅鐨勬帶浠�
+ this.InitTopRightMenuControl();
//鍒濆鍖栦腑閮ㄤ俊鎭�
this.InitMiddleFrame();
}
@@ -66,8 +72,58 @@
/// </summary>
private void InitMiddleFrame()
{
+ //娓呯┖body
+ this.ClearBodyFrame();
//鍒濆鍖栨埧闂磋彍鍗曟帶浠�
this.InitRoomMenuControl();
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栧彸涓婅鐨勬帶浠�
+ /// </summary>
+ private void InitTopRightMenuControl()
+ {
+ //鑾峰彇妤煎眰
+ var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
+ if (dicFloor.Count == 0)
+ {
+ return;
+ }
+ var btnIconContr = new MostRightIconControl(69, 69);
+ btnIconContr.UnSelectedImagePath = "Item/Drop_Down.png";
+ topFrameLayout.AddChidren(btnIconContr);
+ btnIconContr.InitControl();
+
+ var btnFloor = new NormalViewControl(300, 69, true);
+ btnFloor.Gravity = Gravity.CenterVertical;
+ btnFloor.X = btnIconContr.X + btnIconContr.btnIcon.X - Application.GetRealWidth(300);
+ btnFloor.TextAlignment = TextAlignment.CenterRight;
+ topFrameLayout.AddChidren(btnFloor);
+
+ foreach (var floorId in dicFloor.Keys)
+ {
+ //绗竴涓ゼ灞�
+ this.nowSelectFloorId = floorId;
+ btnFloor.Text = dicFloor[floorId];
+ break;
+ }
+
+ btnIconContr.ButtonClickEvent += (sender, e) =>
+ {
+ //妤煎眰鑿滃崟
+ var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, this.nowSelectFloorId, Language.StringByID(R.MyInternationalizationString.SelectFloor));
+ foreach (var floorId in dicFloor.Keys)
+ {
+ contr.AddRowMenu(floorId, () =>
+ {
+ //璁板綍璧烽�夋嫨鐨処D
+ this.nowSelectFloorId = floorId;
+ btnFloor.Text = dicFloor[this.nowSelectFloorId];
+ //鍒濆鍖栦腑閮ㄤ俊鎭�
+ this.InitMiddleFrame();
+ });
+ }
+ };
}
#endregion
@@ -98,7 +154,10 @@
roomSwitchContr.SelectRoomEvent += (selectRoom) =>
{
//鍦ㄥ闈㈡竻绌�(鐗规晥鐨勯棶棰�)
- this.deviceFunctionMenuContr?.RemoveAll();
+ if (this.deviceFunctionMenuContr != null && this.deviceFunctionMenuContr.Parent != null)
+ {
+ this.deviceFunctionMenuContr.RemoveAll();
+ }
this.listDeviceView?.RemoveAll();
HdlThreadLogic.Current.RunMainInThread(() =>
@@ -116,7 +175,10 @@
this.btnFinishControl = new BottomClickButton();
btnFinishControl.TextID = R.MyInternationalizationString.uFinish;
bodyFrameLayout.AddChidren(btnFinishControl);
- btnFinishControl.Visible = false;
+ if (this.dicNewListTask == null || this.dicNewListTask.Count == 0)
+ {
+ btnFinishControl.Visible = false;
+ }
btnFinishControl.ButtonClickEvent += (sender, e) =>
{
//鍥炶皟鍑芥暟
@@ -136,20 +198,24 @@
/// <returns></returns>
private List<Room> GetCanShowRoomList()
{
- //鍏堝皢鍒楄〃Dictionary鍖�
- this.dicNewListTask = new Dictionary<string, List<Safeguard.TaskListInfo>>();
- this.dicOldListTask = new Dictionary<string, List<Safeguard.TaskListInfo>>();
- foreach (var data in this.listAdjustTarget)
+ if (this.dicNewListTask == null)
{
- if (data.Type == 0)
+ //鍏堝皢鍒楄〃Dictionary鍖�
+ this.dicNewListTask = new Dictionary<string, List<Safeguard.TaskListInfo>>();
+ this.dicOldListTask = new Dictionary<string, List<Safeguard.TaskListInfo>>();
+ foreach (var data in this.listAdjustTarget)
{
- //鍙璁惧
- string mainkey = LocalDevice.Current.GetDeviceMainKeys(data.DeviceAddr, data.Epoint);
- dicOldListTask[mainkey] = data.TaskList;
+ if (data.Type == 0)
+ {
+ //鍙璁惧
+ string mainkey = LocalDevice.Current.GetDeviceMainKeys(data.DeviceAddr, data.Epoint);
+ dicOldListTask[mainkey] = data.TaskList;
+ }
}
}
+
//褰撳墠妤煎眰鐨勫叏閮ㄦ埧闂�
- var lisrRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
+ var lisrRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(this.nowSelectFloorId);
var listShowRoom = new List<Room>();
foreach (var room in lisrRoom)
{
@@ -181,7 +247,7 @@
var dicGroupDevice = this.GetAllGroupDevice(room);
//鍙垵濮嬪寲涓�娆�
- if (this.deviceFunctionMenuContr == null)
+ if (this.deviceFunctionMenuContr == null || this.deviceFunctionMenuContr.Parent == null)
{
//璁惧鑿滃崟鐨勭櫧鑹茶儗鏅�
var functionBack1 = new FrameLayout();
@@ -256,7 +322,7 @@
HdlThreadLogic.Current.RunMainInThread(() =>
{
//鍒濆鍖栬澶囧垪琛ㄦ帶浠�
- this.InitListDeviceControls(listDeviceView, rowInfo, room);
+ this.InitListDeviceControls(listDeviceView, rowInfo);
});
}
};
@@ -273,7 +339,7 @@
if (nowSelectDeviceInfo != null)
{
//鍒濆鍖栭粯璁ょ殑璁惧鍒楄〃鎺т欢
- this.InitListDeviceControls(listDeviceView, nowSelectDeviceInfo, room);
+ this.InitListDeviceControls(listDeviceView, nowSelectDeviceInfo);
}
}
@@ -286,7 +352,7 @@
/// </summary>
/// <param name="listView"></param>
/// <param name="rowInfo"></param>
- private void InitListDeviceControls(VerticalListControl listView, DeviceRowInfo rowInfo, Room i_room)
+ private void InitListDeviceControls(VerticalListControl listView, DeviceRowInfo rowInfo)
{
//鍏堟竻绌�
listView.RemoveAll();
diff --git a/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddSceneForm.cs
index 3aef76a..211ea4e 100755
--- a/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddSceneForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AdjustTargetAddSceneForm.cs
@@ -38,6 +38,10 @@
/// 鍦烘櫙鍒楄〃鎺т欢
/// </summary>
private VerticalListControl listSceneView = null;
+ /// <summary>
+ /// 褰撳墠閫夋嫨鐨勬ゼ灞�
+ /// </summary>
+ private string nowSelectFloorId = string.Empty;
#endregion
@@ -53,6 +57,9 @@
//璁剧疆澶撮儴淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.AddScence));
+
+ //鍒濆鍖栧彸涓婅鐨勬帶浠�
+ this.InitTopRightMenuControl();
//鍒濆鍖栦腑閮ㄤ俊鎭�
this.InitMiddleFrame();
}
@@ -62,6 +69,9 @@
/// </summary>
private void InitMiddleFrame()
{
+ //娓呯┖body
+ this.ClearBodyFrame();
+
//鑾峰彇鑳藉鏄剧ず鐨勬埧闂村垪琛�
var listRoom = this.GetCanShowRoomList();
if (listRoom.Count == 0)
@@ -96,7 +106,10 @@
this.btnFinishControl = new BottomClickButton();
btnFinishControl.TextID = R.MyInternationalizationString.uFinish;
bodyFrameLayout.AddChidren(btnFinishControl);
- btnFinishControl.Visible = false;
+ if (this.listNewScene == null || this.listNewScene.Count == 0)
+ {
+ btnFinishControl.Visible = false;
+ }
btnFinishControl.ButtonClickEvent += (sender, e) =>
{
//鍥炶皟鍑芥暟
@@ -106,6 +119,54 @@
//鎵ц鍒濆鍖�(浼氳嚜鍔ㄨЕ鍙慡electRoomEvent浜嬩欢)
roomSwitchContr.InitControl();
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栧彸涓婅鐨勬帶浠�
+ /// </summary>
+ private void InitTopRightMenuControl()
+ {
+ //鑾峰彇妤煎眰
+ var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
+ if (dicFloor.Count == 0)
+ {
+ return;
+ }
+ var btnIconContr = new MostRightIconControl(69, 69);
+ btnIconContr.UnSelectedImagePath = "Item/Drop_Down.png";
+ topFrameLayout.AddChidren(btnIconContr);
+ btnIconContr.InitControl();
+
+ var btnFloor = new NormalViewControl(300, 69, true);
+ btnFloor.Gravity = Gravity.CenterVertical;
+ btnFloor.X = btnIconContr.X + btnIconContr.btnIcon.X - Application.GetRealWidth(300);
+ btnFloor.TextAlignment = TextAlignment.CenterRight;
+ topFrameLayout.AddChidren(btnFloor);
+
+ foreach (var floorId in dicFloor.Keys)
+ {
+ //绗竴涓ゼ灞�
+ this.nowSelectFloorId = floorId;
+ btnFloor.Text = dicFloor[floorId];
+ break;
+ }
+
+ btnIconContr.ButtonClickEvent += (sender, e) =>
+ {
+ //妤煎眰鑿滃崟
+ var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, this.nowSelectFloorId, Language.StringByID(R.MyInternationalizationString.SelectFloor));
+ foreach (var floorId in dicFloor.Keys)
+ {
+ contr.AddRowMenu(floorId, () =>
+ {
+ //璁板綍璧烽�夋嫨鐨処D
+ this.nowSelectFloorId = floorId;
+ btnFloor.Text = dicFloor[this.nowSelectFloorId];
+ //鍒濆鍖栦腑閮ㄤ俊鎭�
+ this.InitMiddleFrame();
+ });
+ }
+ };
}
#endregion
@@ -209,19 +270,23 @@
/// <returns></returns>
private List<Room> GetCanShowRoomList()
{
- //鍏堝垪琛ㄥ寲
- this.listOldSceneId = new List<int>();
- this.listNewScene = new List<int>();
- foreach (var data in this.listAdjustTarget)
+ if (this.listNewScene == null)
{
- if (data.Type == 1)
+ //鍏堝垪琛ㄥ寲
+ this.listOldSceneId = new List<int>();
+ this.listNewScene = new List<int>();
+ foreach (var data in this.listAdjustTarget)
{
- //鍙鍦烘櫙
- listOldSceneId.Add(data.ElseScenesId);
+ if (data.Type == 1)
+ {
+ //鍙鍦烘櫙
+ listOldSceneId.Add(data.ElseScenesId);
+ }
}
}
+
//褰撳墠妤煎眰鐨勫叏閮ㄦ埧闂�
- var lisrRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
+ var lisrRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(this.nowSelectFloorId);
var listShowRoom = new List<Room>();
foreach (var room in lisrRoom)
{
diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index 78a495d..7451d5d 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -152,18 +152,21 @@
btnFloorName.Y = Application.GetRealHeight(17);
btnFloorName.TextAlignment = TextAlignment.CenterRight;
btnFloorName.IsBold = true;
- btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(Config.Instance.Home.CurrentFloorId);
+ btnFloorName.Text = Common.Config.Instance.Home.GetCurrentFloorName;
frameSwitchBack.AddChidren(btnFloorName);
btnFloorName.ButtonClickEvent += (sender, e) =>
{
var floors = new SelectFloorForm();
+ floors.CurFloorId = Config.Instance.Home.CurrentFloorId;
AddChidren(floors);
floors.Init(580, 330, Direction.Right);
- floors.changeFloor = true;
floors.FloorAction += (floorId) =>
{
btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(floorId);
+ Config.Instance.Home.CurrentFloorId = floorId;
HdlRoomLogic.Current.NowCategoryRoom = HdlRoomLogic.Current.GetLoveRoom();
+ //杩欎釜鏃跺�欓渶瑕佸埛鏂颁富椤�
+ UserPage.Instance.RefreshMainPageForm = true;
//鍒锋柊bodyView
this.RefreshBodyView();
};
@@ -277,7 +280,7 @@
private void InitRoomMenuControl()
{
//褰撳墠妤煎眰鐨勫叏閮ㄦ埧闂�
- var lisrRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
+ var lisrRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
if (HdlRoomLogic.Current.NowCategoryRoom == null)
{
//璁剧疆绗竴涓负鍒濆鎴块棿
@@ -633,12 +636,13 @@
HdlThreadLogic.Current.RunMain(() =>
{
listview1.EndHeaderRefreshing();
- if (result == true)
+ //listview1.Parent涓簄ull浠h〃瀹冨垏鎹㈡埧闂翠簡
+ if (result == true && listview1.Parent != null)
{
- //鍦ㄥ闈㈡竻绌�(鐗规晥鐨勯棶棰�)
- this.functionSceneBodyView.RemoveAll();
//鍒锋柊鍦烘櫙鐨勬椂鍊�,鍏抽棴宸﹀垝鑿滃崟鐨勬湭鍒嗛厤鐣岄潰
MainPage.LeftListRoomViewFrom.Instance?.CloseUnallocatedRoomForm();
+ //鍦ㄥ闈㈡竻绌�(鐗规晥鐨勯棶棰�)
+ this.functionSceneBodyView.RemoveAll();
HdlThreadLogic.Current.RunMainInThread(() =>
{
@@ -820,7 +824,11 @@
//宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 2020.05.09:鍒犻櫎Ack涓婚
this.dicDeviceRowControl[mainKeys].SetHadGetResponeResultStatu();
//鍒锋柊鎺т欢
- this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
+ if (locadevice.Type != DeviceType.IASZone)
+ {
+ //浼犳劅鍣ㄤ笉闇�瑕佸睘鎬т笂鎶�(浣嗘槸閭d釜鐞冨瀷浼犳劅鍣ㄥ眳鐒朵細灞炴�т笂鎶�)
+ this.dicDeviceRowControl[mainKeys].RefreshControlInfo(locadevice);
+ }
}
}, ShowErrorMode.NO);
});
diff --git a/ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs b/ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs
index e07f70b..f72f1cb 100755
--- a/ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/SelectFloorForm.cs
@@ -9,10 +9,6 @@
public Action<string> FloorAction;
/// <summary>
- /// 鏄惁鍒囨崲涓哄綋鍓嶆ゼ灞�
- /// </summary>
- public bool changeFloor = true;
- /// <summary>
/// 褰撳墠浼犺繃鏉ョ殑floorid
/// </summary>
public string CurFloorId = string.Empty;
@@ -127,32 +123,11 @@
frow.Width = this.GetPictrueRealSize(449);
frow.Height = this.GetPictrueRealSize(150);
frow.Init("Floor/Floor.png", "Floor/FloorSelected.png", floorName);
- verticalScrolView.AddChidren(frow);
-
- if (string.IsNullOrEmpty(CurFloorId))
- {
- if (Config.Instance.Home.CurrentFloorId == floorId)
- {
- frow.IsSelected = true;
- }
- }
- else
- {
- if (CurFloorId == floorId)
- {
- frow.IsSelected = true;
- }
- }
+ verticalScrolView.AddChidren(frow);
+ frow.IsSelected = floorId == this.CurFloorId;
frow.ButtonClickEvent += (sender, e) =>
{
- frow.IsSelected = true;
- if (changeFloor)
- {
- Config.Instance.Home.CurrentFloorId = floorId;
- Config.Instance.Home.Save(false);
- UserCenter.HdlRoomLogic.Current.RefreshRoomListView();
- }
RemoveView();
FloorAction?.Invoke(floorId);
};
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
index 045ed5d..6c053c7 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneCategoryView.cs
@@ -70,7 +70,9 @@
//鍦烘櫙鐐瑰嚮
sceneContr.ButtonClickEvent += (sender, e) =>
{
- this.SceneUpHandler();
+ //涓嶈兘鍙嶅鐐瑰嚮
+ sceneContr.CanClick = false;
+ this.SceneUpHandler(sceneContr);
};
//鏀惰棌
@@ -243,8 +245,13 @@
{
//闅愯棌鍙冲垝鑿滃崟
this.HideMenu();
- scene.SceneDelayTime = t;
- btnDelayTime.Text = CommonFormResouce.GetTimeString(t);
+ if (t != 0)
+ {
+ scene.SceneDelayTime = t;
+ btnDelayTime.Text = CommonFormResouce.GetTimeString(t);
+ //缂栬緫寤舵椂鏃�,闇�瑕佸埛鏂颁富椤�
+ UserView.UserPage.Instance.RefreshAllForm = true;
+ }
};
};
}
@@ -254,9 +261,8 @@
/// <summary>
///
/// </summary>
- /// <param name="btnScenePic"></param>
- /// <param name="btnSceneName"></param>
- private async void SceneUpHandler()
+ /// <param name="sceneContr"></param>
+ private async void SceneUpHandler(ScenePictrueControl sceneContr)
{
if (scene.SceneDelayTime <= 0 && scene.RemainTime <= 0)
{
@@ -267,6 +273,7 @@
var result = await HdlSceneLogic.Current.ControlScene(scene);
if (result == false)
{
+ sceneContr.CanClick = true;
return;
}
@@ -274,8 +281,12 @@
scene.SceneDelayTime = 0;
if (scene.RemainTime <= 0)
{
+ sceneContr.CanClick = true;
return;
}
+ //璋冪敤鏈夊欢鏃剁殑鍦烘櫙,闇�瑕佸埛鏂颁富椤�
+ UserView.UserPage.Instance.RefreshAllForm = true;
+
int myRemainTime = scene.RemainTime;
//寮�鍚唴閮ㄥ欢鏃舵椂闂寸嚎绋�(鏃ㄥ湪鍏ㄩ儴鍦版柟鐨勫悓涓�鍦烘櫙鏃堕棿鍚屾)
HdlSceneLogic.Current.StartDelayTimeThread(scene);
@@ -298,6 +309,7 @@
SetTimeImage();
//鐩存帴寮�鍚疞oading鐗规晥
this.StartLoadingApreal();
+ sceneContr.CanClick = true;
}
});
})
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
index ad7886d..26c0e85 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -1236,12 +1236,16 @@
/// <param name="method">璇锋眰鏂瑰紡涓篜OST/GET</param>
/// <param name="second">瓒呮椂鏃堕棿</param>
/// <returns></returns>
- public static async System.Threading.Tasks.Task<string> HttpWebRequest(string getUrl, string str, string method, int second = 3)
+ public static async System.Threading.Tasks.Task<string> HttpWebRequest(string getUrl, string str, string method, int second = 3, bool _bool = false)
{
HttpWebRequest request = WebRequest.Create(getUrl) as HttpWebRequest; //鍒涘缓璇锋眰
request.Method = method; //璇锋眰鏂瑰紡涓篜OST/GET
- request.ContentType = "application/json";
+ request.ContentType = "application/json";
request.Timeout = second * 1000;//瓒呮椂鏃堕棿
+ if (_bool) {
+ //鐢ㄤ簬楂樿儨鍙瀵硅鎺ュ彛
+ request.Headers.Add("Authorization", Config.Instance.Token);
+ }
if (method == "POST")
{
byte[] jsonbyte = System.Text.Encoding.UTF8.GetBytes(str);
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
index 793d7c0..0f5a797 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -64,8 +64,7 @@
}
#region 鈼� 鑷姩鍖朹_________________________
-
- static bool If_once = true;
+ public static bool If_once = true;//杩涙潵鍙涓�娆℃爣璇�;
/// <summary>
/// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙�
/// </summary>
@@ -276,9 +275,9 @@
{
if (If_once)
{
- If_once = false;
if (Common.Logic.LogicList.Count == 0)
{
+ If_once = false;
var Idlist1 = await Send.GetLogicId(0);//
var Idlist2 = await Send.GetLogicId(2);//闂ㄩ攣甯稿紑妯″紡
if (Idlist1.Count != 0)
diff --git a/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs b/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs
new file mode 100755
index 0000000..070ceac
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/VideoIntercom/VideoMachine.cs
@@ -0,0 +1,275 @@
+锘縰sing System;
+using Newtonsoft.Json.Linq;
+using Shared.Common;
+using System.Collections.Generic;
+using Shared.Phone.Device.Logic;
+
+namespace Shared.Phone.Device.VideoIntercom
+{
+ public class VideoMachine : FrameLayout
+ {
+ public VideoMachine()
+ {
+ }
+ public void Show(List<VideoCalss> videoInfosLists)
+ {
+ TopView view = new TopView();
+ this.AddChidren(view.TopRowView());
+ view.toptitleNameBtn.TextID = R.MyInternationalizationString.videoIntercom;
+ view.clickBtn.MouseDownEventHandler += (sender, e) => { RemoveFromParent(); };
+
+ var middle = new VerticalRefreshLayout
+ {
+ Y = view.topRowLayout.Bottom,
+ Height = Application.GetRealHeight(Method.H - 184),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(middle);
+
+ for (int i = 0; i < videoInfosLists.Count; i++)
+ {
+ var videoInfos = videoInfosLists[i];
+ var fLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(fLayout);
+ var iconBtn = new Button
+ {
+ Width = Application.GetMinRealAverage(81),
+ Height = Application.GetMinRealAverage(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "Item/videoIntercom.png",
+ };
+ fLayout.AddChidren(iconBtn);
+ var nameBtn = new Button
+ {
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextSize = 15,
+ Y = Application.GetRealHeight(30),
+ X = Application.GetRealWidth(176),
+ Height = Application.GetRealHeight(60),
+ Width = Application.GetRealWidth(400),
+ Text = videoInfos.DeviceName,
+ };
+ fLayout.AddChidren(nameBtn);
+
+ var name1Btn = new Button
+ {
+ Text = videoInfos.RoomName,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ TextSize = 12,
+ Y = nameBtn.Bottom + Application.GetRealHeight(3),
+ X = Application.GetRealWidth(176),
+ Height = Application.GetRealHeight(60),
+ Width = Application.GetRealWidth(400),
+ };
+ fLayout.AddChidren(name1Btn);
+
+ var nextBtn = new Button
+ {
+ Width = Application.GetMinRealAverage(104),
+ Height = Application.GetMinRealAverage(104),
+ UnSelectedImagePath = "Item/videoIntercomNext.png",
+ X = Application.GetRealWidth(743 + 176),
+ Y = Application.GetRealHeight(30),
+ };
+ fLayout.AddChidren(nextBtn);
+
+ var lineBtn = new Button
+ {
+ Width = Application.GetRealWidth(845),
+ Height = 1,
+ Y = fLayout.Height - 1,
+ X = Application.GetRealWidth(176),
+ BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ fLayout.AddChidren(lineBtn);
+ var clickBtn = new Button
+ {
+ Height = Application.GetRealHeight(160),
+ };
+ fLayout.AddChidren(clickBtn);
+
+ clickBtn.MouseUpEventHandler += (sen, e) =>
+ {
+#if iOS
+ GateWay.Ios.ESVideoInfo eSVideoInfo = new GateWay.Ios.ESVideoInfo();
+ eSVideoInfo.DeviceName = videoInfos.DeviceName;
+ eSVideoInfo.ESVideoUUID = videoInfos.ESVideoUUID;
+ eSVideoInfo.ESRoomID = videoInfos.ESRoomID;
+ eSVideoInfo.RoomName = videoInfos.RoomName;
+ GateWay.Ios.ESVideo.ShowESVideoMonitor(eSVideoInfo);
+#elif Android
+
+#endif
+ };
+
+ }
+
+ }
+ /// <summary>
+ /// 鍒ゆ柇璐﹀彿鏄惁鏀寔鍙瀵硅
+ /// </summary>
+ /// <param name="topFrameLayout"></param>
+ public async static void AccountSupportVideo(FrameLayout topFrameLayout)
+ {
+ var jobject = new JObject();
+ jobject.Add("RequestVersion", CommonPage.RequestVersion);
+ jobject.Add("RequestSource", "0");
+ jobject.Add("HomeID", Config.Instance.HomeId);
+ var url = "https://developer.hdlcontrol.com/ProposedProductionApi/VideoIntercom/CheckBindRecord";
+ var str = await Send.HttpWebRequest(url, jobject.ToString(), "POST", 3, true);
+ if (!string.IsNullOrEmpty(str))
+ {
+ try
+ {
+ var json = JObject.Parse(str);
+ if (json != null)
+ {
+ var stateCode = json["StateCode"].ToString();
+ //鍙瀵硅蹇嵎鏂瑰紡
+ var videoIntercomBtn = new Button();
+ videoIntercomBtn.Gravity = Gravity.CenterVertical;
+ videoIntercomBtn.UnSelectedImagePath = "Item/videoIntercom.png";
+ videoIntercomBtn.Width = Application.GetMinRealAverage(69);
+ videoIntercomBtn.Height = Application.GetMinRealAverage(69);
+ List<VideoCalss> videoList= new List<VideoCalss>();
+ if (stateCode == "Success")
+ {//鍒ゆ柇杩欎釜璐﹀彿鏄惁缁戝畾;
+ topFrameLayout.AddChidren(videoIntercomBtn);
+ CloudsVideo cloudsVideo = Newtonsoft.Json.JsonConvert.DeserializeObject<CloudsVideo>(json["ResponseData"].ToString());
+ videoList = await GetVideoInfoList(cloudsVideo);
+ }
+ if (UserCenter.UserCenterResourse.ResidenceOption.SafetyShortcut)
+ {
+ videoIntercomBtn.X = Application.GetRealWidth(746 + 10);
+ }
+ else
+ {
+ videoIntercomBtn.X = Application.GetRealWidth(850 + 10);
+ }
+ videoIntercomBtn.MouseUpEventHandler += (sender, e) =>
+ {
+
+ var videoMachine = new Device.VideoIntercom.VideoMachine();
+ UserView.HomePage.Instance.AddChidren(videoMachine);
+ UserView.HomePage.Instance.PageIndex += 1;
+ videoMachine.Show(videoList);
+
+ };
+ }
+ }
+ catch { }
+ }
+
+
+
+ }
+ /// <summary>
+ /// 鑾峰彇鍙瀵硅鍒楄〃
+ /// </summary>
+ static async System.Threading.Tasks.Task<List<VideoCalss>> GetVideoInfoList(CloudsVideo clouds)
+ {
+ List<VideoCalss> eSVideoInfosList = new List<VideoCalss>();
+ var jobject = new JObject();
+ jobject.Add("cmtID", clouds.FLCommunityID);
+ jobject.Add("unitno", clouds.FLBuildingID);
+ jobject.Add("method", "getUUIDList");
+ var url = " http://112.74.164.111:180/api.php/Device/getmonitorUUID";
+ var str = await Send.HttpWebRequest(url, jobject.ToString(), "POST");
+ if (string.IsNullOrEmpty(str))
+ {
+ return eSVideoInfosList;
+ }
+ var json = JObject.Parse(str);
+ if (json == null)
+ {
+ return eSVideoInfosList;
+ }
+ if (json["resCode"].ToString() != "0")
+ {
+ return eSVideoInfosList;
+ }
+ var list = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(json["list"].ToString());
+ if (list.Count == 0)
+ {
+ return eSVideoInfosList;
+ }
+ foreach (var videoInfo in list)
+ {
+ VideoCalss eSVideoInfo = new VideoCalss();
+ eSVideoInfo.ESRoomID = int.Parse(clouds.FLRoomID);
+ string str1 = clouds.FLBuildingID.Substring(0, 2).TrimStart('0');
+ string str2 = clouds.FLBuildingID.Substring(2, 2).TrimStart('0');
+ eSVideoInfo.RoomName = str1 +Language.StringByID( R.MyInternationalizationString.dong) + str2 + Language.StringByID(R.MyInternationalizationString.unit);
+ eSVideoInfo.DeviceName = videoInfo["aliasName"];
+ if (videoInfo["uuid"].Contains(","))
+ {
+ var uuid = videoInfo["uuid"].Split(',');
+ eSVideoInfo.ESVideoUUID = uuid[0];
+ }
+ else
+ {
+ eSVideoInfo.ESVideoUUID = videoInfo["uuid"];
+ }
+ eSVideoInfosList.Add(eSVideoInfo);
+ }
+ return eSVideoInfosList;
+ }
+ }
+ public class VideoCalss
+ {
+ /// <summary>
+ /// 瀹ゅ鏈虹殑UUID
+ /// 渚嬶細JJY000007FSEYX
+ /// </summary>
+ public string ESVideoUUID = string.Empty;
+ /// <summary>
+ /// 褰撳墠鐢ㄦ埛鐨勬埧闂碔D
+ /// 渚嬶細0801
+ /// </summary>
+ public int ESRoomID;
+ /// <summary>
+ /// 瀹ゅ鏈虹殑鍚嶇О
+ /// 渚嬶細瀹ゅ鏈�
+ /// </summary>
+ public string DeviceName = string.Empty;
+ /// <summary>
+ /// 鎴块棿鍛藉悕
+ /// 渚嬶細8鏍�1鍗曞厓0801
+ /// </summary>
+ public string RoomName = string.Empty;
+
+ }
+ public class CloudsVideo
+ {
+ /// <summary>
+ /// 鏍嬫ゼ鍗曞厓鍙�
+ /// </summary>
+ public string FLBuildingID = string.Empty;
+ /// <summary>
+ /// 閭f爧妤肩殑鍚嶇О
+ /// </summary>
+ public string FLBuildingName = string.Empty;
+ /// <summary>
+ /// 灏忓尯ID
+ /// </summary>
+ public string FLCommunityID = string.Empty;
+ /// <summary>
+ /// 鎴块棿ID
+ /// </summary>
+ public string FLRoomID = string.Empty;
+ /// <summary>
+ /// 浣忓畢ID
+ /// </summary>
+ public string HomeID = string.Empty;
+
+ public string FLSecretKey = string.Empty;
+
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs
index 645b3dc..1e95885 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/SceneCardControl.cs
@@ -60,6 +60,7 @@
this.ButtonClickEvent += (sender, e) =>
{
//璋冪敤鍦烘櫙
+ this.CanClick = false;
this.SetSceneAction();
};
}
@@ -125,12 +126,17 @@
timeSelect.Init();
timeSelect.TimeAction = (time) =>
{
+ //閫夋嫨鐨勬槸涓嶅紑鍚�
+ if (time == 0) { return; }
+
i_scene.SceneDelayTime = time;
//鏃堕棿鍥炬爣涓嶆樉绀�
this.btnTimeIcon.Visible = false;
//鏄剧ず鍓╀綑鐨勬椂闂�
this.btnTimeView.Text = this.GetTimeString(time, hourText, minuText, secondText);
+ //閫夋嫨寤舵椂鏃�,闇�瑕佸埛鏂颁富椤�
+ UserView.UserPage.Instance.RefreshAllForm = true;
};
};
@@ -195,7 +201,13 @@
var result = await HdlSceneLogic.Current.ControlScene(scene);
if (result == false)
{
+ this.CanClick = true;
return;
+ }
+ if (scene.SceneDelayTime > 0)
+ {
+ //璋冪敤鏈夊欢鏃剁殑鍦烘櫙,闇�瑕佸埛鏂颁富椤�
+ UserView.UserPage.Instance.RefreshAllForm = true;
}
//淇敼鏃堕棿
scene.RemainTime = scene.SceneDelayTime;
@@ -236,6 +248,7 @@
}
//寮�鍚欢鏃跺�掕鏃剁壒鏁�
+ this.CanClick = false;
this.StartRemainTimeApreal(i_scene);
}
@@ -251,6 +264,7 @@
{
if (i_scene.RemainTime <= 0)
{
+ this.CanClick = true;
return;
}
int remainTine = i_scene.RemainTime;
@@ -284,6 +298,7 @@
this.btnTimeView.Text = string.Empty;
//鐩存帴寮�鍚疞oading鐗规晥
this.StartLoadingApreal();
+ this.CanClick = true;
});
})
{ IsBackground = true }.Start();
diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
index 8f84fd0..b6f5a1b 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs
@@ -74,6 +74,9 @@
listBodyContr.RecoverTableHeight();
}
+ //鍒濆鍖栭粯璁ゆゼ灞侷D
+ this.InitDefultFloorId();
+
//鍒濆鍖栧ご閮ㄦ帶浠�
this.InitTopFrameLayoutControl();
//鍒濆鍖栦腑闂存帶浠�
@@ -129,6 +132,9 @@
this.ShowSelectFloorForm(btnFloorName);
};
}
+
+ //鍙瀵硅蹇嵎鏂瑰紡
+ Shared.Phone.Device.VideoIntercom.VideoMachine.AccountSupportVideo(topFrameLayout);
//瀹夐槻蹇嵎鏂瑰紡
if (UserCenterResourse.ResidenceOption.SafetyShortcut)
{
@@ -403,10 +409,9 @@
roomPageView.SetLeftAndRightImageView(mLeftImageView, mRightImageView);
//褰撳墠鎴块棿
- var listRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
+ var listRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
if (HdlRoomLogic.Current.NowMainPageRoom == null)
{
- //璁剧疆绗竴涓负鍒濆鎴块棿
HdlRoomLogic.Current.NowMainPageRoom = listRoom[0];
}
var curIndex = 0;
@@ -506,7 +511,7 @@
//褰撴病鏈夌粦瀹氭湁缃戝叧,宸︽粦鏃�,鐐瑰嚮鎴块棿鍒楄〃,鍒欎笉楦熷畠
return;
}
- var listRoom = HdlRoomLogic.Current.GetRoomsByCurrentFloorIdAppendLoveRoom();
+ var listRoom = HdlRoomLogic.Current.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
for (int i = 0; i < listRoom.Count; i++)
{
if (room.Id == listRoom[i].Id)
@@ -522,7 +527,7 @@
//閲嶇疆涓�涓嬫ゼ灞傚悕瀛�
if (this.btnFloorName != null)
{
- btnFloorName.Text = HdlResidenceLogic.Current.GetFloorNameById(Config.Instance.Home.CurrentFloorId);
+ btnFloorName.Text = Config.Instance.Home.GetCurrentFloorName;
}
}
@@ -1096,7 +1101,11 @@
//宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 2020.05.09:鍒犻櫎Ack涓婚
this.dicDeviceCardControl[mainKeys].SetHadGetResponeResultStatu();
//鍒锋柊鎺т欢
- this.dicDeviceCardControl[mainKeys].RefreshControlInfo(locadevice);
+ if (locadevice.Type != DeviceType.IASZone)
+ {
+ //浼犳劅鍣ㄤ笉闇�瑕佸睘鎬т笂鎶�(浣嗘槸閭d釜鐞冨瀷浼犳劅鍣ㄥ眳鐒朵細灞炴�т笂鎶�)
+ this.dicDeviceCardControl[mainKeys].RefreshControlInfo(locadevice);
+ }
}
}, ShowErrorMode.NO);
});
@@ -1155,13 +1164,16 @@
private void ShowSelectFloorForm(NormalViewControl btnFloor)
{
var floorFL = new Category.SelectFloorForm();
+ floorFL.CurFloorId = Config.Instance.Home.CurrentFloorId;
this.AddChidren(floorFL);
floorFL.Init(35, 153);
- floorFL.changeFloor = true;
floorFL.FloorAction = (floorId) =>
{
btnFloor.Text = HdlResidenceLogic.Current.GetFloorNameById(floorId);
+ Config.Instance.Home.CurrentFloorId = floorId;
HdlRoomLogic.Current.NowMainPageRoom = HdlRoomLogic.Current.GetLoveRoom();
+ //鍒嗙被鐣岄潰闇�瑕佸埛鏂�
+ UserView.UserPage.Instance.RefreshCategoryForm = true;
this.ShowForm();
};
}
@@ -1203,6 +1215,23 @@
return true;
}
+ /// <summary>
+ /// 鍒濆鍖栭粯璁ゆゼ灞侷D
+ /// </summary>
+ private void InitDefultFloorId()
+ {
+ if (Config.Instance.Home.CurrentFloorId != string.Empty)
+ {
+ return;
+ }
+ var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
+ foreach (var floorId in dicFloor.Keys)
+ {
+ Config.Instance.Home.CurrentFloorId = floorId;
+ break;
+ }
+ }
+
#endregion
#region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________
diff --git a/ZigbeeApp/Shared/Phone/MainPage/LeftListRoomViewFrom.cs b/ZigbeeApp/Shared/Phone/MainPage/LeftListRoomViewFrom.cs
index c64ef01..da61323 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/LeftListRoomViewFrom.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/LeftListRoomViewFrom.cs
@@ -96,13 +96,18 @@
};
//鑾峰彇妤煎眰
- this.curFloorId = Config.Instance.Home.CurrentFloorId;
-
var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
if (dicFloor.Count == 0)
{
return;
}
+ //妤煎眰鍒濆ID
+ foreach (var floorId in dicFloor.Keys)
+ {
+ this.curFloorId = floorId;
+ break;
+ }
+
//妤煎眰鍥炬爣
var btnIconContr = new MostRightIconControl(69, 69);
btnIconContr.UnSelectedImagePath = "Item/Drop_Down.png";
@@ -120,9 +125,9 @@
{
//妤煎眰鑿滃崟
var floors = new Category.SelectFloorForm();
+ floors.CurFloorId = this.curFloorId;
AddChidren(floors);
- floors.changeFloor = false;
- floors.CurFloorId = curFloorId;
+ floors.CurFloorId = this.curFloorId;
floors.Init(599, 161, Direction.Right);
floors.FloorAction += (floorId) =>
{
@@ -219,7 +224,6 @@
{
return;
}
- string oldFloorId = Config.Instance.Home.CurrentFloorId;
CommonPage.Instance.CloseLeftMenu();
HdlThreadLogic.Current.RunThread(() =>
@@ -231,10 +235,11 @@
//鐐瑰嚮鐨勬槸鏀惰棌鎴块棿鐨勮瘽,涓嶅彉鏇村綋鍓嶆ゼ灞俰d
if (room.FloorId != string.Empty)
{
- Config.Instance.Home.CurrentFloorId = room.FloorId;
- if (oldFloorId != room.FloorId)
+ if (Config.Instance.Home.CurrentFloorId != room.FloorId)
{
//妤煎眰閮藉垏鎹㈢殑璇�,鍒锋柊鏁翠釜涓婚〉
+ Config.Instance.Home.CurrentFloorId = room.FloorId;
+ HdlRoomLogic.Current.NowMainPageRoom = room;
UserPage.Instance.ReFreshControl();
return;
}
diff --git a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
index fe4fce7..520287b 100755
--- a/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/MainPage/UnallocatedRoomForm.cs
@@ -536,6 +536,11 @@
{
HdlControlLogic.Current.ShowBottomListRoomView(string.Empty, Language.StringByID(R.MyInternationalizationString.AddTo), (selectId, selectName) =>
{
+ if (selectId == string.Empty)
+ {
+ //閫夋嫨鐨勬槸鏈垎閰�
+ return;
+ }
//鍙樻洿浜嗗綋鍓嶆埧闂寸殑涓滆タ,涓婚〉闇�瑕佸埛鏂�
if (HdlRoomLogic.Current.NowMainPageRoom.Id == selectId)
{
@@ -543,7 +548,9 @@
}
//淇濆瓨閫夋嫨鐨勮澶囧拰鍦烘櫙
var room = HdlRoomLogic.Current.GetRoomById(selectId);
- this.SaveSelectDeviceAndScene(room);
+ this.SaveSelectDeviceAndScene(room);
+ //鍒嗙被鐣岄潰闇�瑕佸埛鏂�
+ UserPage.Instance.RefreshCategoryForm = true;
});
};
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightFloorMenuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightFloorMenuControl.cs
index 9238cc3..4ed629e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightFloorMenuControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/TopRightFloorMenuControl.cs
@@ -35,6 +35,10 @@
/// 琛屾暟
/// </summary>
private int RowCount = 0;
+ /// <summary>
+ /// 褰撳墠妤煎眰id
+ /// </summary>
+ private string nowFloorId = string.Empty;
#endregion
@@ -48,9 +52,11 @@
/// <para>1: 395瀹藉害</para>
/// <para>2: 449瀹藉害</para>
/// </param>
+ /// <param name="i_floorId">褰撳墠閫夋嫨鐨勬ゼ灞侷D</param>
/// <param name="titleText">鏍囬鏂囨湰(濡傛灉涓嶄负绌�,鑿滃崟妯″紡鍙樻洿涓烘嫢鏈夋爣棰樼殑妯″紡)</param>
- public TopRightFloorMenuControl(int i_RowCount, int i_widthType, string titleText = null)
+ public TopRightFloorMenuControl(int i_RowCount, int i_widthType,string i_floorId, string titleText = null)
{
+ this.nowFloorId = i_floorId;
this.RowCount = i_RowCount;
if (i_widthType == 1)
{
@@ -162,7 +168,7 @@
btnLine.X = Application.GetRealWidth(81);
}
- if (floorId == Common.Config.Instance.Home.CurrentFloorId)
+ if (this.nowFloorId == floorId)
{
//褰撳墠妤煎眰榛樿璁剧疆涓洪�夋嫨鐘舵��
this.SetRowSelectStatu(rowFrame, true);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
index 6ff45d2..ee4a454 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs
@@ -137,7 +137,7 @@
this.RefreshDfunctionType();
//璁惧鏀瑰彉鍔熻兘绫诲瀷鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
//璋冪敤鍥炶皟鍑芥暟
this.FinishSelectEvent?.Invoke(nowSelectNo);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
index 5582faa..e39e4e8 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/SceneControls/SceneRoomControl.cs
@@ -79,7 +79,7 @@
var room = HdlRoomLogic.Current.GetRoomBySceneId(this.SceneId);
if (room != null)
{
- btnRoom.Text = room.Name;
+ btnRoom.Text = HdlRoomLogic.Current.GetRoomName(room);
}
else
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
index 797741b..4d6cefc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
@@ -38,7 +38,7 @@
//濡傛灉娌℃湁鑷姩澶囦唤鏁版嵁,鍒欐妸鏈湴鍏ㄩ儴涓滆タ涓婁紶
var pathTemp = DirNameResourse.AutoBackupDirectory;
//澶嶅埗鏈湴鎵�鏈夋枃浠惰繃鍘�
- List<string> listAllFile = Global.FileListByHomeId();
+ List<string> listAllFile = HdlFileLogic.Current.GetRootPathListFile();
foreach (string fileName in listAllFile)
{
string oldFile = System.IO.Path.Combine(Config.Instance.FullPath, fileName);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
index 5dc54a3..fffeefb 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -245,7 +245,7 @@
if (upPath == string.Empty)
{
//鑾峰彇鏈湴鏂囦欢
- listAllFile = Global.FileListByHomeId();
+ listAllFile = HdlFileLogic.Current.GetRootPathListFile();
fullDir = Common.Config.Instance.FullPath;
}
else
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
index dcd359c..a73caea 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -168,8 +168,6 @@
var listFloorKey = this.GetAllFloorKeys();
var dicRoomName = this.GetRoomSampleList();
- //璁剧疆鍒濆妤煎眰
- Config.Instance.Home.CurrentFloorId = listFloorKey[0];
foreach (string floorKey in listFloorKey)
{
foreach (string roomId in dicRoomName.Keys)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs
index 544d769..ecaf58d 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlFileLogic.cs
@@ -212,21 +212,37 @@
return new List<string>();
}
- List<string> list = new List<string>();
- var files = System.IO.Directory.GetFiles(directory);
- foreach (var file in files)
+ var list = new List<string>();
+ try
{
- string fileName = file;
- if (onlyFileName == true)
+ //2020.07.10鐨勬椂鍊�,鍑虹幇杩囪幏鍙栧け璐ュ紓甯� 鎻愮ず:write fault on path
+ var files = System.IO.Directory.GetFiles(directory);
+ foreach (var file in files)
{
- fileName = fileName.Substring(directory.Length + 1);
+ string fileName = file;
+ if (onlyFileName == true)
+ {
+ fileName = fileName.Substring(directory.Length + 1);
+ }
+ list.Add(fileName);
}
- list.Add(fileName);
}
+ catch (Exception ex)
+ { HdlLogLogic.Current.WriteLog(ex); }
+
return list;
}
/// <summary>
+ /// 鑾峰彇鏍圭洰褰曠殑鍏ㄩ儴鏂囦欢鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ public List<string> GetRootPathListFile()
+ {
+ return this.GetFileFromDirectory(Common.Config.Instance.FullPath);
+ }
+
+ /// <summary>
/// 灏嗘寚瀹氭枃浠跺す閲岄潰鐨勫叏閮ㄦ枃浠剁Щ鍔ㄥ埌褰撳墠浣忓畢鐨勬枃浠跺す鍐�
/// </summary>
/// <param name="fulldirectory">鏂囦欢澶瑰叏璺緞</param>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
index 275a2cc..22eced4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayLogic.cs
@@ -226,7 +226,7 @@
return false;
}
//娣诲姞缃戝叧鐨勮瘽,寮哄埗涓婚〉鍒锋柊
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
return true;
}
@@ -546,7 +546,7 @@
}
//娣诲姞缃戝叧鐨勮瘽,寮哄埗涓婚〉鍒锋柊
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
return 1;
}
@@ -621,7 +621,7 @@
//鍒囨崲缃戝叧,淇濆瓨缂撳瓨
this.SaveGatewayIdToLocation(gatewayId);
//鍒囨崲缃戝叧鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
return true;
}
@@ -983,7 +983,7 @@
public List<string> GetAllGatewayFile()
{
List<string> list = new List<string>();
- List<string> listFile = Global.FileListByHomeId();
+ List<string> listFile = HdlFileLogic.Current.GetRootPathListFile();
foreach (string file in listFile)
{
//鍙幏鍙栫綉鍏宠澶�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
index 2e85454..64b64c5 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlResidenceLogic.cs
@@ -160,7 +160,7 @@
home.Name = residenceName;
home.Save();
//浣忓畢淇敼鍚嶇О鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
index a777b63..38c531b 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlRoomLogic.cs
@@ -62,7 +62,7 @@
//妫�娴嬫垜鐨勫枩鐖辫繖涓埧闂村璞�
this.CheckLoveRoom();
- var listFile = Global.FileListByHomeId();
+ var listFile = HdlFileLogic.Current.GetRootPathListFile();
foreach (var fileName in listFile)
{
if (fileName.StartsWith("Room_") == true)
@@ -75,8 +75,6 @@
}
}
}
- //璁剧疆褰撳墠妤煎眰鐨処D
- Config.Instance.Home.SetCurrentFloorId();
//椤轰究鍒锋柊鍦烘櫙
HdlSceneLogic.Current.ReFreshByLocal();
//鍒锋柊鎴块棿瑙嗗浘鍒楄〃
@@ -88,7 +86,7 @@
/// </summary>
public void RefreshAllRoomByLocation()
{
- var listFile = Global.FileListByHomeId();
+ var listFile = HdlFileLogic.Current.GetRootPathListFile();
//鎴戠殑鍠滅埍鐨勬埧闂村繀椤昏鍦ㄧ0浣嶆墠琛�
string fRoom = "Room_Favorite.json";
@@ -242,6 +240,17 @@
/// <returns></returns>
public void RemoveRoom(string roomId, bool refreshLeftView = true)
{
+ if (this.NowMainPageRoom != null && this.NowMainPageRoom.Id == roomId)
+ {
+ //褰撳垹闄ょ殑鏄富椤电殑鎴块棿鐨勬椂鍊�
+ this.NowMainPageRoom = this.GetLoveRoom();
+ }
+ if (this.NowCategoryRoom != null && this.NowCategoryRoom.Id == roomId)
+ {
+ //褰撳垹闄ょ殑鏄垎绫荤殑鎴块棿鐨勬椂鍊�
+ this.NowCategoryRoom = this.GetLoveRoom();
+ }
+
//鏍规嵁鎴块棿Id锛岃幏鍙栨埧闂村璞�
var room = this.GetRoomById(roomId);
if (room == null)
@@ -482,7 +491,7 @@
}
}
}
- return listRoom;
+ return this.SortRoom(listRoom);
}
/// <summary>
@@ -497,35 +506,6 @@
listRoom.Add(room);
}
return this.SortRoom(listRoom);
- }
-
- /// <summary>
- /// 鑾峰彇褰撳墠妤煎眰鐨勬埧闂村悕绉�
- /// </summary>
- /// <param name="id"></param>
- /// <returns></returns>
- public List<string> GetRoomNamesByFloorId(string id)
- {
- var listName = new List<string>();
- if (Config.Instance.Home.FloorDics.Count == 0)
- {
- //娌℃湁妤煎眰
- foreach (var room in this.dicRooms.Values)
- {
- listName.Add(room.Name);
- }
- }
- else
- {
- foreach (var room in this.dicRooms.Values)
- {
- if (room.FloorId == id)
- {
- listName.Add(room.Name);
- }
- }
- }
- return listName;
}
/// <summary>
@@ -557,17 +537,10 @@
}
}
}
+ listRoom = this.SortRoom(listRoom);
+
listRoom.Insert(0, GetLoveRoom());
return listRoom;
- }
-
- /// <summary>
- /// 鑾峰彇褰撳墠妤煎眰鐨勬埧闂�(鎷兼帴浜嗐�愬父鐢ㄣ�戝湪绗竴浣�)
- /// </summary>
- /// <returns></returns>
- public List<Room> GetRoomsByCurrentFloorIdAppendLoveRoom()
- {
- return this.GetRoomsByFloorIdAppendLoveRoom(Config.Instance.Home.CurrentFloorId);
}
#endregion
@@ -590,7 +563,7 @@
//绉婚櫎鎴戠殑鍠滅埍
this.DeleteLoveDevice(device);
//璁惧鏀瑰彉鎴块棿鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
return;
}
//鎴块棿鏄惁淇敼
@@ -608,7 +581,7 @@
this.AddDevice(room, device, saveRealRoom);
}
//璁惧鏀瑰彉鎴块棿鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
}
/// <summary>
@@ -681,6 +654,8 @@
//淇濆瓨鍒版湰鍦�
loveRoom.ListDevice.Add(mainkeys);
loveRoom.Save();
+ //娣诲姞鏀惰棌璁惧鏃�,闇�瑕佸埛鏂颁富椤�
+ UserView.UserPage.Instance.RefreshAllForm = true;
}
}
}
@@ -744,6 +719,8 @@
loveRoom.Save();
//鏇存敼鑷姩澶囦唤
HdlAutoBackupLogic.AddOrEditorFile(loveRoom.FileName);
+ //娣诲姞鏀惰棌璁惧鏃�,闇�瑕佸埛鏂颁富椤�
+ UserView.UserPage.Instance.RefreshAllForm = true;
}
}
@@ -1021,6 +998,11 @@
/// <returns></returns>
public Dictionary<string, string> GetFloorSortList()
{
+ //娌℃湁妤煎眰
+ if (Config.Instance.Home.FloorDics.Count == 0)
+ {
+ return new Dictionary<string, string>();
+ }
//浠庝竴鍫嗘枃瀛椾腑,鑾峰彇杩欎竴鍫嗘枃瀛楅噷闈㈡暟瀛楀瓧绗︿覆鐨勬渶闀块暱搴�
var listName = new List<string>();
foreach (var floorName in Config.Instance.Home.FloorDics.Values)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs
index aaeab0e..402cf70 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs
@@ -403,6 +403,8 @@
{
nowRoom.ListSceneId.Add(scene.Id);
nowRoom.Save();
+ //娣诲姞鏀惰棌鍦烘櫙鏃�,闇�瑕佸埛鏂颁富椤�
+ UserView.UserPage.Instance.RefreshAllForm = true;
}
}
@@ -616,6 +618,8 @@
HdlAutoBackupLogic.DeleteFile(sceneUI.IconPath);
}
}
+ //鍒犻櫎鍦烘櫙鏃�,闇�瑕佸埛鏂颁富椤�
+ UserView.UserPage.Instance.RefreshAllForm = true;
}
/// <summary>
@@ -660,6 +664,8 @@
{
nowRoom.ListSceneId.Remove(scene.Id);
nowRoom.Save();
+ //鍙栨秷鏀惰棌鍦烘櫙鏃�,闇�瑕佸埛鏂颁富椤�
+ UserView.UserPage.Instance.RefreshAllForm = true;
}
}
@@ -960,7 +966,7 @@
public List<string> GetAllSceneFile()
{
List<string> listSceneFile = new List<string>();
- List<string> listAllFile = Global.FileListByHomeId();
+ List<string> listAllFile = HdlFileLogic.Current.GetRootPathListFile();
foreach (string file in listAllFile)
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
index 3a55f87..9091b23 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -343,7 +343,7 @@
//娓呯┖妤煎眰鏁版嵁
Common.Config.Instance.Home.FloorDics.Clear();
//鐒跺悗妫�娴嬫湰鍦扮殑鏂囦欢
- var listLocalFile = Global.FileListByHomeId();
+ var listLocalFile = HdlFileLogic.Current.GetRootPathListFile();
foreach (string fileName in listLocalFile)
{
if (fileName == DirNameResourse.ShardFloorFile)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
index 062c873..bf5c4b9 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -770,7 +770,7 @@
public static bool InitUserCenterMenmoryAndThread(bool ShowPrompted = true)
{
//璋冪敤杩欎釜鏂规硶,閮介渶瑕侀噸鏂板埛鏂颁富椤�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
//娣诲姞缃戠粶鐘舵�佺洃鍚�
HdlWifiLogic.Current.StartListenNetWork();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
index 5c66c54..5cdd8b4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindCommonLayout.cs
@@ -17,9 +17,13 @@
/// </summary>
public Action FloorAction = null;
/// <summary>
- /// 閫変腑鐨勬ゼ灞傚洖璋僛
+ /// 閫変腑鐨勬ゼ灞傚洖璋�
/// </summary>
public Action<string, Button> ChooseFloorAction = null;
+ /// <summary>
+ /// 閲嶆柊鍔犺浇
+ /// </summary>
+ public Action ReLoadAction = null;
public FrameLayout topFrameLayout = new FrameLayout { Height = Application.GetRealHeight(184), BackgroundColor = ZigbeeColor.Current.XMTopFrameLayout };
public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1925 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout };
@@ -95,7 +99,7 @@
btnTitle.Text = titleText;
}
/// <summary>
- /// 闂ㄩ攣涓儴甯冨眬
+ /// 涓儴甯冨眬
/// </summary>
/// <param name="frameLayout"></param>
public void MidFrameLayout(FrameLayout frameLayout)
@@ -106,7 +110,7 @@
}
/// <summary>
- /// 闂ㄩ攣搴曢儴甯冨眬
+ /// 搴曢儴甯冨眬
/// </summary>
/// <param name="frameLayout"></param>
public void BottomFrameLayout(FrameLayout frameLayout)
@@ -118,6 +122,28 @@
BackgroundColor = ZigbeeColor.Current.XMWhite,
};
this.midFrameLayout.AddChidren(bottomFrameLayout1);
+ }
+
+ /// <summary>
+ /// 鏄剧ず閲嶆柊鍔犺浇鐨勭晫闈�(涓昏鏄敤鍦ㄧ晫闈㈠姞杞介敊璇椂锛屽啀娆″姞杞�)
+ /// </summary>
+ public void ShowReLoadView()
+ {
+ var frame = new FrameLayout();
+ frame.BackgroundColor = UserCenterColor.Current.White;
+ frame.Tag = "ReLoadView";
+ this.midFrameLayout.AddChidren(frame);
+
+ //閲嶆柊鍔犺浇
+ var btnReLoad = new BottomClickButton();
+ btnReLoad.Gravity = Gravity.Center;
+ btnReLoad.TextID = R.MyInternationalizationString.uDoReload;
+ frame.AddChidren(btnReLoad);
+ btnReLoad.ButtonClickEvent += (sender, e) =>
+ {
+ ReLoadAction?.Invoke();
+ ReLoadAction = null;
+ };
}
/// <summary>
@@ -134,7 +160,6 @@
btnFloorText = new Button
{
Width = Application.GetRealWidth(300 - 69 - 58),
- Text = Language.StringByID(R.MyInternationalizationString.FirstFloor),
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
TextSize = 14,
IsBold = true,
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
index 12546e0..ee1cf2c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs
@@ -274,10 +274,10 @@
}
/// <summary>
- /// 鑾峰彇妤煎眰瀵瑰簲鐨勬埧闂村垪琛�
+ /// 鑾峰彇鏀寔鐨勬埧闂村垪琛�
/// </summary>
/// <returns></returns>
- public static List<Room> GetFloorRoomList()
+ public static List<Room> GetSupportRoomList()
{
var supportRoomListTemp = new List<Room>();
var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
@@ -347,10 +347,7 @@
var device = LocalDevice.Current.GetDevice(de);
if (device != null)
{
- //鑾峰彇璁惧绫诲瀷鐨�
- var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
- //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
- if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+ if (BindInfo.checkRealFreshAirDevice(device) == false)
{
continue;
}
@@ -711,7 +708,7 @@
{
bool result = true;
//鑾峰彇璁惧绫诲瀷鐨�
- var clu = device.OutClusterList.Find((obj) => obj.OutCluster == 513);
+ var clu = device.OutClusterList.Find((obj) => obj.OutCluster == 513 || obj.OutCluster == 514);
if (clu != null)
{
result = false;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
index fdba54a..1278976 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
@@ -525,6 +525,10 @@
}
}
}
+ else
+ {
+ btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed);
+ }
devicePic.UnSelectedImagePath = tempDev.IconPath;
devicePic.Text = "";
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs
index c1bac93..1fced47 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs
@@ -54,6 +54,10 @@
foreach (var bDev in bList)
{
var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
+ if (device == null)
+ {
+ continue;
+ }
switch (curBindType)
{
case 0:
@@ -128,7 +132,6 @@
//绌鸿皟缁戝畾绫诲瀷
if (device.Type == DeviceType.Thermostat && bDev.BindCluster == 513)
{
- //Thermostat鏄┖璋�
tempList.Add(bDev);
}
}
@@ -223,6 +226,10 @@
foreach (var bDev in bList)
{
var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
+ if (device == null)
+ {
+ continue;
+ }
switch (curBindType)
{
case 0:
@@ -296,7 +303,6 @@
//绌鸿皟缁戝畾绫诲瀷
if (device.Type == DeviceType.Thermostat && bDev.BindCluster == 513)
{
- //Thermostat鏄┖璋�
tempList.Remove(bDev.KeyEpoint);
}
}
@@ -393,10 +399,10 @@
roomIncludeMatchDevice.Add(device);
}
}
- if (device.Type == DeviceType.DimmableLight)
- {
- roomIncludeMatchDevice.Add(device);
- }
+ //if (device.Type == DeviceType.DimmableLight)
+ //{
+ // roomIncludeMatchDevice.Add(device);
+ //}
break;
case 4:
if (device.Type == DeviceType.WindowCoveringDevice)
@@ -407,7 +413,10 @@
case 5:
if (device.Type == DeviceType.Thermostat)
{
- //Thermostat鏄┖璋�
+ if (BindInfo.checkRealAcDevice(device) == false)
+ {
+ continue;
+ }
roomIncludeMatchDevice.Add(device);
}
break;
@@ -579,10 +588,10 @@
{
currentPanelBindSupportDeviceListTemp.Add(device);
}
- if (device.Type == DeviceType.DimmableLight)
- {
- currentPanelBindSupportDeviceListTemp.Add(device);
- }
+ //if (device.Type == DeviceType.DimmableLight)
+ //{
+ // currentPanelBindSupportDeviceListTemp.Add(device);
+ //}
break;
case 4:
if (device.Type == DeviceType.WindowCoveringDevice)
@@ -593,7 +602,10 @@
case 5:
if (device.Type == DeviceType.Thermostat)
{
- //Thermostat鏄┖璋�
+ if (BindInfo.checkRealAcDevice(device) == false)
+ {
+ continue;
+ }
currentPanelBindSupportDeviceListTemp.Add(device);
}
break;
@@ -715,10 +727,6 @@
undistruibuteDevList.Add(device);
}
}
- if (device.Type == DeviceType.DimmableLight)
- {
- undistruibuteDevList.Add(device);
- }
break;
case 4:
if (device.Type == DeviceType.WindowCoveringDevice)
@@ -729,7 +737,10 @@
case 5:
if (device.Type == DeviceType.Thermostat)
{
- //Thermostat鏄┖璋�
+ if (BindInfo.checkRealAcDevice(device) == false)
+ {
+ continue;
+ }
undistruibuteDevList.Add(device);
}
break;
@@ -826,21 +837,12 @@
curRoomDeviceListTemp.Add(device);
}
}
- if (device.Type == DeviceType.DimmableLight)
- {
- if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
- {
- //Thermostat鏄┖璋�
- curRoomDeviceListTemp.Add(device);
- }
- }
break;
case 4:
if (device.Type == DeviceType.WindowCoveringDevice)
{
if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
{
- //Thermostat鏄┖璋�
curRoomDeviceListTemp.Add(device);
}
}
@@ -848,11 +850,11 @@
case 5:
if (device.Type == DeviceType.Thermostat)
{
- if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
+ if (BindInfo.checkRealAcDevice(device) == false)
{
- //Thermostat鏄┖璋�
- curRoomDeviceListTemp.Add(device);
+ continue;
}
+ curRoomDeviceListTemp.Add(device);
}
break;
case 6:
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs
index d7e25e7..7fdf549 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/PaneTargetsBaseForm.cs
@@ -93,7 +93,7 @@
/// <summary>
/// 妤煎眰鍒楄〃
/// </summary>
- Dictionary<string, string> dicFloorList;
+ Dictionary<string, string> dicFloorList = new Dictionary<string, string> { };
/// <summary>
/// 鎵�鏈夋埧闂翠腑鏀寔琚粦瀹氱殑璁惧鍒楄〃
/// </summary>
@@ -130,7 +130,10 @@
/// Ac缁戝畾鐩爣鍥炶皟
/// </summary>
public Action<string> actionAcTarget = null;
-
+ /// <summary>
+ /// 鏄惁鑳藉埛鏂�
+ /// </summary>
+ private bool canFresh = false;
#endregion
#region UI璁捐
@@ -143,6 +146,7 @@
//鏍囬鏍忎笅鐨刄I
MidFrameLayoutContent();
//鍒濆鍖栬澶囨暟鎹�
+ CommonPage.Loading.Start("");
InitData();
}
@@ -184,7 +188,7 @@
/// <summary>
/// 涓儴UI銆愭爣棰樻爮涓嬬殑UI銆�
/// </summary>
- async void MidFrameLayoutContent()
+ void MidFrameLayoutContent()
{
var btnMidTopLayout = new FrameLayout
{
@@ -208,6 +212,7 @@
this.midFrameLayout.AddChidren(midVerticalScrolViewLayout);
midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
{
+ canFresh = true;
midVerticalScrolViewLayout.BeginHeaderRefreshing();
InitData();
};
@@ -221,20 +226,24 @@
};
this.midFrameLayout.AddChidren(bottomFrameLayout);
+ var bottomTipPicFrameLayout = new FrameLayout()
+ {
+ Height = Application.GetMinReal(40 + 44 - 10),
+ };
+ bottomFrameLayout.AddChidren(bottomTipPicFrameLayout);
+
var btnTipPicFrameLayout = new FrameLayout()
{
- Width = Application.GetMinReal(40 + 23 + 37),
+ Width = Application.GetMinReal(23 + 37),
Height = Application.GetMinReal(40 + 44 - 10),
- X = Application.GetMinReal(383 - 37),
};
- bottomFrameLayout.AddChidren(btnTipPicFrameLayout);
+ bottomTipPicFrameLayout.AddChidren(btnTipPicFrameLayout);
btnTipPic = new Button()
{
Width = Application.GetMinReal(40),
Height = Application.GetMinReal(40),
- X = Application.GetMinReal(40),
- Y = Application.GetRealHeight(22),
+ Y = Application.GetRealHeight(19),
UnSelectedImagePath = "BindPic/EmptyTargets.png",
SelectedImagePath = "BindPic/EmptyTargetsSelected.png",
};
@@ -243,14 +252,16 @@
btnTipText = new Button()
{
Height = Application.GetRealHeight(84 - 10),
- X = Application.GetMinReal(444),
+ X = Application.GetMinReal(58),
Width = Application.GetMinReal(1080 - 446),
TextID = R.MyInternationalizationString.BindEmptyTargets,
- TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,//XMTopTitleText
+ TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
TextSize = 12,
TextAlignment = TextAlignment.CenterLeft,
};
- bottomFrameLayout.AddChidren(btnTipText);
+ bottomTipPicFrameLayout.AddChidren(btnTipText);
+ bottomTipPicFrameLayout.Width = btnTipPicFrameLayout.Width + Application.GetMinReal(2) + btnTipText.GetTextWidth();
+ bottomTipPicFrameLayout.Gravity = Gravity.CenterHorizontal;
EventHandler<MouseEventArgs> eHandlerEmptyTargets = (sender, e) =>
{
@@ -306,20 +317,19 @@
void RefreshRoomList()
{
Room curRoom = null;
- if (supportRoomList.Count == 0)
- {
- return;
- }
btnHorizontalScrolViewLayout.RemoveAll();
Button curentOldRoom = null;
FrameLayout curentOldRoomFrameLayout = null;
int index = 0;
- var roomTempList = BindInfo.GetSupportRoomList(curControlDev, supportRoomList, curDeviceBindType);
Room slectedRoom = null;
-
var roomUn = new Room();
roomUn.Name = Language.StringByID(R.MyInternationalizationString.Undistributed);
roomUn.Id = "UndistributedId";
+ List<Room> roomTempList = new List<Room> { };
+ if (supportRoomList.Count != 0)
+ {
+ roomTempList = BindInfo.GetSupportRoomList(curControlDev, supportRoomList, curDeviceBindType);
+ }
if (undistruibuteDevList.Count != 0)
{
roomTempList.Add(roomUn);
@@ -445,6 +455,8 @@
var btn = (Button)frame.GetChildren(0);
frame.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png";
btn.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite;
+ curentOldRoom = btn;
+ curentOldRoomFrameLayout = frame;
}
else
{
@@ -464,7 +476,6 @@
midVerticalScrolViewLayout.RemoveAll();
Button oldDevice = null;
int curIndex = 0;
-
if (curRoom.Id == "UndistributedId")
{
currentRoomSupportBindDeviceList = BindInfo.GetUndistributeDeviceList(undistruibuteDevList, curDeviceBindType);
@@ -640,6 +651,26 @@
btnChoose.MouseUpEventHandler += hander;
curIndex++;
}
+
+ //棣栨鏄惁鑳界偣鍑讳繚瀛�
+ if (targetList.Count == 0)
+ {
+ if (targetListTemp.Count == 0)
+ {
+ btnFinifh.Enable = false;
+ btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
+ }
+ else
+ {
+ btnFinifh.Enable = true;
+ btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ }
+ }
+ else
+ {
+ btnFinifh.Enable = true;
+ btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ }
}
#endregion
@@ -648,23 +679,19 @@
/// <summary>
/// 鍒濆鍖栬澶囨暟鎹�
/// </summary>
- void InitData()
+ void InitData(bool canUpdateBindName = false)
{
System.Threading.Tasks.Task.Run(async () =>
{
try
{
- Application.RunOnMainThread(() =>
- {
- CommonPage.Loading.Start("");
- });
//鑾峰彇琚粦鐩爣绛変俊鎭�
BindDevInfo(curBindDevice);
- //鑾峰彇妤煎眰
+ //鑾峰彇妤煎眰
dicFloorList = HdlRoomLogic.Current.GetFloorSortList();
- //鑾峰彇妤煎眰涓埧闂村垪琛�
- supportRoomList = BindInfo.GetFloorRoomList();
+ //鑾峰彇鎴块棿鍒楄〃
+ supportRoomList = BindInfo.GetSupportRoomList();
//鑾峰彇鎵�鏈夋埧闂翠腑鍖归厤鐨勮兘缁戠殑鐩爣
currentPanelSupportBindDeviceList = BindInfo.GetAllRoomSupportDeviceList(currentPanelSupportBindDeviceList, supportRoomList, curDeviceBindType);
@@ -685,13 +712,27 @@
{
Application.RunOnMainThread(() =>
{
- CommonPage.Loading.Hide();
+ canFresh = false;
midVerticalScrolViewLayout.EndHeaderRefreshing();
+ CommonPage.Loading.Hide();
new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance);
+
+ this.midFrameLayout.RemoveAll();
+
+ ShowReLoadView();
+ ReLoadAction += () =>
+ {
+ this.midFrameLayout.RemoveAll();
+ //鍒濆鍖栬澶囨暟鎹�
+ CommonPage.Loading.Start("");
+ MidFrameLayoutContent();
+ InitData(true);
+ };
+
});
}
- targetList.Clear();
+ oldTargetList.Clear();
//閫変腑鐩爣鍒楄〃 targetList
if (curControlDev.bindList.Count != 0)
{
@@ -700,7 +741,7 @@
var mainKey = bindDev.BindMacAddr + bindDev.BindEpoint;
//鍒嗛厤鐨勭洰鏍囧垪琛�
- if (currentPanelSupportBindDeviceList.Count != 0)
+ if (Shared.Common.LocalDevice.Current.listAllDevice.Count != 0)
{
var dev = currentPanelSupportBindDeviceList.Find(obj => (obj != null) && (obj.DeviceAddr + obj.DeviceEpoint == mainKey));
if (dev != null)
@@ -738,31 +779,44 @@
{
Application.RunOnMainThread(() =>
{
- BindDownFrameLayout(this.midFrameLayout, curControlDev, dicFloorList, ref btnFloorText);
+ //妤煎眰渚ц竟鏍忕粦瀹�
+ if (!canFresh)
+ {
+ BindDownFrameLayout(this.midFrameLayout, curControlDev, dicFloorList, ref btnFloorText);
+ }
ChooseFloorAction += (floorId, btnMethodText) =>
{
+ btnFloorText.Text = string.Empty;
btnFloorText.Text = dicFloorList[floorId];
- //鑾峰彇妤煎眰涓埧闂村垪琛�
- supportRoomList = BindInfo.GetFloorRoomList();
+ //鑾峰彇鎴块棿鍒楄〃
+ supportRoomList = BindInfo.GetSupportRoomList();
//鑾峰彇鏈湴鏈垎閰嶇殑鏀寔褰撳墠绫诲瀷鐨勭粦瀹氳澶囧垪琛�
undistruibuteDevList = BindInfo.GetUndistributeDeviceList(undistruibuteDevList, curDeviceBindType);
RefreshRoomList();
};
+
+ //榛樿妤煎眰鏄剧ず
+ if (BindInfo.GetCurrentSelectFloorIdName() != null)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
+ });
+ }
//棣栨鏄惁鑳界偣鍑讳繚瀛�
if (targetList.Count == 0)
{
curControlDev.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId();
curControlDev.currentSelectRoomId = null;
- if (BindInfo.GetCurrentSelectFloorIdName() != null)
- {
- Application.RunOnMainThread(() =>
- {
- btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
- });
- }
btnFinifh.Enable = false;
btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect;
+
+ //鏇存柊澶栭潰鐩爣鍚嶅瓧锛氭棤
+ if (canUpdateBindName)
+ {
+ TargesBindName();
+ }
}
else
{
@@ -785,6 +839,28 @@
curControlDev.currentSelectRoomId = "UndistributedId";
}
}
+
+ if (canUpdateBindName)
+ {
+ //鏇存柊澶栭潰鐩爣鍚嶅瓧锛氬叿浣撳悕瀛椼�愬埛鏂版湰鍦扮晫闈細瀵艰嚧澶栭儴鐩爣鍙樺寲銆�
+ string bindName = Common.LocalDevice.Current.GetDeviceEpointName(dev);
+ switch (curDeviceBindType)
+ {
+ case BindInfo.BindType.Temperature:
+ if (dev.Type == DeviceType.PMSensor)
+ {
+ bindName += "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
+ }
+ break;
+ case BindInfo.BindType.Humidity:
+ if (dev.Type == DeviceType.PMSensor)
+ {
+ bindName += "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
+ }
+ break;
+ }
+ TargesBindName(bindName);
+ }
}
if (!string.IsNullOrEmpty(curControlDev.currentSelectFloorId))
{
@@ -798,15 +874,11 @@
btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
}
-
//鑾峰彇妤煎眰涓埧闂村垪琛�
- if (supportRoomList.Count != 0)
- {
- RefreshRoomList();
- }
-
- CommonPage.Loading.Hide();
+ RefreshRoomList();
+ canFresh = false;
midVerticalScrolViewLayout.EndHeaderRefreshing();
+ CommonPage.Loading.Hide();
});
}
});
@@ -827,75 +899,94 @@
try
{
Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
-
- if (oldTargetList.Count != 0)
+ if (btnTipPic.IsSelected)
{
- //鍒犻櫎鍙栨秷鐨勭洰鏍�
- foreach (var bd in oldTargetList)
+ //鍒犻櫎鎯呭喌1:缁戝畾绌虹洰鏍囧繀椤诲彇娑堟寜閿腑宸茬粡瀛樺湪鐨勭洰鏍�
+ if (oldTargetList.Count != 0)
{
- var delDevice = new DelDeviceBindData();
- delDevice.DeviceAddr = curControlDev.DeviceAddr;
- delDevice.Epoint = curControlDev.DeviceEpoint;
+ //鍒犻櫎鎸夐敭涓凡缁忕粦瀹氱殑鐩爣涓暟銆愬垹闄ゆ垚鍔熶釜鏁般��
+ int sOldTargetListCount = 0;
- var removeDevice = new RemoveBindListObj();
- removeDevice.BindType = 0;
- switch (curDeviceBindType)
+ foreach (var bd in oldTargetList)
{
- case BindInfo.BindType.FreshAir:
- removeDevice.BindCluster = 514;
- break;
- case BindInfo.BindType.Temperature:
- removeDevice.BindCluster = 1026;
- break;
- case BindInfo.BindType.Humidity:
- removeDevice.BindCluster = 1029;
- break;
- case BindInfo.BindType.PM:
- removeDevice.BindCluster = 1066;
- break;
- case BindInfo.BindType.AC:
- removeDevice.BindCluster = 513;//Ac闇�瑕佺粦瀹�2涓皣513鍜�514
- break;
- }
- removeDevice.BindMacAddr = bd.DeviceAddr;
- removeDevice.BindEpoint = bd.DeviceEpoint;
- delDevice.RemoveBindList.Add(removeDevice);
+ var delDevice = DelBindDevice(bd);
- if (curDeviceBindType == BindInfo.BindType.AC)
- {
- //瑕佺Щ闄ょ┖璋冿細闇�瑕佺Щ闄�513锛�514
- var removeDevice3 = new RemoveBindListObj();
- removeDevice3.BindCluster = 514;
- removeDevice3.BindType = 0;
- removeDevice3.BindMacAddr = bd.DeviceAddr;
- removeDevice3.BindEpoint = bd.DeviceEpoint;
- delDevice.RemoveBindList.Add(removeDevice3);
- }
+ //姝ゆ鎸夐敭涓渶瑕佺Щ闄ょ殑鐩爣涓暟銆愬悓涓�涓洰鏍囨惡甯︾殑澶氫釜鍔熻兘鍒犻櫎鎴愬姛鐨勪釜鏁般��
+ int sRemoveBindListCount = 0;
- var delResult = new DelDeviceBindResponseAllData();
- delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice);
- if (delResult == null)
- {
- Application.RunOnMainThread(() =>
+ var delResult = new DelDeviceBindResponseAllData();
+ delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice);
+ if (delResult == null)
{
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- CommonPage.Loading.Hide();
- });
- return;
- }
- else
- {
- if (delResult.removeBindResultResponseData == null)
- {
- if (delResult.delDeviceBindResponseData != null)
+ Application.RunOnMainThread(() =>
{
- foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList)
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ CommonPage.Loading.Hide();
+
+ ShowReLoadView();
+ ReLoadAction += () =>
{
- if (d.Result == 0 || d.Result == 1)
+ this.midFrameLayout.RemoveAll();
+ //鍒濆鍖栬澶囨暟鎹�
+ CommonPage.Loading.Start("");
+ MidFrameLayoutContent();
+ InitData(true);
+ };
+ });
+ return;
+ }
+ else
+ {
+ if (delResult.removeBindResultResponseData == null)
+ {
+ if (delResult.delDeviceBindResponseData != null)
+ {
+ foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList)
{
- EmptyTargesMess();
+ if (d.Result == 0 || d.Result == 1)
+ {
+ sRemoveBindListCount++;
+ if (sRemoveBindListCount == delDevice.RemoveBindList.Count)
+ {
+ sOldTargetListCount++;
+ }
+
+ //鎸夐敭鐩爣涓殑璇ョ被鍨嬩釜鏁伴兘鍒犻櫎鎴愬姛
+ if (sOldTargetListCount == oldTargetList.Count)
+ {
+ TargesBindName();
+ Application.RunOnMainThread(() =>
+ {
+ CommonPage.Loading.Hide();
+ btnFinifh.Enable = true;
+ btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ this.RemoveFromParent();
+ });
+ }
+ }
+ else
+ {
+ Application.RunOnMainThread(() =>
+ {
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ btnFinifh.Enable = true;
+ btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ CommonPage.Loading.Hide();
+ });
+ return;
+ }
+ }
+ }
+ }
+ else
+ {
+ if (delResult.removeBindResultResponseData.Result == 0)
+ {
+ sOldTargetListCount++;
+ //鎸夐敭鐩爣涓殑璇ョ被鍨嬩釜鏁伴兘鍒犻櫎鎴愬姛
+ if (sOldTargetListCount == oldTargetList.Count)
+ {
+ TargesBindName();
Application.RunOnMainThread(() =>
{
CommonPage.Loading.Hide();
@@ -904,54 +995,26 @@
this.RemoveFromParent();
});
}
- else
- {
- Application.RunOnMainThread(() =>
- {
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- CommonPage.Loading.Hide();
- });
- return;
- }
}
- }
- }
- else
- {
- if (delResult.removeBindResultResponseData.Result == 0)
- {
- EmptyTargesMess();
- Application.RunOnMainThread(() =>
+ else
{
- CommonPage.Loading.Hide();
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- this.RemoveFromParent();
- });
-
- }
- else
- {
- Application.RunOnMainThread(() =>
- {
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- CommonPage.Loading.Hide();
- });
- return;
+ Application.RunOnMainThread(() =>
+ {
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ btnFinifh.Enable = true;
+ btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ CommonPage.Loading.Hide();
+ });
+ return;
+ }
}
}
}
}
- }
- else
- {
- if (btnTipPic.IsSelected)
+ else
{
- EmptyTargesMess();
+ //鎸夐敭涓病鏈夌洰鏍囩洿鎺ョ粦瀹氱┖鐩爣
+ TargesBindName();
Application.RunOnMainThread(() =>
{
CommonPage.Loading.Hide();
@@ -959,22 +1022,6 @@
btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
this.RemoveFromParent();
});
- }
- else
- {
- //娌℃湁鐩爣鎻愮ず
- Application.RunOnMainThread(() =>
- {
- var myTip = new Tip();
- myTip.Direction = AMPopTipDirection.None;
- myTip.CloseTime = 2;
- myTip.Text = Language.StringByID(R.MyInternationalizationString.BindDeviceTargetIsEmpty);
- myTip.Show(Common.CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- CommonPage.Loading.Hide();
- });
- return;
}
}
}
@@ -986,6 +1033,8 @@
CommonPage.Loading.Hide();
});
btnFinifh.Enable = true;
+ btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+
}
});
}
@@ -1014,11 +1063,17 @@
{
Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); });
- //鍒犻櫎宸茬粡瀛樺湪鐨勭洰鏍�
+ //鍒犻櫎鎯呭喌2:鎸夐敭涔嬪墠宸茬粡瀛樺湪鐨勭洰鏍�
if (oldTargetList.Count != 0)
{
+ //鍒犻櫎鎸夐敭涓凡缁忕粦瀹氱殑鐩爣涓暟銆愬垹闄ゆ垚鍔熶釜鏁般��
+ int sOldTargetListCount = 0;
+
foreach (var bd in oldTargetList)
{
+ //姝ゆ鎸夐敭涓渶瑕佺Щ闄ょ殑鐩爣涓暟銆愬悓涓�涓洰鏍囨惡甯︾殑澶氫釜鍔熻兘鍒犻櫎鎴愬姛鐨勪釜鏁般��
+ int sRemoveBindListCount = 0;
+
var delDevice = DelBindDevice(bd);
var delResult = new DelDeviceBindResponseAllData();
delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice);
@@ -1028,9 +1083,17 @@
Application.RunOnMainThread(() =>
{
new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
CommonPage.Loading.Hide();
+
+ ShowReLoadView();
+ ReLoadAction += () =>
+ {
+ this.midFrameLayout.RemoveAll();
+ //鍒濆鍖栬澶囨暟鎹�
+ CommonPage.Loading.Start("");
+ MidFrameLayoutContent();
+ InitData(true);
+ };
});
return;
}
@@ -1053,84 +1116,43 @@
});
return;
}
+
+ sRemoveBindListCount++;
+ if (sRemoveBindListCount == delDevice.RemoveBindList.Count)
+ {
+ sOldTargetListCount++;
+ }
}
}
}
- }
- if (delResult != null && delResult.removeBindResultResponseData != null)
- {
- if (delResult.removeBindResultResponseData.Result != 0)
+ else
{
- Application.RunOnMainThread(() =>
+ if (delResult.removeBindResultResponseData.Result != 0)
{
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- CommonPage.Loading.Hide();
- });
- return;
+ Application.RunOnMainThread(() =>
+ {
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ btnFinifh.Enable = true;
+ btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ CommonPage.Loading.Hide();
+ });
+ return;
+ }
+ sOldTargetListCount++;
}
}
}
- }
- else
- {
- //妫�娴嬪凡缁忕粦瀹氱殑鐩爣鏄惁涓嶅湪鏈湴鎴栬�呮病鏈夊垎閰嶅埌浠讳綍鎴块棿涓�
- //姝ゆ椂闇�瑕佸垹闄ゅ凡缁忚缁戝畾鍒扮洰鏍囷紝鎵嶈兘缁х画缁戝畾鏂扮洰鏍�
- if (curBindDevice != null)
- {
- var delDevice = DelBindDevice(curBindDevice);
- var delResult = new DelDeviceBindResponseAllData();
- delResult = HdlDeviceBindLogic.Current.DelDeviceBindAsync(delDevice);
- if (delResult == null)
+ if (sOldTargetListCount != oldTargetList.Count)
+ {
+ Application.RunOnMainThread(() =>
{
- Application.RunOnMainThread(() =>
- {
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- CommonPage.Loading.Hide();
- });
- return;
- }
- else
- {
- if (delResult.removeBindResultResponseData == null)
- {
- if (delResult.delDeviceBindResponseData != null)
- {
- foreach (var d in delResult.delDeviceBindResponseData.RemoveBindList)
- {
- if (d.Result != 0 && d.Result != 1)
- {
- Application.RunOnMainThread(() =>
- {
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- CommonPage.Loading.Hide();
- });
- return;
- }
- }
- }
- }
- }
- if (delResult != null && delResult.removeBindResultResponseData != null)
- {
- if (delResult.removeBindResultResponseData.Result != 0)
- {
- Application.RunOnMainThread(() =>
- {
- new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- CommonPage.Loading.Hide();
- });
- return;
- }
- }
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
+ btnFinifh.Enable = true;
+ btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
+ CommonPage.Loading.Hide();
+ });
+ return;
}
}
@@ -1204,9 +1226,16 @@
{
CommonPage.Loading.Hide();
new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance);
- btnFinifh.Enable = true;
- btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- return;
+
+ ShowReLoadView();
+ ReLoadAction += () =>
+ {
+ this.midFrameLayout.RemoveAll();
+ //鍒濆鍖栬澶囨暟鎹�
+ CommonPage.Loading.Start("");
+ MidFrameLayoutContent();
+ InitData(true);
+ };
});
}
else
@@ -1215,39 +1244,8 @@
{
targetList.Clear();
targetListTemp.Clear();
- switch (curDeviceBindType)
- {
- case BindInfo.BindType.FreshAir:
- if (actionFreshAirTarget != null)
- {
- actionFreshAirTarget(addBindeDev.BindName);
- }
- break;
- case BindInfo.BindType.Temperature:
- if (actionTemperatureTarget != null)
- {
- actionTemperatureTarget(addBindeDev.BindName);
- }
- break;
- case BindInfo.BindType.Humidity:
- if (actionHumidityTarget != null)
- {
- actionHumidityTarget(addBindeDev.BindName);
- }
- break;
- case BindInfo.BindType.PM:
- if (actionPMTarget != null)
- {
- actionPMTarget(addBindeDev.BindName);
- }
- break;
- case BindInfo.BindType.AC:
- if (actionAcTarget != null)
- {
- actionAcTarget(addBindeDev.BindName);
- }
- break;
- }
+
+ TargesBindName(addBindeDev.BindName);
Application.RunOnMainThread(() =>
{
@@ -1308,9 +1306,9 @@
}
/// <summary>
- /// 鐩爣涓虹┖鏃剁殑鏂囨湰鏄剧ず
+ /// 鐩爣涓烘枃鏈樉绀�
/// </summary>
- void EmptyTargesMess()
+ void EmptyTargesMess1()
{
switch (curDeviceBindType)
{
@@ -1346,6 +1344,45 @@
break;
}
}
+ /// <summary>
+ /// 鐩爣涓烘枃鏈樉绀�
+ /// </summary>
+ void TargesBindName(string name = "")
+ {
+ switch (curDeviceBindType)
+ {
+ case BindInfo.BindType.FreshAir:
+ if (actionFreshAirTarget != null)
+ {
+ actionFreshAirTarget(name);
+ }
+ break;
+ case BindInfo.BindType.Temperature:
+ if (actionTemperatureTarget != null)
+ {
+ actionTemperatureTarget(name);
+ }
+ break;
+ case BindInfo.BindType.Humidity:
+ if (actionHumidityTarget != null)
+ {
+ actionHumidityTarget(name);
+ }
+ break;
+ case BindInfo.BindType.PM:
+ if (actionPMTarget != null)
+ {
+ actionPMTarget(name);
+ }
+ break;
+ case BindInfo.BindType.AC:
+ if (actionAcTarget != null)
+ {
+ actionAcTarget(name);
+ }
+ break;
+ }
+ }
/// <summary>
/// 缁戝畾鐩爣鍒楄〃
@@ -1364,7 +1401,6 @@
{
if (device.Type == DeviceType.FreshAir)
{
- targetList.Add(device);
oldTargetList.Add(device);
}
}
@@ -1375,7 +1411,6 @@
var bDev = device as TemperatureSensor;
if (bDev.SensorDiv == 1)
{
- targetList.Add(device);
oldTargetList.Add(device);
}
}
@@ -1383,7 +1418,6 @@
{
if (bindDev.BindCluster == 1026)
{
- targetList.Add(device);
oldTargetList.Add(device);
}
}
@@ -1394,20 +1428,17 @@
var bDev = device as TemperatureSensor;
if (bDev.SensorDiv == 2)
{
- targetList.Add(device);
oldTargetList.Add(device);
}
}
if (device.Type == DeviceType.FreshAirHumiditySensor)
{
- targetList.Add(device);
oldTargetList.Add(device);
}
if (device.Type == DeviceType.PMSensor)
{
if (bindDev.BindCluster == 1029)
{
- targetList.Add(device);
oldTargetList.Add(device);
}
}
@@ -1417,7 +1448,6 @@
{
if (bindDev.BindCluster == 1066)
{
- targetList.Add(device);
oldTargetList.Add(device);
}
}
@@ -1427,12 +1457,18 @@
{
if (bindDev.BindCluster == 513)
{
- targetList.Add(device);
oldTargetList.Add(device);
}
}
break;
}
+
+ targetList.Clear();
+ if (oldTargetList.Count != 0)
+ {
+ targetList.Add(oldTargetList[0]);
+ }
+
targetListTemp.Clear();
foreach (var d in targetList)
{
@@ -1492,14 +1528,26 @@
removeDevice.BindCluster = 1066;
break;
case BindInfo.BindType.AC:
- removeDevice.BindCluster = 513;
+ removeDevice.BindCluster = 513;//Ac闇�瑕佺粦瀹�2涓皣513鍜�514
break;
}
removeDevice.BindMacAddr = bd.DeviceAddr;
removeDevice.BindEpoint = bd.DeviceEpoint;
delDevice.RemoveBindList.Add(removeDevice);
+
+ if (curDeviceBindType == BindInfo.BindType.AC)
+ {
+ //瑕佺Щ闄ょ┖璋冿細闇�瑕佺Щ闄�513锛�514
+ var removeDevice3 = new RemoveBindListObj();
+ removeDevice3.BindCluster = 514;
+ removeDevice3.BindType = 0;
+ removeDevice3.BindMacAddr = bd.DeviceAddr;
+ removeDevice3.BindEpoint = bd.DeviceEpoint;
+ delDevice.RemoveBindList.Add(removeDevice3);
+ }
return delDevice;
}
+
#endregion
#region 绉婚櫎鏂规硶
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
index cc2bc06..9c7b1f1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceAddSuccessForm.cs
@@ -46,7 +46,7 @@
}
//娣诲姞鏂拌澶囩殑璇�,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
//璁剧疆鏍囬淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddDevice));
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
index 4e36633..1c30f0e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -151,7 +151,7 @@
listView.BeginHeaderRefreshingAction += () =>
{
//鍒锋柊璁惧鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
HdlThreadLogic.Current.RunThread(() =>
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
index abcd1c3..1bd57b2 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs
@@ -102,10 +102,13 @@
{
//绠�绾﹂潰鏉块殢渚夸竴涓洖璺潵鑾峰彇璁惧淇℃伅
var dev = Common.LocalDevice.Current.GetDevice(deviceMac, 62);
- var key = new ZigBee.Device.Panel();
- key.DeviceAddr = deviceMac;
- key.CurrentGateWayId = dev.CurrentGateWayId;
- InitBindInfo(key);
+ if (dev != null)
+ {
+ var key = new ZigBee.Device.Panel();
+ key.DeviceAddr = deviceMac;
+ key.CurrentGateWayId = dev.CurrentGateWayId;
+ InitBindInfo(key);
+ }
}
}
@@ -710,7 +713,8 @@
private void AddPirSensorWorkModeRow()
{
if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir
- || deviceEnumInfo.IsHdlDevice == false)
+ || deviceEnumInfo.IsHdlDevice == false
+ || this.listNewDevice.Count != 2)
{
return;
}
@@ -739,7 +743,8 @@
/// </summary>
private void AddPirSensorBindRow()
{
- if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir)
+ if (this.deviceEnumInfo.ConcreteType != DeviceConcreteType.Sensor_Pir
+ || this.listNewDevice.Count != 2)
{
return;
}
@@ -1207,6 +1212,10 @@
foreach (var bDev in bindList)
{
var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
+ if (device == null)
+ {
+ continue;
+ }
if (device.Type == DeviceType.TemperatureSensor)
{
var bD = device as TemperatureSensor;
@@ -1499,7 +1508,17 @@
//妫�娴嬫鍥炶矾鏄惁鎷ユ湁瀹氫綅鍔熻兘(鎷跨鐐规渶灏忕殑閭d釜鍥炶矾鍘诲畾浣�)
bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]);
- var frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
+ TopRightMenuControl frame = null;
+
+ if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
+ {
+ frame = new TopRightMenuControl(3, 1);
+ }
+ else
+ {
+ frame = new TopRightMenuControl(canTest == true ? 2 : 1, 1);
+ }
+
string deviceMenu = string.Empty;
if (canTest == true)
{
@@ -1530,6 +1549,23 @@
});
});
+ //鍚屾
+ deviceMenu = Language.StringByID(R.MyInternationalizationString.Synchronization);
+ if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(listNewDevice[0]))
+ {
+ frame.AddRowMenu(deviceMenu, "", "Item/SynchronizationSelected.png", () =>
+ {
+ //濡傛灉褰撳墠浣忓畢鏄櫄鎷熶綇瀹�,姝ゅ姛鑳芥棤鏁�
+ if (Common.Config.Instance.Home.IsVirtually == true)
+ {
+ return;
+ }
+
+ //鍚屾鎸囧畾璁惧
+ this.SynchronizationDevice();
+ });
+ }
+
}
/// <summary>
@@ -1557,6 +1593,27 @@
});
});
}
+
+ /// <summary>
+ /// 鍚屾鎸囧畾璁惧
+ /// </summary>
+ private void SynchronizationDevice()
+ {
+ HdlThreadLogic.Current.RunThread(async () =>
+ {
+ //鎵撳紑杩涘害鏉�
+ this.ShowProgressBar();
+
+ //鍚屾璁惧
+ bool result = await Common.LocalDevice.Current.SynchronizationDevice(listNewDevice);
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar();
+ if (result == false)
+ {
+ return;
+ }
+ });
+ }
#endregion
#region 鈻� 鍏抽棴鐣岄潰___________________________
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
index a75e0d8..7dec652 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs
@@ -202,7 +202,10 @@
foreach (var bDev in bindList)
{
var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
-
+ if (device == null)
+ {
+ continue;
+ }
if (device.Type == DeviceType.FreshAir)
{
//鑾峰彇璁惧绫诲瀷鐨�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs
index e6c53d3..6b6ac40 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs
@@ -208,7 +208,10 @@
foreach (var bDev in bindList)
{
var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
-
+ if (device == null)
+ {
+ continue;
+ }
if (device.Type == DeviceType.FreshAir)
{
//鑾峰彇璁惧绫诲瀷鐨�
@@ -283,6 +286,19 @@
}
bindAcDev = device;
+ }
+ else if (device.Type == DeviceType.PMSensor)
+ {
+ if (bDev.BindCluster == 1026)
+ {
+ bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
+ bindTemperatureDev = device;
+ }
+ if (bDev.BindCluster == 1029)
+ {
+ bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
+ bindHumidityDev = device;
+ }
}
}
count++;
@@ -458,7 +474,7 @@
var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700);
rowHumidity.ButtonClickEvent += (sender, e) =>
{
- this.deviceObj.DeviceEpoint = 2;
+ this.deviceObj.DeviceEpoint = 1;
var paneTargetsBaseFormp = new PaneTargetsBaseForm(this.deviceObj, bindAcDev, DeviceBind.BindInfo.BindType.Humidity);
Shared.Phone.UserView.HomePage.Instance.AddChidren(paneTargetsBaseFormp);
Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionAddTargetsForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionAddTargetsForm.cs
index 9ae205e..2083145 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionAddTargetsForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleMutilfunctionAddTargetsForm.cs
@@ -129,6 +129,10 @@
/// 聽鍒锋柊缁戝畾琛ㄩ〉闈⒙犅�
/// </summary>
public Action actionRefreshBindList;
+ /// <summary>
+ /// 鏄惁鑳藉埛鏂�
+ /// </summary>
+ private bool canFresh = false;
#endregion
#region UI璁捐
@@ -139,6 +143,8 @@
{
TitleUI();
MidFrameLayouUI();
+ //棣栨鍒濆鍖栨暟鎹�
+ CommonPage.Loading.Start("");
InitData();
}
@@ -211,6 +217,7 @@
midVerticalScrolViewLayout.BeginHeaderRefreshingAction += () =>
{
midVerticalScrolViewLayout.BeginHeaderRefreshing();
+ canFresh = true;
InitData();
};
@@ -255,169 +262,28 @@
}
/// <summary>
- /// 妤煎眰閫夋嫨鐨勪晶杈规爮
- /// </summary>
- void SideslipFramelayout()
- {
- var dialog = new Dialog
- {
- };
- dialog.Show();
-
- var flMain = new FrameLayout { BackgroundColor = 0x00000000 };
- dialog.AddChidren(flMain);
- flMain.MouseUpEventHandler += (sender11, e11) =>
- {
- dialog.Close();
- };
-
- var sidelipFrameLayout = new FrameLayout()
- {
- Width = Application.GetMinReal(449),
- Y = Application.GetRealHeight(161),
- X = Application.GetRealWidth(596),
- BackgroundImagePath = "DoorLock/SideslipPic.png",
- };
- flMain.AddChidren(sidelipFrameLayout);
-
- var btnSelectFloor = new Button()
- {
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealHeight(58),
- X = Application.GetRealWidth(81),
- Y = Application.GetRealHeight(81),
- TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
- TextSize = 14,
- IsBold = true,
- TextAlignment = TextAlignment.CenterLeft,
- TextID = R.MyInternationalizationString.SelectFloor,
- };
- sidelipFrameLayout.AddChidren(btnSelectFloor);
-
- var sidelipVerticalScrolViewLayout = new VerticalScrolViewLayout()
- {
- Y = btnSelectFloor.Bottom + Application.GetRealHeight(45),
- Height = Application.GetRealHeight(600),
- };
- sidelipFrameLayout.AddChidren(sidelipVerticalScrolViewLayout);
-
- Button oldbutton = null;
- Button oldbuttonText = null;
- int count = 0;
- foreach (var floorId in dicFloorList.Keys)
- {
- var rowFrameLayout = new RowLayout()
- {
- Height = Application.GetRealHeight(152),
- LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
- X = Application.GetRealWidth(81),
- };
- sidelipVerticalScrolViewLayout.AddChidren(rowFrameLayout);
-
- var btnAllMethod = new Button()
- {
- Width = Application.GetMinReal(81),
- Height = Application.GetMinReal(81),
- UnSelectedImagePath = "Floor/Floor.png",
- SelectedImagePath = "Floor/FloorSelected.png",
- Gravity = Gravity.CenterVertical,
- };
- rowFrameLayout.AddChidren(btnAllMethod);
-
- var btnMethodText = new Button()
- {
- Width = Application.GetRealWidth(311),
- Height = Application.GetRealHeight(58),
- X = Application.GetRealWidth(92),
- Gravity = Gravity.CenterVertical,
- TextColor = Shared.Common.ZigbeeColor.Current.XMGray3,
- TextSize = 14,
- TextAlignment = TextAlignment.CenterLeft,
- Text = dicFloorList[floorId],
- };
- rowFrameLayout.AddChidren(btnMethodText);
-
- if (curControlDev.currentSelectFloorId == floorId)
- {
- btnAllMethod.IsSelected = true;
- btnAllMethod.IsBold = true;
- btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- }
-
- string curFloorId = floorId;
- EventHandler<MouseEventArgs> hander = (sender, e) =>
- {
- if (curControlDev.currentSelectFloorId == curFloorId)
- {
- return;
- }
- curControlDev.currentSelectFloorId = curFloorId;
-
-
-
- if (!btnMethodText.IsSelected)
- {
- if (oldbutton != null)
- {
- oldbutton.IsSelected = false;
- }
- if (oldbuttonText != null)
- {
- oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3;
- }
- oldbutton = btnMethodText;
- oldbuttonText = btnMethodText;
- btnMethodText.IsSelected = true;
- oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack;
- oldbuttonText.IsBold = true;
- }
-
- int index = 0;
- RefreshRoomList();
- dialog.Close();
- };
- btnAllMethod.MouseUpEventHandler += hander;
- rowFrameLayout.MouseUpEventHandler += hander;
- btnMethodText.MouseUpEventHandler += hander;
- count++;
- }
-
- if (count == 0)
- {
- sidelipFrameLayout.Height = 0;
- }
- else if (count <= 4 && count > 0)
- {
- sidelipFrameLayout.Height = Application.GetRealHeight(180) + count * Application.GetRealHeight(150);
- }
- else
- {
- sidelipFrameLayout.Height = Application.GetMinReal(780);
- }
- }
-
- /// <summary>
/// 闈㈡澘缁戝畾鐩爣琛ㄦ樉绀�
/// </summary>
/// <param name="gateway">Gateway.</param>
/// <param name="key">Key.</param>
void RefreshRoomList()
{
- Room curRoom = null;
- if (supportRoomList.Count == 0)
- {
- return;
- }
btnHorizontalScrolViewLayout.RemoveAll();
+ Room curRoom = null;
Button curentOldRoom = null;
FrameLayout curentOldRoomFrameLayout = null;
int index = 0;
- curBindTypeList = MutilfunctionPanelMethod.GetMatchBindList(curBindType);
- var roomTempList = MutilfunctionPanelMethod.GetSupportRoomList(curControlDev, supportRoomList, curBindTypeList, curBindType);
+ List<Room> roomTempList = new List<Room> { };
Room slectedRoom = null;
var roomUn = new Room();
roomUn.Name = Language.StringByID(R.MyInternationalizationString.Undistributed);
roomUn.Id = "UndistributedId";
+
+ if (supportRoomList.Count != 0)
+ {
+ roomTempList = MutilfunctionPanelMethod.GetSupportRoomList(curControlDev, supportRoomList, curBindTypeList, curBindType);
+ }
+
if (curBindType == 0)
{
if (undistributeScList != null && undistributeScList.Count != 0)
@@ -560,6 +426,8 @@
var btn = (Button)frame.GetChildren(0);
frame.BackgroundImagePath = "Item/RoomIconBackgroundSelected.png";
btn.TextColor = Shared.Common.ZigbeeColor.Current.XMWhite;
+ curentOldRoom = btn;
+ curentOldRoomFrameLayout = frame;
}
else
{
@@ -1027,17 +895,14 @@
{
try
{
- Application.RunOnMainThread(() =>
- {
- CommonPage.Loading.Start("");
- });
-
//鑾峰彇妤煎眰
dicFloorList = HdlRoomLogic.Current.GetFloorSortList();
curControlDev.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId();
- //鑾峰彇妤煎眰涓埧闂村垪琛�
- supportRoomList = BindInfo.GetFloorRoomList();
+ //鑾峰彇鎴块棿鍒楄〃
+ supportRoomList = BindInfo.GetSupportRoomList();
+ //鑾峰彇闈㈡澘宸茬粡缁戝畾鐨勫尮閰嶇被鍨嬬殑鍒楄〃
+ curBindTypeList = MutilfunctionPanelMethod.GetMatchBindList(curBindType);
if (curBindType == 0)
{
@@ -1077,14 +942,17 @@
{
Application.RunOnMainThread(() =>
{
- BindDownFrameLayout(this.midFrameLayout, curControlDev, dicFloorList, ref btnFloorText);
+ if (!canFresh)
+ {
+ BindDownFrameLayout(this.midFrameLayout, curControlDev, dicFloorList, ref btnFloorText);
+ }
ChooseFloorAction += (floorId, btnMethodText) =>
{
btnFloorText.Text = dicFloorList[floorId];
- //鑾峰彇妤煎眰涓埧闂村垪琛�
+ //鑾峰彇鎴块棿鍒楄〃
supportRoomList.Clear();
- supportRoomList = BindInfo.GetFloorRoomList();
+ supportRoomList = BindInfo.GetSupportRoomList();
if (curBindType == 0)
{
// 鑾峰彇鏈湴鏈垎閰嶇殑鏀寔褰撳墠绫诲瀷鐨勭粦瀹氬満鏅垪琛�
@@ -1097,15 +965,18 @@
}
RefreshRoomList();
};
-
- btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
- //鑾峰彇妤煎眰涓埧闂村垪琛�
- if (supportRoomList.Count != 0)
+ //榛樿妤煎眰鏄剧ず
+ if (BindInfo.GetCurrentSelectFloorIdName() != null)
{
- RefreshRoomList();
+ Application.RunOnMainThread(() =>
+ {
+ btnFloorText.Text = BindInfo.GetCurrentSelectFloorIdName();
+ });
}
-
+ //鑾峰彇妤煎眰涓埧闂村垪琛�
+ RefreshRoomList();
CommonPage.Loading.Hide();
+ canFresh = false;
midVerticalScrolViewLayout.EndHeaderRefreshing();
});
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs
index 7999dcc..73f495e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionDirectoryListForm.cs
@@ -39,9 +39,9 @@
Type type = typeof(DirNameResourse);
- var PropertyList = type.GetFields();
+ var PropertyList = type.GetProperties();
- var listFile = new List<System.Reflection.FieldInfo>();
+ var listFile = new List<System.Reflection.PropertyInfo>();
foreach (var item in PropertyList)
{
if (item.Name.EndsWith("Directory") == true)
@@ -84,13 +84,7 @@
private void AddRowControl(VerticalListControl listView, string directory, string directoryValue, bool addLine)
{
- string localDir = DirNameResourse.LocalMemoryDirectory;
- string myPath = System.IO.Path.Combine(localDir, directoryValue);
- if (localDir.EndsWith(directoryValue) == true)
- {
- myPath = localDir;
- }
- if (System.IO.Directory.Exists(myPath) == false)
+ if (System.IO.Directory.Exists(directoryValue) == false)
{
return;
}
@@ -106,7 +100,7 @@
row1.ButtonClickEvent += (sender, e) =>
{
var form = new HideOptionFileListForm();
- form.AddForm(myPath);
+ form.AddForm(directoryValue);
};
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
index 540f95a..91d8619 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
@@ -102,9 +102,13 @@
var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(System.Text.Encoding.UTF8.GetString(byteData));
if (revertObj.StateCode == "AccountNoExists")
{
- //鎴愬憳涓嶅瓨鍦�
- var form = new MemberNotEsixtForm();
- form.AddForm();
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //鎴愬憳涓嶅瓨鍦�
+ var form = new MemberNotEsixtForm();
+ form.AddForm();
+ });
+
return;
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
old mode 100755
new mode 100644
index 00891a0..5805a8c
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
@@ -144,9 +144,6 @@
if (string.IsNullOrEmpty(resultValue) == true)
{
- //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
- string msg = Language.StringByID(R.MyInternationalizationString.uUnKnownError);
- this.ShowMassage(ShowMsgType.Tip, msg);
return;
}
List<MemberInfoRes> listInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<MemberInfoRes>>(resultValue);
@@ -159,12 +156,12 @@
break;
}
}
- if (memberInfoRes == null)
- {
- //鍑虹幇鏈煡閿欒,鏁版嵁涓㈠け
- string msg = Language.StringByID(R.MyInternationalizationString.uUnKnownError);
- this.ShowMassage(ShowMsgType.Tip, msg);
- return;
+ if (memberInfoRes == null)
+ {
+ //鍑虹幇鎰忓鎯呭喌,鏁版嵁涓㈠け
+ string msg = Language.StringByID(R.MyInternationalizationString.uUnKnownErrorAndLostData);
+ this.ShowMassage(ShowMsgType.Tip, msg);
+ return;
}
string iconPath = System.IO.Path.Combine(UserCenterResourse.AccountOption.UserPictruePath, memberInfoRes.DistributedMark + ".png");
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
index 1f576c5..e88ead1 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
@@ -433,9 +433,12 @@
var revertObj = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResponsePack>(System.Text.Encoding.UTF8.GetString(byteData));
if (revertObj.StateCode == "AccountNoExists")
{
- //鎴愬憳涓嶅瓨鍦�
- var form = new MemberNotEsixtForm();
- form.AddForm();
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //鎴愬憳涓嶅瓨鍦�
+ var form = new MemberNotEsixtForm();
+ form.AddForm();
+ });
return;
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
index 4798b97..745feb7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
@@ -215,7 +215,7 @@
}
//娣诲姞鎴块棿,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
HdlRoomLogic.Current.AddRoom(newRoom);
this.FinishEditorEvent?.Invoke();
@@ -275,6 +275,11 @@
{
//鑾峰彇娓╁害浼犳劅鍣�
if (device is ZigBee.Device.TemperatureSensor && ((ZigBee.Device.TemperatureSensor)device).SensorDiv == 1)
+ {
+ listDevice.Add(device);
+ }
+ //PM2.5鏄俯搴﹀拰婀垮害鍚堝湪鍚屼竴涓鐐�
+ else if (device.Type == ZigBee.Device.DeviceType.PMSensor)
{
listDevice.Add(device);
}
@@ -385,10 +390,16 @@
{
listDevice.Add(device);
}
+ //鏂伴
else if (device.Type == ZigBee.Device.DeviceType.FreshAirHumiditySensor)
{
listDevice.Add(device);
}
+ //PM2.5鏄俯搴﹀拰婀垮害鍚堝湪鍚屼竴涓鐐�
+ else if (device.Type == ZigBee.Device.DeviceType.PMSensor)
+ {
+ listDevice.Add(device);
+ }
}
var listSelect = new List<string>() { newRoom.HumidityDevice };
var form = new SelectDeviceForm();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
index af6cd06..920a4ab 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
@@ -315,7 +315,7 @@
}
//绠椾簡,杩欓噷濡傛灉鎸変笅淇濆瓨,鍒欎富椤甸渶瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
this.CloseForm();
};
@@ -372,6 +372,11 @@
{
//鑾峰彇娓╁害浼犳劅鍣�
if (device is ZigBee.Device.TemperatureSensor && ((ZigBee.Device.TemperatureSensor)device).SensorDiv == 1)
+ {
+ listDevice.Add(device);
+ }
+ //PM2.5鏄俯搴﹀拰婀垮害鍚堝湪鍚屼竴涓鐐�
+ else if (device.Type == ZigBee.Device.DeviceType.PMSensor)
{
listDevice.Add(device);
}
@@ -463,10 +468,16 @@
{
listDevice.Add(device);
}
+ //鏂伴
else if (device.Type == ZigBee.Device.DeviceType.FreshAirHumiditySensor)
{
listDevice.Add(device);
}
+ //PM2.5鏄俯搴﹀拰婀垮害鍚堝湪鍚屼竴涓鐐�
+ else if (device.Type == ZigBee.Device.DeviceType.PMSensor)
+ {
+ listDevice.Add(device);
+ }
}
var listSelect = new List<string>() { cloneRoom.HumidityDevice };
var form = new SelectDeviceForm();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
index dee8d57..948b78c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/ResidenceManagementForm.cs
@@ -352,11 +352,11 @@
Common.Config.Instance.Home.FloorDics.Remove(keys);
if (Common.Config.Instance.Home.CurrentFloorId == keys)
{
- //濡傛灉鍒犻櫎鐨勬槸褰撳墠妤煎眰鐨勮瘽
Common.Config.Instance.Home.CurrentFloorId = string.Empty;
- foreach (string floorId in Common.Config.Instance.Home.FloorDics.Keys)
+ var dicFloor = HdlRoomLogic.Current.GetFloorSortList();
+ foreach (var floorId in dicFloor.Keys)
{
- //鎶婄涓�涓ゼ灞侷D缁欏畠
+ //鎶婄涓�涓ゼ灞傝祴鍊肩粰褰撳墠妤煎眰
Common.Config.Instance.Home.CurrentFloorId = floorId;
break;
}
@@ -406,7 +406,7 @@
this.AdjustContrlTableHeight();
}
//鍒犻櫎妤煎眰鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
});
};
}
@@ -464,7 +464,6 @@
Common.Config.Instance.Home.Save();
if (Common.Config.Instance.Home.CurrentFloorId == string.Empty)
{
- Common.Config.Instance.Home.CurrentFloorId = keys;
//鍒涘缓绗竴涓柊鐨勬ゼ灞傜殑璇�,闇�瑕佸幓鍒锋柊涓婚〉宸﹁竟鐨勬埧闂村垪琛�
HdlRoomLogic.Current.RefreshRoomListView();
}
@@ -478,7 +477,7 @@
this.InitFrameTableByMode();
}
//鍒涘缓鎴栬�呬慨鏀规ゼ灞傜殑璇�,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
}
});
}
@@ -619,7 +618,7 @@
this.AdjustContrlTableHeight();
}
//鍒犻櫎鎴块棿鐨勮瘽,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
});
};
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs
index 4ed7043..c80a36f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/AlarmTargetAddMenuForm.cs
@@ -157,7 +157,7 @@
btnIconContr.ButtonClickEvent += (sender, e) =>
{
//妤煎眰鑿滃崟
- var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, Language.StringByID(R.MyInternationalizationString.SelectFloor));
+ var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, this.nowSelectFloorId, Language.StringByID(R.MyInternationalizationString.SelectFloor));
foreach (var floorId in dicFloor.Keys)
{
contr.AddRowMenu(floorId, () =>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
index 64c7cd3..7be9dbd 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -254,7 +254,7 @@
UserCenterResourse.ResidenceOption.Save();
btnShortCut.IsSelected = false;
//鍙栨秷涓婚〉鐨勩�屽畨闃层�嶆嵎寰勭殑璇�,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
});
}
else
@@ -266,7 +266,7 @@
UserCenterResourse.ResidenceOption.Save();
btnShortCut.IsSelected = true;
//鍒涘缓涓婚〉鐨勩�屽畨闃层�嶆嵎寰勭殑璇�,涓婚〉闇�瑕侀噸鏂板埛鏂�
- UserView.UserPage.Instance.RefreshForm = true;
+ UserView.UserPage.Instance.RefreshAllForm = true;
});
}
};
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs
index 5506715..6f0377a 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/AddNewSharedListRoomForm.cs
@@ -144,7 +144,7 @@
btnIconContr.ButtonClickEvent += (sender, e) =>
{
//妤煎眰鑿滃崟
- var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, Language.StringByID(R.MyInternationalizationString.SelectFloor));
+ var contr = new TopRightFloorMenuControl(dicFloor.Count, 2, this.nowSelectFloorId, Language.StringByID(R.MyInternationalizationString.SelectFloor));
foreach (var floorId in dicFloor.Keys)
{
contr.AddRowMenu(floorId, () =>
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
index a2fb881..c7009e5 100755
--- a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -52,7 +52,15 @@
/// <summary>
/// 濡傛灉璁剧疆姝ゅ彉閲忎负true,鍒欏湪鍗曞嚮搴曢儴鑿滃崟鏃�,寮哄埗鏃犳潯浠跺叏閮ㄥ埛鏂�
/// </summary>
- public bool RefreshForm = false;
+ public bool RefreshAllForm = false;
+ /// <summary>
+ /// 鍒锋柊涓婚〉
+ /// </summary>
+ public bool RefreshMainPageForm = false;
+ /// <summary>
+ /// 鍒锋柊鍒嗙被
+ /// </summary>
+ public bool RefreshCategoryForm = false;
#endregion
@@ -230,20 +238,20 @@
/// <param name="handClick">鏄惁鏄墜鍔ㄧ偣鍑�</param>
private void BottomMenuClickEvent(MenuSelectEnum selectEnum, bool handClick)
{
- if (this.RefreshForm == false && selectEnum == this.nowSelectMenu && handClick == true)
+ if (this.RefreshAllForm == false && selectEnum == this.nowSelectMenu && handClick == true)
{
//鎵嬪姩鐐瑰嚮鍚屼竴涓彍鍗�,鍒欎笉鍋氬鐞�
return;
}
//濡傛灉寮哄埗鎸囧畾鍒锋柊鐣岄潰鐨勮瘽
- if (this.RefreshForm == true)
+ if (this.RefreshAllForm == true)
{
//鍏ㄩ儴鍒锋柊
this.listForm = new List<EditorCommonForm>() { null, null, null };
this.bodyFrameView.RemoveAll();
- this.RefreshForm = false;
+ this.RefreshAllForm = false;
}
this.nowSelectMenu = selectEnum;
@@ -253,6 +261,13 @@
{
//宸︽粦鑿滃崟鍙�
CommonPage.Instance.IsDrawerLockMode = false;
+ if (this.RefreshMainPageForm == true)
+ {
+ //鍒锋柊涓婚〉
+ listForm[0]?.CloseForm();
+ listForm[0] = null;
+ this.RefreshMainPageForm = false;
+ }
if (listForm[0] == null)
{
var form = new MainPage.HomeMainPageForm();
@@ -266,6 +281,13 @@
{
//宸︽粦鑿滃崟涓嶅彲
CommonPage.Instance.IsDrawerLockMode = true;
+ if (this.RefreshCategoryForm == true)
+ {
+ //鍒锋柊鍒嗙被
+ listForm[1]?.CloseForm();
+ listForm[1] = null;
+ this.RefreshCategoryForm = false;
+ }
if (listForm[1] == null)
{
var form = new Category.CategoryMainForm();
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
index 561bff8..0ae3f20 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/CommonDevice.cs
@@ -850,6 +850,109 @@
}
#endregion
+ #region 涓�閿洿鏂板洓瀵稿睆鎸夐敭灞炴��
+ /// <summary>
+ /// 鍚屾璁惧鍔熻兘
+ /// </summary>
+ /// <returns></returns>
+ public async System.Threading.Tasks.Task<SynchronizationDeviceResponseAllData> SyncMsgToBindSource(string deviceAddr, int deviceEpoint)
+ {
+ if (Gateway == null)
+ {
+ return null;
+ }
+
+ return await System.Threading.Tasks.Task.Run(async () =>
+ {
+ SynchronizationDeviceResponseAllData resContent = null;
+ Action<string, string> action = (topic, message) =>
+ {
+ var gatewayID = topic.Split('/')[0];
+ var jobject = Newtonsoft.Json.Linq.JObject.Parse(message);
+
+ if (topic == gatewayID + "/" + "Error_Respon")
+ {
+ var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.ErrorResponData>(jobject["Data"].ToString());
+
+ if (temp == null)
+ {
+ resContent = new SynchronizationDeviceResponseAllData { errorMessageBase = "缃戝叧閿欒鍥炲锛屼笖鏁版嵁鏄┖" };
+ }
+ else
+ {
+ resContent = new SynchronizationDeviceResponseAllData { errorResponData = temp, errorMessageBase = ErrorMess(temp.Error) };
+ }
+ }
+
+ if (topic == gatewayID + "/" + "Bind/SyncMsgToBindSourceRespon")
+ {
+ var res = Newtonsoft.Json.JsonConvert.DeserializeObject<int>(jobject["Data"]["Result"].ToString());
+ if (res == null)
+ {
+ resContent = new SynchronizationDeviceResponseAllData { errorMessageBase = "缃戝叧杩斿洖鐨勬暟鎹负绌�" };
+ }
+ else
+ {
+ resContent = new SynchronizationDeviceResponseAllData { result = res };
+ System.Console.WriteLine($"UI鏀跺埌閫氱煡鍚庣殑涓婚_{ topic}");
+ }
+ }
+ };
+ Gateway.Actions = action;
+ DebugPrintLog("Bind/SyncMsgToBindSourceRespon_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
+
+ try
+ {
+ var jObject = new JObject { { "DeviceAddr", deviceAddr }, { "Epoint", deviceEpoint }, { "Cluster_ID", 0 }, { "Command", 5010 } };
+ Gateway.Send("Bind/SyncMsgToBindSource", jObject.ToString());
+ }
+ catch { }
+
+ var dateTime = DateTime.Now;
+ while ((DateTime.Now - dateTime).TotalMilliseconds < WaitReceiveDataTime)
+ {
+ await System.Threading.Tasks.Task.Delay(10);
+ if (resContent != null)
+ {
+ break;
+ }
+ }
+ if ((DateTime.Now - dateTime).TotalMilliseconds > WaitReceiveDataTime)
+ {
+ resContent = new SynchronizationDeviceResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
+ }
+ Gateway.Actions -= action;
+ DebugPrintLog("Bind/SyncMsgToBindSource_Actions 閫�鍑�" + System.DateTime.Now.ToString());
+
+ return resContent;
+ });
+
+ }
+
+ /// <summary>
+ /// 鍚屾璁惧,缃戝叧鍙嶉鍏蜂綋淇℃伅
+ /// </summary>
+ [System.Serializable]
+ public class SynchronizationDeviceResponseAllData
+ {
+ /// <summary>
+ /// 閿欒淇℃伅
+ /// </summary>
+ public string errorMessageBase;
+ /// <summary>
+ /// 缃戝叧淇℃伅閿欒鍙嶉
+ /// <para>褰撶綉鍏虫帴鏀跺埌瀹㈡埛绔俊鎭悗锛屽嚭鐜颁互涓嬪紓甯告儏鍐靛皢鍙嶉閿欒銆�</para>
+ /// </summary>
+ public ErrorResponData errorResponData;
+ /// <summary>
+ /// 鍚屾缁撴灉
+ /// 0:鎴愬姛锛氱綉鍏冲唴閮ㄨ嚜鍔ㄥ啓鍏ヨ澶囩洰鏍囧悕瀛椼�佽澶囩洰鏍囧姛鑳界被鍨嬨�佸満鏅洰鏍囧悕瀛椼�乽tc鏃堕棿鍐欏叆4瀵稿睆
+ /// 1:澶辫触
+ /// </summary>
+ public int result;
+ }
+ #endregion
+
#region 鍒犻櫎璁惧锛堜娇璁惧绂荤綉锛�
/// <summary>
/// 鍒犻櫎璁惧锛堜娇璁惧绂荤綉锛�
@@ -900,7 +1003,7 @@
}
};
Gateway.Actions += action;
- System.Console.WriteLine("RemoveDevice_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
+ DebugPrintLog("RemoveDevice_Actions 鍚姩" + "_" + System.DateTime.Now.ToString());
try
{
@@ -938,7 +1041,7 @@
d = new RemoveDeviceResponseAllData { errorMessageBase = " 鍥炲瓒呮椂锛岃閲嶆柊鎿嶄綔" };
}
Gateway.Actions -= action;
- System.Console.WriteLine("RemoveDevice_Actions 閫�鍑�" + System.DateTime.Now.ToString());
+ DebugPrintLog("RemoveDevice_Actions 閫�鍑�" + System.DateTime.Now.ToString());
return d;
});
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
old mode 100755
new mode 100644
index d78def6..646002c
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -654,6 +654,14 @@
/// 璀﹀憡锛佹暟鎹嚭閿欙紝蹇呴』鍒锋柊鍒楄〃锛屽惁鍒欐帶鍒剁幇璞¢敊涔�
/// </summary>
public const int UpdateBindList = 335;
+ /// <summary>
+ /// 鍚屾
+ /// </summary>
+ public const int Synchronization = 336;
+ /// <summary>
+ /// 鍚屾澶辫触
+ /// </summary>
+ public const int SynchronizationFailed = 337;
public readonly static int cancel = 5097;
public readonly static int confrim = 5098;
@@ -942,6 +950,11 @@
public readonly static int dark = 5411;
public readonly static int bright = 5412;
public readonly static int tipIlluminanceValue = 5413;
+ public readonly static int videoIntercom = 5414;
+ public readonly static int dong = 5415;
+ public readonly static int unit = 5416;
+ public readonly static int theOutdoorUnit = 5417;
+
/// <summary>
@@ -5804,7 +5817,11 @@
/// <summary>
/// 闇�閲嶆柊缁戝畾
/// </summary>
- public const int uNeedToRebind = 16136;
+ public const int uNeedToRebind = 16136;
+ /// <summary>
+ /// 鍑虹幇鎰忓鎯呭喌,鏁版嵁涓㈠け
+ /// </summary>
+ public const int uUnKnownErrorAndLostData = 16137;
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
index 4d5db96..7de833c 100755
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -57,6 +57,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\RoomAndDeviceView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SkipView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SoneLogicList.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\VideoIntercom\VideoMachine.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountForgetPWD.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\Logic\AccountLogic.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountRegister.cs" />
--
Gitblit v1.8.0