From 2bf5ec775cb57d8015bee58c745a1e48081ff1b1 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期二, 15 十月 2019 11:06:05 +0800
Subject: [PATCH] 首次合并了全部的代码
---
ZigbeeApp/GateWay.Droid/Assets/Language.ini | 38
ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs | 671 -
ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs | 38
ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs | 2
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor44.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NotShardPic.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/deviceselectedbackgroundcolor.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/1.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedlight.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs | 2
ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 690 +
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs | 131
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/athome.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/scene.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor42.png | 0
ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs | 5
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/panel.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs | 281
ZigbeeApp/Shared/Phone/UserView/UserPage.cs | 44
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/InputAccountIcon.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs | 389 +
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs | 14
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs | 10
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/temperature.png | 0
ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs | 184
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/3.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsenor.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor40.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/delay1.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/light.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selected.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs | 2033 ++++-
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/doorlock.png | 0
ZigbeeApp/Shared/Common/ZigbeeColor.cs | 36
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor21.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ScanQRcodeIconSelected.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicbj2.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedpanel.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs | 1739 ++++
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nodelay.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs | 69
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor22.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/time.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MemberNotEsixtPic.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/security1.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs | 1740 ++-
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ScanQRcodeIcon.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedcurtain.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor277.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/timeparagraph.png | 0
ZigbeeApp/Shared/DLL/Shared.IOS.TBL.dll | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/security.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png | 0
ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs | 6
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedac.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor43.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedmonth.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/dimmableLight.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs | 556 +
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/humidity.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor22.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/next.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sunset.png | 0
ZigbeeApp/Shared/Shared.projitems | 13
ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs | 3
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/connect.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selecteddimmableLight.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs | 104
ZigbeeApp/Shared/Phone/UserCenter/Member/MemberNotEsixtForm.cs | 69
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/curtain.png | 0
ZigbeeApp/Shared/Phone/Device/CommonForm/RoomNoNameMainView.cs | 104
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/function.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs | 1280 ++-
ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs | 275
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor43.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/SelectedButton.cs | 45
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs | 18
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SecondaryPswSecurityForm.cs | 11
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/Ddmmablelight.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor13.png | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs | 77
ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs | 228
ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs | 36
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs | 22
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/iconBackgroundColor.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs | 17
ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs | 914 +
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor277.png | 0
ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj | 1065 -
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs | 12
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs | 37
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicaddcolor.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/leavehome.png | 0
ZigbeeApp/Shared/Common/CommonPage.cs | 5
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor13.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 275
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/scene1.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/ac.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor21.png | 0
ZigbeeApp/GateWay.Droid/Application.cs | 5
ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs | 422
ZigbeeApp/Shared/DLL/Shared.Droid.HDLWidget.dll | 0
ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs | 2
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor44.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/dropdown.png | 0
ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs | 628 +
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs | 8
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/delay.png | 0
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs | 187
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/2.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/airswitch.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/InputAccountIconSelected.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sunrise.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/function1.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs | 19
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noscene.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicbj1.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nosecurity.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/position.png | 0
ZigbeeApp/Shared/DLL/Shared.Droid.TouchID.dll | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/AddSelected.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs | 252
ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs | 763 +
ZigbeeApp/Shared/R.cs | 63
ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs | 374
ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs | 1452 +++
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noon.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor42.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/timepoint.png | 0
ZigbeeApp/Shared/Common/Logic.cs | 19
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selecteddoorlock.png | 0
ZigbeeApp/Shared/Common/Device.cs | 20
ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NotAuthority.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedairswitch.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs | 603
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs | 36
ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs | 1235 ++-
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/withdrawal.png | 0
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs | 50
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/iconSelectedBackgroundColor.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nofunction.png | 0
ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs | 18
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/back.png | 0
ZigbeeApp/Shared/DLL/Shared.Droid.dll | 0
ZigbeeApp/Shared/Phone/Device/CommonForm/SelectFunctionView.cs | 164
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor40.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicopen.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/point.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/deviceunselectedbackgroundcolor.png | 0
ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs | 377
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/add.png | 0
/dev/null | 681 -
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/drop-down.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicclose.png | 0
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sign.png | 0
ZigbeeApp/Shared/DLL/Shared.IOS.dll | 0
ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs | 1
ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs | 19
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs | 50
ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs | 2102 +++++
ZigbeeApp/Shared/Common/House.cs | 7
ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/light_1.png | 0
ZigbeeApp/Shared/Common/Room.cs | 19
164 files changed, 16,549 insertions(+), 6,315 deletions(-)
diff --git a/ZigbeeApp/GateWay.Droid/Application.cs b/ZigbeeApp/GateWay.Droid/Application.cs
index 856ef99..fc32ae7 100755
--- a/ZigbeeApp/GateWay.Droid/Application.cs
+++ b/ZigbeeApp/GateWay.Droid/Application.cs
@@ -36,6 +36,11 @@
BaseActivity.BackKeyAction = () => {
try
{
+ if (Shared.Common.CommonPage.BackKeyCanClick == false)
+ {
+ //涓嶅厑璁告寜杩斿洖閿�
+ return;
+ }
if (Shared.Common.CommonPage.Loading != null)
{
Console.WriteLine(Shared.Common.CommonPage.Loading.CurStatus);
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index 2969b1f..c2813c8 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -531,6 +531,32 @@
5302=鎸夐敭涓�
5303=鎸夐敭鍥�
5304=鏄惁瑕佸垹闄�?
+5305=寮�/鍏�
+5306=鏃犱汉绉诲姩鏃堕棿
+5307=鏃犱汉绉诲姩鏃�
+5308=瓒呰繃鏃堕棿鏈叧闂椂
+5309=鏈叧闂椂
+5340=姣忓懆
+5341=璇烽�夋嫨鎵ц鍛ㄦ湡锛屽惁鍒欐棤娉曟墽琛屼笅涓�姝�
+5342=闂ㄩ攣
+5343=閫夋嫨鐢ㄦ埛
+5344=瀵嗙爜
+5345=鎸囩汗
+5346=IC鍗�
+5347=绌烘皵寮�鍏�
+5348=涓轰綘鐨勫姩浣滃垱寤烘椂闂撮棿闅�
+5349=娣诲姞寤舵椂
+5350=鍒跺喎
+5351=鍒剁儹
+5352=鑷姩
+5353=闄ゆ箍
+5354=閫侀
+5355=浣庨
+5356=涓
+5357=楂橀
+5358=鎺ㄨ崘妯℃澘
+5359=浜烘潵鐏寒
+5360=浜鸿蛋鐏伃
@@ -546,7 +572,7 @@
10106=娉ㄥ唽鐢ㄦ埛
10107=璇疯緭鍏ラ偖绠�
10108=鎼滅储
-10109=纭畾
+10109=瀹屾垚
10110=璐﹀彿鐧诲綍
10111=鍙戦�侀獙璇佺爜
10112=鍚庨噸鍙�
@@ -612,6 +638,10 @@
13114=绉�
13115=鍒嗛挓
13116=灏忔椂
+13117=鏈垎閰�
+13118=鍏ㄩ��
+13119=娣诲姞鍒�
+
@@ -1010,7 +1040,7 @@
15189=宸茶缃梺璺�
15190=娣诲姞浼犳劅鍣�
15191=甯冮槻
-15192=纭畾瑕佹巿鏉冭璐﹀彿涓轰富璐﹀彿?
+15192=纭畾鎺堟潈銆寋0}銆嶆垚涓虹鐞嗗憳?
15193=纭畾瑕佹挙閿�璇ユ垚鍛樼鐞嗘潈闄愬悧锛�
15194=鎴愬憳鎺堟潈
15195=鎴愬憳鎺堟潈鎴愬姛
@@ -1532,6 +1562,10 @@
15771=缂栬緫鎴块棿
15772=鑾峰彇涓�...
15773=瀛樺湪闈炴硶瀛楃銆寋0}銆�
+15774=涓嶅瓨鍦ㄨ璐︽埛锛岃閲嶆柊杈撳叆
+15775=杩斿洖
+15776=杩樻病鏈夊叡浜尯鍩熺粰鎴愬憳{0}鍙偣鍑诲彸涓婅鈥�+鈥濇坊鍔�
+15777=纭鍒犻櫎鍏变韩鎴块棿锛�
;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
18004=鎸囧畾缃戝叧宸茬粡琚粦瀹�
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/InputAccountIcon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/InputAccountIcon.png
new file mode 100755
index 0000000..0bc95dc
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/InputAccountIcon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/InputAccountIconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/InputAccountIconSelected.png
new file mode 100755
index 0000000..537086b
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/InputAccountIconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MemberNotEsixtPic.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MemberNotEsixtPic.png
new file mode 100755
index 0000000..b441a8a
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/MemberNotEsixtPic.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NotAuthority.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NotAuthority.png
new file mode 100755
index 0000000..1e57c20
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NotAuthority.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NotShardPic.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NotShardPic.png
new file mode 100755
index 0000000..095968e
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/NotShardPic.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ScanQRcodeIcon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ScanQRcodeIcon.png
new file mode 100755
index 0000000..e6e9ce2
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ScanQRcodeIcon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ScanQRcodeIconSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ScanQRcodeIconSelected.png
new file mode 100755
index 0000000..7281096
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/ScanQRcodeIconSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png
new file mode 100755
index 0000000..cbc6eda
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconBackgroundColor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png
new file mode 100755
index 0000000..28f3760
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Room/iconSelectedBackgroundColor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/1.png
new file mode 100755
index 0000000..9cc9dbb
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/1.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/2.png
new file mode 100755
index 0000000..73589e5
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/2.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/3.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/3.png
new file mode 100755
index 0000000..cd45bfd
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/3.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/AddSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/AddSelected.png
new file mode 100755
index 0000000..d566501
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/AddSelected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/Ddmmablelight.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/Ddmmablelight.png
new file mode 100755
index 0000000..0e35b54
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/Ddmmablelight.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/ac.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/ac.png
new file mode 100755
index 0000000..0f83fb1
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/ac.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/add.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/add.png
new file mode 100755
index 0000000..0de2e77
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/add.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/airswitch.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/airswitch.png
new file mode 100755
index 0000000..3b8f3bb
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/airswitch.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/athome.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/athome.png
new file mode 100755
index 0000000..d96ce54
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/athome.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/back.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/back.png
new file mode 100755
index 0000000..01783ab
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/back.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/connect.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/connect.png
new file mode 100755
index 0000000..cc0f634
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/connect.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/curtain.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/curtain.png
new file mode 100755
index 0000000..78f44aa
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/curtain.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/delay.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/delay.png
new file mode 100755
index 0000000..081e226
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/delay.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/delay1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/delay1.png
new file mode 100755
index 0000000..0556053
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/delay1.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/deviceselectedbackgroundcolor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/deviceselectedbackgroundcolor.png
new file mode 100755
index 0000000..222bdb9
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/deviceselectedbackgroundcolor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/deviceunselectedbackgroundcolor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/deviceunselectedbackgroundcolor.png
new file mode 100755
index 0000000..5df12a6
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/deviceunselectedbackgroundcolor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/dimmableLight.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/dimmableLight.png
new file mode 100755
index 0000000..0e35b54
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/dimmableLight.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/doorlock.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/doorlock.png
new file mode 100755
index 0000000..c8b0a0f
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/doorlock.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/drop-down.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/drop-down.png
new file mode 100755
index 0000000..0ba04b0
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/drop-down.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/dropdown.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/dropdown.png
new file mode 100755
index 0000000..b272b15
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/dropdown.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/function.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/function.png
new file mode 100755
index 0000000..c493e4c
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/function.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/function1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/function1.png
new file mode 100755
index 0000000..7ab6716
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/function1.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/humidity.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/humidity.png
new file mode 100755
index 0000000..3bfa89d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/humidity.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/iconBackgroundColor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/iconBackgroundColor.png
new file mode 100755
index 0000000..cbc6eda
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/iconBackgroundColor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/iconSelectedBackgroundColor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/iconSelectedBackgroundColor.png
new file mode 100755
index 0000000..28f3760
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/iconSelectedBackgroundColor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/leavehome.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/leavehome.png
new file mode 100755
index 0000000..171bf20
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/leavehome.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/light.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/light.png
new file mode 100755
index 0000000..892e791
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/light.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/light_1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/light_1.png
new file mode 100755
index 0000000..892e791
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/light_1.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicaddcolor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicaddcolor.png
new file mode 100755
index 0000000..28a5977
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicaddcolor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicbj1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicbj1.png
new file mode 100755
index 0000000..908bb80
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicbj1.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicbj2.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicbj2.png
new file mode 100755
index 0000000..60c44ae
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicbj2.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicclose.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicclose.png
new file mode 100755
index 0000000..6c5746d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicclose.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicopen.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicopen.png
new file mode 100755
index 0000000..f0f0a42
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/logicopen.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/next.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/next.png
new file mode 100755
index 0000000..268e0c9
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/next.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nodelay.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nodelay.png
new file mode 100755
index 0000000..bbd6e09
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nodelay.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nofunction.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nofunction.png
new file mode 100755
index 0000000..1da2679
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nofunction.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noon.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noon.png
new file mode 100755
index 0000000..56fa0f4
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noon.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noscene.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noscene.png
new file mode 100755
index 0000000..9a710fe
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/noscene.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nosecurity.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nosecurity.png
new file mode 100755
index 0000000..395aaee
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/nosecurity.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/panel.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/panel.png
new file mode 100755
index 0000000..b10227f
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/panel.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/point.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/point.png
new file mode 100755
index 0000000..28e4411
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/point.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/position.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/position.png
new file mode 100755
index 0000000..38a1707
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/position.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/scene.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/scene.png
new file mode 100755
index 0000000..1a085e7
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/scene.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/scene1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/scene1.png
new file mode 100755
index 0000000..edef6af
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/scene1.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/security.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/security.png
new file mode 100755
index 0000000..5ba9cf1
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/security.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/security1.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/security1.png
new file mode 100755
index 0000000..0531aa4
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/security1.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selected.png
new file mode 100755
index 0000000..8090a4e
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selected.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedac.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedac.png
new file mode 100755
index 0000000..85d626d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedac.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedairswitch.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedairswitch.png
new file mode 100755
index 0000000..2699c8d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedairswitch.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedcurtain.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedcurtain.png
new file mode 100755
index 0000000..6940234
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedcurtain.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selecteddimmableLight.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selecteddimmableLight.png
new file mode 100755
index 0000000..fb01d0b
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selecteddimmableLight.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selecteddoorlock.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selecteddoorlock.png
new file mode 100755
index 0000000..ecabc55
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selecteddoorlock.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedlight.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedlight.png
new file mode 100755
index 0000000..852cd65
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedlight.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedmonth.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedmonth.png
new file mode 100755
index 0000000..d7779d3
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedmonth.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedpanel.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedpanel.png
new file mode 100755
index 0000000..0bc3863
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedpanel.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsenor.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsenor.png
new file mode 100755
index 0000000..ad426d7
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsenor.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor13.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor13.png
new file mode 100755
index 0000000..34fd2c1
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor13.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor21.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor21.png
new file mode 100755
index 0000000..aa12951
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor21.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor22.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor22.png
new file mode 100755
index 0000000..aa12951
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor22.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor277.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor277.png
new file mode 100755
index 0000000..3392659
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor277.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor40.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor40.png
new file mode 100755
index 0000000..b73ce2a
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor40.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor42.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor42.png
new file mode 100755
index 0000000..5015393
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor42.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor43.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor43.png
new file mode 100755
index 0000000..bdffdb9
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor43.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor44.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor44.png
new file mode 100755
index 0000000..d1c7c11
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/selectedsensor44.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor13.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor13.png
new file mode 100755
index 0000000..2de7965
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor13.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor21.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor21.png
new file mode 100755
index 0000000..36e2af3
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor21.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor22.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor22.png
new file mode 100755
index 0000000..36e2af3
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor22.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor277.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor277.png
new file mode 100755
index 0000000..cc0a514
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor277.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor40.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor40.png
new file mode 100755
index 0000000..522a291
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor40.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor42.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor42.png
new file mode 100755
index 0000000..1414d94
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor42.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor43.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor43.png
new file mode 100755
index 0000000..0c519d8
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor43.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor44.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor44.png
new file mode 100755
index 0000000..41653a0
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sensor44.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sign.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sign.png
new file mode 100755
index 0000000..aff814c
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sign.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sunrise.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sunrise.png
new file mode 100755
index 0000000..18073ca
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sunrise.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sunset.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sunset.png
new file mode 100755
index 0000000..6dd40b9
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/sunset.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/temperature.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/temperature.png
new file mode 100755
index 0000000..baa303e
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/temperature.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/time.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/time.png
new file mode 100755
index 0000000..e54ecf3
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/time.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/timeparagraph.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/timeparagraph.png
new file mode 100755
index 0000000..8872a53
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/timeparagraph.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/timepoint.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/timepoint.png
new file mode 100755
index 0000000..03a623e
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/timepoint.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/withdrawal.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/withdrawal.png
new file mode 100755
index 0000000..a54767d
--- /dev/null
+++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/ZigeeLogic/withdrawal.png
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
index d5962f1..ccc8183 100755
--- a/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
+++ b/ZigbeeApp/GateWay.Droid/GateWay.Droid.csproj
@@ -224,36 +224,62 @@
<AndroidResource Include="Resources\xml\file_paths.xml" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Language.ini" />
- </ItemGroup>
- <ItemGroup>
<ProjectReference Include="..\DroidLib\DroidLib.csproj">
<Project>{47EFF987-3192-4A56-A463-A940F245FF7D}</Project>
<Name>DroidLib</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
+ <AndroidAsset Include="Assets\Language.ini" />
+ <AndroidAsset Include="Assets\Phone\Account\Account.png" />
+ <AndroidAsset Include="Assets\Phone\Account\Cancle.png" />
+ <AndroidAsset Include="Assets\Phone\Account\Cat.png" />
+ <AndroidAsset Include="Assets\Phone\Account\ChangeSuccess.png" />
+ <AndroidAsset Include="Assets\Phone\Account\Code.png" />
+ <AndroidAsset Include="Assets\Phone\Account\HidePwd.png" />
+ <AndroidAsset Include="Assets\Phone\Account\Logo_loginBG.png" />
+ <AndroidAsset Include="Assets\Phone\Account\Logo_White.png" />
+ <AndroidAsset Include="Assets\Phone\Account\Password.png" />
+ <AndroidAsset Include="Assets\Phone\Account\PhoneEmail_White.png" />
+ <AndroidAsset Include="Assets\Phone\Account\UnhidePwd.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Add.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Fan_Height.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Fan_HeightSelected.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Fan_Low.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Fan_LowSelected.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Fan_Middle.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Fan_MiddleSelected.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Group.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_Auto.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_AutoSelected.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_Cool.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_CoolSelected.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_Dry.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_DrySelected.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_Fan.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_FanSelected.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_Heat.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Mode_HeatSelected.png" />
+ <AndroidAsset Include="Assets\Phone\AC\OpenOrClose.png" />
+ <AndroidAsset Include="Assets\Phone\AC\OpenOrCloseSelected.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Path.png" />
+ <AndroidAsset Include="Assets\Phone\AC\Reduce.png" />
+ <AndroidAsset Include="Assets\Phone\AC\SelectedFanModeBG.png" />
+ <AndroidAsset Include="Assets\Phone\AC\SelectedModeBG.png" />
+ <AndroidAsset Include="Assets\Phone\BindPic\BindAdd.png" />
+ <AndroidAsset Include="Assets\Phone\BindPic\BindDown.png" />
+ <AndroidAsset Include="Assets\Phone\BindPic\BindEmptyPic.png" />
+ <AndroidAsset Include="Assets\Phone\BindPic\BindLeft.png" />
+ <AndroidAsset Include="Assets\Phone\BindPic\BindRight.png" />
<AndroidAsset Include="Assets\Phone\Center\Abount.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Center\Admin.png" />
<AndroidAsset Include="Assets\Phone\Center\Backup.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Center\DeviceManagement.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Center\ImperialCrown.png" />
<AndroidAsset Include="Assets\Phone\Center\MenberManagement.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Center\Opinion.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Center\ResidenceManagement.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Center\SafetyManagement.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Device\AirConditioner.png" />
<AndroidAsset Include="Assets\Phone\Device\AirConditionerEpoint.png" />
<AndroidAsset Include="Assets\Phone\Device\AirConditionerZbGateway.png" />
@@ -275,6 +301,8 @@
<AndroidAsset Include="Assets\Phone\Device\DryContact.png" />
<AndroidAsset Include="Assets\Phone\Device\IntelligentLocks.png" />
<AndroidAsset Include="Assets\Phone\Device\IntelligentLocksH06C.png" />
+ <AndroidAsset Include="Assets\Phone\Device\Light.png" />
+ <AndroidAsset Include="Assets\Phone\Device\PanelTable.png" />
<AndroidAsset Include="Assets\Phone\Device\Relay.png" />
<AndroidAsset Include="Assets\Phone\Device\RelayEpoint.png" />
<AndroidAsset Include="Assets\Phone\Device\RelayThreeLoad.png" />
@@ -284,920 +312,537 @@
<AndroidAsset Include="Assets\Phone\Device\SensorDoorWindow.png" />
<AndroidAsset Include="Assets\Phone\Device\SensorEmergencyButton.png" />
<AndroidAsset Include="Assets\Phone\Device\SensorFire.png" />
+ <AndroidAsset Include="Assets\Phone\Device\SensorHumidity.png" />
<AndroidAsset Include="Assets\Phone\Device\SensorInfrared.png" />
<AndroidAsset Include="Assets\Phone\Device\SensorMotion.png" />
<AndroidAsset Include="Assets\Phone\Device\SensorPir.png" />
+ <AndroidAsset Include="Assets\Phone\Device\SensorTemperature.png" />
<AndroidAsset Include="Assets\Phone\Device\SensorWater.png" />
- <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon1.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon1Selected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon6.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon6Selected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\PhoneImage.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\RealGateway1.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\RealGateway6.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\SearchGateway.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\WiredGateway.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\WiredGatewayInstruct.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\WiredGatewaySelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\WirelessGateway.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\WirelessGatewayImage.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\WirelessGatewayInstruct.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Gateway\WirelessGatewaySelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Instruct\PanelFourButton.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Instruct\PanelThreeButton.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Instruct\PanelTwoButton.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Add.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Back.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Check.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\CloseIcon.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\DeleteIcon1.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Down.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\DownLoad.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\GarrisonList.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\GarrisonListSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\More.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Next.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\OpenIcon.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\PersentIcon.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\PickerColorWheel.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\PirSensorLightScale.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\PirSensorLightScaleButton.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Point.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\PswSettion.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\PswSettionSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Remote.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\RightIcon.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Scene.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Search.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\ShardMenu.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Switch.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\SwitchSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\ItemSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Timer.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Tips.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\UpperTriangle.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\WrongIcon.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\CurtainAutoOpen.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\SensorCarbonMonoxide.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\AirSwitchCloudContr.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\SensorDoorWindow.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\SensorEmergencyButton.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\SensorFire.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\PanelFourButton.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\PanelFourNotPowerButton.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\SensorInfrared.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\SensorMotion.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\SensorPir.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\CurtainSiphonate.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\PanelThreeButton.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\PanelTwoButton.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\SensorWater.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Safeguard\ProtectionAtHome.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Safeguard\ProtectionAtHomeSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Safeguard\ProtectionRemoveHome.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Safeguard\ProtectionRemoveHomeSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Safeguard\WithdrawGarrison.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Safeguard\WithdrawGarrisonSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Instruct\DeviceSearch.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Instruct\IntelligentLocksH06C.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Instruct\RelayThreeLoad.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\NewVersion.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\ThirdPartyDevice.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Center\ImperialCrown.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Instruct\DimmableLightOneLoad.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\DeleteIcon2.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\DeleteIcon2Selected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\FixedPosition.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\FixedPositionSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Device\PanelTable.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Navigation\Category.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Navigation\CategorySelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Navigation\Home.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Navigation\HomeSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Navigation\Setting.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Navigation\SettingSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Center\Admin.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\ProgressMsg.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\CancelIcon.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\DateSearchIcon.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\ScreeningType.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\UnLockFail.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\UnLockSuccess.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\QRCode.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\HidenPWD.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\UnHidenPWD.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\ForgotPswList.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\BindPic\BindAdd.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\BindPic\BindDown.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\BindPic\BindEmptyPic.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\BindPic\BindLeft.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\BindPic\BindRight.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Device\Socket1.png" />
+ <AndroidAsset Include="Assets\Phone\Device\Switch.png" />
+ <AndroidAsset Include="Assets\Phone\DoorLock\AddFailedPic.png" />
<AndroidAsset Include="Assets\Phone\DoorLock\AddFingerprintTipPic.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\AddIcCardTipPic.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\AddIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\AddPasswordTicPic.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\AllMethod.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\AllMethodIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\AllMethodOn.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\CancelIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\DateIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\DelIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\DistributeUnlockIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\DooorLockPicOpen.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\DoorLockClose.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\DoorlockIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\DoorLockOpen.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\DoorLockPicClose.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\DoorLock\DoorlockPicture.png" />
<AndroidAsset Include="Assets\Phone\DoorLock\DoorLockUserPic.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\EntrySuccessIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\FavoriteIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\Fingerprint.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\Fingerprint207.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\FingerprintOn.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\Left.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\MemberIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\Password.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\PasswordOn.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\proximityCard.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\proximityCardOn.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\RecordIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\RemoteUnlockIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\RightIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\RoomPic.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\SelectedIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\SettingIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\ShareIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\SideslipPic.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\DoorLock\Switch.png" />
+ <AndroidAsset Include="Assets\Phone\DoorLock\SwitchOn.png" />
<AndroidAsset Include="Assets\Phone\DoorLock\TemPasswordVisiable.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\TempPasswordBackground.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\TempPasswordBackground1.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\TypeIcon.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\DoorLock\UndistributeIcon.png" />
<AndroidAsset Include="Assets\Phone\DoorLock\UnLockBlankPic.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\UnLockButton.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\UnlockFailed.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\UnLockSideslipIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\UnlockSuccess.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\UnselectedIcon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\DoorLock\VisitorIcon.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\ResidenceIcon.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Add.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Fan_Height.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Fan_HeightSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Fan_Low.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Fan_LowSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Fan_Middle.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Fan_MiddleSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Group.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_Auto.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_AutoSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_Cool.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_CoolSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_Dry.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_DrySelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_Fan.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_FanSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_Heat.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Mode_HeatSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\OpenOrClose.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\OpenOrCloseSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Path.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\Reduce.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\SelectedFanModeBG.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\AC\SelectedModeBG.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\Account.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\Cancle.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\Cat.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\ChangeSuccess.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\Code.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\HidePwd.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\Logo_loginBG.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\Logo_White.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\Password.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\UnhidePwd.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Floor\Floor.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Floor\FloorSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\10Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\10IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\11Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\11IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\12Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\12IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\13Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\13IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\14Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\14IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\15Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\15IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\16Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\16IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\17Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\17IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\18Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\18IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\19Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\19IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\1Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\1IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\20Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\20IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\2Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\2IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\3Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\3IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\4Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\4IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\5Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\5IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\6Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\6IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\7Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\7IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\8Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\8IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\9Icon.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\FunctionIcon\9IconSelected.png" />
- </ItemGroup>
- <ItemGroup>
- <AndroidAsset Include="Assets\Phone\Logo\Logo.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon1.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon1Selected.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon6.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\GatewayIcon6Selected.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\PhoneImage.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\RealGateway1.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\RealGateway6.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\SearchGateway.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\WiredGateway.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\WiredGatewayInstruct.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\WiredGatewaySelected.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\WirelessGateway.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\WirelessGatewayImage.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\WirelessGatewayInstruct.png" />
+ <AndroidAsset Include="Assets\Phone\Gateway\WirelessGatewaySelected.png" />
+ <AndroidAsset Include="Assets\Phone\Instruct\DeviceSearch.png" />
+ <AndroidAsset Include="Assets\Phone\Instruct\DimmableLightOneLoad.png" />
+ <AndroidAsset Include="Assets\Phone\Instruct\IntelligentLocksH06C.png" />
+ <AndroidAsset Include="Assets\Phone\Instruct\PanelFourButton.png" />
+ <AndroidAsset Include="Assets\Phone\Instruct\PanelThreeButton.png" />
+ <AndroidAsset Include="Assets\Phone\Instruct\PanelTwoButton.png" />
+ <AndroidAsset Include="Assets\Phone\Instruct\RelayThreeLoad.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Add.png" />
<AndroidAsset Include="Assets\Phone\Item\Add_Category.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Item\Add_GW.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\Back.png" />
+ <AndroidAsset Include="Assets\Phone\Item\BottomShadow.png" />
+ <AndroidAsset Include="Assets\Phone\Item\CancelIcon.png" />
<AndroidAsset Include="Assets\Phone\Item\Category_FunctionBG.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Item\Category_FunctionBGSelected.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\Check.png" />
+ <AndroidAsset Include="Assets\Phone\Item\CloseIcon.png" />
<AndroidAsset Include="Assets\Phone\Item\Collection.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\Collection1.png" />
<AndroidAsset Include="Assets\Phone\Item\CollectionSelected.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\CollectionSelected1.png" />
+ <AndroidAsset Include="Assets\Phone\Item\DateSearchIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Item\DeleteIcon1.png" />
+ <AndroidAsset Include="Assets\Phone\Item\DeleteIcon2.png" />
+ <AndroidAsset Include="Assets\Phone\Item\DeleteIcon2Selected.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Down.png" />
+ <AndroidAsset Include="Assets\Phone\Item\DownLoad.png" />
<AndroidAsset Include="Assets\Phone\Item\Drop_Down.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\FixedPosition.png" />
+ <AndroidAsset Include="Assets\Phone\Item\FixedPositionSelected.png" />
<AndroidAsset Include="Assets\Phone\Item\Floor.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\ForgotPswList.png" />
+ <AndroidAsset Include="Assets\Phone\Item\FunctionCardView.png" />
+ <AndroidAsset Include="Assets\Phone\Item\FunctionCardViewSelected.png" />
+ <AndroidAsset Include="Assets\Phone\Item\FunctionViewBG.png" />
+ <AndroidAsset Include="Assets\Phone\Item\GarrisonList.png" />
+ <AndroidAsset Include="Assets\Phone\Item\GarrisonListSelected.png" />
+ <AndroidAsset Include="Assets\Phone\Item\HidenPWD.png" />
<AndroidAsset Include="Assets\Phone\Item\House.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Item\HouseSelected.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\ItemSelected.png" />
+ <AndroidAsset Include="Assets\Phone\Item\More.png" />
+ <AndroidAsset Include="Assets\Phone\Item\NewVersion.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Next.png" />
<AndroidAsset Include="Assets\Phone\Item\NoBindGW.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Item\NoFunction.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\OpenIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Item\PersentIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Item\PickerColorWheel.png" />
+ <AndroidAsset Include="Assets\Phone\Item\PirSensorLightScale.png" />
+ <AndroidAsset Include="Assets\Phone\Item\PirSensorLightScaleButton.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Point.png" />
+ <AndroidAsset Include="Assets\Phone\Item\ProgressMsg.png" />
+ <AndroidAsset Include="Assets\Phone\Item\PswSettion.png" />
+ <AndroidAsset Include="Assets\Phone\Item\PswSettionSelected.png" />
+ <AndroidAsset Include="Assets\Phone\Item\QRCode.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Remote.png" />
+ <AndroidAsset Include="Assets\Phone\Item\ResidenceIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Item\RightIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Room.png" />
+ <AndroidAsset Include="Assets\Phone\Item\RoomIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Scene.png" />
+ <AndroidAsset Include="Assets\Phone\Item\SceneCard.png" />
<AndroidAsset Include="Assets\Phone\Item\SceneFunctionBG.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\ScreeningType.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Search.png" />
<AndroidAsset Include="Assets\Phone\Item\SelectFloor_Left.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Item\SelectHouse.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\ShardMenu.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Switch.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Switch1.png" />
<AndroidAsset Include="Assets\Phone\Item\Switch2.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\Item\Switch2Selected.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\SwitchSelected.png" />
+ <AndroidAsset Include="Assets\Phone\Item\SwitchSelected1.png" />
+ <AndroidAsset Include="Assets\Phone\Item\ThirdPartyDevice.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Time.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Timer.png" />
+ <AndroidAsset Include="Assets\Phone\Item\Tips.png" />
+ <AndroidAsset Include="Assets\Phone\Item\UnHidenPWD.png" />
+ <AndroidAsset Include="Assets\Phone\Item\UnLockFail.png" />
+ <AndroidAsset Include="Assets\Phone\Item\UnLockSuccess.png" />
+ <AndroidAsset Include="Assets\Phone\Item\UpperTriangle.png" />
<AndroidAsset Include="Assets\Phone\Item\VirtualFrame.png" />
- </ItemGroup>
- <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\Item\WrongIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Logo\Logo.png" />
+ <AndroidAsset Include="Assets\Phone\Navigation\Category.png" />
+ <AndroidAsset Include="Assets\Phone\Navigation\CategorySelected.png" />
+ <AndroidAsset Include="Assets\Phone\Navigation\Home.png" />
+ <AndroidAsset Include="Assets\Phone\Navigation\HomeSelected.png" />
+ <AndroidAsset Include="Assets\Phone\Navigation\Setting.png" />
+ <AndroidAsset Include="Assets\Phone\Navigation\SettingSelected.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\AirSwitchCloudContr.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\CommonDevice.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\CurtainAutoOpen.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\CurtainSiphonate.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\PanelFourButton.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\PanelFourNotPowerButton.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\PanelThreeButton.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\PanelTwoButton.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\SensorCarbonMonoxide.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\SensorDoorWindow.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\SensorEmergencyButton.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\SensorFire.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\SensorInfrared.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\SensorMotion.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\SensorPir.png" />
+ <AndroidAsset Include="Assets\Phone\RealDevice\SensorWater.png" />
+ <AndroidAsset Include="Assets\Phone\Room\HomeBG.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r0.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r1.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r10.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r11.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r12.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r13.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r14.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r15.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r16.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r17.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r18.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r19.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r2.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r20.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r21.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r22.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r23.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r24.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r3.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r4.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r5.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r6.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r7.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r8.png" />
+ <AndroidAsset Include="Assets\Phone\Room\r9.png" />
+ <AndroidAsset Include="Assets\Phone\Room\RoomCardView.png" />
+ <AndroidAsset Include="Assets\Phone\Room\RoomCardView_Name.png" />
+ <AndroidAsset Include="Assets\Phone\Room\Room_Rectangle.png" />
+ <AndroidAsset Include="Assets\Phone\Safeguard\ProtectionAtHome.png" />
+ <AndroidAsset Include="Assets\Phone\Safeguard\ProtectionAtHomeSelected.png" />
+ <AndroidAsset Include="Assets\Phone\Safeguard\ProtectionRemoveHome.png" />
+ <AndroidAsset Include="Assets\Phone\Safeguard\ProtectionRemoveHomeSelected.png" />
+ <AndroidAsset Include="Assets\Phone\Safeguard\WithdrawGarrison.png" />
+ <AndroidAsset Include="Assets\Phone\Safeguard\WithdrawGarrisonSelected.png" />
<AndroidAsset Include="Assets\Phone\SceneIcon\1.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\SceneIcon\2.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\SceneIcon\3.png" />
- </ItemGroup>
- <ItemGroup>
<AndroidAsset Include="Assets\Phone\SceneIcon\4.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\RoomIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Item\InputAccountIcon.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\BottomShadow.png" />
+ <AndroidAsset Include="Assets\Phone\Item\InputAccountIconSelected.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r0.png" />
+ <AndroidAsset Include="Assets\Phone\Item\MemberNotEsixtPic.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r1.png" />
+ <AndroidAsset Include="Assets\Phone\Item\NotAuthority.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r10.png" />
+ <AndroidAsset Include="Assets\Phone\Item\NotShardPic.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r11.png" />
+ <AndroidAsset Include="Assets\Phone\Item\ScanQRcodeIcon.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r12.png" />
+ <AndroidAsset Include="Assets\Phone\Item\ScanQRcodeIconSelected.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r13.png" />
+ <AndroidAsset Include="Assets\Phone\Room\iconBackgroundColor.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r14.png" />
+ <AndroidAsset Include="Assets\Phone\Room\iconSelectedBackgroundColor.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r15.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\1.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r16.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\2.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r17.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\3.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r18.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\ac.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r19.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\add.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r2.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\AddSelected.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r20.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\airswitch.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r21.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\athome.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r22.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\back.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r23.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\connect.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r24.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\curtain.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r3.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\Ddmmablelight.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r4.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\delay.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r5.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\delay1.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r6.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\deviceselectedbackgroundcolor.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r7.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\deviceunselectedbackgroundcolor.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r8.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\dimmableLight.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\r9.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\doorlock.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Device\SensorHumidity.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\drop-down.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Device\SensorTemperature.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\dropdown.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\RealDevice\CommonDevice.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\function.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Account\PhoneEmail_White.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\function1.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Collection1.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\humidity.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\CollectionSelected1.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\iconBackgroundColor.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\FunctionCardView.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\iconSelectedBackgroundColor.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\FunctionCardViewSelected.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\leavehome.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\FunctionViewBG.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\light.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Room.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\light_1.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\SceneCard.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\logicaddcolor.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Switch1.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\logicbj1.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\SwitchSelected1.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\logicbj2.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Item\Time.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\logicclose.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\HomeBG.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\logicopen.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\Room_Rectangle.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\next.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\RoomCardView.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\nodelay.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Room\RoomCardView_Name.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\nofunction.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Device\Light.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\noon.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Device\Socket1.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\noscene.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\Device\Switch.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\nosecurity.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\DoorLock\AddFailedPic.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\panel.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\DoorLock\DoorlockPicture.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\point.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\DoorLock\Switch.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\position.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\DoorLock\SwitchOn.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\scene.png" />
</ItemGroup>
<ItemGroup>
- <AndroidAsset Include="Assets\Phone\DoorLock\UndistributeIcon.png" />
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\scene1.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\security.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\security1.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selected.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedac.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedairswitch.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedcurtain.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selecteddimmableLight.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selecteddoorlock.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedlight.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedmonth.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedpanel.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsenor.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsensor13.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsensor21.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsensor22.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsensor277.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsensor40.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsensor42.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsensor43.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\selectedsensor44.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sensor13.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sensor21.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sensor22.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sensor277.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sensor40.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sensor42.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sensor43.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sensor44.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sign.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sunrise.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\sunset.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\temperature.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\time.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\timeparagraph.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\timepoint.png" />
+ </ItemGroup>
+ <ItemGroup>
+ <AndroidAsset Include="Assets\Phone\ZigeeLogic\withdrawal.png" />
</ItemGroup>
<Import Project="..\Shared\Shared.projitems" Label="Shared" Condition="Exists('..\Shared\Shared.projitems')" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
diff --git a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
index 8401703..e731163 100755
--- a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
+++ b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs
@@ -26,90 +26,6 @@
public static void UpdateIdValues()
{
- global::Shared.Droid.TCL.Resource.Animation.timepicker_anim_enter_bottom = global::GateWay.Droid.Resource.Animation.timepicker_anim_enter_bottom;
- global::Shared.Droid.TCL.Resource.Animation.timepicker_anim_exit_bottom = global::GateWay.Droid.Resource.Animation.timepicker_anim_exit_bottom;
- global::Shared.Droid.TCL.Resource.Boolean.abc_action_bar_embed_tabs = global::GateWay.Droid.Resource.Boolean.abc_action_bar_embed_tabs;
- global::Shared.Droid.TCL.Resource.Color.material_grey_100 = global::GateWay.Droid.Resource.Color.material_grey_100;
- global::Shared.Droid.TCL.Resource.Color.material_grey_300 = global::GateWay.Droid.Resource.Color.material_grey_300;
- global::Shared.Droid.TCL.Resource.Color.material_grey_50 = global::GateWay.Droid.Resource.Color.material_grey_50;
- global::Shared.Droid.TCL.Resource.Color.primary_text_default_material_dark = global::GateWay.Droid.Resource.Color.primary_text_default_material_dark;
- global::Shared.Droid.TCL.Resource.Color.ripple_material_light = global::GateWay.Droid.Resource.Color.ripple_material_light;
- global::Shared.Droid.TCL.Resource.Color.secondary_text_default_material_dark = global::GateWay.Droid.Resource.Color.secondary_text_default_material_dark;
- global::Shared.Droid.TCL.Resource.Color.secondary_text_default_material_light = global::GateWay.Droid.Resource.Color.secondary_text_default_material_light;
- global::Shared.Droid.TCL.Resource.Color.wheel_timebtn_nor = global::GateWay.Droid.Resource.Color.wheel_timebtn_nor;
- global::Shared.Droid.TCL.Resource.Color.wheel_timebtn_pre = global::GateWay.Droid.Resource.Color.wheel_timebtn_pre;
- global::Shared.Droid.TCL.Resource.Dimension.activity_horizontal_margin = global::GateWay.Droid.Resource.Dimension.activity_horizontal_margin;
- global::Shared.Droid.TCL.Resource.Dimension.activity_vertical_margin = global::GateWay.Droid.Resource.Dimension.activity_vertical_margin;
- global::Shared.Droid.TCL.Resource.Dimension.notification_large_icon_height = global::GateWay.Droid.Resource.Dimension.notification_large_icon_height;
- global::Shared.Droid.TCL.Resource.Dimension.notification_large_icon_width = global::GateWay.Droid.Resource.Dimension.notification_large_icon_width;
- global::Shared.Droid.TCL.Resource.Dimension.notification_subtext_size = global::GateWay.Droid.Resource.Dimension.notification_subtext_size;
- global::Shared.Droid.TCL.Resource.Drawable.bg_above_timepicker = global::GateWay.Droid.Resource.Drawable.bg_above_timepicker;
- global::Shared.Droid.TCL.Resource.Drawable.bg_line_timepicker = global::GateWay.Droid.Resource.Drawable.bg_line_timepicker;
- global::Shared.Droid.TCL.Resource.Drawable.ic_launcher = global::GateWay.Droid.Resource.Drawable.ic_launcher;
- global::Shared.Droid.TCL.Resource.Drawable.notification_template_icon_bg = global::GateWay.Droid.Resource.Drawable.notification_template_icon_bg;
- global::Shared.Droid.TCL.Resource.Drawable.wheel_timebtn = global::GateWay.Droid.Resource.Drawable.wheel_timebtn;
- global::Shared.Droid.TCL.Resource.Drawable.wheel_val = global::GateWay.Droid.Resource.Drawable.wheel_val;
- global::Shared.Droid.TCL.Resource.Id.action0 = global::GateWay.Droid.Resource.Id.action0;
- global::Shared.Droid.TCL.Resource.Id.action_divider = global::GateWay.Droid.Resource.Id.action_divider;
- global::Shared.Droid.TCL.Resource.Id.action_settings = global::GateWay.Droid.Resource.Id.action_settings;
- global::Shared.Droid.TCL.Resource.Id.btnCancel = global::GateWay.Droid.Resource.Id.btnCancel;
- global::Shared.Droid.TCL.Resource.Id.btnSubmit = global::GateWay.Droid.Resource.Id.btnSubmit;
- global::Shared.Droid.TCL.Resource.Id.cancel_action = global::GateWay.Droid.Resource.Id.cancel_action;
- global::Shared.Droid.TCL.Resource.Id.chronometer = global::GateWay.Droid.Resource.Id.chronometer;
- global::Shared.Droid.TCL.Resource.Id.day = global::GateWay.Droid.Resource.Id.day;
- global::Shared.Droid.TCL.Resource.Id.end_padder = global::GateWay.Droid.Resource.Id.end_padder;
- global::Shared.Droid.TCL.Resource.Id.hour = global::GateWay.Droid.Resource.Id.hour;
- global::Shared.Droid.TCL.Resource.Id.icon = global::GateWay.Droid.Resource.Id.icon;
- global::Shared.Droid.TCL.Resource.Id.info = global::GateWay.Droid.Resource.Id.info;
- global::Shared.Droid.TCL.Resource.Id.line1 = global::GateWay.Droid.Resource.Id.line1;
- global::Shared.Droid.TCL.Resource.Id.line3 = global::GateWay.Droid.Resource.Id.line3;
- global::Shared.Droid.TCL.Resource.Id.media_actions = global::GateWay.Droid.Resource.Id.media_actions;
- global::Shared.Droid.TCL.Resource.Id.min = global::GateWay.Droid.Resource.Id.min;
- global::Shared.Droid.TCL.Resource.Id.month = global::GateWay.Droid.Resource.Id.month;
- global::Shared.Droid.TCL.Resource.Id.normal = global::GateWay.Droid.Resource.Id.normal;
- global::Shared.Droid.TCL.Resource.Id.options1 = global::GateWay.Droid.Resource.Id.options1;
- global::Shared.Droid.TCL.Resource.Id.options2 = global::GateWay.Droid.Resource.Id.options2;
- global::Shared.Droid.TCL.Resource.Id.options3 = global::GateWay.Droid.Resource.Id.options3;
- global::Shared.Droid.TCL.Resource.Id.optionspicker = global::GateWay.Droid.Resource.Id.optionspicker;
- global::Shared.Droid.TCL.Resource.Id.status_bar_latest_event_content = global::GateWay.Droid.Resource.Id.status_bar_latest_event_content;
- global::Shared.Droid.TCL.Resource.Id.text = global::GateWay.Droid.Resource.Id.text;
- global::Shared.Droid.TCL.Resource.Id.text2 = global::GateWay.Droid.Resource.Id.text2;
- global::Shared.Droid.TCL.Resource.Id.time = global::GateWay.Droid.Resource.Id.time;
- global::Shared.Droid.TCL.Resource.Id.timepicker = global::GateWay.Droid.Resource.Id.timepicker;
- global::Shared.Droid.TCL.Resource.Id.title = global::GateWay.Droid.Resource.Id.title;
- global::Shared.Droid.TCL.Resource.Id.tvOptions = global::GateWay.Droid.Resource.Id.tvOptions;
- global::Shared.Droid.TCL.Resource.Id.tvTime = global::GateWay.Droid.Resource.Id.tvTime;
- global::Shared.Droid.TCL.Resource.Id.year = global::GateWay.Droid.Resource.Id.year;
- global::Shared.Droid.TCL.Resource.Integer.cancel_button_image_alpha = global::GateWay.Droid.Resource.Integer.cancel_button_image_alpha;
- global::Shared.Droid.TCL.Resource.Integer.status_bar_notification_info_maxnum = global::GateWay.Droid.Resource.Integer.status_bar_notification_info_maxnum;
- global::Shared.Droid.TCL.Resource.Layout.activity_main = global::GateWay.Droid.Resource.Layout.activity_main;
- global::Shared.Droid.TCL.Resource.Layout.include_optionspicker = global::GateWay.Droid.Resource.Layout.include_optionspicker;
- global::Shared.Droid.TCL.Resource.Layout.include_timepicker = global::GateWay.Droid.Resource.Layout.include_timepicker;
- global::Shared.Droid.TCL.Resource.Layout.notification_media_action = global::GateWay.Droid.Resource.Layout.notification_media_action;
- global::Shared.Droid.TCL.Resource.Layout.notification_media_cancel_action = global::GateWay.Droid.Resource.Layout.notification_media_cancel_action;
- global::Shared.Droid.TCL.Resource.Layout.notification_template_big_media = global::GateWay.Droid.Resource.Layout.notification_template_big_media;
- global::Shared.Droid.TCL.Resource.Layout.notification_template_big_media_narrow = global::GateWay.Droid.Resource.Layout.notification_template_big_media_narrow;
- global::Shared.Droid.TCL.Resource.Layout.notification_template_media = global::GateWay.Droid.Resource.Layout.notification_template_media;
- global::Shared.Droid.TCL.Resource.Layout.notification_template_part_chronometer = global::GateWay.Droid.Resource.Layout.notification_template_part_chronometer;
- global::Shared.Droid.TCL.Resource.Layout.notification_template_part_time = global::GateWay.Droid.Resource.Layout.notification_template_part_time;
- global::Shared.Droid.TCL.Resource.Layout.pw_options = global::GateWay.Droid.Resource.Layout.pw_options;
- global::Shared.Droid.TCL.Resource.Layout.pw_time = global::GateWay.Droid.Resource.Layout.pw_time;
- global::Shared.Droid.TCL.Resource.Menu.main = global::GateWay.Droid.Resource.Menu.main;
- global::Shared.Droid.TCL.Resource.String.action_settings = global::GateWay.Droid.Resource.String.action_settings;
- global::Shared.Droid.TCL.Resource.String.app_name = global::GateWay.Droid.Resource.String.app_name;
- global::Shared.Droid.TCL.Resource.String.hello_world = global::GateWay.Droid.Resource.String.hello_world;
- global::Shared.Droid.TCL.Resource.String.pickerview_cancel = global::GateWay.Droid.Resource.String.pickerview_cancel;
- global::Shared.Droid.TCL.Resource.String.pickerview_day = global::GateWay.Droid.Resource.String.pickerview_day;
- global::Shared.Droid.TCL.Resource.String.pickerview_hours = global::GateWay.Droid.Resource.String.pickerview_hours;
- global::Shared.Droid.TCL.Resource.String.pickerview_minutes = global::GateWay.Droid.Resource.String.pickerview_minutes;
- global::Shared.Droid.TCL.Resource.String.pickerview_month = global::GateWay.Droid.Resource.String.pickerview_month;
- global::Shared.Droid.TCL.Resource.String.pickerview_seconds = global::GateWay.Droid.Resource.String.pickerview_seconds;
- global::Shared.Droid.TCL.Resource.String.pickerview_submit = global::GateWay.Droid.Resource.String.pickerview_submit;
- global::Shared.Droid.TCL.Resource.String.pickerview_year = global::GateWay.Droid.Resource.String.pickerview_year;
- global::Shared.Droid.TCL.Resource.String.status_bar_notification_info_overflow = global::GateWay.Droid.Resource.String.status_bar_notification_info_overflow;
- global::Shared.Droid.TCL.Resource.Style.AppBaseTheme = global::GateWay.Droid.Resource.Style.AppBaseTheme;
- global::Shared.Droid.TCL.Resource.Style.AppTheme = global::GateWay.Droid.Resource.Style.AppTheme;
- global::Shared.Droid.TCL.Resource.Style.timepopwindow_anim_style = global::GateWay.Droid.Resource.Style.timepopwindow_anim_style;
}
public partial class Animation
@@ -294,12 +210,6 @@
// aapt resource value: 0x7F01003B
public const int pickerview_slide_out_bottom = 2130772027;
-
- // aapt resource value: 0x7F01003C
- public const int timepicker_anim_enter_bottom = 2130772028;
-
- // aapt resource value: 0x7F01003D
- public const int timepicker_anim_exit_bottom = 2130772029;
static Animation()
{
@@ -539,12 +449,6 @@
// aapt resource value: 0x7F050013
public const int secondary_text_default_material_light = 2131034131;
- // aapt resource value: 0x7F050014
- public const int wheel_timebtn_nor = 2131034132;
-
- // aapt resource value: 0x7F050015
- public const int wheel_timebtn_pre = 2131034133;
-
static Color()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
@@ -559,91 +463,85 @@
{
// aapt resource value: 0x7F060000
- public const int activity_horizontal_margin = 2131099648;
+ public const int compat_button_inset_horizontal_material = 2131099648;
// aapt resource value: 0x7F060001
- public const int activity_vertical_margin = 2131099649;
+ public const int compat_button_inset_vertical_material = 2131099649;
// aapt resource value: 0x7F060002
- public const int compat_button_inset_horizontal_material = 2131099650;
+ public const int compat_button_padding_horizontal_material = 2131099650;
// aapt resource value: 0x7F060003
- public const int compat_button_inset_vertical_material = 2131099651;
+ public const int compat_button_padding_vertical_material = 2131099651;
// aapt resource value: 0x7F060004
- public const int compat_button_padding_horizontal_material = 2131099652;
+ public const int compat_control_corner_material = 2131099652;
// aapt resource value: 0x7F060005
- public const int compat_button_padding_vertical_material = 2131099653;
+ public const int fingerprint_icon_size = 2131099653;
// aapt resource value: 0x7F060006
- public const int compat_control_corner_material = 2131099654;
+ public const int fingerprint_status_layout_margin_vertical = 2131099654;
// aapt resource value: 0x7F060007
- public const int fingerprint_icon_size = 2131099655;
+ public const int notification_action_icon_size = 2131099655;
// aapt resource value: 0x7F060008
- public const int fingerprint_status_layout_margin_vertical = 2131099656;
+ public const int notification_action_text_size = 2131099656;
// aapt resource value: 0x7F060009
- public const int notification_action_icon_size = 2131099657;
+ public const int notification_big_circle_margin = 2131099657;
// aapt resource value: 0x7F06000A
- public const int notification_action_text_size = 2131099658;
+ public const int notification_content_margin_start = 2131099658;
// aapt resource value: 0x7F06000B
- public const int notification_big_circle_margin = 2131099659;
+ public const int notification_large_icon_height = 2131099659;
// aapt resource value: 0x7F06000C
- public const int notification_content_margin_start = 2131099660;
+ public const int notification_large_icon_width = 2131099660;
// aapt resource value: 0x7F06000D
- public const int notification_large_icon_height = 2131099661;
+ public const int notification_main_column_padding_top = 2131099661;
// aapt resource value: 0x7F06000E
- public const int notification_large_icon_width = 2131099662;
+ public const int notification_media_narrow_margin = 2131099662;
// aapt resource value: 0x7F06000F
- public const int notification_main_column_padding_top = 2131099663;
+ public const int notification_right_icon_size = 2131099663;
// aapt resource value: 0x7F060010
- public const int notification_media_narrow_margin = 2131099664;
+ public const int notification_right_side_padding_top = 2131099664;
// aapt resource value: 0x7F060011
- public const int notification_right_icon_size = 2131099665;
+ public const int notification_small_icon_background_padding = 2131099665;
// aapt resource value: 0x7F060012
- public const int notification_right_side_padding_top = 2131099666;
+ public const int notification_small_icon_size_as_large = 2131099666;
// aapt resource value: 0x7F060013
- public const int notification_small_icon_background_padding = 2131099667;
+ public const int notification_subtext_size = 2131099667;
// aapt resource value: 0x7F060014
- public const int notification_small_icon_size_as_large = 2131099668;
+ public const int notification_top_pad = 2131099668;
// aapt resource value: 0x7F060015
- public const int notification_subtext_size = 2131099669;
+ public const int notification_top_pad_large_text = 2131099669;
// aapt resource value: 0x7F060016
- public const int notification_top_pad = 2131099670;
+ public const int pickerview_textsize = 2131099670;
// aapt resource value: 0x7F060017
- public const int notification_top_pad_large_text = 2131099671;
+ public const int pickerview_topbar_btn_textsize = 2131099671;
// aapt resource value: 0x7F060018
- public const int pickerview_textsize = 2131099672;
+ public const int pickerview_topbar_height = 2131099672;
// aapt resource value: 0x7F060019
- public const int pickerview_topbar_btn_textsize = 2131099673;
+ public const int pickerview_topbar_padding = 2131099673;
// aapt resource value: 0x7F06001A
- public const int pickerview_topbar_height = 2131099674;
-
- // aapt resource value: 0x7F06001B
- public const int pickerview_topbar_padding = 2131099675;
-
- // aapt resource value: 0x7F06001C
- public const int pickerview_topbar_title_textsize = 2131099676;
+ public const int pickerview_topbar_title_textsize = 2131099674;
static Dimension()
{
@@ -659,127 +557,133 @@
{
// aapt resource value: 0x7F070000
- public const int bg_above_timepicker = 2131165184;
+ public const int fingerprint_draw_off = 2131165184;
// aapt resource value: 0x7F070001
- public const int bg_line_timepicker = 2131165185;
+ public const int fingerprint_draw_off_animation = 2131165185;
// aapt resource value: 0x7F070002
- public const int fingerprint_draw_off = 2131165186;
+ public const int fingerprint_draw_on = 2131165186;
// aapt resource value: 0x7F070003
- public const int fingerprint_draw_off_animation = 2131165187;
+ public const int fingerprint_draw_on_animation = 2131165187;
// aapt resource value: 0x7F070004
- public const int fingerprint_draw_on = 2131165188;
+ public const int fingerprint_error = 2131165188;
// aapt resource value: 0x7F070005
- public const int fingerprint_draw_on_animation = 2131165189;
+ public const int fingerprint_error_off = 2131165189;
// aapt resource value: 0x7F070006
- public const int fingerprint_error = 2131165190;
+ public const int fingerprint_error_off_animation = 2131165190;
// aapt resource value: 0x7F070007
- public const int fingerprint_error_off = 2131165191;
+ public const int fingerprint_error_on = 2131165191;
// aapt resource value: 0x7F070008
- public const int fingerprint_error_off_animation = 2131165192;
+ public const int fingerprint_error_on_animation = 2131165192;
// aapt resource value: 0x7F070009
- public const int fingerprint_error_on = 2131165193;
+ public const int fingerprint_error_state_to_fp = 2131165193;
// aapt resource value: 0x7F07000A
- public const int fingerprint_error_on_animation = 2131165194;
+ public const int fingerprint_error_state_to_fp_animation = 2131165194;
// aapt resource value: 0x7F07000B
- public const int fingerprint_error_state_to_fp = 2131165195;
+ public const int fingerprint_fingerprint = 2131165195;
// aapt resource value: 0x7F07000C
- public const int fingerprint_error_state_to_fp_animation = 2131165196;
+ public const int fingerprint_fp_to_error_state = 2131165196;
// aapt resource value: 0x7F07000D
- public const int fingerprint_fingerprint = 2131165197;
+ public const int fingerprint_fp_to_error_state_animation = 2131165197;
// aapt resource value: 0x7F07000E
- public const int fingerprint_fp_to_error_state = 2131165198;
+ public const int gd_btn_shape_app_b = 2131165198;
// aapt resource value: 0x7F07000F
- public const int fingerprint_fp_to_error_state_animation = 2131165199;
+ public const int gd_btn_shape_app_g = 2131165199;
// aapt resource value: 0x7F070010
- public const int gd_btn_shape_app_b = 2131165200;
+ public const int gd_btn_shape_app_w = 2131165200;
// aapt resource value: 0x7F070011
- public const int gd_btn_shape_app_g = 2131165201;
+ public const int gd_btn_shape_shadow_w = 2131165201;
// aapt resource value: 0x7F070012
- public const int gd_btn_shape_app_w = 2131165202;
+ public const int gd_click_effect_select = 2131165202;
+
+ // aapt resource value: 0x7F07001C
+ public const int Icon = 2131165212;
// aapt resource value: 0x7F070013
- public const int gd_click_effect_select = 2131165203;
-
- // aapt resource value: 0x7F070018
- public const int Icon = 2131165208;
+ public const int ic_gdmap_add = 2131165203;
// aapt resource value: 0x7F070014
public const int ic_gdmap_back = 2131165204;
// aapt resource value: 0x7F070015
- public const int ic_gdmap_mylocation = 2131165205;
+ public const int ic_gdmap_delete = 2131165205;
// aapt resource value: 0x7F070016
- public const int ic_gps_point = 2131165206;
+ public const int ic_gdmap_home = 2131165206;
// aapt resource value: 0x7F070017
- public const int ic_launcher = 2131165207;
+ public const int ic_gdmap_mylocation = 2131165207;
+
+ // aapt resource value: 0x7F070018
+ public const int ic_gdmap_now = 2131165208;
// aapt resource value: 0x7F070019
- public const int Loading = 2131165209;
+ public const int ic_gdmap_search = 2131165209;
// aapt resource value: 0x7F07001A
- public const int notification_action_background = 2131165210;
+ public const int ic_gdmap_zoom_out = 2131165210;
// aapt resource value: 0x7F07001B
- public const int notification_bg = 2131165211;
-
- // aapt resource value: 0x7F07001C
- public const int notification_bg_low = 2131165212;
+ public const int ic_gps_point = 2131165211;
// aapt resource value: 0x7F07001D
- public const int notification_bg_low_normal = 2131165213;
+ public const int Loading = 2131165213;
// aapt resource value: 0x7F07001E
- public const int notification_bg_low_pressed = 2131165214;
+ public const int notification_action_background = 2131165214;
// aapt resource value: 0x7F07001F
- public const int notification_bg_normal = 2131165215;
+ public const int notification_bg = 2131165215;
// aapt resource value: 0x7F070020
- public const int notification_bg_normal_pressed = 2131165216;
+ public const int notification_bg_low = 2131165216;
// aapt resource value: 0x7F070021
- public const int notification_icon_background = 2131165217;
+ public const int notification_bg_low_normal = 2131165217;
// aapt resource value: 0x7F070022
- public const int notification_template_icon_bg = 2131165218;
+ public const int notification_bg_low_pressed = 2131165218;
// aapt resource value: 0x7F070023
- public const int notification_template_icon_low_bg = 2131165219;
+ public const int notification_bg_normal = 2131165219;
// aapt resource value: 0x7F070024
- public const int notification_tile_bg = 2131165220;
+ public const int notification_bg_normal_pressed = 2131165220;
// aapt resource value: 0x7F070025
- public const int notify_panel_notification_icon_bg = 2131165221;
+ public const int notification_icon_background = 2131165221;
// aapt resource value: 0x7F070026
- public const int selector_pickerview_btn = 2131165222;
+ public const int notification_template_icon_bg = 2131165222;
// aapt resource value: 0x7F070027
- public const int wheel_timebtn = 2131165223;
+ public const int notification_template_icon_low_bg = 2131165223;
// aapt resource value: 0x7F070028
- public const int wheel_val = 2131165224;
+ public const int notification_tile_bg = 2131165224;
+
+ // aapt resource value: 0x7F070029
+ public const int notify_panel_notification_icon_bg = 2131165225;
+
+ // aapt resource value: 0x7F07002A
+ public const int selector_pickerview_btn = 2131165226;
static Drawable()
{
@@ -797,8 +701,8 @@
// aapt resource value: 0x7F080003
public const int action0 = 2131230723;
- // aapt resource value: 0x7F080009
- public const int actions = 2131230729;
+ // aapt resource value: 0x7F080008
+ public const int actions = 2131230728;
// aapt resource value: 0x7F080004
public const int action_container = 2131230724;
@@ -810,43 +714,40 @@
public const int action_image = 2131230726;
// aapt resource value: 0x7F080007
- public const int action_settings = 2131230727;
+ public const int action_text = 2131230727;
- // aapt resource value: 0x7F080008
- public const int action_text = 2131230728;
+ // aapt resource value: 0x7F080009
+ public const int async = 2131230729;
// aapt resource value: 0x7F08000A
- public const int async = 2131230730;
+ public const int blocking = 2131230730;
// aapt resource value: 0x7F08000B
- public const int blocking = 2131230731;
+ public const int btnCancel = 2131230731;
// aapt resource value: 0x7F08000C
- public const int btnCancel = 2131230732;
+ public const int btnSubmit = 2131230732;
// aapt resource value: 0x7F08000D
- public const int btnSubmit = 2131230733;
+ public const int cancel_action = 2131230733;
// aapt resource value: 0x7F08000E
- public const int cancel_action = 2131230734;
+ public const int center = 2131230734;
// aapt resource value: 0x7F08000F
- public const int center = 2131230735;
+ public const int chronometer = 2131230735;
// aapt resource value: 0x7F080010
- public const int chronometer = 2131230736;
+ public const int content_container = 2131230736;
// aapt resource value: 0x7F080011
- public const int content_container = 2131230737;
+ public const int day = 2131230737;
// aapt resource value: 0x7F080012
- public const int day = 2131230738;
+ public const int description = 2131230738;
// aapt resource value: 0x7F080013
- public const int description = 2131230739;
-
- // aapt resource value: 0x7F080014
- public const int end_padder = 2131230740;
+ public const int end_padder = 2131230739;
// aapt resource value: 0x7F080000
public const int FILL = 2131230720;
@@ -854,158 +755,173 @@
// aapt resource value: 0x7F080001
public const int FILL_STROKE = 2131230721;
+ // aapt resource value: 0x7F080014
+ public const int fingerprint_icon = 2131230740;
+
// aapt resource value: 0x7F080015
- public const int fingerprint_icon = 2131230741;
+ public const int forever = 2131230741;
// aapt resource value: 0x7F080016
- public const int forever = 2131230742;
+ public const int gd_btn_back = 2131230742;
// aapt resource value: 0x7F080017
- public const int gd_btn_back = 2131230743;
+ public const int gd_btn_myLocation = 2131230743;
// aapt resource value: 0x7F080018
- public const int gd_btn_myLocation = 2131230744;
+ public const int gd_btn_save = 2131230744;
// aapt resource value: 0x7F080019
- public const int gd_btn_save = 2131230745;
+ public const int gd_img_search_delete = 2131230745;
// aapt resource value: 0x7F08001A
- public const int gd_mapView = 2131230746;
+ public const int gd_ll_myhome = 2131230746;
// aapt resource value: 0x7F08001B
- public const int hdl_gallery_rootView = 2131230747;
+ public const int gd_ll_search = 2131230747;
// aapt resource value: 0x7F08001C
- public const int hdl_gallery_viewPager = 2131230748;
+ public const int gd_mapView = 2131230748;
// aapt resource value: 0x7F08001D
- public const int hdl_options1 = 2131230749;
+ public const int gd_rl_topview = 2131230749;
// aapt resource value: 0x7F08001E
- public const int hdl_options2 = 2131230750;
+ public const int gd_tv_activity_title = 2131230750;
// aapt resource value: 0x7F08001F
- public const int hdl_options3 = 2131230751;
+ public const int gd_tv_radius = 2131230751;
// aapt resource value: 0x7F080020
- public const int hdl_pickerview_ll = 2131230752;
+ public const int gd_tv_search_title = 2131230752;
// aapt resource value: 0x7F080021
- public const int hour = 2131230753;
+ public const int hdl_gallery_rootView = 2131230753;
// aapt resource value: 0x7F080022
- public const int icon = 2131230754;
+ public const int hdl_gallery_viewPager = 2131230754;
// aapt resource value: 0x7F080023
- public const int icon_group = 2131230755;
+ public const int hdl_options1 = 2131230755;
// aapt resource value: 0x7F080024
- public const int info = 2131230756;
+ public const int hdl_options2 = 2131230756;
// aapt resource value: 0x7F080025
- public const int italic = 2131230757;
+ public const int hdl_options3 = 2131230757;
// aapt resource value: 0x7F080026
- public const int left = 2131230758;
+ public const int hdl_pickerview_ll = 2131230758;
// aapt resource value: 0x7F080027
- public const int line1 = 2131230759;
+ public const int hour = 2131230759;
// aapt resource value: 0x7F080028
- public const int line3 = 2131230760;
+ public const int icon = 2131230760;
// aapt resource value: 0x7F080029
- public const int media_actions = 2131230761;
+ public const int icon_group = 2131230761;
// aapt resource value: 0x7F08002A
- public const int min = 2131230762;
+ public const int info = 2131230762;
// aapt resource value: 0x7F08002B
- public const int month = 2131230763;
+ public const int italic = 2131230763;
// aapt resource value: 0x7F08002C
- public const int myButton = 2131230764;
+ public const int left = 2131230764;
// aapt resource value: 0x7F08002D
- public const int normal = 2131230765;
+ public const int line1 = 2131230765;
// aapt resource value: 0x7F08002E
- public const int notification_background = 2131230766;
+ public const int line3 = 2131230766;
// aapt resource value: 0x7F08002F
- public const int notification_main_column = 2131230767;
+ public const int media_actions = 2131230767;
// aapt resource value: 0x7F080030
- public const int notification_main_column_container = 2131230768;
+ public const int min = 2131230768;
// aapt resource value: 0x7F080031
- public const int options1 = 2131230769;
+ public const int month = 2131230769;
// aapt resource value: 0x7F080032
- public const int options2 = 2131230770;
+ public const int myButton = 2131230770;
// aapt resource value: 0x7F080033
- public const int options3 = 2131230771;
+ public const int normal = 2131230771;
// aapt resource value: 0x7F080034
- public const int optionspicker = 2131230772;
+ public const int notification_background = 2131230772;
// aapt resource value: 0x7F080035
- public const int outmost_container = 2131230773;
+ public const int notification_main_column = 2131230773;
// aapt resource value: 0x7F080036
- public const int right = 2131230774;
+ public const int notification_main_column_container = 2131230774;
// aapt resource value: 0x7F080037
- public const int right_icon = 2131230775;
+ public const int options1 = 2131230775;
// aapt resource value: 0x7F080038
- public const int right_side = 2131230776;
+ public const int options2 = 2131230776;
// aapt resource value: 0x7F080039
- public const int rv_topbar = 2131230777;
+ public const int options3 = 2131230777;
// aapt resource value: 0x7F08003A
- public const int second = 2131230778;
+ public const int optionspicker = 2131230778;
// aapt resource value: 0x7F08003B
- public const int status = 2131230779;
+ public const int outmost_container = 2131230779;
// aapt resource value: 0x7F08003C
- public const int status_bar_latest_event_content = 2131230780;
+ public const int right = 2131230780;
+
+ // aapt resource value: 0x7F08003D
+ public const int right_icon = 2131230781;
+
+ // aapt resource value: 0x7F08003E
+ public const int right_side = 2131230782;
+
+ // aapt resource value: 0x7F08003F
+ public const int rv_topbar = 2131230783;
+
+ // aapt resource value: 0x7F080040
+ public const int second = 2131230784;
+
+ // aapt resource value: 0x7F080041
+ public const int status = 2131230785;
+
+ // aapt resource value: 0x7F080042
+ public const int status_bar_latest_event_content = 2131230786;
// aapt resource value: 0x7F080002
public const int STROKE = 2131230722;
- // aapt resource value: 0x7F08003D
- public const int subtitle = 2131230781;
-
- // aapt resource value: 0x7F08003E
- public const int text = 2131230782;
-
- // aapt resource value: 0x7F08003F
- public const int text2 = 2131230783;
-
- // aapt resource value: 0x7F080040
- public const int time = 2131230784;
-
- // aapt resource value: 0x7F080041
- public const int timepicker = 2131230785;
-
- // aapt resource value: 0x7F080042
- public const int title = 2131230786;
-
// aapt resource value: 0x7F080043
- public const int tvOptions = 2131230787;
+ public const int subtitle = 2131230787;
// aapt resource value: 0x7F080044
- public const int tvTime = 2131230788;
+ public const int text = 2131230788;
// aapt resource value: 0x7F080045
- public const int tvTitle = 2131230789;
+ public const int text2 = 2131230789;
// aapt resource value: 0x7F080046
- public const int year = 2131230790;
+ public const int time = 2131230790;
+
+ // aapt resource value: 0x7F080047
+ public const int timepicker = 2131230791;
+
+ // aapt resource value: 0x7F080048
+ public const int title = 2131230792;
+
+ // aapt resource value: 0x7F080049
+ public const int tvTitle = 2131230793;
+
+ // aapt resource value: 0x7F08004A
+ public const int year = 2131230794;
static Id()
{
@@ -1046,88 +962,73 @@
public const int activity_geofence_round = 2131361792;
// aapt resource value: 0x7F0A0001
- public const int activity_main = 2131361793;
+ public const int biometric_prompt_dialog_content = 2131361793;
// aapt resource value: 0x7F0A0002
- public const int biometric_prompt_dialog_content = 2131361794;
+ public const int hdl_gallery_banner_view_layout = 2131361794;
// aapt resource value: 0x7F0A0003
- public const int hdl_gallery_banner_view_layout = 2131361795;
+ public const int hdl_pickerview = 2131361795;
// aapt resource value: 0x7F0A0004
- public const int hdl_pickerview = 2131361796;
+ public const int include_pickerview_topbar = 2131361796;
// aapt resource value: 0x7F0A0005
- public const int include_optionspicker = 2131361797;
+ public const int layout_basepickerview = 2131361797;
// aapt resource value: 0x7F0A0006
- public const int include_pickerview_topbar = 2131361798;
+ public const int Main = 2131361798;
// aapt resource value: 0x7F0A0007
- public const int include_timepicker = 2131361799;
+ public const int notification_action = 2131361799;
// aapt resource value: 0x7F0A0008
- public const int layout_basepickerview = 2131361800;
+ public const int notification_action_tombstone = 2131361800;
// aapt resource value: 0x7F0A0009
- public const int Main = 2131361801;
+ public const int notification_media_action = 2131361801;
// aapt resource value: 0x7F0A000A
- public const int notification_action = 2131361802;
+ public const int notification_media_cancel_action = 2131361802;
// aapt resource value: 0x7F0A000B
- public const int notification_action_tombstone = 2131361803;
+ public const int notification_template_big_media = 2131361803;
// aapt resource value: 0x7F0A000C
- public const int notification_media_action = 2131361804;
+ public const int notification_template_big_media_custom = 2131361804;
// aapt resource value: 0x7F0A000D
- public const int notification_media_cancel_action = 2131361805;
+ public const int notification_template_big_media_narrow = 2131361805;
// aapt resource value: 0x7F0A000E
- public const int notification_template_big_media = 2131361806;
+ public const int notification_template_big_media_narrow_custom = 2131361806;
// aapt resource value: 0x7F0A000F
- public const int notification_template_big_media_custom = 2131361807;
+ public const int notification_template_custom_big = 2131361807;
// aapt resource value: 0x7F0A0010
- public const int notification_template_big_media_narrow = 2131361808;
+ public const int notification_template_icon_group = 2131361808;
// aapt resource value: 0x7F0A0011
- public const int notification_template_big_media_narrow_custom = 2131361809;
+ public const int notification_template_lines_media = 2131361809;
// aapt resource value: 0x7F0A0012
- public const int notification_template_custom_big = 2131361810;
+ public const int notification_template_media = 2131361810;
// aapt resource value: 0x7F0A0013
- public const int notification_template_icon_group = 2131361811;
+ public const int notification_template_media_custom = 2131361811;
// aapt resource value: 0x7F0A0014
- public const int notification_template_lines_media = 2131361812;
+ public const int notification_template_part_chronometer = 2131361812;
// aapt resource value: 0x7F0A0015
- public const int notification_template_media = 2131361813;
+ public const int notification_template_part_time = 2131361813;
// aapt resource value: 0x7F0A0016
- public const int notification_template_media_custom = 2131361814;
+ public const int pickerview_options = 2131361814;
// aapt resource value: 0x7F0A0017
- public const int notification_template_part_chronometer = 2131361815;
-
- // aapt resource value: 0x7F0A0018
- public const int notification_template_part_time = 2131361816;
-
- // aapt resource value: 0x7F0A0019
- public const int pickerview_options = 2131361817;
-
- // aapt resource value: 0x7F0A001A
- public const int pickerview_time = 2131361818;
-
- // aapt resource value: 0x7F0A001B
- public const int pw_options = 2131361819;
-
- // aapt resource value: 0x7F0A001C
- public const int pw_time = 2131361820;
+ public const int pickerview_time = 2131361815;
static Layout()
{
@@ -1139,27 +1040,11 @@
}
}
- public partial class Menu
- {
-
- // aapt resource value: 0x7F0B0000
- public const int main = 2131427328;
-
- static Menu()
- {
- global::Android.Runtime.ResourceIdManager.UpdateIdValues();
- }
-
- private Menu()
- {
- }
- }
-
public partial class Mipmap
{
- // aapt resource value: 0x7F0C0000
- public const int Icon = 2131492864;
+ // aapt resource value: 0x7F0B0000
+ public const int Icon = 2131427328;
static Mipmap()
{
@@ -1174,65 +1059,68 @@
public partial class String
{
- // aapt resource value: 0x7F0D0000
- public const int action_settings = 2131558400;
+ // aapt resource value: 0x7F0C0000
+ public const int app_name = 2131492864;
- // aapt resource value: 0x7F0D0001
- public const int app_name = 2131558401;
+ // aapt resource value: 0x7F0C0001
+ public const int gd_activity_title = 2131492865;
- // aapt resource value: 0x7F0D0002
- public const int gd_cancel = 2131558402;
+ // aapt resource value: 0x7F0C0002
+ public const int gd_cancel = 2131492866;
- // aapt resource value: 0x7F0D0003
- public const int gd_notifyMsg = 2131558403;
+ // aapt resource value: 0x7F0C0003
+ public const int gd_myhome = 2131492867;
- // aapt resource value: 0x7F0D0004
- public const int gd_notifyTitle = 2131558404;
+ // aapt resource value: 0x7F0C0004
+ public const int gd_notifyMsg = 2131492868;
- // aapt resource value: 0x7F0D0005
- public const int gd_save = 2131558405;
+ // aapt resource value: 0x7F0C0005
+ public const int gd_notifyTitle = 2131492869;
- // aapt resource value: 0x7F0D0006
- public const int gd_setting = 2131558406;
+ // aapt resource value: 0x7F0C0006
+ public const int gd_save = 2131492870;
- // aapt resource value: 0x7F0D0007
- public const int hello = 2131558407;
+ // aapt resource value: 0x7F0C0007
+ public const int gd_search_tip = 2131492871;
- // aapt resource value: 0x7F0D0008
- public const int hello_world = 2131558408;
+ // aapt resource value: 0x7F0C0008
+ public const int gd_setting = 2131492872;
- // aapt resource value: 0x7F0D0009
- public const int not_recognized_fingerprint_hint = 2131558409;
+ // aapt resource value: 0x7F0C0009
+ public const int hello = 2131492873;
- // aapt resource value: 0x7F0D000A
- public const int pickerview_cancel = 2131558410;
+ // aapt resource value: 0x7F0C000A
+ public const int not_recognized_fingerprint_hint = 2131492874;
- // aapt resource value: 0x7F0D000B
- public const int pickerview_day = 2131558411;
+ // aapt resource value: 0x7F0C000B
+ public const int pickerview_cancel = 2131492875;
- // aapt resource value: 0x7F0D000C
- public const int pickerview_hours = 2131558412;
+ // aapt resource value: 0x7F0C000C
+ public const int pickerview_day = 2131492876;
- // aapt resource value: 0x7F0D000D
- public const int pickerview_minutes = 2131558413;
+ // aapt resource value: 0x7F0C000D
+ public const int pickerview_hours = 2131492877;
- // aapt resource value: 0x7F0D000E
- public const int pickerview_month = 2131558414;
+ // aapt resource value: 0x7F0C000E
+ public const int pickerview_minutes = 2131492878;
- // aapt resource value: 0x7F0D000F
- public const int pickerview_seconds = 2131558415;
+ // aapt resource value: 0x7F0C000F
+ public const int pickerview_month = 2131492879;
- // aapt resource value: 0x7F0D0010
- public const int pickerview_submit = 2131558416;
+ // aapt resource value: 0x7F0C0010
+ public const int pickerview_seconds = 2131492880;
- // aapt resource value: 0x7F0D0011
- public const int pickerview_year = 2131558417;
+ // aapt resource value: 0x7F0C0011
+ public const int pickerview_submit = 2131492881;
- // aapt resource value: 0x7F0D0012
- public const int status_bar_notification_info_overflow = 2131558418;
+ // aapt resource value: 0x7F0C0012
+ public const int pickerview_year = 2131492882;
- // aapt resource value: 0x7F0D0013
- public const int touch_fingerprint_sensor_hint = 2131558419;
+ // aapt resource value: 0x7F0C0013
+ public const int status_bar_notification_info_overflow = 2131492883;
+
+ // aapt resource value: 0x7F0C0014
+ public const int touch_fingerprint_sensor_hint = 2131492884;
static String()
{
@@ -1247,68 +1135,59 @@
public partial class Style
{
- // aapt resource value: 0x7F0E0000
- public const int AppBaseTheme = 2131623936;
+ // aapt resource value: 0x7F0D0000
+ public const int BottomSheetDialogAnimation = 2131558400;
- // aapt resource value: 0x7F0E0001
- public const int AppTheme = 2131623937;
+ // aapt resource value: 0x7F0D000F
+ public const int custom_dialog2 = 2131558415;
- // aapt resource value: 0x7F0E0002
- public const int BottomSheetDialogAnimation = 2131623938;
+ // aapt resource value: 0x7F0D0001
+ public const int MyTheme = 2131558401;
- // aapt resource value: 0x7F0E0011
- public const int custom_dialog2 = 2131623953;
+ // aapt resource value: 0x7F0D0010
+ public const int picker_view_scale_anim = 2131558416;
- // aapt resource value: 0x7F0E0003
- public const int MyTheme = 2131623939;
+ // aapt resource value: 0x7F0D0011
+ public const int picker_view_slide_anim = 2131558417;
- // aapt resource value: 0x7F0E0012
- public const int picker_view_scale_anim = 2131623954;
+ // aapt resource value: 0x7F0D0002
+ public const int TextAppearance_Compat_Notification = 2131558402;
- // aapt resource value: 0x7F0E0013
- public const int picker_view_slide_anim = 2131623955;
+ // aapt resource value: 0x7F0D0003
+ public const int TextAppearance_Compat_Notification_Info = 2131558403;
- // aapt resource value: 0x7F0E0004
- public const int TextAppearance_Compat_Notification = 2131623940;
+ // aapt resource value: 0x7F0D0004
+ public const int TextAppearance_Compat_Notification_Info_Media = 2131558404;
- // aapt resource value: 0x7F0E0005
- public const int TextAppearance_Compat_Notification_Info = 2131623941;
+ // aapt resource value: 0x7F0D0005
+ public const int TextAppearance_Compat_Notification_Line2 = 2131558405;
- // aapt resource value: 0x7F0E0006
- public const int TextAppearance_Compat_Notification_Info_Media = 2131623942;
+ // aapt resource value: 0x7F0D0006
+ public const int TextAppearance_Compat_Notification_Line2_Media = 2131558406;
- // aapt resource value: 0x7F0E0007
- public const int TextAppearance_Compat_Notification_Line2 = 2131623943;
+ // aapt resource value: 0x7F0D0007
+ public const int TextAppearance_Compat_Notification_Media = 2131558407;
- // aapt resource value: 0x7F0E0008
- public const int TextAppearance_Compat_Notification_Line2_Media = 2131623944;
+ // aapt resource value: 0x7F0D0008
+ public const int TextAppearance_Compat_Notification_Time = 2131558408;
- // aapt resource value: 0x7F0E0009
- public const int TextAppearance_Compat_Notification_Media = 2131623945;
+ // aapt resource value: 0x7F0D0009
+ public const int TextAppearance_Compat_Notification_Time_Media = 2131558409;
- // aapt resource value: 0x7F0E000A
- public const int TextAppearance_Compat_Notification_Time = 2131623946;
+ // aapt resource value: 0x7F0D000A
+ public const int TextAppearance_Compat_Notification_Title = 2131558410;
- // aapt resource value: 0x7F0E000B
- public const int TextAppearance_Compat_Notification_Time_Media = 2131623947;
+ // aapt resource value: 0x7F0D000B
+ public const int TextAppearance_Compat_Notification_Title_Media = 2131558411;
- // aapt resource value: 0x7F0E000C
- public const int TextAppearance_Compat_Notification_Title = 2131623948;
+ // aapt resource value: 0x7F0D000C
+ public const int Theme_BiometricPromptDialog = 2131558412;
- // aapt resource value: 0x7F0E000D
- public const int TextAppearance_Compat_Notification_Title_Media = 2131623949;
+ // aapt resource value: 0x7F0D000D
+ public const int Widget_Compat_NotificationActionContainer = 2131558413;
- // aapt resource value: 0x7F0E000E
- public const int Theme_BiometricPromptDialog = 2131623950;
-
- // aapt resource value: 0x7F0E0014
- public const int timepopwindow_anim_style = 2131623956;
-
- // aapt resource value: 0x7F0E000F
- public const int Widget_Compat_NotificationActionContainer = 2131623951;
-
- // aapt resource value: 0x7F0E0010
- public const int Widget_Compat_NotificationActionText = 2131623952;
+ // aapt resource value: 0x7F0D000E
+ public const int Widget_Compat_NotificationActionText = 2131558414;
static Style()
{
@@ -1507,8 +1386,8 @@
public partial class Xml
{
- // aapt resource value: 0x7F100000
- public const int file_paths = 2131755008;
+ // aapt resource value: 0x7F0F0000
+ public const int file_paths = 2131689472;
static Xml()
{
diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs
index 0179b96..97a93ac 100755
--- a/ZigbeeApp/Shared/Common/CommonPage.cs
+++ b/ZigbeeApp/Shared/Common/CommonPage.cs
@@ -182,7 +182,10 @@
/// 11
/// </summary>
public static int PlaceHolderTextSize = 11;
-
+ /// <summary>
+ /// 瀹夊崜鐨勭郴缁熻繑鍥炴寜閿兘鍚︽寜涓�(姣斿鍦ㄥ浠借繕鍘熸椂,涓嶈兘鎸変笅杩斿洖閿�)
+ /// </summary>
+ public static bool BackKeyCanClick = true;
/// <summary>
/// 璇锋眰鏈嶅姟鍣ㄦ柟娉�
diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs
index 8f0dc65..77f300a 100755
--- a/ZigbeeApp/Shared/Common/Device.cs
+++ b/ZigbeeApp/Shared/Common/Device.cs
@@ -85,7 +85,7 @@
/// </summary>
private Dictionary<string, HashSet<int>> dicDeviceEpoint = new Dictionary<string, HashSet<int>>();
/// <summary>
- /// 璁惧Mac椤哄簭
+ /// 璁惧Mac椤哄簭(閲岄潰鏄疢ac鍦板潃)
/// </summary>
private Dictionary<string, List<string>> dicDeviceSort = null;
/// <summary>
@@ -1563,10 +1563,14 @@
/// <returns></returns>
public List<CommonDevice> SortDevice(List<CommonDevice> listDevice)
{
- var dic = new Dictionary<string, CommonDevice>();
+ var dic = new Dictionary<string, List<CommonDevice>>();
for (int i = 0; i < listDevice.Count; i++)
{
- dic[(this.GetDeviceMainKeys(listDevice[i]))] = listDevice[i];
+ if (dic.ContainsKey(listDevice[i].DeviceAddr) == false)
+ {
+ dic[listDevice[i].DeviceAddr] = new List<CommonDevice>();
+ }
+ dic[listDevice[i].DeviceAddr].Add(listDevice[i]);
}
var list = new List<CommonDevice>();
foreach (var listSort in this.dicDeviceSort.Values)
@@ -1575,7 +1579,15 @@
{
if (dic.ContainsKey(listSort[i]) == true)
{
- list.Add(dic[listSort[i]]);
+ dic[listSort[i]].Sort((obj1, obj2) =>
+ {
+ if (obj1.DeviceEpoint > obj2.DeviceEpoint)
+ {
+ return 1;
+ }
+ return -1;
+ });
+ list.AddRange(dic[listSort[i]]);
}
}
}
diff --git a/ZigbeeApp/Shared/Common/House.cs b/ZigbeeApp/Shared/Common/House.cs
index 1d6815e..7d0728e 100755
--- a/ZigbeeApp/Shared/Common/House.cs
+++ b/ZigbeeApp/Shared/Common/House.cs
@@ -402,9 +402,12 @@
/// GetCurrentFloorName
/// </summary>
/// <returns></returns>
- public string GetCurrentFloorName()
+ public string GetCurrentFloorName
{
- return GetFloorName(CurrentFloorId);
+ get
+ {
+ return GetFloorName(CurrentFloorId);
+ }
}
/// <summary>
diff --git a/ZigbeeApp/Shared/Common/Logic.cs b/ZigbeeApp/Shared/Common/Logic.cs
index 8fed77f..e7805cc 100755
--- a/ZigbeeApp/Shared/Common/Logic.cs
+++ b/ZigbeeApp/Shared/Common/Logic.cs
@@ -3,6 +3,7 @@
namespace Shared.Common
{
+
public class Logic
{
public static List<Logic> LogicList = new List<Logic>();
@@ -14,7 +15,13 @@
///<para>浠ヤ笅鎵�鏈夊瓧娈靛彧鏈夊湪Result 涓�1鏃跺瓨鍦�</para>
/// </summary>
public int Result;
-
+ /// <summary>
+ /// 1姝e父鑷姩鍖�;2鎺ㄨ崘妯℃澘鑷姩鍖�;
+ /// </summary>
+ public int LogicType=1;
+ /// <summary>
+ /// 閫昏緫ID
+ /// </summary>
public int LogicId;
/// <summary>
///璇ラ�昏緫鏄惁琚娇鑳姐��
@@ -35,9 +42,13 @@
///<para>1锛氭弧瓒冲叾涓竴涓潯浠惰Е鍙戝姩浣�</para>
/// </summary>
public int Relationship;
+ /// <summary>
+ /// 鎺ㄩ�佸唴瀹�
+ /// </summary>
+ public string LogicCustomPushText;
//public Dictionary<string, string> TimeAttribute = new Dictionary<string, string>();
- public TimeAttributeObj TimeAttribute = new TimeAttributeObj();
+ public TimeAttributeObj TimeAttribute = new TimeAttributeObj();
/// <summary>
/// 閫昏緫鏉′欢鍒楄〃
/// </summary>
@@ -48,6 +59,10 @@
/// </summary>
public List<Dictionary<string, object>> Actions = new List<Dictionary<string, object>>();
+ /// <summary>
+ /// 鍏宠仈app璐﹀彿鍒楄〃
+ /// </summary>
+ public List<Dictionary<string, string>> Accounts = new List<Dictionary<string, string>>();
}
diff --git a/ZigbeeApp/Shared/Common/Room.cs b/ZigbeeApp/Shared/Common/Room.cs
index 282f05b..d29e34b 100755
--- a/ZigbeeApp/Shared/Common/Room.cs
+++ b/ZigbeeApp/Shared/Common/Room.cs
@@ -36,7 +36,7 @@
/// 妤煎眰Id
/// 鏂板鏃朵娇鐢℅uid
/// </summary>
- public string FloorId = "Floor1";
+ public string FloorId = string.Empty;
/// <summary>
/// 妤煎眰鍚嶇О
/// </summary>
@@ -382,21 +382,8 @@
//璁惧锛坉eviceUI锛�
beforeRoom.DeviceUIList.Clear();
foreach (var deviceFilePath in beforeRoom.DeviceUIFilePathList)
- {
- var jsonInfo = Encoding.UTF8.GetString(Global.ReadFileByHomeId(deviceFilePath));
- var tempDeviceUI = Newtonsoft.Json.JsonConvert.DeserializeObject<DeviceUI>(jsonInfo);
- if (tempDeviceUI != null)
- {
- var delCommon = tempDeviceUIList.Find((obj) => obj.CommonDevice != null && tempDeviceUI.CommonDevice != null && obj.CommonDevice.Type == tempDeviceUI.CommonDevice.Type && obj.CommonDevice.CommonDeviceAddrEpoint == tempDeviceUI.CommonDevice.CommonDeviceAddrEpoint);
- if (delCommon != null)
- {
- beforeRoom.DeviceUIList.Add(delCommon);
- }
- else
- {
- beforeRoom.AddDevice(deviceFilePath);
- }
- }
+ {
+ beforeRoom.DeviceUIList.Add(Common.LocalDevice.Current.GetDeviceUI(deviceFilePath));
}
//鍦烘櫙(SceneUI)
beforeRoom.SceneUIList.Clear();
diff --git a/ZigbeeApp/Shared/Common/ZigbeeColor.cs b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
index cd8dc23..1b07814 100755
--- a/ZigbeeApp/Shared/Common/ZigbeeColor.cs
+++ b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
@@ -101,6 +101,10 @@
/// </summary>
public uint GXCTextSelectedColor3 = 0xFFFFB400;
/// <summary>
+ /// 瀛椾綋閫変腑棰滆壊 0xFF0075FF
+ /// </summary>
+ public uint GXCTextSelectedColor4 = 0xFF0075FF;
+ /// <summary>
/// 搴曢儴鏈�変腑棰滆壊 0xFF8E8E93
/// </summary>
public uint GXCTextBottomUnSelectedColor = 0xFF8E8E93;
@@ -120,6 +124,10 @@
/// 榛戣壊鑳屾櫙 0xFF333333
/// </summary>
public uint GXCBlackBackgroundColor2 = 0xFF333333;
+ /// <summary>
+ /// 榛戣壊鑳屾櫙 0xF2232323
+ /// </summary>
+ public uint GXCBlackBackgroundColor3 = 0xF2232323;
/// <summary>
/// functionView 0x1AFC744B
/// </summary>
@@ -282,8 +290,34 @@
public uint LogicTextBlueColor = 0xFF00AAF0;
public uint LogicDelBackgroundColor = 0xFFFF0000;
public uint LogicEditBlackColor = 0xFF00aaf0;
- public uint LogicTimeViewColor= 0xFFFFFFFF;
+ public uint LogicTimeViewColor = 0xFFFFFFFF;
public uint LogicTimeViewSaveButton = 0xFF121212;
+ //鏈�鏂癠I棰滆壊
+ public uint LogicTopBackgroundColor = 0xFFF9F9F9;
+ public uint LogicMiddleBackgroundColor = 0xFFF5F6FA;
+ public uint LogicBlankBackgroundColor = 0xFFFFFFFF;
+ public uint LogicRowLayoutLineColor = 0x40cccccc;
+ public uint LogicRowLayoutTopLineColor = 0x25000000;
+ public uint LogicBtnCancelColor = 0xFF999999;
+ public uint LogicBtnTypeColor = 0xFF232323;
+ public uint LogicBtnCompleteColor = 0xFFFB744A;
+ public uint LogicBtnSelectedColor = 0xFF333333;
+ public uint LogicBtnNotSelectedColor = 0xFF666666;
+ public uint LogicBtnSaveBackgroundColor = 0xFF232323;
+ public uint LogicBtnSaveTextColor = 0xFFFFFFFF;
+ public uint LogicTranslucentColor = 0x50000000;
+ public uint LogicAddColor = 0xFFFC744B;
+ public uint LogicIconBackgroundColor = 0xFFFEF1ED;
+ public uint LogicProgressColor = 0xFFE8E8E8;
+ public uint LogicProgressColorSelected = 0xffFDB500;
+ public uint LogicEditBlackColor1 = 0xFF4A4A4A;
+ public uint LogicDelBlackColor1 = 0xFFF75858;
+ public uint LogicFunction1Color = 0xFFFFa200;
+ public uint LogicScene1Color = 0xFF4A90E2;
+ public uint LogicSecurity1Color = 0xFF35B87F;
+ public uint LogicDelay1Color = 0xFFBF64FB;
+ public uint LogicListWeekTextColor = 0xFF666666;
+
#endregion
}
}
diff --git a/ZigbeeApp/Shared/DLL/Shared.Droid.GDMapKit.dll b/ZigbeeApp/Shared/DLL/Shared.Droid.GDMapKit.dll
deleted file mode 100755
index be91b1e..0000000
--- a/ZigbeeApp/Shared/DLL/Shared.Droid.GDMapKit.dll
+++ /dev/null
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Shared.Droid.HDLWidget.dll b/ZigbeeApp/Shared/DLL/Shared.Droid.HDLWidget.dll
index aea459a..65e9deb 100755
--- a/ZigbeeApp/Shared/DLL/Shared.Droid.HDLWidget.dll
+++ b/ZigbeeApp/Shared/DLL/Shared.Droid.HDLWidget.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Shared.Droid.PickerView.dll b/ZigbeeApp/Shared/DLL/Shared.Droid.PickerView.dll
deleted file mode 100755
index 12e551e..0000000
--- a/ZigbeeApp/Shared/DLL/Shared.Droid.PickerView.dll
+++ /dev/null
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Shared.Droid.TBL.dll b/ZigbeeApp/Shared/DLL/Shared.Droid.TBL.dll
deleted file mode 100755
index 20001b4..0000000
--- a/ZigbeeApp/Shared/DLL/Shared.Droid.TBL.dll
+++ /dev/null
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Shared.Droid.TCL.dll b/ZigbeeApp/Shared/DLL/Shared.Droid.TCL.dll
deleted file mode 100755
index 4221046..0000000
--- a/ZigbeeApp/Shared/DLL/Shared.Droid.TCL.dll
+++ /dev/null
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Shared.Droid.TouchID.dll b/ZigbeeApp/Shared/DLL/Shared.Droid.TouchID.dll
index f365695..484bf27 100755
--- a/ZigbeeApp/Shared/DLL/Shared.Droid.TouchID.dll
+++ b/ZigbeeApp/Shared/DLL/Shared.Droid.TouchID.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Shared.Droid.dll b/ZigbeeApp/Shared/DLL/Shared.Droid.dll
index 19b4b2d..92348ee 100755
--- a/ZigbeeApp/Shared/DLL/Shared.Droid.dll
+++ b/ZigbeeApp/Shared/DLL/Shared.Droid.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Shared.IOS.TBL.dll b/ZigbeeApp/Shared/DLL/Shared.IOS.TBL.dll
index 88be6c1..cd3a196 100755
--- a/ZigbeeApp/Shared/DLL/Shared.IOS.TBL.dll
+++ b/ZigbeeApp/Shared/DLL/Shared.IOS.TBL.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/DLL/Shared.IOS.dll b/ZigbeeApp/Shared/DLL/Shared.IOS.dll
index bffafda..71c1fcf 100755
--- a/ZigbeeApp/Shared/DLL/Shared.IOS.dll
+++ b/ZigbeeApp/Shared/DLL/Shared.IOS.dll
Binary files differ
diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
index 145ef10..2f5882d 100755
--- a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs
@@ -2,11 +2,8 @@
using System.Collections.Generic;
using System.Net;
using System.Text;
-using uPLibrary.Networking.M2Mqtt;
using Shared.Common;
-using Shared.IO;
using Shared.Phone.UserView;
-using System.Net.Http;
using Shared.Phone.Device.CommonForm;
namespace Shared.Phone.Device.Account
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
index 14cb8c3..0c0e063 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs
@@ -533,35 +533,12 @@
instance = this;
}
- public void InitFloor()
- {
- Config.Instance.Home.FloorDics.Clear();
- Config.Instance.Home.FloorDics.Add("Floor1", "涓�妤�");
- Config.Instance.Home.FloorDics.Add("Floor2", "浜屾ゼ");
- Config.Instance.Home.FloorDics.Add("Floor3", "涓夋ゼ");
- Config.Instance.Home.FloorDics.Add("Floor4", "鍥涙ゼ");
- Config.Instance.Home.FloorDics.Add("Floor5", "鈶ゆゼ");
- if (string.IsNullOrEmpty(Config.Instance.Home.CurrentFloorId))
- {
- if (Config.Instance.Home.FloorDics.Count > 0)
- {
- foreach (var floor in Config.Instance.Home.FloorDics)
- {
- Config.Instance.Home.CurrentFloorId=floor.Key;
- break;
- }
- }
- }
- //Config.Instance.Save();
- }
-
/// <summary>
/// 鏄剧ず鐣岄潰--榛樿鍦烘櫙鐣岄潰
/// </summary>
/// <param name="selectedBtn">閫変腑閭d釜鐣岄潰 0--鍔熻兘 1--鍦烘櫙 2--鑷姩鍖� </param>
public void Show(int selectedBtn = 1)
{
- InitFloor();
ZbGateway.StatusList.Add(this);
RemoveAll();
@@ -657,7 +634,7 @@
if (Config.Instance.Home.FloorDics.Count > 0)
{
- floorBtn.Text = Config.Instance.Home.GetCurrentFloorName();
+ floorBtn.Text = Config.Instance.Home.GetCurrentFloorName;
functionSceneAutoBG.AddChidren(floorBtn);
functionSceneAutoBG.AddChidren(selectFloorBtn);
}
@@ -1811,8 +1788,168 @@
/// </summary>
public async void ShowAutotion()
{
- var logicScrolView = new VerticalScrolViewLayout { };
+ functionSceneBodyView.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+
+ var bjFrameLayout = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(170),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ X = Application.GetRealWidth(58),
+ Radius = (uint)Application.GetRealHeight(50),
+ Y = Application.GetRealHeight(30),
+ };
+ functionSceneBodyView.AddChidren(bjFrameLayout);
+
+ var sigBtn = new Button
+ {
+ Width = Application.GetMinRealAverage(84),
+ Height = Application.GetMinRealAverage(84),
+ UnSelectedImagePath = "ZigeeLogic/sign.png",
+ X = Application.GetRealWidth(58),
+ Gravity = Gravity.CenterVertical,
+ };
+ bjFrameLayout.AddChidren(sigBtn);
+
+ var recommendtextBtn = new Button
+ {
+ Width = Application.GetMinRealAverage(300),
+ Height = Application.GetMinRealAverage(84),
+ X = sigBtn.Right + Application.GetRealWidth(35),
+ TextAlignment = TextAlignment.CenterLeft,
+ //Text = "鎺ㄨ崘妯℃澘",
+ TextID = MyInternationalizationString.logictemplate,
+ Gravity = Gravity.CenterVertical,
+ TextColor = ZigbeeColor.Current.LogicBtnSelectedColor,
+ };
+ bjFrameLayout.AddChidren(recommendtextBtn);
+
+ var recommendswitchBtn = new Button
+ {
+ Width = Application.GetMinRealAverage(104),
+ Height = Application.GetMinRealAverage(63),
+ UnSelectedImagePath = "ZigeeLogic/logicclose.png",
+ SelectedImagePath = "ZigeeLogic/logicopen.png",
+ X = bjFrameLayout.Width - Application.GetRealWidth(104 + 58),
+ Gravity = Gravity.CenterVertical,
+ };
+ bjFrameLayout.AddChidren(recommendswitchBtn);
+
+
+ var scenehorizontalScrol = new HorizontalScrolViewLayout
+ {
+ Width = Application.GetRealWidth(1080 - 58),
+ X = Application.GetRealWidth(58),
+ Y = bjFrameLayout.Bottom + Application.GetRealHeight(30),
+ Height = Application.GetRealHeight(0),
+ };
+ functionSceneBodyView.AddChidren(scenehorizontalScrol);
+
+ var logicScrolView = new VerticalScrolViewLayout
+ {
+ Height = functionSceneBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ X = Application.GetRealWidth(58),
+ Radius = (uint)Application.GetRealHeight(50),
+ Y = scenehorizontalScrol.Bottom,
+ };
functionSceneBodyView.AddChidren(logicScrolView);
+
+
+ recommendswitchBtn.MouseUpEventHandler += (sender, e) =>
+ {
+ int Yheight = 0;
+ recommendswitchBtn.IsSelected = !recommendswitchBtn.IsSelected;
+ scenehorizontalScrol.RemoveAll();
+ if (recommendswitchBtn.IsSelected)
+ {
+ scenehorizontalScrol.Height = Application.GetRealHeight(246);
+ Yheight = 20;
+ for (int i = 1; i < 4; i++)
+ {
+
+ var frameLayout = new FrameLayout
+ {
+ Width = Application.GetMinRealAverage(369 + 46),
+ Height = Application.GetMinRealAverage(246),
+ };
+ scenehorizontalScrol.AddChidren(frameLayout);
+ var logiciocnBtn = new Button
+ {
+ Width = Application.GetMinRealAverage(369),
+ Height = Application.GetMinRealAverage(246),
+ UnSelectedImagePath = "ZigeeLogic/" + i + ".png",
+ Tag = i,
+ };
+ frameLayout.AddChidren(logiciocnBtn);
+
+ var logicnameBtn = new Button
+ {
+ Width = Application.GetMinRealAverage(250),
+ Height = Application.GetMinRealAverage(80),
+ X = Application.GetRealWidth(23),
+ Y = Application.GetRealHeight(246 - 23 - 80),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ };
+ frameLayout.AddChidren(logicnameBtn);
+
+ if (i == 1)
+ {
+ logicnameBtn.Text = Language.StringByID(MyInternationalizationString.onlight);
+ }
+ else if (i == 2)
+ {
+ logicnameBtn.Text = Language.StringByID(MyInternationalizationString.offlight);
+ }
+ else if (i == 3)
+ {
+ logicnameBtn.Text = Language.StringByID(MyInternationalizationString.automation1);
+ }
+
+
+ EventHandler<MouseEventArgs> iconclick = (sender1, e1) =>
+ {
+ Common.Logic.CurrentLogic = new Common.Logic();
+ Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑
+ if (logiciocnBtn.Tag.ToString() == "3")
+ {
+ Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;// Language.StringByID(MyInternationalizationString.automation1);
+ var addLogicPage = new Logic.AddLogicPage();
+ HomePage.Instance.AddChidren(addLogicPage);
+ HomePage.Instance.PageIndex += 1;
+ addLogicPage.Show();
+ }
+ else
+ {
+ Common.Logic.LogicDviceList.Clear();
+ if (Common.Logic.LogicDviceList.Count == 0)
+ {
+ Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
+ }
+ Common.Logic.CurrentLogic.LogicType = 2;
+ Common.Logic.CurrentLogic.LogicName = logicnameBtn.Text;
+ Logic.TemplatePage templatePage = new Logic.TemplatePage();
+ Logic.TemplatePage.s = logiciocnBtn.Tag.ToString();
+ HomePage.Instance.AddChidren(templatePage);
+ HomePage.Instance.PageIndex += 1;
+ templatePage.Show();
+ }
+ };
+ logiciocnBtn.MouseUpEventHandler += iconclick;
+ logicnameBtn.MouseUpEventHandler += iconclick;
+ }
+ }
+ else
+ {
+ scenehorizontalScrol.Height = Application.GetRealHeight(0);
+ Yheight = 0;
+ }
+ logicScrolView.Y = scenehorizontalScrol.Bottom + Yheight;
+ logicScrolView.Height = functionSceneBodyView.Height - bjFrameLayout.Height - bjFrameLayout.Y - scenehorizontalScrol.Height - Application.GetRealHeight(30) - Yheight;
+ Automationview(logicScrolView);
+ };
+
CommonPage.Loading.Start();
if (Common.Logic.LogicList.Count == 0)
{
@@ -1832,10 +1969,13 @@
if (Idlist.Count != 0)
{
var listlogic = await Logic.Send.ReadList(Idlist.Count);
- foreach (var LogicId in Idlist)
+ for (int i = 0; i < Idlist.Count; i++)
{
- foreach (var logic in listlogic)
+ var LogicId = Idlist[i];
+ //foreach鍙兘闆嗗悎宸茶淇敼,鏋氫妇鎿嶄綔鍙兘涓嶄細鎵ц,鍙兘鍑虹幇宕╂簝(寤鸿for)銆�
+ for (int j = 0; j < listlogic.Count; j++)
{
+ var logic = listlogic[j];
if (logic.LogicId == LogicId)
{
Common.Logic.LogicList.Add(logic);
@@ -1844,7 +1984,6 @@
}
}
}
-
//鑷姩鍖�
Automationview(logicScrolView);
CommonPage.Loading.Hide();
@@ -1859,68 +1998,87 @@
refresview.RemoveAll();
foreach (var logic in Common.Logic.LogicList)
{
- var logicrowlayout = new RowLayout
+ var bjRow = new RowLayout
{
- Height = Application.GetRealHeight(180),
- LineColor = ZigbeeColor.Current.LogicLineColor,
- };
- refresview.AddChidren(logicrowlayout);
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(220),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- var btnname = new Button
+ };
+ refresview.AddChidren(bjRow);
+
+ var logicRowlayout = new RowLayout
{
- //Text = "閫昏緫涓�",
+ Y = Application.GetRealHeight(220 - 190),
+ Height = Application.GetRealHeight(190),
+ Width = Application.GetRealWidth(1080 - 58 - 46),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ X = Application.GetRealWidth(46),
+ };
+ bjRow.AddChidren(logicRowlayout);
+
+ var logicnameBtn = new Button
+ {
+ Height = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(350),
Text = logic.LogicName,
- X = Application.GetRealWidth(50),
+ X = Application.GetRealWidth(12),
TextAlignment = TextAlignment.CenterLeft,
- Gravity = Gravity.CenterVertical,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- logicrowlayout.AddChidren(btnname);
+ logicRowlayout.AddChidren(logicnameBtn);
- var btnswitch = new Button
+
+ var logicswitchBtn = new Button
{
- Width = Application.GetMinRealAverage(183),
- Height = Application.GetMinRealAverage(123),
- UnSelectedImagePath = "ZigeeLogic/Switch.png",
- SelectedImagePath = "ZigeeLogic/SwitchSelected.png",
- X = Application.GetRealWidth(1080 - 200),
- Gravity = Gravity.CenterVertical,
+ Width = Application.GetMinRealAverage(104),
+ Height = Application.GetMinRealAverage(63),
+ UnSelectedImagePath = "ZigeeLogic/logicclose.png",
+ SelectedImagePath = "ZigeeLogic/logicopen.png",
+ X = logicRowlayout.Width - Application.GetRealWidth(104 + 58),
+ Y = Application.GetRealHeight(58 + 30 + 9),
};
- logicrowlayout.AddChidren(btnswitch);
+ logicRowlayout.AddChidren(logicswitchBtn);
- btnswitch.MouseUpEventHandler += (sender1, e1) =>
+
+
+ logicswitchBtn.MouseUpEventHandler += (sender1, e1) =>
{
- btnswitch.IsSelected = !btnswitch.IsSelected;
- if (btnswitch.IsSelected)
+ logicswitchBtn.IsSelected = !logicswitchBtn.IsSelected;
+ if (logicswitchBtn.IsSelected)
{
//閫昏緫寮�
logic.IsEnable = 1;
+ StatusColor(logic, logicRowlayout, 1);
}
else
{
//閫昏緫鍏�
logic.IsEnable = 0;
+ StatusColor(logic, logicRowlayout, 0);
}
Logic.Send.LogicControlSwitch(logic);
//Logic.Send.AddModifyLogic(logic);
};
if (logic.IsEnable == 1)
{
- btnswitch.IsSelected = true;
+ logicswitchBtn.IsSelected = true;
+ StatusColor(logic, logicRowlayout, 1);
}
else if (logic.IsEnable == 0)
{
- btnswitch.IsSelected = false;
+ logicswitchBtn.IsSelected = false;
+ StatusColor(logic, logicRowlayout, 0);
}
///缂栬緫
var edit = new Button
{
- //TextID = MyInternationalizationString.Musicdel
- BackgroundColor = 0xFF00aaf0,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- logicrowlayout.AddRightView(edit);
+ bjRow.AddRightView(edit);
edit.MouseUpEventHandler += (sender, e) =>
{
Common.Logic.LogicDviceList.Clear();
@@ -1930,9 +2088,9 @@
}
Common.Logic.CurrentLogic = logic;
var logicCommunalPage = new Logic.LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { btnname.Text = logic.LogicName; Automationview(refresview); });
+ HomePage.Instance.AddChidren(logicCommunalPage);
+ HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { logicnameBtn.Text = logic.LogicName; Automationview(refresview); });
};
@@ -1940,16 +2098,26 @@
///鍒犻櫎
var del = new Button
{
- //TextID = MyInternationalizationString.Musicdel,
- BackgroundColor = 0xFFFF0000,
+ BackgroundColor = ZigbeeColor.Current.LogicDelBlackColor1,
Text = Language.StringByID(MyInternationalizationString.del),
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- logicrowlayout.AddRightView(del);
+ bjRow.AddRightView(del);
del.MouseUpEventHandler += (sender, e) =>
{
- Common.Logic.LogicList.Remove(logic);
- Automationview(refresview);
- Logic.Send.DelLogic(logic.LogicId);
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.tip), Language.StringByID(MyInternationalizationString.doyouwanttodelete),
+ Language.StringByID(MyInternationalizationString.cancel), Language.StringByID(MyInternationalizationString.confrim));
+ alert.ResultEventHandler += (sender1, e1) =>
+ {
+ if (e1)
+ {
+ Common.Logic.LogicList.Remove(logic);
+ Automationview(refresview);
+ Logic.Send.DelLogic(logic.LogicId);
+ }
+ };
+ alert.Show();
+
};
}
@@ -2030,5 +2198,399 @@
}
#endregion
+
+ private void StatusColor(Common.Logic logic, RowLayout logicRowlayout, int intvalue)
+ {
+
+ var logictimeBtn = new Button
+ {
+ Height = Application.GetRealHeight(58),
+ Width = logicRowlayout.Width - Application.GetRealWidth(58 + 12 + 350),
+ X = Application.GetRealWidth(365),
+ TextAlignment = TextAlignment.CenterRight,
+ TextColor = ZigbeeColor.Current.LogicListWeekTextColor,
+ };
+ logicRowlayout.AddChidren(logictimeBtn);
+
+ ///鏄剧ず鎵ц鍛ㄦ湡
+ switch (logic.TimeAttribute.Repeat)
+ {
+ ///0:鍙墽琛屼竴娆★紝鎵ц鍚嶪sEnable鍊肩疆;1,浠婂勾鍐呮墽琛�;2锛氭瘡澶╂墽琛�;3锛氭瘡鏈堟墽琛�;4锛氭瘡骞存墽琛�;5锛氬懆閲嶅銆�
+ case 0:
+ {
+ logictimeBtn.Text = Language.StringByID(MyInternationalizationString.executeonce);
+ }; break;
+ case 1: { }; break;
+ case 2:
+ {
+ logictimeBtn.Text = Language.StringByID(MyInternationalizationString.everyday);
+ }; break;
+ case 3:
+ {
+
+ string len = "", value = "";
+ var stringvalue = Convert.ToString(logic.TimeAttribute.MonthDate, 2);
+ var str = stringvalue.Insert(0, new string('0', 32 - stringvalue.Length));
+ for (int j = 31; j >= 0; j--)
+ {
+ len += str.Substring(j, 1);
+ }
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ value += (j + 1).ToString() + ",";
+ }
+ }
+ logictimeBtn.Text = Language.StringByID(MyInternationalizationString.monthly) + value.TrimEnd(',') + Language.StringByID(MyInternationalizationString.day);
+
+ }; break;
+ case 4:
+ {
+
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ ///鎵惧嚭鎵ц鐨勬湀浠藉拰澶╂暟
+ if (logic.TimeAttribute.SelectMonDate.Count != 0)
+ {
+ for (int i = 0; i < logic.TimeAttribute.SelectMonDate.Count; i++)
+ {
+ var dayvalue = logic.TimeAttribute.SelectMonDate[i];
+ if (dayvalue != 0)
+ {
+ dictionary.Add(i + 1, dayvalue);
+ }
+ }
+ }
+ if (dictionary.Count != 0 && dictionary.Count == 1)
+ {
+ string len = "", leng = "";
+ int minvalue = 0, Maximum = 0;
+ foreach (var value in dictionary)
+ {
+ ///鍙栧嚭鏈堜唤
+ var month = value.Key;
+ ///鍙栧嚭鏃ユ暟
+ var day = value.Value;
+ var maxvalue = Convert.ToString(day, 2);
+ var str = maxvalue.Insert(0, new string('0', 32 - maxvalue.Length));
+ for (int j = 31; j >= 0; j--)
+ {
+ len += str.Substring(j, 1);
+ }
+
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ minvalue = j + 1;
+ break;
+ }
+ }
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ Maximum = j + 1;
+ }
+ }
+
+ if (month.ToString().Length < 2)
+ {
+ leng = "0" + month.ToString();
+ }
+ else
+ {
+ leng = month.ToString();
+ }
+ if (minvalue == Maximum)
+ {
+ logictimeBtn.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString());
+ }
+ else
+ {
+ logictimeBtn.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-" + leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString());
+ }
+ }
+
+ }
+ else
+ {
+ int b = 0;
+ string stringtext = "";
+ foreach (var value in dictionary)
+ {
+ string len = "", leng = "";
+ int minvalue = 0, Maximum = 0;
+ ///鍙栧嚭鏈堜唤
+ var month = value.Key;
+ ///鍙栧嚭鏃ユ暟
+ var day = value.Value;
+ var maxvalue = Convert.ToString(day, 2);
+ var str = maxvalue.Insert(0, new string('0', 32 - maxvalue.Length));
+ for (int j = 31; j >= 0; j--)
+ {
+ len += str.Substring(j, 1);
+ }
+
+
+ if (month.ToString().Length < 2)
+ {
+ leng = "0" + month.ToString();
+ }
+ else
+ {
+ leng = month.ToString();
+ }
+
+
+
+ if (b == 0)
+ {
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ minvalue = j + 1;
+ break;
+ }
+ }
+ stringtext += leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-";
+
+ }
+
+ if (b == dictionary.Count - 1)
+ {
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ Maximum = j + 1;
+ }
+ }
+ stringtext += leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString());
+
+ }
+ b++;
+ }
+ logictimeBtn.Text = Language.StringByID(MyInternationalizationString.everyyear) + stringtext;
+ }
+
+ }; break;
+ case 5:
+ {
+ string len = "", text = "";
+ List<int> listvalueInt = new List<int>();
+ listvalueInt.Clear();
+ var maxvalue = Convert.ToString(logic.TimeAttribute.WeekDay, 2);
+ var str = maxvalue.Insert(0, new string('0', 8 - maxvalue.Length));
+ for (int j = 7; j >= 0; j--)
+ {
+ len += str.Substring(j, 1);
+ }
+
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ listvalueInt.Add(j + 1);
+
+
+ if ((j + 1) == 1)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.mon1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.mon) + ",";
+ }
+ else if ((j + 1) == 2)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.tue1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.tue) + ",";
+ }
+ else if ((j + 1) == 3)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.wed1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.wed) + ",";
+ }
+ else if ((j + 1) == 4)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.thu1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.thu) + ",";
+ }
+ else if ((j + 1) == 5)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.frl1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.frl) + ",";
+ }
+ else if ((j + 1) == 6)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.sat1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.sat) + ",";
+ }
+ else if ((j + 1) == 7)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.sun1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.sun) + ",";
+ }
+
+
+ }
+ }
+ //鏆傛椂闅愯棌鎺夛紝闇�瑕佹樉绀哄懆鏈拰宸ヤ綔鏃ュ啀鏀惧紑锛�
+ //if (listvalueInt.Count == 5 && !listvalueInt.Contains(6) && !listvalueInt.Contains(7))
+ //{
+ // btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.workingday);
+ //}
+ //else if (listvalueInt.Count == 2 && listvalueInt.Contains(6) && listvalueInt.Contains(7))
+ //{
+ // btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.weekend);
+ //}
+ //else if (listvalueInt.Count == 7)
+ //{
+ // btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyday);
+ //}
+ //else
+ //{
+ // btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.week1) + text.Replace(Language.StringByID(MyInternationalizationString.week1), "").TrimEnd(',');
+ //}
+ logictimeBtn.Text = Language.StringByID(MyInternationalizationString.week1) + text.Replace(Language.StringByID(MyInternationalizationString.week1), "").TrimEnd(',');
+ //btndisplaycycle.Text = text.TrimEnd(',');
+ }; break;
+ }
+
+ List<string> indexlist = new List<string>();
+ List<string> iconIndexlist = new List<string>();
+ for (int i = 0; i < logic.Actions.Count; i++)
+ {
+ var linkType = logic.Actions[i]["LinkType"].ToString();
+ var d = indexlist.Find((value) => { return value == linkType; });
+ if (d == null)
+ {
+ indexlist.Add(linkType);
+ }
+ }
+ if (indexlist.Contains("0"))
+ {
+ iconIndexlist.Add("0");
+ }
+ if (indexlist.Contains("2"))
+ {
+ iconIndexlist.Add("2");
+ }
+ if (indexlist.Contains("6"))
+ {
+ iconIndexlist.Add("6");
+ }
+ if (indexlist.Contains("7"))
+ {
+ iconIndexlist.Add("7");
+ }
+ for (int i = 0; i < iconIndexlist.Count; i++)
+ {
+ var iconindex = iconIndexlist[i];
+ var typebjBtn = new FrameLayout
+ {
+ Width = Application.GetRealWidth(82),
+ Height = Application.GetRealHeight(82),
+ X = Application.GetRealWidth(12 + (12 + 82 + 45 + 12) * i),
+ Y = Application.GetRealHeight(58 + 30),
+ Radius = (uint)Application.GetRealHeight(41),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ logicRowlayout.AddChidren(typebjBtn);
+
+ var typeIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ Gravity = Gravity.Center,
+
+ };
+ typebjBtn.AddChidren(typeIconBtn);
+
+ var connectIconBtn = new Button
+ {
+ Y = typebjBtn.Y + Application.GetRealHeight(35),
+ X = Application.GetRealWidth((12 + 82 + 12) + (12 + 45 + 82 + 12) * i),
+ Width = Application.GetRealWidth(48),
+ Height = Application.GetRealHeight(15),
+ UnSelectedImagePath = "ZigeeLogic/connect.png",
+ };
+ logicRowlayout.AddChidren(connectIconBtn);
+ if (iconIndexlist.Count - 1 == i)
+ {
+ connectIconBtn.Visible = false;
+ }
+ switch (iconindex)
+ {
+ case "0":
+ {
+ if (intvalue == 1)
+ {
+ typeIconBtn.UnSelectedImagePath = "ZigeeLogic/function1.png";
+ typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicFunction1Color;
+ }
+ else
+ {
+ typeIconBtn.UnSelectedImagePath = "ZigeeLogic/nofunction.png";
+ typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ }
+ }
+ break;
+ case "2":
+ {
+
+ if (intvalue == 1)
+ {
+ typeIconBtn.UnSelectedImagePath = "ZigeeLogic/scene1.png";
+ typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicScene1Color;
+ }
+ else
+ {
+ typeIconBtn.UnSelectedImagePath = "ZigeeLogic/noscene.png";
+ typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ }
+
+ }
+ break;
+ case "6":
+ {
+ if (intvalue == 1)
+ {
+ typeIconBtn.UnSelectedImagePath = "ZigeeLogic/security1.png";
+ typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicSecurity1Color;
+
+ }
+ else
+ {
+ typeIconBtn.UnSelectedImagePath = "ZigeeLogic/nosecurity.png";
+ typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ }
+
+ }
+ break;
+ case "7":
+ {
+ if (intvalue == 1)
+ {
+ typeIconBtn.UnSelectedImagePath = "ZigeeLogic/delay1.png";
+ typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicDelay1Color;
+ }
+ else
+ {
+ typeIconBtn.UnSelectedImagePath = "ZigeeLogic/nodelay.png";
+ typebjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ }
+
+ }
+ break;
+
+ }
+ }
+ }
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs b/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs
index 53cd5e5..2c1541c 100755
--- a/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Category/SelectFloor.cs
@@ -105,7 +105,7 @@
{
((sender as Button).Parent as CommonForm.LeftIconButtonRow).IsSelected = true;
Config.Instance.Home.CurrentFloorId = (sender as Button).Tag.ToString();
- FloorAction?.Invoke(Config.Instance.Home.GetCurrentFloorName());
+ FloorAction?.Invoke(Config.Instance.Home.GetCurrentFloorName);
RemoveFromParent();
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs
index 34c6509..a4f3a70 100755
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs
@@ -61,10 +61,12 @@
/// </summary>
public void Init()
{
- NameBtn = new SelectedStatuButton()
+ NameBtn = new Button()
{
Width = Width,
- Height = Height - 3
+ Height = Height - 3,
+ TextColor=ZigbeeColor.Current.GXCTextGrayColor4,
+ SelectedTextColor=ZigbeeColor.Current.GXCTextDeepBlackColor
};
AddChidren(NameBtn);
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomNoNameMainView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomNoNameMainView.cs
new file mode 100755
index 0000000..e114c15
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomNoNameMainView.cs
@@ -0,0 +1,104 @@
+锘縰sing System;
+using Shared.Common;
+namespace Shared.Phone.Device.CommonForm
+{
+ public class RoomNoNameMainView : FrameLayout
+ {
+ /// <summary>
+ /// SceneIcon
+ /// </summary>
+ public Button Icon;
+ /// <summary>
+ /// RoomNameButton
+ /// </summary>
+ public Button RoomNameButton;
+ /// <summary>
+ /// CardBG
+ /// </summary>
+ private Button CardBG;
+ /// <summary>
+ /// iconFL
+ /// </summary>
+ public FrameLayout iconFL;
+
+ /// <summary>
+ /// RoomMainView
+ /// </summary>
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ public RoomNoNameMainView(int x, int y)
+ {
+ X = Application.GetRealWidth(x);
+ Y = Application.GetRealHeight(y);
+ Width = Application.GetMinRealAverage(487);
+ Height = Application.GetMinRealAverage(348);
+ }
+
+ /// <summary>
+ /// init
+ /// </summary>
+ public void Init()
+ {
+ CardBG = new Button
+ {
+ Width = Application.GetMinRealAverage(495),
+ Height = Application.GetMinRealAverage(354),
+ UnSelectedImagePath = "Room/RoomCardView.png",
+ Gravity = Gravity.CenterHorizontal
+ };
+ AddChidren(CardBG);
+
+ iconFL = new FrameLayout
+ {
+ X = Application.GetMinRealAverage(14),
+ Width = Application.GetMinRealAverage(467),
+ Height = Application.GetMinRealAverage(311),
+ Gravity = Gravity.CenterHorizontal,
+ Radius = (uint)Application.GetMinRealAverage(29),
+ BackgroundColor=ZigbeeColor.Current.GXCBlackBackgroundColor3
+ };
+ AddChidren(iconFL);
+
+ Icon = new Button
+ {
+ X = Application.GetMinRealAverage(115),
+ Y=Application.GetMinRealAverage(141),
+ Width = Application.GetMinRealAverage(92),
+ Height = Application.GetMinRealAverage(72),
+ UnSelectedImagePath="Room/NoNameRoom.png"
+ };
+ iconFL.AddChidren(Icon);
+
+ RoomNameButton = new Button()
+ {
+ X = Application.GetMinRealAverage(230),
+ Y = Application.GetMinRealAverage(141),
+ Width = Application.GetMinRealAverage(141),
+ Height = Application.GetMinRealAverage(84),
+ TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+ TextID=R.MyInternationalizationString.Unallocated,
+ TextSize=14
+, };
+ AddChidren(RoomNameButton);
+ }
+
+ /// <summary>
+ /// SetRoomName
+ /// </summary>
+ /// <param name="name"></param>
+ public void SetRoomName(string name)
+ {
+ RoomNameButton.Text = name;
+ }
+
+ /// <summary>
+ /// SetRoomIcon
+ /// </summary>
+ /// <param name="imagePath"></param>
+ public void SetRoomIcon(string imagePath)
+ {
+ Icon.UnSelectedImagePath = imagePath;
+ }
+
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectFunctionView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectFunctionView.cs
new file mode 100755
index 0000000..cc7dc5a
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectFunctionView.cs
@@ -0,0 +1,164 @@
+锘縰sing System;
+using Shared.Common;
+namespace Shared.Phone.Device.CommonForm
+{
+ public class SelectFunctionView : FrameLayout
+ {
+ /// <summary>
+ /// name
+ /// </summary>
+ public Button NameBtn;
+ /// <summary>
+ /// Image
+ /// </summary>
+ public Button ImageBtn;
+ /// <summary>
+ /// ImageBG
+ /// </summary>
+ public Button ImageBG;
+ /// <summary>
+ /// SwitchBtn
+ /// </summary>
+ public Button SelectBtn;
+ /// <summary>
+ /// v_Selected
+ /// </summary>
+ private bool v_Selected;
+ /// <summary>
+ /// IsSelected
+ /// </summary>
+ public bool IsSelected
+ {
+ set
+ {
+ v_Selected = value;
+ try
+ {
+ SetStatu(v_Selected);
+ }
+ catch
+ {
+
+ }
+ }
+ get
+ {
+ return v_Selected;
+ }
+ }
+ /// <summary>
+ /// SelectFunctionView
+ /// </summary>
+ /// <param name="x"></param>
+ /// <param name="y"></param>
+ public SelectFunctionView(int x = 0, int y = 0)
+ {
+ X = Application.GetRealWidth(x);
+ Y = Application.GetRealHeight(y);
+ Width = Application.GetRealWidth(1022);
+ Height = Application.GetRealHeight(127);
+ }
+
+ /// <summary>
+ /// Init
+ /// </summary>
+ /// <param name="imagePath"></param>
+ /// <param name="selectedImagePath"></param>
+ public void Init(string imagePath, string selectedImagePath)
+ {
+ ImageBG = new Button()
+ {
+ X = Application.GetRealWidth(45),
+ Width = Application.GetMinRealAverage(112),
+ Height = Application.GetMinRealAverage(112),
+ Gravity = Gravity.CenterVertical,
+ Radius = (uint)Application.GetMinRealAverage(112 / 2),
+ BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+ SelectedBackgroundColor = ZigbeeColor.Current.GXCSelectedBackgroundColor,
+ Tag = Tag
+ };
+ AddChidren(ImageBG);
+
+ ImageBtn = new Button()
+ {
+ X = Application.GetRealWidth(63),
+ Width = Application.GetMinRealAverage(78),
+ Height = Application.GetMinRealAverage(78),
+ Gravity = Gravity.CenterVertical,
+ UnSelectedImagePath = imagePath,
+ SelectedImagePath = selectedImagePath,
+ Tag = Tag
+ };
+ AddChidren(ImageBtn);
+
+ NameBtn = new Button()
+ {
+ X = Application.GetRealWidth(181),
+ Width = Application.GetRealWidth(500),
+ Height = Application.GetRealHeight(80),
+ Gravity = Gravity.CenterVertical,
+ TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+ SelectedTextColor = ZigbeeColor.Current.GXCTextSelectedColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ Tag = Tag
+ };
+ AddChidren(NameBtn);
+
+ SelectBtn = new Button()
+ {
+ X = Application.GetRealWidth(896),
+ Width = Application.GetMinRealAverage(60),
+ Height = Application.GetMinRealAverage(60),
+ Gravity = Gravity.CenterVertical,
+ UnSelectedImagePath = "Room/ItemUnSelected_Black.png",
+ SelectedImagePath = "Room/ItemSelected.png",
+ Tag = Tag
+ };
+ AddChidren(SelectBtn);
+
+ var line = new Button()
+ {
+ X = Application.GetRealWidth(180),
+ Y = this.Height - 2,
+ Width = Application.GetRealWidth(841),
+ Height = 2,
+ BackgroundColor = ZigbeeColor.Current.GXCGrayLineColor,
+ Tag = Tag
+ };
+ AddChidren(line);
+ }
+
+ /// <summary>
+ /// SetTitle
+ /// </summary>
+ /// <param name="title"></param>
+ public void SetTitle(string title)
+ {
+ NameBtn.Text = title;
+ }
+ /// <summary>
+ /// SetTitle
+ /// </summary>
+ /// <param name="title"></param>
+ public void SetTitle(int title)
+ {
+ SetTitle(Language.StringByID(title));
+ }
+ /// <summary>
+ /// SetStatu
+ /// </summary>
+ /// <param name="statu"></param>
+ public void SetStatu(bool statu)
+ {
+ NameBtn.IsSelected = ImageBG.IsSelected = ImageBtn.IsSelected = statu;
+ }
+ /// <summary>
+ /// SetSelectStatu
+ /// </summary>
+ /// <param name="statu"></param>
+ public void SetSelectStatu(bool statu)
+ {
+ SelectBtn.IsSelected = statu;
+ }
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs
new file mode 100755
index 0000000..822da27
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SelectZone.cs
@@ -0,0 +1,187 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+
+namespace Shared.Phone.Device.CommonForm
+{
+ public class SelectZone : FrameLayout
+ {
+ public Action<Common.Room> ZoneAction;
+
+ private UIPickerView pickView;
+
+ private List<string> floorList = new List<string> { };
+ private List<string> roomList = new List<string> { };
+ private List<string> roomIdList = new List<string> { };
+ private string currentId;
+ public SelectZone()
+ {
+ }
+
+ /// <summary>
+ /// Init
+ /// </summary>
+ public void Init()
+ {
+ var dialog = new FrameLayout()
+ {
+ BackgroundColor = ZigbeeColor.Current.GXCDailogBackGroundColor
+ };
+ AddChidren(dialog);
+
+ dialog.MouseUpEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+
+ var backgroundFL = new FrameLayout
+ {
+ Y = Application.GetRealHeight(1115),
+ Height = Application.GetRealHeight(805),
+ BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(20)
+ };
+ dialog.AddChidren(backgroundFL);
+
+ var topView = new FrameLayout
+ {
+ Height = Application.GetRealHeight(138)
+ };
+ backgroundFL.AddChidren(topView);
+
+ var cancle = new Button
+ {
+ X = Application.GetRealWidth(80),
+ Width = Application.GetRealWidth(300),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.GXCTextGrayColor,
+ TextID = R.MyInternationalizationString.Cancel,
+ TextSize = 16
+ };
+ topView.AddChidren(cancle);
+
+ var title = new Button
+ {
+ Width = Application.GetRealWidth(300),
+ Gravity = Gravity.CenterHorizontal,
+ TextColor = ZigbeeColor.Current.GXCTextBlackColor2,
+ TextID = R.MyInternationalizationString.AddTo,
+ TextSize = 16
+ };
+ topView.AddChidren(title);
+
+ var confrim = new Button
+ {
+ X = Application.GetRealWidth(CommonFormResouce.AppRealWidth - 80 - 300),
+ Width = Application.GetRealWidth(300),
+ TextAlignment = TextAlignment.CenterRight,
+ TextColor = ZigbeeColor.Current.GXCTextSelectedColor2,
+ TextID = R.MyInternationalizationString.Confrim,
+ TextSize = 16
+ };
+ topView.AddChidren(confrim);
+
+ pickView = new UIPickerView
+ {
+ Y = Application.GetRealHeight(20+138),
+ Height = Application.GetRealHeight(450)
+ };
+ backgroundFL.AddChidren(pickView);
+
+ foreach(var floor in Config.Instance.Home.FloorDics)
+ {
+ floorList.Add(floor.Value);
+ }
+ foreach(var room in Shared.Common.Room.Lists)
+ {
+ roomList.Add(room.Name);
+ roomIdList.Add(room.Id);
+ }
+ pickView.setNPicker(floorList, roomList, null);
+
+ pickView.OnSelectChangeEvent += (l1, l2, l3) =>
+ {
+ currentId = roomIdList[l2];
+ };
+
+ cancle.MouseUpEventHandler += Close;
+ confrim.MouseUpEventHandler += Confrim_MouseEvent;
+ }
+
+ /// <summary>
+ /// AddTime
+ /// </summary>
+ /// <param name="verticalScrolView"></param>
+ private void AddTime(VerticalScrolViewLayout verticalScrolView, int timess)
+ {
+ var row = new FrameLayout
+ {
+ Height = Application.GetRealHeight(127 + 12),
+ BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+ };
+ verticalScrolView.AddChidren(row);
+
+ var trow = new FrameLayout
+ {
+ Y = Application.GetRealHeight(12),
+ Height = Application.GetRealHeight(127),
+ BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+ };
+ row.AddChidren(trow);
+
+ var timeBtn = new Button
+ {
+ X = Application.GetRealWidth(80),
+ Width = Application.GetRealWidth(500),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.GXCTextGrayColor4,
+ SelectedTextColor = ZigbeeColor.Current.GXCTextBlackColor,
+ IsSelected = false
+ };
+ trow.AddChidren(timeBtn);
+
+ var selectBtn = new Button
+ {
+ X = Application.GetRealWidth(942),
+ Width = Application.GetMinRealAverage(60),
+ Height = Application.GetMinRealAverage(60),
+ Gravity = Gravity.CenterVertical,
+ UnSelectedImagePath = "Item/ItemSelected.png",
+ Visible = false
+ };
+ trow.AddChidren(selectBtn);
+
+ var Line = new FrameLayout()
+ {
+ Y = trow.Height - 1,
+ Width = Application.GetRealWidth(919),
+ Height = 1,
+ Gravity = Gravity.CenterHorizontal,
+ BackgroundColor = Common.ZigbeeColor.Current.GXCGrayLineColor2
+ };
+ trow.AddChidren(Line);
+
+ }
+
+ /// <summary>
+ /// Close
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="mouseEventArgs"></param>
+ private void Close(object sender, MouseEventArgs mouseEventArgs)
+ {
+ RemoveFromParent();
+ }
+
+ /// <summary>
+ /// Confrim_MouseEvent
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="mouseEventArgs"></param>
+ private void Confrim_MouseEvent(object sender, MouseEventArgs mouseEventArgs)
+ {
+ ZoneAction?.Invoke(Shared.Common.Room.CurrentRoom.GetRoomById(currentId));
+ RemoveFromParent();
+ }
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
index 2e14c60..54dd41d 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddLogicPage.cs
@@ -14,106 +14,172 @@
{
Tag = "Logic";
}
- public void Show ()
+ public void Show()
{
-
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- var topFrameLayout = new FrameLayout {
- Height = Application.GetRealHeight (140),
- Y = Application.GetRealHeight (80),
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor= ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren (topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button {
- TextID = MyInternationalizationString.selection,
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.selection,
};
- topFrameLayout.AddChidren (titleName);
+ topRowLayout.AddChidren(titleName);
- var back = new Button {
- Width = Application.GetRealWidth (110),
- Height = Application.GetRealHeight (110),
- X = Application.GetRealWidth (20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58+40),
+ Y = Application.GetRealHeight(98-40),
};
- topFrameLayout.AddChidren (back);
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren (back);
back.MouseDownEventHandler += (sender, e) => {
RemoveFromParent ();
};
+ #endregion
- var middle = new FrameLayout ();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight (1920 - 220);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
- this.AddChidren (middle);
-
-
- #region ----鏃堕棿鏉′欢----
- var timerowlayout = new RowLayout {
- Height = Application.GetRealHeight (180),
- //Y=pointtimerowlayout.Bottom,
+ #region 鏈�涓嬮潰鐨勫竷灞�浠g爜
+ var middle = new FrameLayout {
+ Y=topRowLayout.Bottom,
+ Height=Application.GetRealHeight(1920-184),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
- middle.AddChidren (timerowlayout);
+ this.AddChidren (middle);
+
+ #region ----鏃堕棿鏉′欢----
+ var timeframelayout= new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(timeframelayout);
+
+
+ var timeiconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/time.png",
+
+ };
+ timeframelayout.AddChidren(timeiconBtn);
+
+ var timerow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor= ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ timeframelayout.AddChidren(timerow);
///鏃堕棿鏉′欢
var btntime = new Button {
Text=Language.StringByID (MyInternationalizationString.timecondition),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth (60),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- timerowlayout.AddChidren (btntime);
+ timerow.AddChidren (btntime);
var btntimeback = new Button {
- Width = Application.GetRealWidth (110),
- Height = Application.GetRealHeight (110),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth (1080 - 140),
+ X = Application.GetRealWidth(789),
Gravity = Gravity.CenterVertical,
};
- timerowlayout.AddChidren (btntimeback);
+ timerow.AddChidren (btntimeback);
- EventHandler<MouseEventArgs> timeclick = (sender, e) => {
- //var timePage = new TimePage ();
- //UserView.HomePage.Instance.AddChidren (timePage);
- //UserView.HomePage.Instance.PageIndex += 1;
- //timePage.Show ();
+ EventHandler<MouseEventArgs> timeclick = (sender, e) =>
+ {
TimeView();
};
btntime.MouseUpEventHandler += timeclick;
btntimeback.MouseUpEventHandler += timeclick;
+ timeframelayout.MouseUpEventHandler += timeclick;
+ timeiconBtn.MouseUpEventHandler += timeclick;
+ timerow.MouseUpEventHandler += timeclick;
+
#endregion
#region ----璁惧鐘舵�佹潯浠�----
- var devicerowlayout = new RowLayout {
- Height = Application.GetRealHeight (180),
- Y=timerowlayout.Bottom,
+ var deviceframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = timeframelayout.Bottom,
};
- middle.AddChidren (devicerowlayout);
+ middle.AddChidren (deviceframelayout);
+
+ var deviceiconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/function.png",
+
+ };
+ deviceframelayout.AddChidren(deviceiconBtn);
+
+ var devicerow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ deviceframelayout.AddChidren(devicerow);
+
+
///璁惧鐘舵�佹潯浠�
var btndevice = new Button {
//Text = "璁惧鐘舵�佹潯浠�",
TextID = MyInternationalizationString.device,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth (60),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- devicerowlayout.AddChidren (btndevice);
+ devicerow.AddChidren (btndevice);
var btndeviceback = new Button {
- Width = Application.GetRealWidth (110),
- Height = Application.GetRealHeight (110),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth (1080-140),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ X = Application.GetRealWidth(789),
Gravity = Gravity.CenterVertical,
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+
};
- devicerowlayout.AddChidren (btndeviceback);
+ devicerow.AddChidren (btndeviceback);
EventHandler<MouseEventArgs> devicestateclick = (sender, e) =>
{
@@ -127,39 +193,61 @@
UserView.HomePage.Instance.PageIndex += 1;
deviceStateCondition.Show();
};
- devicerowlayout.MouseUpEventHandler += devicestateclick;
+ deviceframelayout.MouseUpEventHandler += devicestateclick;
btndevice.MouseUpEventHandler += devicestateclick;
btndeviceback.MouseUpEventHandler += devicestateclick;
+ deviceiconBtn.MouseUpEventHandler += devicestateclick;
+ devicerow.MouseUpEventHandler += devicestateclick;
#endregion
#region ----瀹夐槻鏉′欢----
- var securityrowlayout = new RowLayout
+ var securityframelayout = new FrameLayout
{
- Height = Application.GetRealHeight(180),
- Y = devicerowlayout.Bottom,
+ Height = Application.GetRealHeight(160),
+ Y = deviceframelayout.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- middle.AddChidren(securityrowlayout);
+ middle.AddChidren(securityframelayout);
+
+ var securityiconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ UnSelectedImagePath = "ZigeeLogic/security.png",
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ };
+ securityframelayout.AddChidren(securityiconBtn);
+
+ var securityrow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ securityframelayout.AddChidren(securityrow);
+
var btnsecurity = new Button
{
//Text = "瀹夐槻鏉′欢",
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(60),
TextID = MyInternationalizationString.security,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- securityrowlayout.AddChidren(btnsecurity);
+ securityrow.AddChidren(btnsecurity);
var btnsecurityback = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080 - 140),
- Gravity = Gravity.CenterVertical,
+ X = Application.GetRealWidth(789),
+ Gravity=Gravity.CenterVertical,
};
- securityrowlayout.AddChidren(btnsecurityback);
+ securityrow.AddChidren(btnsecurityback);
EventHandler<MouseEventArgs> securityclick = (sender, e) =>
{
@@ -167,15 +255,77 @@
this.AddChidren(flMain);
SecurityView(flMain, false);
};
- securityrowlayout.MouseUpEventHandler += securityclick;
+ securityframelayout.MouseUpEventHandler += securityclick;
btnsecurity.MouseUpEventHandler += securityclick;
btnsecurityback.MouseUpEventHandler += securityclick;
+ securityiconBtn.MouseUpEventHandler += securityclick;
+ securityrow.MouseUpEventHandler += securityclick;
+ #endregion
+
+ #region ----鍦扮悊鍥存爮鏉′欢----
+ var locationframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = securityframelayout.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(locationframelayout);
+
+ var locationiconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ UnSelectedImagePath = "ZigeeLogic/position.png",
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ };
+ locationframelayout.AddChidren(locationiconBtn);
+
+ var locationrow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ locationframelayout.AddChidren(locationrow);
+
+ var btnlocation = new Button
+ {
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = MyInternationalizationString.location,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ locationrow.AddChidren(btnlocation);
+
+ var btnlocationback = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = Application.GetRealWidth(789),
+ Gravity = Gravity.CenterVertical,
+ };
+ locationrow.AddChidren(btnlocationback);
+
+ EventHandler<MouseEventArgs> locationclick = (sender, e) =>
+ {
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ LocationView(flMain, false);
+ };
+ locationframelayout.MouseUpEventHandler += locationclick;
+ locationiconBtn.MouseUpEventHandler += locationclick;
+ locationrow.MouseUpEventHandler += locationclick;
+ btnlocation.MouseUpEventHandler += locationclick;
+ btnlocationback.MouseUpEventHandler += locationclick;
#endregion
#region ----宸叉湁鑷姩鍖栨潯浠�----
var existencerowlayout = new RowLayout {
Height = Application.GetRealHeight (180),
- Y= securityrowlayout.Bottom,
+ Y= securityframelayout.Bottom,
};
//middle.AddChidren (existencerowlayout);
///宸叉湁鑷姩鍖栨潯浠�
@@ -210,48 +360,10 @@
existencerowlayout.MouseUpEventHandler += logicclick;
#endregion
- #region ----鍦扮悊鍥存爮鏉′欢----
- var locationrowlayout = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- Y = securityrowlayout.Bottom,
- };
- //middle.AddChidren(locationrowlayout);
+
- var btnlocation = new Button
- {
- //Text = "鍦扮悊鍥存爮",
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(60),
- TextID = MyInternationalizationString.location,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- locationrowlayout.AddChidren(btnlocation);
-
- var btnlocationback = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080 - 140),
- Gravity = Gravity.CenterVertical,
- };
- locationrowlayout.AddChidren(btnlocationback);
-
- EventHandler<MouseEventArgs> locationclick = (sender, e) =>
- {
- var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
- this.AddChidren(flMain);
- LocationView(flMain, false);
- };
- locationrowlayout.MouseUpEventHandler += locationclick;
- btnlocation.MouseUpEventHandler += locationclick;
- btnlocationback.MouseUpEventHandler += locationclick;
#endregion
-
-
-
+
}
/// <summary>
/// 瀹夐槻鏉′欢View
@@ -268,143 +380,217 @@
{
flMain.RemoveFromParent();
};
- var devicefra = new FrameLayout
+
+ var securityfra1= new FrameLayout
{
- Width = Application.GetRealWidth(1080 - 80),
- Height = Application.GetRealHeight(720),
- Y = Application.GetRealHeight(1920 - 30 - 720),
- X = Application.GetRealWidth(40),
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(50),
};
- flMain.AddChidren(devicefra);
-
- var devicename = new Button
+ flMain.AddChidren(securityfra1);
+ var securityfra = new FrameLayout
{
- Y = Application.GetRealHeight(20),
- TextID = MyInternationalizationString.securityconditions,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Height = Application.GetRealHeight(150),
- Width = Application.GetRealWidth(1080 - 80),
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(690),
+ Y = Application.GetRealHeight(1920-690),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(60),
};
- devicefra.AddChidren(devicename);
-
- if (SecurityConditionsInfo.ContainsKey("Type"))
+ flMain.AddChidren(securityfra);
+ #region -------鍙栨秷 瀹屾垚
+ var timetype = new RowLayout
{
- SecurityConditionsInfo.Remove("Type");
- }
- if (SecurityConditionsInfo.ContainsKey("IsValid"))
- {
- SecurityConditionsInfo.Remove("IsValid");
- }
- if (SecurityConditionsInfo.ContainsKey("ModeId"))
- {
- SecurityConditionsInfo.Remove("ModeId");
- }
-
- SecurityConditionsInfo.Add("Type", "6");
- SecurityConditionsInfo.Add("IsValid", "1");
- SecurityConditionsInfo.Add("ModeId", "0");
-
- var defenceRowLayout = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- Y = devicename.Bottom,
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- devicefra.AddChidren(defenceRowLayout);
+ securityfra.AddChidren(timetype);
+ var Btncancel = new Button
+ {
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(80),
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ timetype.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
- var btndefence = new Button
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.security,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ };
+ timetype.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
+
+ };
+ timetype.AddChidren(Btncomplete);
+ #endregion
+
+
+ #region ----鍦ㄥ甯冮槻 绂诲甯冮槻 鎾ら槻
+
+ #region 鍦ㄥ甯冮槻
+
+
+ var athomeFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ securityfra.AddChidren(athomeFrameLayout);
+
+ var athomedefenceRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ athomeFrameLayout.AddChidren(athomedefenceRowLayout);
+
+ var btnathomedefence = new Button
{
Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.defence,
+ TextID = MyInternationalizationString.logicathomegarrison,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //Text="甯冮槻",
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
- defenceRowLayout.AddChidren(btndefence);
- var defenceSelected = new Button
+ athomedefenceRowLayout.AddChidren(btnathomedefence);
+
+
+ var athomedefenceSelected = new SelectedButton();
+ athomedefenceRowLayout.AddChidren(athomedefenceSelected);
+
+ #endregion
+ #region 绂诲甯冮槻
+
+ var leavehomeFrameLayout = new FrameLayout
{
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
+ Height = Application.GetRealHeight(160),
+ Y = athomeFrameLayout.Bottom,
};
- defenceRowLayout.AddChidren(defenceSelected);
+ securityfra.AddChidren(leavehomeFrameLayout);
+
+ var leavehomedefenceRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ leavehomeFrameLayout.AddChidren(leavehomedefenceRowLayout);
+
+ var leavehomebtndefence = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.logicremovehomegarrison,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ leavehomedefenceRowLayout.AddChidren(leavehomebtndefence);
+ var leavehomedefenceSelected = new SelectedButton();
+ leavehomedefenceRowLayout.AddChidren(leavehomedefenceSelected);
+ #endregion
+ #region 鎾ら槻
+ var withdrawalFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = leavehomeFrameLayout.Bottom,
+ };
+ securityfra.AddChidren(withdrawalFrameLayout);
+
var withdrawalRowLayout = new RowLayout
{
- Y = defenceRowLayout.Bottom,
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- devicefra.AddChidren(withdrawalRowLayout);
+ withdrawalFrameLayout.AddChidren(withdrawalRowLayout);
var btnwithdrawal = new Button
{
+
Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.withdrawal,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //Text = "鎾ら槻",
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
withdrawalRowLayout.AddChidren(btnwithdrawal);
- var withdrawalSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var withdrawalSelected = new SelectedButton();
withdrawalRowLayout.AddChidren(withdrawalSelected);
+ #endregion
- ///甯冮槻鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> copenclick = (sedner14, e14) =>
+ #region ----鍦ㄥ甯冮槻 绂诲甯冮槻 鎾ら槻鐐瑰嚮浜嬩欢
+ ///鍦ㄥ甯冮槻鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> athomeclick = (sedner14, e14) =>
{
- UserView.HomePage.Instance.ScrollEnabled = true;
- defenceSelected.Visible = true;
+ btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ athomedefenceSelected.Visible = true;
+ leavehomedefenceSelected.Visible = false;
withdrawalSelected.Visible = false;
- if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
- {
- SecurityConditionsInfo.Remove("EnOrWithdrawMode");
- }
- SecurityConditionsInfo.Add("EnOrWithdrawMode", "0");
-
- LogicIfon.AddSecurityconditions(SecurityConditionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
};
- btndefence.MouseUpEventHandler += copenclick;
- defenceRowLayout.MouseUpEventHandler += copenclick;
- defenceSelected.MouseUpEventHandler += copenclick;
+ athomedefenceRowLayout.MouseUpEventHandler += athomeclick;
+ btnathomedefence.MouseUpEventHandler += athomeclick;
+ athomedefenceSelected.MouseUpEventHandler += athomeclick;
+ athomeFrameLayout.MouseUpEventHandler += athomeclick;
-
+ ///绂诲甯冮槻鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> leavehomeclick = (sedner14, e14) =>
+ {
+ btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = true;
+ withdrawalSelected.Visible = false;
+ };
+ leavehomedefenceRowLayout.MouseUpEventHandler += leavehomeclick;
+ leavehomebtndefence.MouseUpEventHandler += leavehomeclick;
+ leavehomedefenceSelected.MouseUpEventHandler += leavehomeclick;
+ leavehomeFrameLayout.MouseUpEventHandler += leavehomeclick;
///鎾ら槻鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> disableclick = (sedner15, e15) =>
{
- UserView.HomePage.Instance.ScrollEnabled = true;
- defenceSelected.Visible = false;
+ btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = false;
withdrawalSelected.Visible = true;
- if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
- {
- SecurityConditionsInfo.Remove("EnOrWithdrawMode");
- }
- SecurityConditionsInfo.Add("EnOrWithdrawMode", "1");
- LogicIfon.AddSecurityconditions(SecurityConditionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
};
withdrawalRowLayout.MouseUpEventHandler += disableclick;
btnwithdrawal.MouseUpEventHandler += disableclick;
withdrawalSelected.MouseUpEventHandler += disableclick;
+ withdrawalFrameLayout.MouseUpEventHandler += disableclick;
+ #endregion
+ #endregion
+
if (edit)
{
@@ -415,36 +601,107 @@
{
if (securityifon["EnOrWithdrawMode"] == "0")
{
- defenceSelected.Visible = true;
- withdrawalSelected.Visible = false;
+ if (securityifon["ModeId"] == "1")
+ {
+ btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ athomedefenceSelected.Visible = true;
+ leavehomedefenceSelected.Visible = false;
+ withdrawalSelected.Visible = false;
+ }
+ else
+ {
+ btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = true;
+ withdrawalSelected.Visible = false;
+ }
+
}
else
{
- defenceSelected.Visible = false;
+ btnathomedefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ leavehomebtndefence.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnwithdrawal.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = false;
withdrawalSelected.Visible = true;
}
break;
}
}
}
- var cancel = new Button
+ Btncomplete.MouseUpEventHandler += (sender, e) =>
{
- Height = Application.GetRealHeight(160),
- TextID = MyInternationalizationString.cancel,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 16,
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- Y = devicefra.Height - Application.GetRealHeight(160),
-
- };
- devicefra.AddChidren(cancel);
- cancel.MouseUpEventHandler += (sender16, e16) =>
- {
- flMain.RemoveFromParent();
+ if (!athomedefenceSelected.Visible && !leavehomedefenceSelected.Visible && !withdrawalSelected.Visible)
+ {
+ return;
+ }
UserView.HomePage.Instance.ScrollEnabled = true;
- };
+ if (SecurityConditionsInfo.ContainsKey("Type"))
+ {
+ SecurityConditionsInfo.Remove("Type");
+ }
+ if (SecurityConditionsInfo.ContainsKey("IsValid"))
+ {
+ SecurityConditionsInfo.Remove("IsValid");
+ }
+ if (SecurityConditionsInfo.ContainsKey("ModeId"))
+ {
+ SecurityConditionsInfo.Remove("ModeId");
+ }
+ SecurityConditionsInfo.Add("Type", "6");
+ SecurityConditionsInfo.Add("IsValid", "1");
+ SecurityConditionsInfo.Add("ModeId", "0");
+ //鍦ㄥ甯冮槻
+ if (athomedefenceSelected.Visible)
+ {
+ if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
+ {
+ SecurityConditionsInfo.Remove("EnOrWithdrawMode");
+ }
+ if (SecurityConditionsInfo.ContainsKey("ModeId"))
+ {
+ SecurityConditionsInfo.Remove("ModeId");
+ }
+ SecurityConditionsInfo.Add("EnOrWithdrawMode", "0");
+ SecurityConditionsInfo.Add("ModeId", "1");
+ }
+ //绂诲甯冮槻
+ if (leavehomedefenceSelected.Visible)
+ {
+ if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
+ {
+ SecurityConditionsInfo.Remove("EnOrWithdrawMode");
+ }
+ if (SecurityConditionsInfo.ContainsKey("ModeId"))
+ {
+ SecurityConditionsInfo.Remove("ModeId");
+ }
+ SecurityConditionsInfo.Add("EnOrWithdrawMode", "0");
+ SecurityConditionsInfo.Add("ModeId", "2");
+ }
+ //鎾ら槻
+ if (withdrawalSelected.Visible)
+ {
+ if (SecurityConditionsInfo.ContainsKey("EnOrWithdrawMode"))
+ {
+ SecurityConditionsInfo.Remove("EnOrWithdrawMode");
+ }
+ SecurityConditionsInfo.Add("EnOrWithdrawMode", "1");
+ }
+ LogicIfon.AddSecurityconditions(SecurityConditionsInfo);
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+ };
+
}
/// <summary>
/// 鍦扮悊鍥存爮View
@@ -461,139 +718,168 @@
{
flMain.RemoveFromParent();
};
+
+ var Locationfra1 = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ flMain.AddChidren(Locationfra1);
var Locationfra = new FrameLayout
{
- Width = Application.GetRealWidth(1080 - 80),
- Height = Application.GetRealHeight(720),
- Y = Application.GetRealHeight(1920 - 30 - 720),
- X = Application.GetRealWidth(40),
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(530),
+ Y = Application.GetRealHeight(1920 - 530),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(50),
+ Radius = (uint)Application.GetRealHeight(60),
};
flMain.AddChidren(Locationfra);
- var locationviewname = new Button
+
+ #region -------鍙栨秷 瀹屾垚
+ var typeRow = new RowLayout
{
- Y = Application.GetRealHeight(20),
- TextID = MyInternationalizationString.locationmode,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Height = Application.GetRealHeight(150),
- Width = Application.GetRealWidth(1080 - 80),
- //Text="浣嶇疆妯″紡",
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- Locationfra.AddChidren(locationviewname);
-
- if (LocationConditionsInfo.ContainsKey("Type"))
+ Locationfra.AddChidren(typeRow);
+ var Btncancel = new Button
{
- LocationConditionsInfo.Remove("Type");
- }
- if (LocationConditionsInfo.ContainsKey("IsValid"))
- {
- LocationConditionsInfo.Remove("IsValid");
- }
-
- LocationConditionsInfo.Add("Type", "7");
- LocationConditionsInfo.Add("IsValid", "1");
-
- var leavehomeRowLayout = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- Y = locationviewname.Bottom,
- };
- Locationfra.AddChidren(leavehomeRowLayout);
-
- var btnleavehome = new Button
- {
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.leavehome,
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(80),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //Text="绂诲",
};
- leavehomeRowLayout.AddChidren(btnleavehome);
- var leavehomeSelected = new Button
+ typeRow.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
{
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
};
- leavehomeRowLayout.AddChidren(leavehomeSelected);
+
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.location,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ };
+ typeRow.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
+
+ };
+ typeRow.AddChidren(Btncomplete);
+ #endregion
+
+ #region ------鍦ㄥ 绂诲
+ #region ------鍦ㄥ
+
+ var athomeFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = typeRow.Bottom + Application.GetRealHeight(20),
+ };
+ Locationfra.AddChidren(athomeFrameLayout);
var athomeRowLayout = new RowLayout
{
- Y = leavehomeRowLayout.Bottom,
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- Locationfra.AddChidren(athomeRowLayout);
+ athomeFrameLayout.AddChidren(athomeRowLayout);
var btnathome = new Button
{
Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.athome,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //Text = "鍦ㄥ",
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+
+
};
athomeRowLayout.AddChidren(btnathome);
- var athomeSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var athomeSelected = new SelectedButton();
athomeRowLayout.AddChidren(athomeSelected);
+ #endregion
- ///绂诲鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> leavehomeclick = (sedner14, e14) =>
+ #region -------绂诲
+ var leavehomeFrameLayout = new FrameLayout
{
- UserView.HomePage.Instance.ScrollEnabled = true;
- leavehomeSelected.Visible = true;
- athomeSelected.Visible = false;
- if (LocationConditionsInfo.ContainsKey("AtHome"))
- {
- LocationConditionsInfo.Remove("AtHome");
- }
- LocationConditionsInfo.Add("AtHome", "0");
-
- LogicIfon.AddLocationconditions(LocationConditionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+ Height = Application.GetRealHeight(160),
+ Y = athomeFrameLayout.Bottom,
};
- btnleavehome.MouseUpEventHandler += leavehomeclick;
- leavehomeSelected.MouseUpEventHandler += leavehomeclick;
- leavehomeRowLayout.MouseUpEventHandler += leavehomeclick;
-
+ Locationfra.AddChidren(leavehomeFrameLayout);
+ var leavehomeRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ leavehomeFrameLayout.AddChidren(leavehomeRowLayout);
+
+ var btnleavehome = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.leavehome,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ leavehomeRowLayout.AddChidren(btnleavehome);
+ var leavehomeSelected = new SelectedButton();
+ leavehomeRowLayout.AddChidren(leavehomeSelected);
+ #endregion
+
+ #endregion
+ string strname = "";
///鍦ㄥ鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> athomeclick = (sedner15, e15) =>
{
- UserView.HomePage.Instance.ScrollEnabled = true;
+ strname = btnathome.Text;
+ btnleavehome.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnathome.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
leavehomeSelected.Visible = false;
athomeSelected.Visible = true;
- if (LocationConditionsInfo.ContainsKey("AtHome"))
- {
- LocationConditionsInfo.Remove("AtHome");
- }
- LocationConditionsInfo.Add("AtHome", "1");
- LogicIfon.AddLocationconditions(LocationConditionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+
+
};
btnathome.MouseUpEventHandler += athomeclick;
athomeSelected.MouseUpEventHandler += athomeclick;
athomeRowLayout.MouseUpEventHandler += athomeclick;
+ athomeFrameLayout.MouseUpEventHandler += athomeclick;
+
+ ///绂诲鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> leavehomeclick = (sedner14, e14) =>
+ {
+ strname = btnleavehome.Text;
+ btnleavehome.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnathome.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ leavehomeSelected.Visible = true;
+ athomeSelected.Visible = false;
+ };
+ btnleavehome.MouseUpEventHandler += leavehomeclick;
+ leavehomeSelected.MouseUpEventHandler += leavehomeclick;
+ leavehomeRowLayout.MouseUpEventHandler += leavehomeclick;
+ leavehomeFrameLayout.MouseUpEventHandler += leavehomeclick;
if (edit)
{
@@ -604,36 +890,102 @@
{
if (Locationifon["AtHome"] == "0")
{
+ strname = btnleavehome.Text;
leavehomeSelected.Visible = true;
athomeSelected.Visible = false;
-
+ btnleavehome.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnathome.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
}
else
{
+ strname = btnathome.Text;
leavehomeSelected.Visible = false;
athomeSelected.Visible = true;
+ btnleavehome.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnathome.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
}
break;
}
}
}
- var cancel = new Button
- {
- Height = Application.GetRealHeight(160),
- TextID = MyInternationalizationString.cancel,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 16,
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- Y = Locationfra.Height - Application.GetRealHeight(160),
- };
- Locationfra.AddChidren(cancel);
- cancel.MouseUpEventHandler += (sender16, e16) =>
+ Btncomplete.MouseUpEventHandler += (sender, e) =>
{
- flMain.RemoveFromParent();
+
+ if (!leavehomeSelected.Visible && !athomeSelected.Visible)
+ {
+ ///鍙互鎻愮ず鏈�変腑鐘舵�侊紱
+ return;
+ }
UserView.HomePage.Instance.ScrollEnabled = true;
- };
+ if (LocationConditionsInfo.ContainsKey("Type"))
+ {
+ LocationConditionsInfo.Remove("Type");
+ }
+ if (LocationConditionsInfo.ContainsKey("IsValid"))
+ {
+ LocationConditionsInfo.Remove("IsValid");
+ }
+ LocationConditionsInfo.Add("Type", "7");
+ LocationConditionsInfo.Add("IsValid", "1");
+ if (leavehomeSelected.Visible)
+ {
+ if (LocationConditionsInfo.ContainsKey("AtHome"))
+ {
+ LocationConditionsInfo.Remove("AtHome");
+ }
+ LocationConditionsInfo.Add("AtHome", "0");
+ }
+ else
+ {
+ if (LocationConditionsInfo.ContainsKey("AtHome"))
+ {
+ LocationConditionsInfo.Remove("AtHome");
+ }
+ LocationConditionsInfo.Add("AtHome", "1");
+ }
+ double a1 = 23.134421, a2 = 113.267189;
+ //璋冪敤鏂规硶锛岃烦杞〉闈�
+ GDMapKit.Show((mLatitude, mLongitude, mRadius, name) =>
+ {
+ //鐐瑰嚮淇濆瓨鎸夐挳锛屽洖璋冨綋鍓嶉�夋嫨鐨勭含搴︼紝缁忓害锛屽崐寰勮寖鍥�
+ var latitud = (int)Math.Truncate(mLatitude * 1000000);
+ var longitude = (int)Math.Truncate(mLongitude * 1000000);
+ Dictionary<string, string> accounts = new Dictionary<string, string>();
+ if (accounts.ContainsKey("Account"))
+ {
+ accounts.Remove("Account");
+ }
+ if (accounts.ContainsKey("Type"))
+ {
+ accounts.Remove("Type");
+ }
+ if (accounts.ContainsKey("Latitude"))
+ {
+ accounts.Remove("latitude");
+ }
+ if (accounts.ContainsKey("Longitude"))
+ {
+ accounts.Remove("Longitude");
+ }
+ if (accounts.ContainsKey("Radius"))
+ {
+ accounts.Remove("radius");
+ }
+ accounts.Add("Account", Config.Instance.Guid);
+ accounts.Add("Type", "7");
+ accounts.Add("Latitude", latitud.ToString());
+ accounts.Add("Longitude", longitude.ToString());
+ accounts.Add("Radius", mRadius.ToString());
+ LogicIfon.Addaccounts(accounts);
+ LogicIfon.AddLocationconditions(LocationConditionsInfo);
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+ }, strname, true, a1, a2, 500);
+ };
}
/// <summary>
@@ -643,126 +995,213 @@
{
UserView.HomePage.Instance.ScrollEnabled = false;
Dictionary<string, string> SecurityConditionsInfo = new Dictionary<string, string>();
- var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
this.AddChidren(flMain);
flMain.MouseUpEventHandler += (sender12, e12) =>
{
flMain.RemoveFromParent();
};
+
+ var timetypeframelayout1 = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ flMain.AddChidren(timetypeframelayout1);
+
var timetypeframelayout = new FrameLayout
{
- Width = Application.GetRealWidth(1080 - 80),
- Height = Application.GetRealHeight(720),
- Y = Application.GetRealHeight(1920 - 30 - 720),
- X = Application.GetRealWidth(40),
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(530),
+ Y = Application.GetRealHeight(1920 - 530),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(50),
+ Radius = (uint)Application.GetRealHeight(60),
};
flMain.AddChidren(timetypeframelayout);
+ #region -------鍙栨秷 瀹屾垚
+ var timetype = new RowLayout
+ {
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ timetypeframelayout.AddChidren(timetype);
+ var Btncancel = new Button
+ {
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X=Application.GetRealWidth(80),
+ TextAlignment=TextAlignment.CenterLeft,
+ };
+ timetype.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
var Btntitle= new Button
{
- Y = Application.GetRealHeight(20),
- TextID = MyInternationalizationString.Selectedtimetype,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Height = Application.GetRealHeight(150),
- Width = Application.GetRealWidth(1080 - 80),
- //Text="鏃堕棿绫诲瀷",
+ TextID = MyInternationalizationString.type,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X= Btncancel.Right+Application.GetRealWidth(100),
+ TextSize = 16,
};
- timetypeframelayout.AddChidren(Btntitle);
-
-
-
- var timepointrow= new RowLayout
+ timetype.AddChidren(Btntitle);
+ var Btncomplete = new Button
{
- Height = Application.GetRealHeight(180),
- Y = Btntitle.Bottom,
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
+
};
- timetypeframelayout.AddChidren(timepointrow);
+ timetype.AddChidren(Btncomplete);
+ #endregion
+
+ #region -------绔嬪嵆鎵ц 鏃堕棿鑼冨洿
+
+ #region -------绔嬪嵆鎵ц
+ var timepointFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom+Application.GetRealHeight(20),
+ };
+ timetypeframelayout.AddChidren(timepointFrameLayout);
+
+ var timerow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ timepointFrameLayout.AddChidren(timerow);
+
var Btntimepoint = new Button
{
Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.immediateexecution,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
//Text="绔嬪嵆鎵ц",
};
- timepointrow.AddChidren(Btntimepoint);
+ timerow.AddChidren(Btntimepoint);
- var timerow = new RowLayout
+ var timepointSelected = new SelectedButton();
+ timerow.AddChidren(timepointSelected);
+ #endregion
+
+
+ #region -------鏃堕棿鑼冨洿
+ var timeFrameLayout = new FrameLayout
{
- Y = timepointrow.Bottom,
- Height = Application.GetRealHeight(180),
+ Height = Application.GetRealHeight(160),
+ Y =timepointFrameLayout.Bottom,
};
- timetypeframelayout.AddChidren(timerow);
+ timetypeframelayout.AddChidren(timeFrameLayout);
+
+ var time1row = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ timeFrameLayout.AddChidren(time1row);
var Btntime = new Button
{
Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.timeframe,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
//Text = "鏃堕棿鑼冨洿",
};
- timerow.AddChidren(Btntime);
+ time1row.AddChidren(Btntime);
+ var timeSelected = new SelectedButton();
+ time1row.AddChidren(timeSelected);
+ #endregion
+
+
///绔嬪嵆鎵ц鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> timepointclick = (sedner14, e14) =>
{
- Dictionary<string, string> timeConditionsInfo = new Dictionary<string, string>();
- timeConditionsInfo.Add("Type", "0");
- timeConditionsInfo.Add("IsValid", "1");
- timeConditionsInfo.Add("DateType", "1");
- timeConditionsInfo.Add("RemindTime", "0");
- timeConditionsInfo.Add("EnDelay", "0");
- timeConditionsInfo.Add("DelayTime", "0");
- timeConditionsInfo.Add("AdjustTime", "0");
- UserView.HomePage.Instance.ScrollEnabled = true;
- flMain.RemoveFromParent();
- var timePoint = new TimePoint();
- UserView.HomePage.Instance.AddChidren(timePoint);
- UserView.HomePage.Instance.PageIndex += 1;
- timePoint.Show(timeConditionsInfo);
+ Btntimepoint.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ Btntime.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ timepointSelected.Visible = true;
+ timeSelected.Visible = false;
};
+ timepointFrameLayout.MouseUpEventHandler += timepointclick;
+ timerow.MouseUpEventHandler += timepointclick;
Btntimepoint.MouseUpEventHandler += timepointclick;
- timepointrow.MouseUpEventHandler += timepointclick;
+ timepointSelected.MouseUpEventHandler += timepointclick;
///鏃堕棿鑼冨洿鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> timeclick = (sedner15, e15) =>
{
- UserView.HomePage.Instance.ScrollEnabled = true;
- flMain.RemoveFromParent();
- var timePage = new TimePage();
- UserView.HomePage.Instance.AddChidren (timePage);
- UserView.HomePage.Instance.PageIndex += 1;
- timePage.Show ();
-
+ Btntimepoint.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ Btntime.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ timepointSelected.Visible = false;
+ timeSelected.Visible = true;
};
Btntime.MouseUpEventHandler += timeclick;
- timerow.MouseUpEventHandler += timeclick;
+ time1row.MouseUpEventHandler += timeclick;
+ timeSelected.MouseUpEventHandler += timeclick;
+ timeFrameLayout.MouseUpEventHandler += timeclick;
+ #endregion
- var cancel = new Button
+
+ Btncomplete.MouseUpEventHandler += (sender, e) =>
{
- Height = Application.GetRealHeight(160),
- TextID = MyInternationalizationString.cancel,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 16,
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- Y = timetypeframelayout.Height - Application.GetRealHeight(160),
-
- };
- timetypeframelayout.AddChidren(cancel);
- cancel.MouseUpEventHandler += (sender16, e16) =>
- {
- flMain.RemoveFromParent();
+ if (!timepointSelected.Visible && !timeSelected.Visible)
+ {
+ ///鍙互鎻愮ず鏈�変腑鐘舵�侊紱
+ return;
+ }
UserView.HomePage.Instance.ScrollEnabled = true;
- };
+ flMain.RemoveFromParent();
+ if (timepointSelected.Visible)
+ {
+ Dictionary<string, string> timeConditionsInfo = new Dictionary<string, string>();
+ timeConditionsInfo.Add("Type", "0");
+ timeConditionsInfo.Add("IsValid", "1");
+ timeConditionsInfo.Add("DateType", "1");
+ timeConditionsInfo.Add("RemindTime", "0");
+ timeConditionsInfo.Add("EnDelay", "0");
+ timeConditionsInfo.Add("DelayTime", "0");
+ timeConditionsInfo.Add("AdjustTime", "0");
+
+ var timePoint = new TimePoint();
+ UserView.HomePage.Instance.AddChidren(timePoint);
+ UserView.HomePage.Instance.PageIndex += 1;
+ timePoint.Show(timeConditionsInfo);
+ }
+ else
+ {
+ var timePage = new TimePage();
+ UserView.HomePage.Instance.AddChidren(timePage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ timePage.Show();
+
+ }
+ };
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
index 5009ebd..fe73fd3 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/AddScenePage.cs
@@ -12,68 +12,164 @@
public class AddScenePage : FrameLayout
{
- Button roomname;
public AddScenePage()
{
Tag = "Logic";
}
+ Button roombjButton = new Button();
+ Button roomTextButton = new Button();
+ Button clickbutton = new Button();
+ HorizontalScrolViewLayout roomhorizontalScrol;
+ VerticalScrolViewLayout middle;
+ public string clickTag = "no";
+ public SceneUI tempScene = null;
+ Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
public void Show()
{
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
-
- var topFrameLayout = new FrameLayout
+ UserView.HomePage.Instance.ScrollEnabled = false;
+ this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(220),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
-
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- //Text = "娣诲姞鍦烘櫙",
- TextID = MyInternationalizationString.addscene,
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
+ X = Application.GetRealWidth(160),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.addscene,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
var back = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
};
- topFrameLayout.AddChidren(back);
- back.MouseDownEventHandler += (sender, e) =>
- {
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) => {
RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
};
- roomname = new Button
+ var foolrname = new Button
{
- Width = Application.GetMinRealAverage(300 + 300),
- Height = Application.GetMinRealAverage(80),
- X = Application.GetRealWidth(1080 - 300 - 30 - 300),
- Y = Application.GetRealHeight(120),
- TextAlignment = TextAlignment.CenterRight,
- //Text = "鑷畾涔夋埧闂�",
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID=MyInternationalizationString.customroom,
+ TextAlignment = TextAlignment.CenterRight,
+ X = Application.GetRealWidth(1080 - 400 - 120),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.customroom,
};
- topFrameLayout.AddChidren(roomname);
+ topRowLayout.AddChidren(foolrname);
+ var dropdown = new Button
+ {
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterRight,
+ X = foolrname.Right,
+ Width = Application.GetRealWidth(72),
+ Height = Application.GetRealHeight(72),
+ Y = Application.GetRealHeight(92),
+ UnSelectedImagePath = "ZigeeLogic/drop-down.png",
+ };
+ topRowLayout.AddChidren(dropdown);
+ #endregion
+
+ ///娌℃湁鎴块棿鐩存帴杩斿洖鍘伙紱
+ if (Common.Room.Lists.Count == 0)
+ {
+ return;
+ }
+ ///鎴块棿婊戝姩鎺т欢
+ roomhorizontalScrol = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(200),
+ Y = topRowLayout.Bottom,
+ X = Application.GetRealWidth(58),
+ };
+ this.AddChidren(roomhorizontalScrol);
- var middle = new VerticalScrolViewLayout();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 300);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+
+
+ middle = new VerticalScrolViewLayout();
+ middle.Y = roomhorizontalScrol.Bottom;
+ middle.Height = Application.GetRealHeight(1920 - 260 - 200 - 184);
+ middle.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
this.AddChidren(middle);
- roomname.MouseUpEventHandler += (sender, e) =>
+ var saveframeLayout = new FrameLayout
+ {
+ Y = middle.Bottom,
+ Height = Application.GetRealHeight(260),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(saveframeLayout);
+
+ var btnsave = new Button
+ {
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ };
+ saveframeLayout.AddChidren(btnsave);
+
+ btnsave.MouseUpEventHandler += (sender2, e2) =>
+ {
+ if (clickTag == "no" || tempScene == null)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
+ Language.StringByID(MyInternationalizationString.complete));
+ alert.Show();
+ return;
+ }
+ if (actionsInfo.ContainsKey("LinkType"))
+ {
+ actionsInfo.Remove("LinkType");
+ }
+ actionsInfo.Add("LinkType", 2);
+ LogicIfon.AddSceneactions(tempScene, actionsInfo);
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+
+ };
+
+ ///閫変腑妤煎眰
+ foolrname.MouseUpEventHandler += (sender, e) =>
{
var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
this.AddChidren(flMain);
@@ -81,117 +177,205 @@
{
flMain.RemoveFromParent();
};
- var roombj = new VerticalScrolViewLayout
+ var foolrbj = new VerticalScrolViewLayout
{
Width = Application.GetRealWidth(400),
Height = Application.GetRealHeight(600),
X = Application.GetRealWidth(1080 - 400 - 60),
- Y = Application.GetRealHeight(220 + 30 + 80),
+ Y = Application.GetRealHeight(184 + 50),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
Radius = (uint)Application.GetRealHeight(30),
};
- flMain.AddChidren(roombj);
- List<Common.Room> roomlist = new List<Common.Room>();
- roomlist.Clear();
- Common.Room customroom = new Common.Room();
- //铏氭嫙涓�涓埧闂村姞杞芥湰鍦版墍鏈夊満鏅紱
- customroom.SceneUIList.AddRange(Common.Room.AllRoomSceneUIList);
- customroom.Name =Language.StringByID(MyInternationalizationString.customroom);
- roomlist.Add(customroom);
- roomlist.AddRange(Common.Room.Lists);
- foreach (var room in roomlist)
+ flMain.AddChidren(foolrbj);
+ ///榛樿璋冭瘯
+ List<string> foolrlist = new List<string> { "涓�妤�", "浜屾ゼ", "涓夋ゼ" };
+
+ foreach (var foolr in foolrlist)
{
- var rowLayout = new RowLayout
+ var foolrRowLayout = new FrameLayout
{
Height = Application.GetRealHeight(150),
};
- roombj.AddChidren(rowLayout);
+ foolrbj.AddChidren(foolrRowLayout);
- var btnroomname = new Button
+ var btnfoolrname = new Button
{
- Width = Application.GetRealWidth(300),
- Text = room.Name,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(30),
+ Width = Application.GetRealWidth(250),
+ Height = Application.GetRealHeight(160),
+ Text = foolr,
+ TextAlignment = TextAlignment.Center,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ //SelectedTextColor=0xfffc744b,
};
- rowLayout.AddChidren(btnroomname);
+ foolrRowLayout.AddChidren(btnfoolrname);
- EventHandler<MouseEventArgs> roomclick = (sender1, e1) =>
+
+ EventHandler<MouseEventArgs> foolrclick = (sender13, e13) =>
{
-
+ roomhorizontalScrol.RemoveAll();
+ foolrname.Text = btnfoolrname.Text;
flMain.RemoveFromParent();
- roomname.Text = room.Name;
- SceneView(middle, room.SceneUIList);
-
+ ///澶囨敞锛氭樉绀洪�変腑妤煎眰鐨勬墍鏈夋埧闂�
+ AllRoomView(Common.Room.Lists);
};
- rowLayout.MouseUpEventHandler += roomclick;
- btnroomname.MouseUpEventHandler += roomclick;
+ foolrRowLayout.MouseUpEventHandler += foolrclick;
+ btnfoolrname.MouseUpEventHandler += foolrclick;
+
}
-
};
- SceneView(middle,Common.Room.AllRoomSceneUIList);
+ ///绗竴娆¤繘鏉�
+ AllRoomView(Common.Room.Lists);
}
+ /// <summary>
+ /// 鏄剧ず鎵�鏈夋埧闂寸殑鏂规硶
+ /// </summary>
+ /// <param name="RoomList"></param>
+ void AllRoomView(List<Common.Room> RoomList ) {
+ for (int i = 0; i < RoomList.Count; i++)
+ {
+ var room = RoomList[i];
+ var fra = new FrameLayout
+ {
+ Height = Application.GetRealHeight(200),
+ Width = Application.GetRealWidth(255),
+ };
+ roomhorizontalScrol.AddChidren(fra);
+ var roombjBtn = new Button
+ {
+ Height = Application.GetRealHeight(158),
+ Width = Application.GetRealWidth(255),
+ UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png",
+ SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png",
+ Y = Application.GetRealHeight(21),
+ };
+ fra.AddChidren(roombjBtn);
- void SceneView(VerticalScrolViewLayout middle,List<SceneUI>scenelist)
+ var roomnameBtn = new Button
+ {
+
+ Height = Application.GetRealHeight(152 - 26 - 20),
+ Width = Application.GetRealWidth(255 - 20 - 50),
+ Text = room.Name,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = Application.GetRealHeight(21 + 13 + 10),
+ X = Application.GetRealWidth(10 + 25),
+
+ };
+ fra.AddChidren(roomnameBtn);
+
+ if (i == 0)
+ {
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+ SceneView(room.SceneUIList);
+
+ }
+
+ EventHandler<MouseEventArgs> roomclick = (sender, e) =>
+ {
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+ SceneView(room.SceneUIList);
+ };
+ roomnameBtn.MouseUpEventHandler += roomclick;
+ roombjBtn.MouseUpEventHandler += roomclick;
+
+ }
+ }
+ /// <summary>
+ /// 鏄剧ず鎵�鏈夌殑鍦烘櫙鐨勬柟娉�
+ /// </summary>
+ /// <param name="scenelist"></param>
+ void SceneView(List<SceneUI>scenelist)
{
middle.RemoveAll();
- foreach (var tempScene in scenelist)
+ foreach (var scene in scenelist)
{
- var deviceRowLayout = new RowLayout
+ var sceneFramelayout = new FrameLayout
{
- Height = Application.GetRealHeight(180),
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
};
- middle.AddChidren(deviceRowLayout);
+ middle.AddChidren(sceneFramelayout);
- var btn = new Button
+
+ var sceneIconBtn = new Button
{
- Height = Application.GetRealHeight(180),
- Width = LayoutParams.MatchParent,
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/scene.png",
};
- deviceRowLayout.AddChidren(btn);
+ sceneFramelayout.AddChidren(sceneIconBtn);
- var devicetypename = new Button
+ var sceneRow = new RowLayout
{
- Width = Application.GetRealWidth(600),
- Text = tempScene.Name,
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176 + 10),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+
+ };
+ sceneFramelayout.AddChidren(sceneRow);
+
+ var scenename = new Button
+ {
+ Text = scene.Name,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- //SelectedBackgroundColor = 0xfffe5e00,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
};
- deviceRowLayout.AddChidren(devicetypename);
+ sceneRow.AddChidren(scenename);
+
+ var selectedBtn = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ X = Application.GetRealWidth(789),
+ UnSelectedImagePath = "ZigeeLogic/selected.png",
+ Visible = false,
+ Gravity = Gravity.CenterVertical,
+ };
+ sceneRow.AddChidren(selectedBtn);
EventHandler<MouseEventArgs> sceneclick = (sender, e) =>
{
- Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
- if (actionsInfo.ContainsKey("LinkType"))
- {
- actionsInfo.Remove("LinkType");
- }
+ tempScene = scene;
+ clickTag = "yes";
+ clickbutton.Visible = false;
+ clickbutton = selectedBtn;
+ selectedBtn.Visible = true;
if (actionsInfo.ContainsKey("DeviceAddr"))
{
actionsInfo.Remove("DeviceAddr");
}
- actionsInfo.Add("LinkType", 2);
- actionsInfo.Add("DeviceAddr", tempScene.Id);
-
- LogicIfon.AddSceneactions(tempScene,actionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+ actionsInfo.Add("DeviceAddr", scene.Id);
};
- deviceRowLayout.MouseUpEventHandler += sceneclick;
- btn.MouseUpEventHandler += sceneclick;
- devicetypename.MouseUpEventHandler += sceneclick;
+ sceneFramelayout.MouseUpEventHandler += sceneclick;
+ sceneIconBtn.MouseUpEventHandler += sceneclick;
+ sceneRow.MouseUpEventHandler += sceneclick;
+ scenename.MouseUpEventHandler += sceneclick;
+ selectedBtn.MouseUpEventHandler += sceneclick;
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
index a3530a9..2d8c58c 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
@@ -10,75 +10,103 @@
public void Show()
{
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- var topFrameLayout = new FrameLayout
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- //TextID = MyInternationalizationString.selection,
- Text = "鑷畾涔夋帹閫�",
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.custompush,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
- var back = new Button
+ var clickBtn = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
};
- topFrameLayout.AddChidren(back);
- back.MouseDownEventHandler += (sender, e) => {
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
RemoveFromParent();
};
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+ #endregion
- var middle = new FrameLayout();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 220);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+
+ var middle = new FrameLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
this.AddChidren(middle);
var textBox = new EditText
{
- Width = Application.GetRealWidth(900),
+ Width = Application.GetRealWidth(1080),
Height = Application.GetRealHeight(600),
- X = Application.GetRealWidth(90),
- Y = Application.GetRealHeight(90),
TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Radius = (uint)Application.GetRealHeight(40),
- BorderColor = ZigbeeColor.Current.LogicLineColor,
- BorderWidth = 2,
- //Text = Common.Logic.CurrentLogic.LogicName,
- //TextID=MyInternationalizationString.automation1,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Text = Common.Logic.CurrentLogic.LogicCustomPushText,
};
middle.AddChidren(textBox);
- var btnsave = new Button
+ var btnsave = new Button
{
- Height = Application.GetRealHeight(150),
- Y = textBox.Bottom + Application.GetRealHeight(300),
- //Text = "淇濆瓨",
- Width = Application.GetRealWidth(500),
- Radius = (uint)Application.GetRealHeight(50),
- BackgroundColor = ZigbeeColor.Current.LogicButtonBlueColor,
- X = Application.GetRealWidth(290),
- TextID = MyInternationalizationString.Save,
+ Y= middle.Height-Application.GetRealHeight(260),
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.confrim,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
+ middle.AddChidren(btnsave);
+
+
middle.AddChidren(btnsave);
btnsave.MouseUpEventHandler += (sender, e) =>
{
+ if (Common.Logic.CurrentLogic.LogicId != 0)
+ {
+ Send.LogicControlSwitch(Common.Logic.CurrentLogic);
+ }
+ else {
+ Send.AddModifyLogic(Common.Logic.CurrentLogic);
+ }
RemoveFromParent();
+
};
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs
index 159b1eb..f257172 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Cycle.cs
@@ -9,213 +9,441 @@
{
public class Cycle : FrameLayout
{
+
Action action;
public Cycle(Action action)
{
this.action = action;
}
- public Cycle()
- {
- Tag = "Logic";
- }
- /// <summary>
- /// 閫変腑
- /// </summary>
- Button beforeClickButton = new Button();
-
+
public void Show()
{
-
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- var topFrameLayout = new FrameLayout
+ Tag = "Logic";
+
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- TextID = MyInternationalizationString.cycle,
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.cycle,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
- var hdl = new Button
+ var clickBtn = new Button
{
- Width = Application.GetRealWidth(154),
- Height = Application.GetRealHeight(90),
- X = Application.GetRealWidth(1080 - 170),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "Logo/Logo.png",
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
};
- //topFrameLayout.AddChidren(hdl);
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ //if (action != null)
+ // action();
+ };
var back = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
};
- topFrameLayout.AddChidren(back);
- back.MouseDownEventHandler += (sender, e) =>
- {
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) => {
+ //if (action != null)
+ // action();
RemoveFromParent();
- if (action != null)
- action();
+
};
- var titlerl = new RowLayout
+ #endregion
+
+
+
+
+ var middle = new FrameLayout
{
- Height = Application.GetRealHeight(180),
- // BackgroundColor = 0xff0f0f0f,
- Y = Application.GetRealHeight(220),
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
- AddChidren(titlerl);
-
- titlerl.AddChidren(
- new Button
- {
- X = Application.GetRealWidth(40),
- //Text = "璇烽�夋嫨閲嶅鎵ц鍛ㄦ湡",
- TextID = MyInternationalizationString.repeat,
- TextSize = 17,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- }
- );
-
- var middle = new VerticalScrolViewLayout();
- middle.Y = titlerl.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 220 - 180 - 174);
- middle.BackgroundColor =ZigbeeColor.Current.LogicBackgroundColor;
this.AddChidren(middle);
+
-
-
-
- var cyclelist = new List<string>();
- cyclelist.AddRange(new string[] {
- Language.StringByID(MyInternationalizationString.executeonce),
- Language.StringByID(MyInternationalizationString.everyday),
- //"浠婂勾",
- //Language.StringByID(MyInternationalizationString.workingday),
- //Language.StringByID(MyInternationalizationString.weekend),
- Language.StringByID(MyInternationalizationString.monthly),
- Language.StringByID(MyInternationalizationString.everyyear),
- Language.StringByID(MyInternationalizationString.logicminute),
- });
-
- foreach (var name in cyclelist)
+ var btnsave = new Button
{
- var cyclerwLayout = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- };
- middle.AddChidren(cyclerwLayout);
+ Y= middle.Height-Application.GetRealHeight(260),
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ };
+ middle.AddChidren(btnsave);
- var btn = new Button
- {
- Height = Application.GetRealHeight(180),
- Width = LayoutParams.MatchParent,
- SelectedBackgroundColor = 0xfffe5e00,
- };
- cyclerwLayout.AddChidren(btn);
- var btnName = new Button
- {
- Gravity = Gravity.CenterVertical,
- Text = name,
- Width = Application.GetRealWidth(400),
- Height = Application.GetRealHeight(100),
- X = Application.GetRealWidth(30),
- TextSize = 16,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- cyclerwLayout.AddChidren(btnName);
- var btntimeback = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- //UnSelectedImagePath = "MusicIcon/Next.png",
- SelectedImagePath = "ZigeeLogic/next.png",
- X = Application.GetRealWidth(1080 - 140),
- };
- if (name == Language.StringByID(MyInternationalizationString.monthly) || name == Language.StringByID(MyInternationalizationString.everyyear) || name == Language.StringByID(MyInternationalizationString.logiccustom))
- {
- cyclerwLayout.AddChidren(btntimeback);
- }
+ #region ----鎵ц涓�娆�----
+ var onceFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(onceFramelayout);
- //if (timename == name) {
- // beforeClickButton.IsSelected = false;
- // beforeClickButton = btn;
- // btn.IsSelected = true;
- //}
- EventHandler<MouseEventArgs> timeclick = (sender, e) =>
- {
- if (btnName.Text == Language.StringByID(MyInternationalizationString.logiccustom))
- {
- var weekPage = new WeekPage();
- UserView.HomePage.Instance.AddChidren(weekPage);
- UserView.HomePage.Instance.PageIndex += 1;
- weekPage.Show();
- }
- else if (btnName.Text == Language.StringByID(MyInternationalizationString.monthly))
- {
- var everymonthPage = new EverymonthPage();
- UserView.HomePage.Instance.AddChidren(everymonthPage);
- UserView.HomePage.Instance.PageIndex += 1;
- everymonthPage.Show();
- }
- else if (btnName.Text == Language.StringByID(MyInternationalizationString.everyyear))
- {
- var everyyearPage = new EveryyearPage();
- UserView.HomePage.Instance.AddChidren(everyyearPage);
- UserView.HomePage.Instance.PageIndex += 1;
- everyyearPage.Show();
- }
- else
- {
- beforeClickButton.IsSelected = false;
- beforeClickButton = btn;
- btn.IsSelected = true;
- if (btnName.Text == Language.StringByID(MyInternationalizationString.everyday))
- {
- Common.Logic.CurrentLogic.TimeAttribute.Repeat = 2;
- }
- else if (btnName.Text == Language.StringByID(MyInternationalizationString.executeonce))
- {
- Common.Logic.CurrentLogic.TimeAttribute.Repeat = 0;
- }
- }
- };
- cyclerwLayout.MouseUpEventHandler += timeclick;
- btn.MouseUpEventHandler += timeclick;
- btnName.MouseUpEventHandler += timeclick;
- btntimeback.MouseUpEventHandler += timeclick;
+ var onceIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/point.png",
};
+ onceFramelayout.AddChidren(onceIconBtn);
- var btncomplete = new Button
+ var onceRow = new RowLayout
{
- Y = middle.Bottom,
- Height = Application.GetRealHeight(174),
- TextID = MyInternationalizationString.complete,
- //BackgroundColor = 0xff1f1f1f,
- TextSize = 16,
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ onceFramelayout.AddChidren(onceRow);
+ var onceTextBtn = new Button
+ {
+ Text = Language.StringByID(MyInternationalizationString.executeonce),
+ TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- AddChidren(btncomplete);
+ onceRow.AddChidren(onceTextBtn);
- btncomplete.MouseUpEventHandler += (sedder, e) =>
+ var onceBackBtn = new SelectedButton(789);
+ onceRow.AddChidren(onceBackBtn);
+
+
+
+ #endregion
+
+ #region ----姣忓ぉ----
+ var everydayFramelayout = new FrameLayout
{
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = onceFramelayout.Bottom,
+ };
+ middle.AddChidren(everydayFramelayout);
+
+ var everydayIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/point.png",
+
+ };
+ everydayFramelayout.AddChidren(everydayIconBtn);
+
+ var everydayRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ everydayFramelayout.AddChidren(everydayRow);
+
+
+ var everydayTxetBtn = new Button
+ {
+ TextID = MyInternationalizationString.everyday,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ everydayRow.AddChidren(everydayTxetBtn);
+
+ var everydayBack = new SelectedButton(789);
+ everydayRow.AddChidren(everydayBack);
+
+
+ #endregion
+
+ #region ----姣忓懆----
+ var weekFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = everydayFramelayout.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(weekFramelayout);
+
+ var weekIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ UnSelectedImagePath = "ZigeeLogic/point.png",
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ };
+ weekFramelayout.AddChidren(weekIconBtn);
+
+ var weekRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ weekFramelayout.AddChidren(weekRow);
+
+
+ var weekTextBtn = new Button
+ {
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = MyInternationalizationString.weekly,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ weekRow.AddChidren(weekTextBtn);
+
+ var weekBack = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = Application.GetRealWidth(789),
+ Gravity = Gravity.CenterVertical,
+ };
+ weekRow.AddChidren(weekBack);
+
+ #endregion
+
+ #region ----姣忔湀----
+ var monthlyFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = weekFramelayout.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(monthlyFramelayout);
+
+ var monthlyIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ UnSelectedImagePath = "ZigeeLogic/point.png",
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ };
+ monthlyFramelayout.AddChidren(monthlyIconBtn);
+
+ var monthlyRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ monthlyFramelayout.AddChidren(monthlyRow);
+
+ var monthlyTextBtn = new Button
+ {
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = MyInternationalizationString.monthly,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ monthlyRow.AddChidren(monthlyTextBtn);
+
+ var monthlyBack = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = Application.GetRealWidth(789),
+ Gravity = Gravity.CenterVertical,
+ };
+ monthlyRow.AddChidren(monthlyBack);
+ #endregion
+
+ #region ----姣忓勾----
+ var yearFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = monthlyFramelayout.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ //middle.AddChidren(yearFramelayout);
+
+ var yearIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ UnSelectedImagePath = "ZigeeLogic/point.png",
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ };
+ yearFramelayout.AddChidren(yearIconBtn);
+
+ var yearRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ yearFramelayout.AddChidren(yearRow);
+
+
+ var yearTextBtn = new Button
+ {
+ TextAlignment = TextAlignment.CenterLeft,
+ TextID = MyInternationalizationString.everyyear,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ yearRow.AddChidren(yearTextBtn);
+
+ var yearBack = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = Application.GetRealWidth(789),
+ Gravity = Gravity.CenterVertical,
+ };
+ yearRow.AddChidren(yearBack);
+
+ EventHandler<MouseEventArgs> yearclick = (sender, e) =>
+ {
+ var everyyearPage = new EveryyearPage();
+ UserView.HomePage.Instance.AddChidren(everyyearPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ everyyearPage.Show();
+
+ };
+ yearFramelayout.MouseUpEventHandler += yearclick;
+ yearTextBtn.MouseUpEventHandler += yearclick;
+ yearBack.MouseUpEventHandler += yearclick;
+ yearIconBtn.MouseUpEventHandler += yearclick;
+ yearRow.MouseUpEventHandler += yearclick;
+
+ #endregion
+ EventHandler<MouseEventArgs> onceclick = (sender, e) =>
+ {
+ onceBackBtn.Visible = true;
+ everydayBack.Visible = false;
+ };
+ onceTextBtn.MouseUpEventHandler += onceclick;
+ onceBackBtn.MouseUpEventHandler += onceclick;
+ onceFramelayout.MouseUpEventHandler += onceclick;
+ onceIconBtn.MouseUpEventHandler += onceclick;
+ onceRow.MouseUpEventHandler += onceclick;
+
+ EventHandler<MouseEventArgs> everydayclick = (sender, e) =>
+ {
+ onceBackBtn.Visible = false;
+ everydayBack.Visible = true;
+
+ };
+ everydayFramelayout.MouseUpEventHandler += everydayclick;
+ everydayTxetBtn.MouseUpEventHandler += everydayclick;
+ everydayBack.MouseUpEventHandler += everydayclick;
+ everydayIconBtn.MouseUpEventHandler += everydayclick;
+ everydayRow.MouseUpEventHandler += everydayclick;
+
+ EventHandler<MouseEventArgs> weekclick = (sender, e) =>
+ {
+ onceBackBtn.Visible = false;
+ everydayBack.Visible = false;
+ var weekPage = new WeekPage();
+ UserView.HomePage.Instance.AddChidren(weekPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ weekPage.Show(weekTextBtn.Text);
+
+ };
+ weekFramelayout.MouseUpEventHandler += weekclick;
+ weekTextBtn.MouseUpEventHandler += weekclick;
+ weekBack.MouseUpEventHandler += weekclick;
+ weekIconBtn.MouseUpEventHandler += weekclick;
+ weekRow.MouseUpEventHandler += weekclick;
+
+ EventHandler<MouseEventArgs> monthlyclick = (sender, e) =>
+ {
+ onceBackBtn.Visible = false;
+ everydayBack.Visible = false;
+ var everymonthPage = new EverymonthPage();
+ UserView.HomePage.Instance.AddChidren(everymonthPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ everymonthPage.Show(monthlyTextBtn.Text);
+
+ };
+ monthlyFramelayout.MouseUpEventHandler += monthlyclick;
+ monthlyIconBtn.MouseUpEventHandler += monthlyclick;
+ monthlyRow.MouseUpEventHandler += monthlyclick;
+ monthlyTextBtn.MouseUpEventHandler += monthlyclick;
+ monthlyBack.MouseUpEventHandler += monthlyclick;
+ if (Common.Logic.CurrentLogic.TimeAttribute.Repeat == 0)
+ {
+ onceBackBtn.Visible = true;
+ everydayBack.Visible = false;
+ }
+ else if (Common.Logic.CurrentLogic.TimeAttribute.Repeat == 2)
+ {
+ onceBackBtn.Visible = false;
+ everydayBack.Visible = true;
+ }
+ else
+ {
+ onceBackBtn.Visible = false;
+ everydayBack.Visible = false;
+ }
+
+ btnsave.MouseUpEventHandler += (sedder, e) =>
+ {
+ if (!onceBackBtn.Visible && !everydayBack.Visible)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectweek),
+ Language.StringByID(MyInternationalizationString.complete));
+
+ alert.Show();
+ return;
+ }
+ if (onceBackBtn.Visible)
+ {
+ Common.Logic.CurrentLogic.TimeAttribute.Repeat = 0;
+
+ }
+ if (everydayBack.Visible)
+ {
+ Common.Logic.CurrentLogic.TimeAttribute.Repeat = 2;
+ }
RemoveFromParent();
action();
+
};
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
index 2788f4b..1634157 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DelayTime.cs
@@ -4,6 +4,9 @@
using Shared.Common;
using Shared.Phone;
using Shared.R;
+//if (Application.DeviceType == Device.Android) {
+//}
+//using UIKit;//ios骞冲彴鎵嶆湁锛宎ndroid娌℃湁锛�
using ZigBee.Device;
@@ -16,77 +19,214 @@
{
Tag = "Logic";
}
- Dictionary<string, string> timeConditionsInfo = new Dictionary<string, string>();
-
- public void Show()
+
+ public void Show(int isInt=0, bool edit=false)
{
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- var topFrameLayout = new FrameLayout
+
+
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- Text = "娣诲姞寤舵椂",
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.adddelay,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
-
- var back = new Button
+ var clickBtn = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
};
- topFrameLayout.AddChidren(back);
- back.MouseDownEventHandler += (sender, e) =>
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
{
RemoveFromParent();
};
- var middle = new FrameLayout();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 220 - 174);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+ #endregion
+
+ var middle = new FrameLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
this.AddChidren(middle);
-
-
- var timeview = new TimeView
+ var blancolor = new FrameLayout
{
- Y = Application.GetRealHeight(400),
- Height = Application.GetRealHeight(600),
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- Width = Application.GetRealWidth(1080),
+ Width = Application.GetMinRealAverage(200),
+ Height = Application.GetMinRealAverage(200),
+ Y = Application.GetRealHeight(130),
+ BackgroundColor = 0xFFFFFFFF,
+ Radius = (uint)Application.GetMinRealAverage(100),
+ X = Application.GetRealWidth(440),
};
- middle.AddChidren(timeview);
-
- var btnComplete = new Button
+ middle.AddChidren(blancolor);
+ var color = new FrameLayout
{
- Y = middle.Bottom,
- Height = Application.GetRealHeight(174),
- TextID = MyInternationalizationString.complete,
+ Width = blancolor.Width - Application.GetMinRealAverage(24),
+ Height = blancolor.Height - Application.GetMinRealAverage(24),
+ Y = Application.GetRealHeight(12),
+ BackgroundColor = 0xFFFEF1ED,
+ Radius = (uint)Application.GetMinRealAverage(86),
+ X = Application.GetRealWidth(12),
+ };
+ blancolor.AddChidren(color);
+ var btnicon = new Button
+ {
+ X = Application.GetRealWidth(48),
+ Width = Application.GetRealWidth(80),
+ Height = Application.GetRealHeight(80),
+ Y = Application.GetRealHeight(48),
+ UnSelectedImagePath = "ZigeeLogic/delay.png",
+ };
+ color.AddChidren(btnicon);
+ var titleText = new Button
+ {
+ Width = Application.GetMinRealAverage(480),
+ Height = Application.GetMinRealAverage(60),
+ X = Application.GetRealWidth(300),
+ Y = blancolor.Bottom + Application.GetRealHeight(50),
+ TextID =MyInternationalizationString.createtimetext,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 16,
};
- AddChidren(btnComplete);
+ middle.AddChidren(titleText);
+ var PickerViewfra = new FrameLayout
+ {
+ Y = titleText.Bottom + Application.GetRealHeight(250),
+ Height = Application.GetRealHeight(1046),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(PickerViewfra);
+
+
+
+ var mUIPickerView = new UIPickerView
+ {
+ Y = Application.GetRealHeight(50),
+ Height = Application.GetRealHeight(600),
+ };
+ PickerViewfra.AddChidren(mUIPickerView);
+
+ var mList1 = new List<string>();
+ var mList2 = new List<string>();
+ for (int i = 0; i < 61; i++)
+ {
+ if (i < 10)
+ {
+ var a = "0" + i.ToString();
+ mList1.Add(a + " " + Language.StringByID(MyInternationalizationString.minute));
+ mList2.Add(a + " " + Language.StringByID(MyInternationalizationString.second));
+ }
+ else
+ {
+ mList1.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.minute));
+ mList2.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.second));
+ }
+
+ }
+ mUIPickerView.setNPicker(mList1, mList2, new List<string>());
+ ///榛樿鐘舵��
+ mUIPickerView.setCurrentItems(0, 5, 0);
+ int timevalue = 5;
+ int value = 0;
+ if (edit)
+ {
+
+ timevalue = int.Parse(Common.Logic.CurrentLogic.Actions[isInt]["DelayTime"].ToString());
+ var minutevalue1 = timevalue / 60;
+ var secondvalue1 = timevalue % 60;
+ //鏇存柊鏈�鏂扮姸鎬�
+ mUIPickerView.setCurrentItems(minutevalue1, secondvalue1, 0);
+ value = timevalue;
+ }
+ string selectde = "";
+ mUIPickerView.OnSelectChangeEvent += (s1, s2, s3) =>
+ {
+ var minutevalue = int.Parse(mList1[s1].Split(' ')[0]);
+ var secondvalue = int.Parse(mList2[s2].Split(' ')[0]);
+ timevalue = minutevalue * 60 + secondvalue;
+ selectde = "yes";
+
+ };
+
+
+ var btnsave = new Button
+ {
+ Y = PickerViewfra.Height - Application.GetRealHeight(260),
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ };
+ PickerViewfra.AddChidren(btnsave);
///瀹屾垚鐐瑰嚮浜嬩欢
- btnComplete.MouseUpEventHandler += (sender, e) =>
+ btnsave.MouseUpEventHandler += (sender, e) =>
{
- Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
- actionsInfo.Add("LinkType", 10);
- actionsInfo.Add("DelayTime", 5);
- Common.Logic.CurrentLogic.Actions.Add(actionsInfo);
+
+ if (selectde != ""|| timevalue==5)
+ {
+ Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
+ actionsInfo.Add("LinkType", 7);
+ actionsInfo.Add("DelayTime", timevalue);
+ if (edit)
+ {
+ Common.Logic.CurrentLogic.Actions.RemoveAt(isInt);
+ Common.Logic.CurrentLogic.Actions.Insert(isInt, actionsInfo);
+ }
+ else
+ {
+ Common.Logic.CurrentLogic.Actions.Add(actionsInfo);
+
+ }
+ }
+ else
+ {
+ if (!edit)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
+ Language.StringByID(MyInternationalizationString.complete));
+ alert.Show();
+ return;
+ }
+ }
var logicCommunalPage = new LogicCommunalPage { };
UserView.HomePage.Instance.AddChidren(logicCommunalPage);
UserView.HomePage.Instance.PageIndex += 1;
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
index 13af081..4f71fa0 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceStateCondition.cs
@@ -9,104 +9,158 @@
namespace Shared.Phone.Device.Logic
{
- public class DeviceStateCondition :FrameLayout
+ public class DeviceStateCondition : FrameLayout
{
public DeviceStateCondition()
{
Tag = "Logic";
}
- Button SelectedButton = new Button();
- HorizontalScrolViewLayout horizontalScrol;
+ Button roombjButton = new Button();
+ Button roomTextButton = new Button();
+ Button devicetypeButton = new Button();
VerticalScrolViewLayout middle;
+ FrameLayout clickframeLayout = new FrameLayout();
+ Button clickbutton = new Button();
+ Button clicktextcolcrbutton = new Button();
+
public void Show()
{
-
- UserView.HomePage.Instance.ScrollEnabled = false;
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- var topFrameLayout = new RowLayout
+ UserView.HomePage.Instance.ScrollEnabled = false;
+ this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(220),
- Y = Application.GetRealHeight(80),
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
-
+ this.AddChidren(topRowLayout);
+
var titleName = new Button
{
- TextID = MyInternationalizationString.devicestate,
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
+ X = Application.GetRealWidth(160),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.devicestate,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
var back = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
};
- topFrameLayout.AddChidren(back);
+ topRowLayout.AddChidren(back);
back.MouseDownEventHandler += (sender, e) =>
{
RemoveFromParent();
UserView.HomePage.Instance.ScrollEnabled = true;
};
- var roomname = new Button
+ var foolrname = new Button
{
- Width = Application.GetMinRealAverage(300 + 300-30),
- Height = Application.GetMinRealAverage(80),
- X = Application.GetRealWidth(1080 - 300 - 30 - 300),
- Y = Application.GetRealHeight(120),
- TextAlignment = TextAlignment.CenterRight,
- //Text = "鑷畾涔夋埧闂�",
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID=MyInternationalizationString.customroom,
+ TextAlignment = TextAlignment.CenterRight,
+ X = Application.GetRealWidth(1080 - 400 - 120),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ //TextID = MyInternationalizationString.customroom,
+ Text = Config.Instance.Home.GetCurrentFloorName,
};
- topFrameLayout.AddChidren(roomname);
-
- var horizontalScrolfl = new FrameLayout
+ topRowLayout.AddChidren(foolrname);
+ var dropdown = new Button
{
- Height = Application.GetRealHeight(220 + 30),
- Y = topFrameLayout.Bottom,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterRight,
+ X = foolrname.Right,
+ Width = Application.GetRealWidth(72),
+ Height = Application.GetRealHeight(72),
+ Y = Application.GetRealHeight(92),
+ UnSelectedImagePath = "ZigeeLogic/drop-down.png",
+ };
+ topRowLayout.AddChidren(dropdown);
+
+ #endregion
+
+ ///娌℃湁鎴块棿鐩存帴杩斿洖鍘伙紱
+ if (Common.Room.Lists.Count == 0)
+ {
+ return;
+ }
+ ///鎴块棿婊戝姩鎺т欢
+ var roomhorizontalScrol = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(200),
+ Y = topRowLayout.Bottom,
+ X = Application.GetRealWidth(58),
+ };
+ this.AddChidren(roomhorizontalScrol);
+
+ var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58 - 200),
+ Height = Application.GetRealHeight(280),
+ Y = roomhorizontalScrol.Bottom,
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ X = Application.GetRealWidth(58 + 200),
};
- AddChidren(horizontalScrolfl);
-
-
- horizontalScrol = new HorizontalScrolViewLayout()
+ this.AddChidren(devicetypehorizontalScrol1);
+ ///璁惧绫诲瀷婊戝姩鎺т欢
+ var devicetypehorizontalScrol = new HorizontalScrolViewLayout()
{
- Width = Application.GetRealWidth(1080 - 40),
- Height = Application.GetRealHeight(180 + 30),
- Y = Application.GetRealHeight(40),
- X = Application.GetRealWidth(40),
- Radius = (uint)Application.GetRealHeight(30),
- };
- horizontalScrolfl.AddChidren(horizontalScrol);
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(280),
+ Y = roomhorizontalScrol.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ X = Application.GetRealWidth(58),
+ Radius = (uint)Application.GetRealHeight(50),
- middle = new VerticalScrolViewLayout();
- middle.Y = horizontalScrolfl.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 300 - 250);
+ };
+ this.AddChidren(devicetypehorizontalScrol);
+
+ middle = new VerticalScrolViewLayout();
+ middle.Y = devicetypehorizontalScrol.Bottom + Application.GetRealHeight(40);
+ middle.Height = Application.GetRealHeight(1920) - devicetypehorizontalScrol.Y;
middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+ middle.X = Application.GetRealWidth(58);
+ middle.Radius = (uint)Application.GetRealHeight(50);
this.AddChidren(middle);
///鐩墠鏀寔鐨勮澶�
- List<DeviceType> deviceTypeList = new List<DeviceType> {
+ var deviceTypeList = new List<DeviceType> {
DeviceType.IASZone,
DeviceType.OnOffSwitch,
- //DeviceType.ColorDimmableLight,
- // DeviceType.OnOffOutput,
- // DeviceType.WindowCoveringDevice,
- // DeviceType.AirSwitch,
+ DeviceType.OnOffOutput,//妤兼鐏�
+ DeviceType.DoorLock
};
- ///鎴块棿鐐瑰嚮浜嬩欢
- roomname.MouseUpEventHandler += (sender, e) =>
+
+ ///妤煎眰鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> foorlclick = (sender, e) =>
{
var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
@@ -115,95 +169,187 @@
{
flMain.RemoveFromParent();
};
- var roombj = new VerticalScrolViewLayout
+ var foolrbj = new VerticalScrolViewLayout
{
Width = Application.GetRealWidth(400),
Height = Application.GetRealHeight(600),
X = Application.GetRealWidth(1080 - 400 - 60),
- Y = Application.GetRealHeight(220 + 30 + 80),
+ Y = Application.GetRealHeight(184 + 50),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
Radius = (uint)Application.GetRealHeight(30),
};
- flMain.AddChidren(roombj);
- List<Common.Room> roomlist = new List<Common.Room>();
- roomlist.Clear();
- Common.Room customroom = new Common.Room();
- customroom.Name =Language.StringByID(MyInternationalizationString.customroom);
- foreach (var device in Common.Logic.LogicDviceList)
+ flMain.AddChidren(foolrbj);
+ foreach (var foolr in Config.Instance.Home.FloorDics)
{
-
- var deviceui = customroom.GetDeviceUI(device);
- if (deviceui != null)
- {
- customroom.DeviceUIList.Add(deviceui);
- }
- }
- roomlist.Add(customroom);
- roomlist.AddRange(Common.Room.Lists);
- foreach (var room in roomlist)
- {
- var rowLayout = new RowLayout
+ var foolrRowLayout = new FrameLayout
{
Height = Application.GetRealHeight(150),
};
- roombj.AddChidren(rowLayout);
+ foolrbj.AddChidren(foolrRowLayout);
- var btnroomname = new Button
+ var btnfoolrname = new Button
{
- Width = Application.GetRealWidth(300),
- Text = room.Name,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(30),
+ Width = Application.GetRealWidth(250),
+ Height = Application.GetRealHeight(160),
+ Text = foolr.Value,
+ TextAlignment = TextAlignment.Center,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ //SelectedTextColor=0xfffc744b,
+ Tag = foolr.Key,
};
- rowLayout.AddChidren(btnroomname);
+ foolrRowLayout.AddChidren(btnfoolrname);
- EventHandler<MouseEventArgs> roomclick = (sender1, e1) =>
+
+ EventHandler<MouseEventArgs> foolrnameclick = (sender13, e13) =>
{
-
+ roomhorizontalScrol.RemoveAll();
+ devicetypehorizontalScrol.RemoveAll();
+ middle.RemoveAll();
+ foolrname.Text = btnfoolrname.Text;
flMain.RemoveFromParent();
- roomname.Text = room.Name;
- var list = new List<DeviceUI>();
- foreach (var device in room.DeviceUIList)
- {
- if (!deviceTypeList.Contains(device.CommonDevice.Type))
- {
- continue;
- }
- list.Add(device);
- }
- AllDeviceTypeView(list);
+ var list = Send.GetRoomList(btnfoolrname.Tag.ToString());
+ AllRoomView(list, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
};
- rowLayout.MouseUpEventHandler += roomclick;
- btnroomname.MouseUpEventHandler += roomclick;
+ foolrRowLayout.MouseUpEventHandler += foolrnameclick;
+ btnfoolrname.MouseUpEventHandler += foolrnameclick;
+
}
+
};
-
- Common.Room room1= new Common.Room();
- foreach (var device in Common.Logic.LogicDviceList)
+ foolrname.MouseUpEventHandler += foorlclick;
+ dropdown.MouseUpEventHandler += foorlclick;
+ ///绗竴娆¤繘鏉�
+ var roomlists = new List<Common.Room>();
+ roomlists.Clear();
+ if (Config.Instance.Home.FloorDics.Count < 1)
{
-
- if (!deviceTypeList.Contains(device.Type))
+ foolrname.Visible = false;
+ dropdown.Visible = false;
+ if (Config.Instance.Home.FloorDics.Count == 0)
{
- continue;
+ roomlists.AddRange(Common.Room.Lists);
}
- var deviceui = room1.GetDeviceUI(device);
- if (deviceui != null)
+ else
{
- room1.DeviceUIList.Add(deviceui);
+ roomlists = Send.GetRoomList(Config.Instance.Home.CurrentFloorId);
}
+ }
+ else
+ {
+ roomlists = Send.GetRoomList(Config.Instance.Home.CurrentFloorId);
}
- AllDeviceTypeView(room1.DeviceUIList);
+
+ AllRoomView(roomlists, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
+ }
+ /// <summary>
+ /// 鍔犺浇鎵�鏈夋埧闂寸殑瑙嗗浘鏂规硶
+ /// </summary>
+ void AllRoomView(List<Common.Room> roomlist, List<DeviceType> deviceTypeList, HorizontalScrolViewLayout roomhorizontalScrol, HorizontalScrolViewLayout devicetypehorizontalScrol)
+ {
+ for (int i = 0; i < roomlist.Count; i++)
+ {
+ var room = roomlist[i];
+
+ var fra = new FrameLayout
+ {
+ Height = Application.GetRealHeight(200),
+ Width = Application.GetRealWidth(255),
+ };
+ roomhorizontalScrol.AddChidren(fra);
+
+ var roombjBtn = new Button
+ {
+ Height = Application.GetRealHeight(158),
+ Width = Application.GetRealWidth(255),
+ UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png",
+ SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png",
+ Y=Application.GetRealHeight(21),
+ };
+ fra.AddChidren(roombjBtn);
+
+ var roomnameBtn= new Button
+ {
+
+ Height = Application.GetRealHeight(152-26-20),
+ Width = Application.GetRealWidth(255-20-50),
+ Text = room.Name,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y=Application.GetRealHeight(21 +13+10),
+ X=Application.GetRealWidth(10+25),
+
+ };
+ fra.AddChidren(roomnameBtn);
+
+ if (i == 0)//
+ {
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+
+ var list = new List<DeviceUI>();
+ foreach (var device in room.DeviceUIList)
+ {
+ if (device.CommonDevice==null) {
+ continue;
+ }
+ if (!deviceTypeList.Contains(device.CommonDevice.Type))
+ {
+ continue;
+ }
+ list.Add(device);
+ }
+ AllDeviceTypeView(list, devicetypehorizontalScrol);
+
+ }
+
+
+ EventHandler<MouseEventArgs> roomclick = (sender, e) =>
+ {
+
+
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+
+ var list = new List<DeviceUI>();
+ foreach (var device in room.DeviceUIList)
+ {
+ if (device.CommonDevice==null) {
+ continue;
+ }
+ if (!deviceTypeList.Contains(device.CommonDevice.Type))
+ {
+ continue;
+ }
+ list.Add(device);
+ }
+ AllDeviceTypeView(list, devicetypehorizontalScrol);
+
+
+ };
+ roomnameBtn.MouseUpEventHandler += roomclick;
+ roombjBtn.MouseUpEventHandler += roomclick;
+
+ }
}
/// <summary>
/// 鍔犺浇璇ュ尯鍩熸墍鏈夎澶囪鍥炬柟娉�
/// </summary>0
/// <param name="devicelist">Devicelist.</param>
- void AllDeviceTypeView(List<DeviceUI> devicelist)
+ void AllDeviceTypeView(List<DeviceUI> devicelist, HorizontalScrolViewLayout devicetypehorizontalScrol)
{
List<string> devicetypelist = new List<string>();
devicetypelist.Clear();
@@ -230,65 +376,100 @@
{
devicetypelist.Add(Language.StringByID(MyInternationalizationString.OnOffSwitch));
}
- #endregion
-
- horizontalScrol.RemoveAll();
- foreach (var devicetype in devicetypelist)
+ var doorLock = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.DoorLock);
+ if (doorLock != null)
{
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.doorLock));
+ }
+ #endregion
+
+ devicetypehorizontalScrol.RemoveAll();
+ for (int i = 0; i < devicetypelist.Count; i++)
+ {
+
+ var devicetype = devicetypelist[i];
+
+ var spaceRowLayout = new FrameLayout();
+ devicetypehorizontalScrol.AddChidren(spaceRowLayout);
+ if (i == 0)
+ {
+ spaceRowLayout.Width = Application.GetRealWidth(37);
+ }
+ else
+ {
+ spaceRowLayout.Width = Application.GetRealWidth(80);
+ }
var deviceRowLayout = new FrameLayout
{
- Height = Application.GetRealHeight(180 + 30),
- Width = Application.GetRealWidth(250),
+ Width = Application.GetRealWidth(156 + 20),
+ Height = Application.GetRealHeight(280 - 30),
+ Y = Application.GetRealHeight(30),
};
- horizontalScrol.AddChidren(deviceRowLayout);
+ devicetypehorizontalScrol.AddChidren(deviceRowLayout);
+
+ var backgroundColor = new Button
+ {
+ Width = Application.GetRealWidth(156),
+ Height = Application.GetRealHeight(180),
+ X = Application.GetRealWidth(10),
+ UnSelectedImagePath = "ZigeeLogic/deviceunselectedbackgroundcolor.png",
+ SelectedImagePath = "ZigeeLogic/deviceselectedbackgroundcolor.png",
+ };
+ deviceRowLayout.AddChidren(backgroundColor);
+
var devicetypeicon = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(70),
+ Width = Application.GetRealWidth(84),
+ Height = Application.GetRealHeight(84),
+ X = Application.GetRealWidth(46),
+ Y = Application.GetRealHeight(30),
};
deviceRowLayout.AddChidren(devicetypeicon);
- if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
- {
- devicetypeicon.UnSelectedImagePath = "ZigeeLogic/Light.png";
- devicetypeicon.SelectedImagePath = "ZigeeLogic/LightSelected.png";
- }
- else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains))
- {
- devicetypeicon.UnSelectedImagePath = "ZigeeLogic/Curtain.png";
- devicetypeicon.SelectedImagePath = "ZigeeLogic/CurtainSelected.png";
- }
- else if (devicetype == Language.StringByID(MyInternationalizationString.OnOffSwitch))
- {
- devicetypeicon.UnSelectedImagePath = "ZigeeLogic/OnOffSwitch.png";
- devicetypeicon.SelectedImagePath = "ZigeeLogic/OnOffSwitchSelected.png";
- }
- else if (devicetype == Language.StringByID(MyInternationalizationString.sensor))
- {
- devicetypeicon.UnSelectedImagePath = "ZigeeLogic/Sensor.png";
- devicetypeicon.SelectedImagePath = "ZigeeLogic/SensorSelected.png";
- }
var devicetypename = new Button
{
- Width = Application.GetRealWidth(250),
- Height = Application.GetRealHeight(50),
+ Width = Application.GetRealWidth(176),
+ Height = Application.GetRealHeight(40),
Text = devicetype,
TextAlignment = TextAlignment.Center,
- Y = devicetypeicon.Bottom + Application.GetRealHeight(20),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Y = backgroundColor.Bottom,
+ TextColor = ZigbeeColor.Current.LogicAddColor,
+ TextSize = 10,
};
deviceRowLayout.AddChidren(devicetypename);
-
+ if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedlight.png";
+ // devicetypeicon.SelectedImagePath = "ZigeeLogic/LightSelected.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedcurtain.png";
+ //devicetypeicon.SelectedImagePath = "ZigeeLogic/CurtainSelected.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.OnOffSwitch))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedpanel.png";
+ // devicetypeicon.SelectedImagePath = "ZigeeLogic/OnOffSwitchSelected.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.sensor))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedsenor.png";
+ // devicetypeicon.SelectedImagePath = "ZigeeLogic/SensorSelected.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.doorLock))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selecteddoorlock.png";
+ }
EventHandler<MouseEventArgs> devicetypeclick = (sender13, e13) =>
{
List<DeviceType> list = new List<DeviceType>();
list.Clear();
- SelectedButton.IsSelected = false;
- SelectedButton = devicetypeicon;
- SelectedButton.IsSelected = true;
+ devicetypeButton.IsSelected = false;
+ devicetypeButton = backgroundColor;
+ backgroundColor.IsSelected = true;
///鍒嗙被鏄剧ず锛堜緥濡傜伅鍏夛細{鐏厜1锛岀伅鍏�2...}锛�
if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
{
@@ -306,6 +487,10 @@
{
list.Add(DeviceType.IASZone);
}
+ else if (devicetype == Language.StringByID(MyInternationalizationString.doorLock))
+ {
+ list.Add(DeviceType.DoorLock);
+ }
ConditionDeviceView(list, devicelist);
@@ -313,6 +498,7 @@
deviceRowLayout.MouseUpEventHandler += devicetypeclick;
devicetypename.MouseUpEventHandler += devicetypeclick;
devicetypeicon.MouseUpEventHandler += devicetypeclick;
+ backgroundColor.MouseUpEventHandler += devicetypeclick;
}
///鏄剧ず鎴块棿鎵�鏈夎澶�
@@ -336,44 +522,108 @@
continue;
}
- var row = new RowLayout
+
+ var deviceFramelayout = new FrameLayout
{
- Height = Application.GetRealHeight(180),
+ Height = Application.GetRealHeight(160),
+ };
+ middle.AddChidren(deviceFramelayout);
+
+ var bjFramelayout = new FrameLayout
+ {
+ Width = Application.GetRealWidth(112),
+ Height = Application.GetRealHeight(112),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(30 + 9),
+ Radius = (uint)Application.GetRealHeight(56),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ deviceFramelayout.AddChidren(bjFramelayout);
+
+ var deviceIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(82),
+ Height = Application.GetRealHeight(82),
+ Gravity = Gravity.Center,
};
- middle.AddChidren(row);
+ bjFramelayout.AddChidren(deviceIconBtn);
+
+ var deviceRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176 + 10),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+
+ };
+ deviceFramelayout.AddChidren(deviceRow);
var devicename = new Button
{
- Gravity = Gravity.CenterVertical,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(600),
- //SelectedBackgroundColor = 0xFFE9652D,
Text = common.CommonDevice.DeviceEpointName,
+ TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
};
- row.AddChidren(devicename);
-
- var btndeviceback = new Button
+ deviceRow.AddChidren(devicename);
+ switch (common.CommonDevice.Type)
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "ZigeeLogic/Next.png",
- X = Application.GetRealWidth(1080 - 140),
- Gravity = Gravity.CenterVertical,
- };
- row.AddChidren(btndeviceback);
+ case DeviceType.OnOffOutput:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/light.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedlight.png";
+ }
+ break;
+ case DeviceType.IASZone:
+ {
+ var iASZonedevice = common.CommonDevice as IASZone;
+ if (iASZonedevice.DeviceID != 1026)
+ {
+ break;
+ }
+ deviceIconBtn.UnSelectedImagePath = $"ZigeeLogic/sensor{iASZonedevice.IasDeviceType}.png";
+ deviceIconBtn.SelectedImagePath = $"ZigeeLogic/selectedsensor{iASZonedevice.IasDeviceType}.png";
+
+
+ }
+ break;
+ case DeviceType.OnOffSwitch:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/panel.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedpanel.png";
+ }
+ break;
+ case DeviceType.DoorLock:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/doorlock.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selecteddoorlock.png";
+ }
+ break;
+ }
EventHandler<MouseEventArgs> devicclick = (sen, e) =>
{
+ clickbutton.IsSelected = false;
+ clickbutton = deviceIconBtn;
+ deviceIconBtn.IsSelected = true;
+ clickframeLayout.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ clickframeLayout = bjFramelayout;
+ bjFramelayout.BackgroundColor = ZigbeeColor.Current.LogicIconBackgroundColor;
+ clicktextcolcrbutton.IsSelected = false;
+ clicktextcolcrbutton = devicename;
+ devicename.IsSelected = true;
var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
this.AddChidren(flMain);
CurrentDeviceView(flMain, common.CommonDevice, false);
};
- row.MouseUpEventHandler += devicclick;
+ deviceFramelayout.MouseUpEventHandler += devicclick;
+ bjFramelayout.MouseUpEventHandler += devicclick;
+ deviceIconBtn.MouseUpEventHandler += devicclick;
+ deviceRow.MouseUpEventHandler += devicclick;
devicename.MouseUpEventHandler += devicclick;
- btndeviceback.MouseUpEventHandler += devicclick;
+
}
}
@@ -381,59 +631,95 @@
/// 閫変腑璇ヨ澶囧姛鑳戒綔涓烘潯浠剁殑瑙嗗浘鏂规硶
/// </summary>
/// <param name="common">Common.</param>
- public static void CurrentDeviceView(FrameLayout flMain,CommonDevice common,bool edit)
+ public async static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit)
{
//涓嶈褰撳墠鐣岄潰婊戝姩
UserView.HomePage.Instance.ScrollEnabled = false;
+ List<Dictionary<string, string>> doorlockConditionsInfo= new List<Dictionary<string, string>>();
Dictionary<string, string> deviceConditionsInfo = new Dictionary<string, string>();
+ dictionary(deviceConditionsInfo, "Type", "1");
+ dictionary(deviceConditionsInfo, "IsValid", "1");
+ dictionary(deviceConditionsInfo, "MacAddr", common.DeviceAddr);
+ dictionary(deviceConditionsInfo, "Epoint", common.DeviceEpoint.ToString());
//var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
//this.AddChidren(flMain);
flMain.MouseUpEventHandler += (sender, e) =>
{
flMain.RemoveFromParent();
+
+
};
+
+ var devicefra1 = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ flMain.AddChidren(devicefra1);
+
var devicefra = new FrameLayout
{
- Width = Application.GetRealWidth(1080 - 80),
- X = Application.GetRealWidth(40),
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(530),
+ Y = Application.GetRealHeight(1920 - 530),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(50),
+ Radius = (uint)Application.GetRealHeight(60),
};
flMain.AddChidren(devicefra);
- var devicename = new Button
+ #region -------鍙栨秷 瀹屾垚
+ var timetype = new RowLayout
{
- Y = Application.GetRealHeight(20),
- Text = common.DeviceEpointName,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Height = Application.GetRealHeight(150),
- Width = Application.GetRealWidth(1080 - 80),
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- devicefra.AddChidren(devicename);
+ devicefra.AddChidren(timetype);
+ var Btncancel = new Button
+ {
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(80),
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ timetype.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
- string SelectedDeviceStatuscondition = "no";
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.security,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ Text = common.DeviceEpointName,
+ };
+ timetype.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
- if (deviceConditionsInfo.ContainsKey("Type"))
- {
- deviceConditionsInfo.Remove("Type");
- }
- if (deviceConditionsInfo.ContainsKey("IsValid"))
- {
- deviceConditionsInfo.Remove("IsValid");
- }
- if (deviceConditionsInfo.ContainsKey("MacAddr"))
- {
- deviceConditionsInfo.Remove("MacAddr");
- }
- if (deviceConditionsInfo.ContainsKey("Epoint"))
- {
- deviceConditionsInfo.Remove("Epoint");
- }
- deviceConditionsInfo.Add("Type", "1");
- deviceConditionsInfo.Add("IsValid", "1");
- deviceConditionsInfo.Add("MacAddr", common.DeviceAddr);
- deviceConditionsInfo.Add("Epoint",common.DeviceEpoint.ToString());
+ };
+ timetype.AddChidren(Btncomplete);
+ #endregion
+
+ string SelectedDeviceStatuscondition = "";
+
Dictionary<string, string> devices = null;
if (edit)
{
@@ -455,101 +741,72 @@
///鐏厜
case DeviceType.OnOffOutput:
{
-
- if (deviceConditionsInfo.ContainsKey("Cluster_ID"))
- {
- deviceConditionsInfo.Remove("Cluster_ID");
- }
- if (deviceConditionsInfo.ContainsKey("AttriButeId"))
- {
- deviceConditionsInfo.Remove("AttriButeId");
- }
- if (deviceConditionsInfo.ContainsKey("Range"))
- {
- deviceConditionsInfo.Remove("Range");
- }
- if (deviceConditionsInfo.ContainsKey("AttriButeData2"))
- {
- deviceConditionsInfo.Remove("AttriButeData2");
- }
- deviceConditionsInfo.Add("Cluster_ID", "6");
- deviceConditionsInfo.Add("AttriButeId", "0");
- deviceConditionsInfo.Add("Range", "1");
- deviceConditionsInfo.Add("AttriButeData2", "0");
-
+ dictionary(deviceConditionsInfo, "Cluster_ID", "6");
+ dictionary(deviceConditionsInfo, "AttriButeId", "0");
+ dictionary(deviceConditionsInfo, "Range", "1");
+ dictionary(deviceConditionsInfo, "AttriButeData2", "0");
#region 鐏厜View
- devicefra.Y = Application.GetRealHeight(1920 - 30 - 720);
- devicefra.Height = Application.GetRealHeight(720);
- var OnOffOutputfra = new FrameLayout
+
+ var openframelayout = new FrameLayout
{
- Y = Application.GetRealHeight(180),
- Height = Application.GetRealHeight(180 * 2 + 30),
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
};
- devicefra.AddChidren(OnOffOutputfra);
+ devicefra.AddChidren(openframelayout);
var openrowlayout = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- OnOffOutputfra.AddChidren(openrowlayout);
+ openframelayout.AddChidren(openrowlayout);
var btnopen = new Button
{
- //Text = "寮�",
+ Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(180),
- //SelectedBackgroundColor = 0xfffe5e00,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
openrowlayout.AddChidren(btnopen);
- var openBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var openBtnSelected = new SelectedButton();
openrowlayout.AddChidren(openBtnSelected);
-
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
var closerowlayout = new RowLayout
{
- Y = openrowlayout.Bottom,
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
};
- OnOffOutputfra.AddChidren(closerowlayout);
+ closeframelayout.AddChidren(closerowlayout);
var btnclose = new Button
{
//Text = "鍏�",
TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(180),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
closerowlayout.AddChidren(btnclose);
- var closeBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical,
- };
+ var closeBtnSelected = new SelectedButton();
closerowlayout.AddChidren(closeBtnSelected);
#endregion
@@ -558,44 +815,47 @@
{
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
- SelectedDeviceStatuscondition = "yes";
- if (deviceConditionsInfo.ContainsKey("AttriButeData1"))
- {
- deviceConditionsInfo.Remove("AttriButeData1");
- }
- deviceConditionsInfo.Add("AttriButeData1", "1");//榛樿鍊�
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ SelectedDeviceStatuscondition = "OnOffOutput";
+ dictionary(deviceConditionsInfo, "AttriButeData1", "1");//榛樿鍊�
+
};
openrowlayout.MouseUpEventHandler += openclick;
btnopen.MouseUpEventHandler += openclick;
openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
///鐐瑰嚮鍙栨秷浜嬩欢
EventHandler<MouseEventArgs> closeclick = (sender, e) =>
{
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
- SelectedDeviceStatuscondition = "yes";
- if (deviceConditionsInfo.ContainsKey("AttriButeData1"))
- {
- deviceConditionsInfo.Remove("AttriButeData1");
- }
- deviceConditionsInfo.Add("AttriButeData1", "0");//榛樿鍊�
+ SelectedDeviceStatuscondition = "OnOffOutput";
+ dictionary(deviceConditionsInfo, "AttriButeData1", "0");//榛樿鍊�
};
closerowlayout.MouseUpEventHandler += closeclick;
btnclose.MouseUpEventHandler += closeclick;
- closeBtnSelected.MouseUpEventHandler += openclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
if (edit && devices != null)
{
if (devices["AttriButeId"] == "0")
{
if (devices["AttriButeData1"] == "1")
{
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
}
else
{
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
@@ -607,29 +867,10 @@
case DeviceType.WindowCoveringDevice:
{
-
- if (deviceConditionsInfo.ContainsKey("Cluster_ID"))
- {
- deviceConditionsInfo.Remove("Cluster_ID");
- }
- if (deviceConditionsInfo.ContainsKey("AttriButeId"))
- {
- deviceConditionsInfo.Remove("AttriButeId");
- }
- if (deviceConditionsInfo.ContainsKey("Range"))
- {
- deviceConditionsInfo.Remove("Range");
- }
- if (deviceConditionsInfo.ContainsKey("AttriButeData2"))
- {
- deviceConditionsInfo.Remove("AttriButeData2");
- }
- deviceConditionsInfo.Add("Cluster_ID", "258");
- deviceConditionsInfo.Add("AttriButeId", "8");
- deviceConditionsInfo.Add("Range", "0");
- deviceConditionsInfo.Add("AttriButeData2", "0");
-
-
+ dictionary(deviceConditionsInfo, "Cluster_ID", "258");
+ dictionary(deviceConditionsInfo, "AttriButeId", "8");
+ dictionary(deviceConditionsInfo, "Range", "0");
+ dictionary(deviceConditionsInfo, "AttriButeData2", "0");
#region 绐楀笜View
devicefra.Y = Application.GetRealHeight(1920 - 30 - 720);
@@ -652,7 +893,7 @@
//Text = "寮�",
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
+ X = Application.GetRealWidth(50),
Width = Application.GetRealWidth(300),
Height = Application.GetRealHeight(180),
//SelectedBackgroundColor = 0xfffe5e00,
@@ -683,7 +924,7 @@
//Text = "鍏�",
TextID = MyInternationalizationString.close,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
+ X = Application.GetRealWidth(50),
Width = Application.GetRealWidth(300),
Height = Application.GetRealHeight(180),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
@@ -705,15 +946,10 @@
///鐐瑰嚮纭浜嬩欢
EventHandler<MouseEventArgs> openclick = (sender, e) =>
{
- SelectedDeviceStatuscondition = "yes";
+ SelectedDeviceStatuscondition = "WindowCoveringDevice";
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
- if (deviceConditionsInfo.ContainsKey("AttriButeData1"))
- {
- deviceConditionsInfo.Remove("AttriButeData1");
- }
- deviceConditionsInfo.Add("AttriButeData1", "95");//榛樿鍊�
-
+ dictionary(deviceConditionsInfo, "AttriButeData1", "95");//榛樿鍊�
};
openrowlayout.MouseUpEventHandler += openclick;
@@ -722,14 +958,10 @@
///鐐瑰嚮鍙栨秷浜嬩欢
EventHandler<MouseEventArgs> closeclick = (sender, e) =>
{
- SelectedDeviceStatuscondition = "yes";
+ SelectedDeviceStatuscondition = "WindowCoveringDevice";
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
- if (deviceConditionsInfo.ContainsKey("AttriButeData1"))
- {
- deviceConditionsInfo.Remove("AttriButeData1");
- }
- deviceConditionsInfo.Add("AttriButeData1", "5");//榛樿鍊�
+ dictionary(deviceConditionsInfo, "AttriButeData1", "5");//榛樿鍊�
};
closerowlayout.MouseUpEventHandler += closeclick;
@@ -762,141 +994,126 @@
{
break;
}
- if (deviceConditionsInfo.ContainsKey("Cluster_ID"))
- {
- deviceConditionsInfo.Remove("Cluster_ID");
- }
- if (deviceConditionsInfo.ContainsKey("AttriButeId"))
- {
- deviceConditionsInfo.Remove("AttriButeId");
- }
- if (deviceConditionsInfo.ContainsKey("AttriButeData2"))
- {
- deviceConditionsInfo.Remove("AttriButeData2");
- }
- deviceConditionsInfo.Add("Cluster_ID", "1280");
- deviceConditionsInfo.Add("AttriButeId", "1281");
-
- deviceConditionsInfo.Add("AttriButeData2", "0");
+ dictionary(deviceConditionsInfo, "Cluster_ID", "1280");
+ dictionary(deviceConditionsInfo, "AttriButeId", "1281");
+ dictionary(deviceConditionsInfo, "AttriButeData2", "0");
#region 瀹夐槻璁惧View
- devicefra.Y = Application.GetRealHeight(1920 - 30 - 720);
- devicefra.Height = Application.GetRealHeight(720);
- var iASZonedevicefra = new FrameLayout
+ var openframelayout = new FrameLayout
{
- Y = Application.GetRealHeight(180),
- Height = Application.GetRealHeight(180 * 2 + 30),
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
};
- devicefra.AddChidren(iASZonedevicefra);
+ devicefra.AddChidren(openframelayout);
var openrowlayout = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
-
+ openframelayout.AddChidren(openrowlayout);
var btnopen = new Button
{
-
- //TextID = MyInternationalizationString.open,
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(180),
- SelectedBackgroundColor = 0xfffe5e00,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
openrowlayout.AddChidren(btnopen);
- var openBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var openBtnSelected = new SelectedButton();
openrowlayout.AddChidren(openBtnSelected);
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
var closerowlayout = new RowLayout
{
- Height = Application.GetRealHeight(180),
- Y = openrowlayout.Bottom,
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
};
- ///
+ closeframelayout.AddChidren(closerowlayout);
var btnclose = new Button
{
-
- //TextID = MyInternationalizationString.close,
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(180),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
closerowlayout.AddChidren(btnclose);
- var closeBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var closeBtnSelected = new SelectedButton();
closerowlayout.AddChidren(closeBtnSelected);
#endregion
+
+ int timevalue = 0;
///鐐瑰嚮纭浜嬩欢
EventHandler<MouseEventArgs> openclick = (sender, e) =>
{
- SelectedDeviceStatuscondition = "yes";
+ SelectedDeviceStatuscondition = "IASZone";
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
- if (deviceConditionsInfo.ContainsKey("Range"))
+ if (iASZonedevice.IasDeviceType == 13)
{
- deviceConditionsInfo.Remove("Range");
+ closeBtnSelected.Visible = true;
}
- deviceConditionsInfo.Add("Range", "5");
- if (deviceConditionsInfo.ContainsKey("AttriButeData1"))
- {
- deviceConditionsInfo.Remove("AttriButeData1");
- }
- deviceConditionsInfo.Add("AttriButeData1", "1");//榛樿鍊�
+ dictionary(deviceConditionsInfo, "Range", "5");
+ dictionary(deviceConditionsInfo, "AttriButeData1", "1");
};
openrowlayout.MouseUpEventHandler += openclick;
btnopen.MouseUpEventHandler += openclick;
openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
///鐐瑰嚮鍙栨秷浜嬩欢
EventHandler<MouseEventArgs> closeclick = (sender, e) =>
{
- SelectedDeviceStatuscondition = "yes";
+ SelectedDeviceStatuscondition = "IASZone";
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
- if (deviceConditionsInfo.ContainsKey("Range"))
+ dictionary(deviceConditionsInfo, "Range", "1");
+ dictionary(deviceConditionsInfo, "AttriButeData1", "0");
+ if (iASZonedevice.IasDeviceType == 13)
{
- deviceConditionsInfo.Remove("Range");
+ SelectedDeviceStatuscondition = "no";
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ var ignoreTime = new IgnoreTime();
+ UserView.HomePage.Instance.AddChidren(ignoreTime);
+ UserView.HomePage.Instance.PageIndex += 1;
+ ignoreTime.Show(common, btnclose.Text, edit, timevalue);
}
- deviceConditionsInfo.Add("Range", "1");
- if (deviceConditionsInfo.ContainsKey("AttriButeData1"))
- {
- deviceConditionsInfo.Remove("AttriButeData1");
- }
- deviceConditionsInfo.Add("AttriButeData1", "0");//榛樿鍊�
+
};
closerowlayout.MouseUpEventHandler += closeclick;
btnclose.MouseUpEventHandler += closeclick;
closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
@@ -905,69 +1122,140 @@
case 13:
{
btnopen.TextID = MyInternationalizationString.someone;
- //btnclose.TextID = MyInternationalizationString.unmanned;
- iASZonedevicefra.AddChidren(openrowlayout);
- //iASZonedevicefra.AddChidren(closerowlayout);
+ btnclose.TextID = MyInternationalizationString.unattendedtime1;
+ closeBtnSelected.UnSelectedImagePath = "ZigeeLogic/next.png";
+ closeBtnSelected.Visible = true;
+ openframelayout.AddChidren(openrowlayout);
+ closeframelayout.AddChidren(closerowlayout);
}
break;
case 21:
- {
- btnopen.TextID = MyInternationalizationString.logicopen;
- btnclose.TextID = MyInternationalizationString.logicclose;
- iASZonedevicefra.AddChidren(openrowlayout);
- iASZonedevicefra.AddChidren(closerowlayout);
- }
- break;
case 22:
{
+ #region
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 * 3 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 * 3 + 20 + 50);
btnopen.TextID = MyInternationalizationString.logicopen;
btnclose.TextID = MyInternationalizationString.logicclose;
- iASZonedevicefra.AddChidren(openrowlayout);
- iASZonedevicefra.AddChidren(closerowlayout);
+ closerowlayout.LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor;
+ openframelayout.AddChidren(openrowlayout);
+ closeframelayout.AddChidren(closerowlayout);
+
+
+
+ var timeoutframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = closeframelayout.Bottom,
+ };
+ devicefra.AddChidren(timeoutframelayout);
+ var timeoutrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ timeoutframelayout.AddChidren(timeoutrowlayout);
+
+ var btntimeout = new Button
+ {
+ TextID = MyInternationalizationString.closetimeout,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ timeoutrowlayout.AddChidren(btntimeout);
+
+ var timeoutBtnSelected = new Button
+ {
+ X = Application.GetRealWidth(860),
+ Width = Application.GetMinRealAverage(60),
+ Height = Application.GetMinRealAverage(60),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ Gravity = Gravity.CenterVertical,
+ };
+ timeoutrowlayout.AddChidren(timeoutBtnSelected);
+ EventHandler<MouseEventArgs> timeoutclick = (sender, e) =>
+ {
+ SelectedDeviceStatuscondition = "no";
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ var ignoreTime = new IgnoreTime();
+ UserView.HomePage.Instance.AddChidren(ignoreTime);
+ UserView.HomePage.Instance.PageIndex += 1;
+ ignoreTime.Show(common, btntimeout.Text, edit, timevalue);
+
+ };
+ timeoutframelayout.MouseUpEventHandler += timeoutclick;
+ timeoutrowlayout.MouseUpEventHandler += timeoutclick;
+ btntimeout.MouseUpEventHandler += timeoutclick;
+ timeoutBtnSelected.MouseUpEventHandler += timeoutclick;
+
+ #endregion
}
break;
case 40:
{
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
btnopen.TextID = MyInternationalizationString.smokescreen;
//btnclose.TextID = MyInternationalizationString.nosmokescreen;
- iASZonedevicefra.AddChidren(openrowlayout);
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
}
break;
case 42:
{
btnopen.TextID = MyInternationalizationString.waterleakage;
btnclose.TextID = MyInternationalizationString.noleakage;
- iASZonedevicefra.AddChidren(openrowlayout);
- iASZonedevicefra.AddChidren(closerowlayout);
+ openframelayout.AddChidren(openrowlayout);
+ closeframelayout.AddChidren(closerowlayout);
+
}
break;
case 43:
{
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
btnopen.TextID = MyInternationalizationString.gas;
//btnclose.TextID = MyInternationalizationString.nogas;
- iASZonedevicefra.AddChidren(openrowlayout);
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
}
break;
case 44:
{
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
btnopen.TextID = MyInternationalizationString.emergencybutton;
//btnclose.TextID = MyInternationalizationString.nosmokescreen;
- iASZonedevicefra.AddChidren(openrowlayout);
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
}
break;
case 277:
{
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
btnopen.TextID = MyInternationalizationString.callthepolice;
//btnclose.TextID = MyInternationalizationString.nosmokescreen;
- iASZonedevicefra.AddChidren(openrowlayout);
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
}
break;
default:
{
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
btnopen.TextID = MyInternationalizationString.callthepolice;
- iASZonedevicefra.AddChidren(openrowlayout);
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
}
break;
}
@@ -977,138 +1265,144 @@
{
if (devices["AttriButeData1"] == "1")
{
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
}
else
{
- openBtnSelected.Visible = false;
- closeBtnSelected.Visible = true;
+ if (devices.ContainsKey("IgnoreTime"))
+ {
+ timevalue = int.Parse(devices["IgnoreTime"]);
+ }
+ else
+ {
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ }
}
}
+
+
}
}
break;
case DeviceType.OnOffSwitch:
{
- if (deviceConditionsInfo.ContainsKey("Cluster_ID"))
- {
- deviceConditionsInfo.Remove("Cluster_ID");
- }
- if (deviceConditionsInfo.ContainsKey("AttriButeId"))
- {
- deviceConditionsInfo.Remove("AttriButeId");
- }
- if (deviceConditionsInfo.ContainsKey("Range"))
- {
- deviceConditionsInfo.Remove("Range");
- }
- if (deviceConditionsInfo.ContainsKey("AttriButeData1"))
- {
- deviceConditionsInfo.Remove("AttriButeData1");
- }
- if (deviceConditionsInfo.ContainsKey("AttriButeData2"))
- {
- deviceConditionsInfo.Remove("AttriButeData2");
- }
- deviceConditionsInfo.Add("Cluster_ID", "1282");
- deviceConditionsInfo.Add("AttriButeId", "1283");
- deviceConditionsInfo.Add("Range", "0");//鎸夐敭鐗规畩
- deviceConditionsInfo.Add("AttriButeData1", "0");
- deviceConditionsInfo.Add("AttriButeData2", "0");
- devicefra.Y = Application.GetRealHeight(1920 - 30 - 720);
- devicefra.Height = Application.GetRealHeight(720);
+ dictionary(deviceConditionsInfo, "Cluster_ID", "1282");
+ dictionary(deviceConditionsInfo, "AttriButeId", "1283");
+ dictionary(deviceConditionsInfo, "Range", "0");//鎸夐敭鐗规畩
+ dictionary(deviceConditionsInfo, "AttriButeData1", "0");
+ dictionary(deviceConditionsInfo, "AttriButeData2", "0");
+
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
var OnOffOutputfra = new FrameLayout
{
- Y = Application.GetRealHeight(180),
- Height = Application.GetRealHeight(180 * 2 + 30),
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
};
devicefra.AddChidren(OnOffOutputfra);
var buttonRow = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
};
OnOffOutputfra.AddChidren(buttonRow);
var button = new Button
{
- //TextID = MyInternationalizationString.button1,
+ Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(180),
- Text=Language.StringByID(MyInternationalizationString.OnOffSwitch)+common.DeviceEpoint.ToString(),
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ Text = Language.StringByID(MyInternationalizationString.OnOffSwitch) + common.DeviceEpoint.ToString(),
//SelectedBackgroundColor = 0xfffe5e00,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
buttonRow.AddChidren(button);
- var buttonSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var buttonSelected = new SelectedButton();
buttonRow.AddChidren(buttonSelected);
- EventHandler<MouseEventArgs> buttonclick = (sender, e) =>
+ EventHandler<MouseEventArgs> buttonclick = (sender, e) =>
{
buttonSelected.Visible = true;
- SelectedDeviceStatuscondition = "yes";
+ SelectedDeviceStatuscondition = "OnOffSwitch";
+ button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
};
buttonRow.MouseUpEventHandler += buttonclick;
button.MouseUpEventHandler += buttonclick;
buttonSelected.MouseUpEventHandler += buttonclick;
+ OnOffOutputfra.MouseUpEventHandler += buttonclick;
if (edit && devices != null)
{
buttonSelected.Visible = true;
+ button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
}
-
+
+ }
+ break;
+ case DeviceType.DoorLock:
+ {
+ #region ------
+ var doorlockifonlist = Send.ReadDoorLockIfon("ccccccfffe300347");
+ //var list = Send.ReadDoorLockIfon(common.DeviceAddr);
+ var pra = new UserCenter.MemberListInfoPra();
+ string result = await UserCenter.UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
+ var listInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<UserCenter.MemberInfoRes>>(result);
+ Send.UserList.Clear();
+ for (int i = 0; i < listInfo.Count; i++)
+ {
+ var membership = new Send.MembershipIfon();
+ var membershipifon = listInfo[i];
+ for (int j = 0; j < doorlockifonlist.Count; j++)
+ {
+ ///鏌ユ壘鎴愬憳浠ュ強鎴愬憳闂ㄩ攣瑙﹀彂婧�(1鎸夐敭/3鍗�/15鎸囩汗)
+ if (doorlockifonlist[j].CloudAccountId == membershipifon.SubAccountDistributedMark)
+ {
+ membership.UserIdMode.Add(doorlockifonlist[j].UserIdMode);
+ membership.MembershipName = membershipifon.UserName;
+ membership.MembershipId = membershipifon.SubAccountDistributedMark;
+
+ }
+
+ }
+ if (membership.UserIdMode.Count != 0)
+ {
+ ///杩囨护鎺夐噸澶嶆暟鎹紱
+ var str = Send.UserList.Find((c) => { return c.MembershipId == membership.MembershipId; });
+ if (str == null)
+ {
+ Send.UserList.Add(membership);
+ }
+ }
+
+ }
+ #endregion
+
+ var memberList = new MemberList();
+ UserView.HomePage.Instance.AddChidren(memberList);
+ UserView.HomePage.Instance.PageIndex += 1;
+ MemberList.action += () => { flMain.RemoveFromParent(); };
+ memberList.Show(common);
}
break;
}
-
- var cancel = new Button
- {
- Height = Application.GetRealHeight(160),
- TextID = MyInternationalizationString.cancel,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 16,
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- Y = devicefra.Height - Application.GetRealHeight(160),
-
- };
- devicefra.AddChidren(cancel);
- cancel.MouseUpEventHandler += (sender, e) =>
- {
- flMain.RemoveFromParent();
- UserView.HomePage.Instance.ScrollEnabled = true;
- };
-
-
- var btnSave = new Button
- {
- Y = Application.GetRealHeight(20),
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealHeight(150),
- Text = Language.StringByID(MyInternationalizationString.complete),
- TextColor = ZigbeeColor.Current.LogicTextBlueColor,
- X = Application.GetRealWidth(1000 - 200),
- };
- devicefra.AddChidren(btnSave);
- btnSave.MouseUpEventHandler += (sender2, e2) =>
+ Btncomplete.MouseUpEventHandler += (sender2, e2) =>
{
//UserView.HomePage.Instance.ScrollEnabled = true;
- if (SelectedDeviceStatuscondition == "yes")
+ if (SelectedDeviceStatuscondition != "")
{
LogicIfon.AddDeviceconditions(common, deviceConditionsInfo);
}
@@ -1135,6 +1429,16 @@
}
+ public static void dictionary(Dictionary<string, string> deviceConditionsInfo, string Key, string Value)
+ {
+ if (deviceConditionsInfo.ContainsKey(Key))
+ {
+ deviceConditionsInfo.Remove(Key);
+ }
+ deviceConditionsInfo.Add(Key, Value);
+ }
+
+
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
index d40a92b..6d8fc64 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/DeviceTarget.cs
@@ -17,75 +17,116 @@
}
public void Show ()
{
-
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- var topFrameLayout = new FrameLayout
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
-
- var titleName = new Button {
- TextID = MyInternationalizationString.addaction,
- TextSize = 17,
+ var titleName = new Button
+ {
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.addaction,
};
- topFrameLayout.AddChidren (titleName);
+ topRowLayout.AddChidren(titleName);
- var back = new Button {
- Width = Application.GetRealWidth (110),
- Height = Application.GetRealHeight (110),
- X = Application.GetRealWidth (20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
};
- topFrameLayout.AddChidren (back);
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren(back);
back.MouseDownEventHandler += (sender, e) => {
- RemoveFromParent ();
+ RemoveFromParent();
};
+ #endregion
-
- var middle = new VerticalScrolViewLayout ();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 220);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+
+ var middle = new FrameLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
this.AddChidren(middle);
#region ----- 璁惧------
- var deviceRowLayout = new RowLayout
+ var deviceframelayout = new FrameLayout
{
- Height = Application.GetRealHeight(180),
- //BackgroundColor = 0xff323232,
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- middle.AddChidren (deviceRowLayout);
+ middle.AddChidren(deviceframelayout);
- var device = new Button {
- Width = Application.GetRealWidth (400),
+ var deviceiconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/function.png",
+
+ };
+ deviceframelayout.AddChidren(deviceiconBtn);
+
+ var devicerow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ deviceframelayout.AddChidren(devicerow);
+
+
+ var btndevice = new Button
+ {
TextID = MyInternationalizationString.device,
- //Text = "璁惧",
- TextSize = 16,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth (40),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- deviceRowLayout.AddChidren (device);
+ devicerow.AddChidren(btndevice);
- var btndeviceback = new Button {
- Width = Application.GetRealWidth (110),
- Height = Application.GetRealHeight (110),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth (1080-140),//550
+ var btndeviceback = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ X = Application.GetRealWidth(789),
Gravity = Gravity.CenterVertical,
- };
- deviceRowLayout.AddChidren (btndeviceback);
+ UnSelectedImagePath = "ZigeeLogic/next.png",
- EventHandler<MouseEventArgs> deviceclick = (sender, e) => {
+ };
+ devicerow.AddChidren(btndeviceback);
+
+ EventHandler<MouseEventArgs> devicestateclick = (sender, e) =>
+ {
Common.Logic.LogicDviceList.Clear();
if (Common.Logic.LogicDviceList.Count == 0)
{
@@ -97,90 +138,122 @@
logicDevicePage.Show();
};
- deviceRowLayout.MouseUpEventHandler += deviceclick;
- device.MouseUpEventHandler += deviceclick;
- btndeviceback.MouseUpEventHandler += deviceclick;
-#endregion
+ deviceframelayout.MouseUpEventHandler += devicestateclick;
+ btndevice.MouseUpEventHandler += devicestateclick;
+ btndeviceback.MouseUpEventHandler += devicestateclick;
+ deviceiconBtn.MouseUpEventHandler += devicestateclick;
+ devicerow.MouseUpEventHandler += devicestateclick;
+ #endregion
- #region ----- 鍦烘櫙------
- var sceneRowLayout = new RowLayout {
- Height = Application.GetRealHeight (180),
- //BackgroundColor = 0xff323232,
- Y=deviceRowLayout.Bottom,
+ #region ----- 鍦烘櫙------
+
+
+ var sceneframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y= deviceframelayout.Bottom,
};
- middle.AddChidren (sceneRowLayout);
+ middle.AddChidren(sceneframelayout);
+
+ var sceneiconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/scene.png",
+
+ };
+ sceneframelayout.AddChidren(sceneiconBtn);
+
+
+ var sceneRowLayout = new RowLayout {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ sceneframelayout.AddChidren (sceneRowLayout);
var scene = new Button {
- Width = Application.GetRealWidth (400),
TextID = MyInternationalizationString.scene,
- //Text = "鍦烘櫙",
- TextSize = 16,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth (40),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
sceneRowLayout.AddChidren (scene);
var btnsceneback = new Button {
- Width = Application.GetRealWidth (110),
- Height = Application.GetRealHeight (110),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth (1080-140),//550
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ X = Application.GetRealWidth(789),
Gravity = Gravity.CenterVertical,
+ UnSelectedImagePath = "ZigeeLogic/next.png",
};
sceneRowLayout.AddChidren (btnsceneback);
- EventHandler<MouseEventArgs> sceneclick = (sender, e) => {
- CommonPage.Loading.Start ();
- System.Threading.Tasks.Task.Run (() => {
- Application.RunOnMainThread (() => {
- CommonPage.Loading.Hide ();
- var addScenePage = new AddScenePage ();
- UserView.HomePage.Instance.AddChidren (addScenePage);
- UserView.HomePage.Instance.PageIndex += 1;
- addScenePage.Show ();
-
- });
- });
+ EventHandler<MouseEventArgs> sceneclick = (sender, e) =>
+ {
+ var addScenePage = new AddScenePage();
+ UserView.HomePage.Instance.AddChidren(addScenePage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ addScenePage.Show();
};
sceneRowLayout.MouseUpEventHandler += sceneclick;
scene.MouseUpEventHandler += sceneclick;
btnsceneback.MouseUpEventHandler += sceneclick;
-#endregion
+ sceneframelayout.MouseUpEventHandler += sceneclick;
+ sceneiconBtn.MouseUpEventHandler += sceneclick;
+ #endregion
#region ----- 瀹夐槻妯″紡------
- ///瀹夐槻妯″紡
- var securityRowLayout = new RowLayout
+ var securityframelayout = new FrameLayout
{
- Height = Application.GetRealHeight(180),
- //BackgroundColor = 0xff323232,
- Y = sceneRowLayout.Bottom,
+ Height = Application.GetRealHeight(160),
+ Y = sceneframelayout.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- middle.AddChidren(securityRowLayout);
+ middle.AddChidren(securityframelayout);
- var security = new Button
+ var securityiconBtn = new Button
{
- Width = Application.GetRealWidth(400),
- TextID = MyInternationalizationString.securitymode,
- //Text = "瀹夐槻妯″紡",
- TextSize = 16,
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ UnSelectedImagePath = "ZigeeLogic/security.png",
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ };
+ securityframelayout.AddChidren(securityiconBtn);
+
+ var securityrow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ securityframelayout.AddChidren(securityrow);
+
+
+ var btnsecurity = new Button
+ {
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
+ TextID = MyInternationalizationString.securitymode,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- securityRowLayout.AddChidren(security);
+ securityrow.AddChidren(btnsecurity);
var btnsecurityback = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080 - 140),//550
+ X = Application.GetRealWidth(789),
Gravity = Gravity.CenterVertical,
};
- securityRowLayout.AddChidren(btnsecurityback);
+ securityrow.AddChidren(btnsecurityback);
EventHandler<MouseEventArgs> securityclick = (sender, e) => {
var securityMode = new SecurityMode();
@@ -189,9 +262,11 @@
securityMode.Show();
};
- securityRowLayout.MouseUpEventHandler += securityclick;
- security.MouseUpEventHandler += securityclick;
+ securityframelayout.MouseUpEventHandler += securityclick;
+ btnsecurity.MouseUpEventHandler += securityclick;
btnsecurityback.MouseUpEventHandler += securityclick;
+ securityiconBtn.MouseUpEventHandler += securityclick;
+ securityrow.MouseUpEventHandler += securityclick;
#endregion
#region ----- 宸叉湁鑷姩鍖�------
@@ -201,7 +276,7 @@
{
Height = Application.GetRealHeight(180),
//BackgroundColor = 0xff323232,
- Y = securityRowLayout.Bottom,
+ Y = securityframelayout.Bottom,
};
//middle.AddChidren(existenceRowLayout);
@@ -240,101 +315,71 @@
btnexistenceback.MouseUpEventHandler += existenceclick;
#endregion
- #region ----- 寤舵椂------
+ #region ----- 寤舵椂------
+
+ var delayedframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = securityframelayout.Bottom,
+ };
+ middle.AddChidren(delayedframelayout);
+
+ var delayediconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/delay.png",
+
+ };
+ delayedframelayout.AddChidren(delayediconBtn);
+
var delayedRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(180),
- //BackgroundColor = 0xff323232,
- Y=securityRowLayout.Bottom,
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- //middle.AddChidren(delayedRowLayout);
+ delayedframelayout.AddChidren(delayedRowLayout);
var delayed = new Button
{
- Width = Application.GetRealWidth(400),
- TextID = MyInternationalizationString.delayed,
- //Text = "寤舵椂",
- TextSize = 16,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
+ TextID = MyInternationalizationString.delayed,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
delayedRowLayout.AddChidren(delayed);
var btndelayedback = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080 - 140),//550
+ X = Application.GetRealWidth(789),
Gravity = Gravity.CenterVertical,
};
delayedRowLayout.AddChidren(btndelayedback);
EventHandler<MouseEventArgs> delayedclick = (sender, e) =>
{
- //var delayTime = new DelayTime();
- //UserView.HomePage.Instance.AddChidren(delayTime);
- //UserView.HomePage.Instance.PageIndex += 1;
- //delayTime.Show();
- DelayTimeView();
+ var delayTime = new DelayTime();
+ UserView.HomePage.Instance.AddChidren(delayTime);
+ UserView.HomePage.Instance.PageIndex += 1;
+ delayTime.Show();
};
delayedRowLayout.MouseUpEventHandler += delayedclick;
delayed.MouseUpEventHandler += delayedclick;
btndelayedback.MouseUpEventHandler += delayedclick;
-#endregion
+ delayedframelayout.MouseUpEventHandler += delayedclick;
+ delayediconBtn.MouseUpEventHandler += delayedclick;
+ #endregion
}
- public static void DelayTimeView(Dictionary<string, object> delayactionsInfo=null)
- {
- var listValues = new List<string>();
- for (int i = 0; i < 60; i++)
- {
- listValues.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.second));
- }
- var list = new List<KeyValuePair<string, string[]>> { };
- for (int i = 0; i <= 60; i++)
- {
- list.Add(new KeyValuePair<string, string[]>(i.ToString() + " " + Language.StringByID(MyInternationalizationString.minute), listValues.ToArray()));
- }
-
- /*
- PickerView.Show(list, (obj) =>
- {
- var minute = obj.Split(',')[0].Split(' ')[0];
- var second = obj.Split(',')[1].Split(' ')[0];
- int value = int.Parse(minute) * 60 + int.Parse(second);
- if (value == 0)
- {
- var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
- "鏃堕棿涓嶈兘涓�0",
- Language.StringByID(MyInternationalizationString.complete));
- alert.Show();
- return;
- }
- if (delayactionsInfo == null)
- {
- Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
- actionsInfo.Add("LinkType", 10);
- actionsInfo.Add("DelayTime", value);
- Common.Logic.CurrentLogic.Actions.Add(actionsInfo);
- }
- else
- {
- if (delayactionsInfo.ContainsKey("DelayTime"))
- {
- delayactionsInfo.Remove("DelayTime");
- }
- delayactionsInfo.Add("DelayTime", value);
- }
- var logicCommunalPage = new LogicCommunalPage { };
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
- }, Language.StringByID(MyInternationalizationString.complete), "");
- */
- }
+
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs
index b5394a8..27e264e 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/EverymonthPage.cs
@@ -1,4 +1,7 @@
-锘縰sing System;
+锘�
+
+
+using System;
using System.Collections.Generic;
using Shared;
using Shared.Phone;
@@ -6,266 +9,104 @@
using Shared.Common;
namespace Shared.Phone.Device.Logic
{
+
public class EverymonthPage : FrameLayout
{
-
-
- public void Show()
+ public EverymonthPage()
{
-
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- var topFrameLayout = new FrameLayout
+ Tag = "Logic";
+ }
+ public void Show(string titlename)
+ {
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- TextID = MyInternationalizationString.cycle,
- TextSize = 17,
- TextColor=ZigbeeColor.Current.LogicTextBlackColor,
+ TextSize = 16,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ Text = titlename,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
- var hdl = new Button
+ var clickBtn = new Button
{
- Width = Application.GetRealWidth(154),
- Height = Application.GetRealHeight(90),
- X = Application.GetRealWidth(1080-170),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "Logo/Logo.png",
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
};
- //topFrameLayout.AddChidren(hdl);
-
- var back = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
- };
- topFrameLayout.AddChidren(back);
- back.MouseDownEventHandler += (sender, e) =>
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
{
RemoveFromParent();
};
- var titlerl = new RowLayout
+ var back = new Button
{
- Height = Application.GetRealHeight(180),
- //BackgroundColor = 0xff0f0f0f,
- Y = Application.GetRealHeight(220),
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
};
- AddChidren(titlerl);
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) => {
+ RemoveFromParent();
+ };
+ #endregion
- titlerl.AddChidren(
- new Button
- {
- X = Application.GetRealWidth(40),
- //Text = "璇烽�夋嫨閲嶅鎵ц鍛ㄦ湡",
- TextID = MyInternationalizationString.repeat,
- TextSize = 17,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- }
- );
-
- var middle = new VerticalScrolViewLayout();
- middle.Y = titlerl.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 220 - 180);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+ var middle = new FrameLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
this.AddChidren(middle);
- var startdaterow = new RowLayout
+ var frameLayout = new FrameLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(80),
+ X = Application.GetRealWidth(50),
+ Width = Application.GetRealWidth(1080 - 100),
+ Height = Application.GetRealHeight(180 * 5 + 50),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
};
- middle.AddChidren(startdaterow);
-
- var btnstartdatetext = new Button
+ middle.AddChidren(frameLayout);
+
+
+ var saveBtn = new Button
{
- TextAlignment = TextAlignment.CenterLeft,
- Width = Application.GetRealWidth(300),
- X = Application.GetRealWidth(30),
- TextID = MyInternationalizationString.startdate,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Y = middle.Height - Application.GetRealHeight(260),
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),//194
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- startdaterow.AddChidren(btnstartdatetext);
+ middle.AddChidren(saveBtn);
- var btnstartdate = new Button
+ var monselectedlist = new List<string>();
+ monselectedlist.Clear();
+ if (Common.Logic.CurrentLogic.TimeAttribute.Repeat == 3)
{
- X = Application.GetRealWidth(330),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(600),
- TextAlignment = TextAlignment.CenterLeft,
- Tag = "0",
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- startdaterow.AddChidren(btnstartdate);
-
- var btnstartback = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080 - 140),
- Gravity = Gravity.CenterVertical,
- };
- startdaterow.AddChidren(btnstartback);
-
- var enddaterow = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- };
- middle.AddChidren(enddaterow);
- var btnenddatetext = new Button
- {
- TextAlignment = TextAlignment.CenterLeft,
- Width = Application.GetRealWidth(300),
- X = Application.GetRealWidth(30),
- TextID = MyInternationalizationString.enddate,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- enddaterow.AddChidren(btnenddatetext);
-
- var btnenddate = new Button
- {
- X = Application.GetRealWidth(330),
- Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(600),
- TextAlignment = TextAlignment.CenterLeft,
- Tag = "0",
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- enddaterow.AddChidren(btnenddate);
-
- var btnendtimeback = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080 - 140),
- Gravity=Gravity.CenterVertical,
- };
- enddaterow.AddChidren(btnendtimeback);
-
-
- EventHandler<MouseEventArgs> startdateclick = (sender33, e33) =>
- {
- var list = new List<string> { };
- for (int day = 1; day <= 31; day++)
- {
- list.Add(day.ToString() + " " + Language.StringByID(MyInternationalizationString.day));
- }
- //PickerView.Show(list, (obj) =>
- //{
- // var day = obj.Split(' ')[0];
- // if (btnenddate.Tag.ToString() != "0" && int.Parse(btnenddate.Tag.ToString()) < int.Parse(day))
- // {
- // var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
- // Language.StringByID(MyInternationalizationString.monthday),
- // Language.StringByID(MyInternationalizationString.OK));
- // alert.Show();
- // }
- // else
- // {
- // btnstartdate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
- // btnstartdate.Tag = day;
- // if (string.IsNullOrEmpty(btnenddate.Text))
- // {
- // btnenddate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
- // btnenddate.Tag = day;
- // }
- // Common.Logic.CurrentLogic.TimeAttribute.Repeat = 3;
- // int a = int.Parse(btnstartdate.Tag.ToString());
- // int b = int.Parse(btnenddate.Tag.ToString());
- // string s = "";
- // for (int i = 32; i > 0; i--)
- // {
- // if (i >=a && i <= b)
- // {
- // s += "1";
- // }
- // else
- // {
- // s += "0";
- // }
- // }
- // var intvalue = Convert.ToInt32(s, 2);
- // Common.Logic.CurrentLogic.TimeAttribute.MonthDate = intvalue;
- // }
- //}, Language.StringByID(MyInternationalizationString.complete), "112");
- };
- startdaterow.MouseUpEventHandler += startdateclick;
- btnstartdate.MouseUpEventHandler += startdateclick;
- btnstartdatetext.MouseUpEventHandler += startdateclick;
- btnstartback.MouseUpEventHandler += startdateclick;
-
-
- EventHandler<MouseEventArgs> enddateclick = (sender33, e33) =>
- {
- var list = new List<string> { };
- for (int day = 1; day <= 31; day++)
- {
- list.Add(day.ToString() + " " + Language.StringByID(MyInternationalizationString.day));
- }
- //PickerView.Show(list, (obj) =>
- //{
- // var day = obj.Split(' ')[0];
- // if (btnstartdate.Tag.ToString() != "0" && int.Parse(btnstartdate.Tag.ToString()) > int.Parse(day))
- // {
- // var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
- // Language.StringByID(MyInternationalizationString.monthday),
- // Language.StringByID(MyInternationalizationString.OK));
- // alert.Show();
- // }
- // else
- // {
- // btnenddate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
- // btnenddate.Tag = day;
- // if (string.IsNullOrEmpty(btnstartdate.Text))
- // {
- // btnstartdate.Text = Language.StringByID(MyInternationalizationString.monthly) + day + Language.StringByID(MyInternationalizationString.day);
- // btnstartdate.Tag = day;
- // }
-
- // Common.Logic.CurrentLogic.TimeAttribute.Repeat = 3;
- // int a = int.Parse(btnstartdate.Tag.ToString());
- // int b = int.Parse(btnenddate.Tag.ToString());
- // string s = "";
- // for (int i = 32; i > 0; i--)
- // {
- // if (i >= a && i <= b)
- // {
- // s += "1";
- // }
- // else
- // {
- // s += "0";
- // }
- // }
- // var intvalue = Convert.ToInt32(s, 2);
- // Common.Logic.CurrentLogic.TimeAttribute.MonthDate = intvalue;
-
- // }
- //}, Language.StringByID(MyInternationalizationString.complete), "112");
- };
- enddaterow.MouseUpEventHandler += enddateclick;
- btnenddate.MouseUpEventHandler += enddateclick;
- btnenddatetext.MouseUpEventHandler += enddateclick;
- btnendtimeback.MouseUpEventHandler += enddateclick;
-
- if(Common.Logic.CurrentLogic.TimeAttribute.Repeat==3){
if (Common.Logic.CurrentLogic.TimeAttribute.MonthDate != 0)
{
string len = "";
- int minvalue = 0;
var maxvalue = Convert.ToString(Common.Logic.CurrentLogic.TimeAttribute.MonthDate, 2);
var str = maxvalue.Insert(0, new string('0', 32 - maxvalue.Length));
for (int j = 31; j >= 0; j--)
@@ -278,20 +119,121 @@
var strvalue = len.Substring(j, 1);
if (strvalue == "1")
{
- minvalue = j + 1;
- break;
+ monselectedlist.Add((j + 1).ToString());
}
}
- btnstartdate.Text = Language.StringByID(MyInternationalizationString.monthly) + minvalue.ToString() + Language.StringByID(MyInternationalizationString.day);
- btnstartdate.Tag = minvalue.ToString();
- btnenddate.Text = Language.StringByID(MyInternationalizationString.monthly) + maxvalue.Length.ToString() + Language.StringByID(MyInternationalizationString.day);
- btnenddate.Tag = maxvalue.Length.ToString();
-
-
}
}
+
+
+ int k = 1;
+ for (int i = 0; i < 5; i++)
+ {
+ var timeRow = new RowLayout
+ {
+ Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(180 * i),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ frameLayout.AddChidren(timeRow);
+ for (int j = 1; j < 8; j++)
+ {
+ if (k > 31)
+ {
+ continue;
+ }
+
+ var monBtn = new Button
+ {
+
+ Text = k.ToString().Length == 1 ? "0" + k.ToString() : k.ToString(),
+ Y = Application.GetRealHeight(40),
+ Height = Application.GetRealHeight(100),
+ Width = Application.GetRealWidth(100),
+ X = Application.GetRealWidth(35 * j) + Application.GetRealWidth(100 * (j - 1)),
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(50),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ SelectedBackgroundColor = ZigbeeColor.Current.LogicAddColor,
+ Tag = k,
+ };
+ timeRow.AddChidren(monBtn);
+
+
+
+ if (monselectedlist.Contains(k.ToString()))
+ {
+ monBtn.IsSelected = true;
+ }
+ k++;
+
+ monBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ monBtn.IsSelected = !monBtn.IsSelected;
+ var selectedmon = monselectedlist.Find((c) => { return c == monBtn.Tag.ToString(); });
+ if (monBtn.IsSelected)
+ {
+ if (selectedmon == null)
+ {
+ monselectedlist.Add(monBtn.Tag.ToString());
+
+ }
+
+ }
+ else
+ {
+ if (selectedmon != null)
+ {
+ monselectedlist.Remove(monBtn.Tag.ToString());
+ }
+ }
+ };
+ }
+ }
+
+
+
+ saveBtn.MouseUpEventHandler += (sedder, e) =>
+ {
+
+ if (monselectedlist.Count == 0)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectweek),
+ Language.StringByID(MyInternationalizationString.complete));
+
+ alert.Show();
+ return;
+ }
+ string s = "";
+ for (int i = 32; i > 0; i--)
+ {
+ var selectedmon = monselectedlist.Find((a) => { return a == i.ToString(); });
+ if (selectedmon != null)
+ {
+ s += "1";
+ }
+ else
+ {
+ s += "0";
+ }
+
+ }
+ var intvalue = Convert.ToInt32(s, 2);
+ Common.Logic.CurrentLogic.TimeAttribute.Repeat = 3;
+ Common.Logic.CurrentLogic.TimeAttribute.MonthDate = intvalue;
+
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+
+ };
+
+
+
}
}
-
-}
+}
\ No newline at end of file
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs b/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs
new file mode 100755
index 0000000..fa588ac
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/IgnoreTime.cs
@@ -0,0 +1,252 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared;
+using Shared.Common;
+using Shared.R;
+using ZigBee.Device;
+
+namespace Shared.Phone.Device.Logic
+{
+ public class IgnoreTime : FrameLayout
+ {
+
+ public IgnoreTime()
+ {
+ Tag = "Logic";
+
+ }
+ Button selectedIcon = new Button();
+ public void Show(CommonDevice common, string name, bool edit, int timevalue)
+ {
+
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
+ };
+ this.AddChidren(topRowLayout);
+
+ var titleName = new Button
+ {
+ TextSize = 16,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(600),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ Text = name,
+ };
+ topRowLayout.AddChidren(titleName);
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+ #endregion
+
+ var middle = new VerticalScrolViewLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184 - 260),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(middle);
+ int selectetimedvalue = 0;
+ var timestrlist = new List<string> { "2", "5", "10", "20", "30", Language.StringByID(MyInternationalizationString.logiccustom) };
+ foreach (var intvalue in timestrlist)
+ {
+
+ var timeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(timeframelayout);
+
+ var timeniconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/point.png",
+
+ };
+ timeframelayout.AddChidren(timeniconBtn);
+
+ var timeRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ timeframelayout.AddChidren(timeRow);
+
+ var timeBtn = new Button
+ {
+ Text = intvalue.ToString() + Language.StringByID(MyInternationalizationString.Minute),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Tag = intvalue,
+ };
+ timeRow.AddChidren(timeBtn);
+
+
+ var selected = new SelectedButton(789);
+ timeRow.AddChidren(selected);
+ //鍒ゆ柇涓�涓瓧绗︽槸瀛楃涓茶繕鏄暟瀛�
+ if (intvalue.Length < 3)
+ {
+ if (timevalue== int.Parse(intvalue) * 60)
+ {
+ selectedIcon.Visible = false;
+ selectedIcon = selected;
+ selected.Visible = true;
+ }
+ }
+ else
+ {
+ timeRow.LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
+ }
+ EventHandler<MouseEventArgs> timeclick = (sender, e) =>
+ {
+ selectedIcon.Visible = false;
+ selectedIcon = selected;
+ selected.Visible = true;
+ if (Language.StringByID(MyInternationalizationString.logiccustom) == timeBtn.Tag.ToString())
+ {
+ var secondList = new List<string>();
+ var minuteList = new List<string>();
+ for (int i = 0; i < 61; i++)
+ {
+ if (i < 10)
+ {
+ var a = "0" + i.ToString();
+ secondList.Add(a + " " + Language.StringByID(MyInternationalizationString.second));
+ minuteList.Add(a + " " + Language.StringByID(MyInternationalizationString.minute));
+ }
+ else
+ {
+ secondList.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.second));
+ minuteList.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.minute));
+ }
+
+ }
+ int selectIndex1 = timevalue / 60;
+ int selectIndex2 = timevalue % 60;
+ PickerView.ShowNormal(minuteList, secondList, new List<string>(), (Index1, Index2, Index3) =>
+ {
+ selectetimedvalue = int.Parse(minuteList[Index1].Split(' ')[0]) * 60 + int.Parse(secondList[Index2].Split(' ')[0]);
+ timemethod(common, selectetimedvalue, timevalue, edit);
+ }, selectIndex1, selectIndex2, 0, Language.StringByID(MyInternationalizationString.logiccustom));
+ }
+ else
+ {
+ selectetimedvalue = int.Parse(timeBtn.Tag.ToString()) * 60;
+ }
+ };
+ timeframelayout.MouseUpEventHandler += timeclick;
+ timeniconBtn.MouseUpEventHandler += timeclick;
+ timeRow.MouseUpEventHandler += timeclick;
+ timeBtn.MouseUpEventHandler += timeclick;
+ selected.MouseUpEventHandler += timeclick;
+ }
+
+ var saveFrameLayout = new FrameLayout
+ {
+ Y = middle.Bottom,
+ Height = Application.GetRealHeight(260),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(saveFrameLayout);
+
+ var btnsave = new Button
+ {
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),//194
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ };
+ saveFrameLayout.AddChidren(btnsave);
+ btnsave.MouseUpEventHandler += (sender, e) =>
+ {
+ timemethod(common, selectetimedvalue, timevalue, edit);
+ };
+ }
+
+ public void timemethod(CommonDevice common, int selectetimedvalue, int timevalue, bool edit)
+ {
+
+ var deviceConditionsInfo = new Dictionary<string, string>();
+ deviceConditionsInfo.Add("Type", "1");
+ deviceConditionsInfo.Add("IsValid", "1");
+ deviceConditionsInfo.Add("MacAddr", common.DeviceAddr);
+ deviceConditionsInfo.Add("Epoint", common.DeviceEpoint.ToString());
+ deviceConditionsInfo.Add("Cluster_ID", "1280");
+ deviceConditionsInfo.Add("AttriButeId", "1281");
+ deviceConditionsInfo.Add("AttriButeData1", "0");
+ deviceConditionsInfo.Add("AttriButeData2", "0");
+ deviceConditionsInfo.Add("Range", "1");
+ if (selectetimedvalue != 0)
+ {
+ if (timevalue != selectetimedvalue)
+ {
+ if (deviceConditionsInfo.ContainsKey("IgnoreTime"))
+ {
+ deviceConditionsInfo.Remove("IgnoreTime");
+ }
+ deviceConditionsInfo.Add("IgnoreTime", selectetimedvalue.ToString());
+ LogicIfon.AddDeviceconditions(common, deviceConditionsInfo);
+ }
+
+ }
+ else
+ {
+ if (!edit)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
+ Language.StringByID(MyInternationalizationString.complete));
+ alert.Show();
+ return;
+ }
+
+ }
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+
+ }
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
index 171aa2f..f0a810c 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicCommunalPage.cs
@@ -20,33 +20,28 @@
EditText logicTextBox;
public void Show(Action action)
{
-
- this.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
-
- var topFrameLayout1 = new FrameLayout
+
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(80),
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout1);
-
- var topFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- };
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
-
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.selection,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
if (Common.Logic.CurrentLogic.LogicId != 0)
{
titleName.Text = Language.StringByID(MyInternationalizationString.editautomation);
@@ -56,195 +51,183 @@
titleName.Text = Language.StringByID(MyInternationalizationString.newautomation);
}
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+
var back = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
};
- topFrameLayout.AddChidren(back);
-
+ topRowLayout.AddChidren(back);
back.MouseDownEventHandler += (sender, e) =>
{
- //if (Common.Logic.CurrentLogic.LogicId != 0)
- //{
- // Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
- // action();
- // Send.AddModifyLogic(Common.Logic.CurrentLogic);
- //}
action();
RemoveFromParent();
};
- var middle = new VerticalScrolViewLayout();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 220 - 194);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+
+ #endregion
+
+
+
+ var middle = new VerticalScrolViewLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184-180),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
this.AddChidren(middle);
- var fl = new FrameLayout
- {
- Height = Application.GetRealHeight(280),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- };
- middle.AddChidren(fl);
-
- #region -----姣忓ぉ 璁剧疆鍛ㄦ湡-----
- var weekfl = new FrameLayout
- {
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(20),
- };
- fl.AddChidren(weekfl);
-
- var btnweektext = new Button
- {
- Width = Application.GetRealWidth(900 - 300),
- Height = Application.GetRealHeight(70),
- X = Application.GetRealWidth(140 + 300),
- TextAlignment = TextAlignment.CenterRight,
- //Text = "姣忓ぉ",
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID = MyInternationalizationString.everyday,
- };
- weekfl.AddChidren(btnweektext);
- var settxet = new Button
- {
- Width = Application.GetRealWidth(900 - 500),
- Height = Application.GetRealHeight(70),
- X = Application.GetRealWidth(140 + 500),
- TextAlignment = TextAlignment.CenterRight,
- Y = btnweektext.Bottom,
- //Text = "璁剧疆鍛ㄦ湡",
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID = MyInternationalizationString.setupcycle,
- };
- weekfl.AddChidren(settxet);
-
- UpdateWeek(btnweektext);
-
- EventHandler<MouseEventArgs> cycleclick = (sender, e) =>
- {
- /*------淇濈暀姣忔湀,姣忓勾绫诲瀷*/
- //var cycle = new Cycle(() => { UpdateWeek(btnweektext); });
- //UserView.HomePage.Instance.AddChidren(cycle);
- //UserView.HomePage.Instance.PageIndex += 1;
- //cycle.Show();
-
- var cyclicCycle = new CyclicCycle(() => { UpdateWeek(btnweektext); });
- UserView.HomePage.Instance.AddChidren(cyclicCycle);
- UserView.HomePage.Instance.PageIndex += 1;
- cyclicCycle.Show();
- };
- btnweektext.MouseUpEventHandler += cycleclick;
- settxet.MouseUpEventHandler += cycleclick;
- #endregion
#region -----鑷姩鍖栧悕绉� 璁剧疆鍚嶇О-----
var logicnamefl = new FrameLayout
{
- Height = Application.GetRealHeight(140),
- Y = weekfl.Bottom,
- //BackgroundColor=0xff453736,
+ Height = Application.GetRealHeight(130),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
};
- fl.AddChidren(logicnamefl);
+ middle.AddChidren(logicnamefl);
var text = new Button
{
- Width = Application.GetRealWidth(600),
+ Width = Application.GetRealWidth(300),
Height = Application.GetRealHeight(60),
- X = Application.GetRealWidth(50),
+ X = Application.GetRealWidth(58),
TextAlignment = TextAlignment.CenterLeft,
//Text = "鑷姩鍖栧悕绉�",
TextID = MyInternationalizationString.automationname,
- TextColor = ZigbeeColor.Current.LogicViewBackgroundColor,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Y = Application.GetRealHeight(35),
};
logicnamefl.AddChidren(text);
logicTextBox = new EditText
{
- Width = Application.GetRealWidth(900),
+ Y = Application.GetRealHeight(35),
+ Width = Application.GetRealWidth(1080-58-300),
Height = Application.GetRealHeight(60),
- X = Application.GetRealWidth(40 + 20),
- Y = text.Bottom + Application.GetRealHeight(10),
+ X = text.Right,
TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
TextSize = 13,
Text = Common.Logic.CurrentLogic.LogicName,
//TextID=MyInternationalizationString.automation1,
};
logicnamefl.AddChidren(logicTextBox);
- var btnline = new Button
+ var fraline = new FrameLayout
{
- Height = Application.GetRealHeight(4),
- Y = Application.GetRealHeight(140 - 4),
- BackgroundColor = ZigbeeColor.Current.LogicLineColor,
+ Height = Application.GetRealHeight(30),
};
- logicnamefl.AddChidren(btnline);
+ middle.AddChidren(fraline);
#endregion
#region -----鏄剧ず閫昏緫鏉′欢-----
+
+
+ var conditionFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(conditionFrameLayout);
+
+
var conditionRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(150),
- //BackgroundColor = 0xff323232,
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- middle.AddChidren(conditionRowLayout);
+ conditionFrameLayout.AddChidren(conditionRowLayout);
+
conditionRowLayout.AddChidren(new Button
{
+
+ Text = Language.StringByID(MyInternationalizationString.ifcondition),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
Width = Application.GetRealWidth(300),
Height = Application.GetRealHeight(60),
- //Text = "濡傛灉",
- TextID = MyInternationalizationString.ifcondition,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- // Gravity = Gravity.CenterVertical,
- TextColor = ZigbeeColor.Current.LogicViewBackgroundColor,
- Y = Application.GetRealHeight(90),
TextSize = 16,
+ Gravity = Gravity.CenterVertical,
});
+
+ var conditionadd1 = new Button
+ {
+
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(57),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(965 + 58),
+
+ };
+ conditionFrameLayout.AddChidren(conditionadd1);
var conditionadd = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(100),
+
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/add.png",
- X = Application.GetRealWidth(1080 - 140),
+ X = Application.GetRealWidth(965 - 58),
Gravity = Gravity.CenterVertical,
+
};
conditionRowLayout.AddChidren(conditionadd);
///娣诲姞鏉′欢鐨勭偣鍑讳簨浠�
- conditionadd.MouseUpEventHandler += (sender, e) =>
+ EventHandler<MouseEventArgs> conditionaddclick = (sender, e) =>
{
- ConditionView();
+ if (Common.Logic.CurrentLogic.Conditions.Count == 1)
+ {
+ ConditionView(false);
+ }
+ else
+ {
+ var addLogicPage = new AddLogicPage();
+ UserView.HomePage.Instance.AddChidren(addLogicPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ addLogicPage.Show();
+ }
};
-
-
+ conditionadd.MouseUpEventHandler += conditionaddclick;
+ conditionadd1.MouseUpEventHandler += conditionaddclick;
List<Dictionary<string, string>> ListConditions = new List<Dictionary<string, string>>();
ListConditions.Clear();
ListConditions.AddRange(Common.Logic.CurrentLogic.Conditions);
ListConditions.Add(new Dictionary<string, string>());
if (Common.Logic.CurrentLogic.Conditions.Count > 1)
{
- //inputVerticalScrolViewLayout.Height = Application.GetRealHeight(160 * ListConditions.Count) + Application.GetRealHeight(60);
var row = new FrameLayout
{
Height = Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- //inputVerticalScrolViewLayout.AddChidren(row);
middle.AddChidren(row);
var relationship = new Button
{
Width = Application.GetRealWidth(600),
Height = Application.GetRealHeight(60),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- TextColor = ZigbeeColor.Current.LogicViewBackgroundColor,
+ X = Application.GetRealWidth(58),
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
};
row.AddChidren(relationship);
if (Common.Logic.CurrentLogic.Relationship == 0)
@@ -255,6 +238,14 @@
{
relationship.Text = Language.StringByID(MyInternationalizationString.followingconditions) + Language.StringByID(MyInternationalizationString.anycondition);
}
+ EventHandler<MouseEventArgs> editclick = (sender, e) =>
+ {
+
+ ConditionView(true);
+ };
+ row.MouseUpEventHandler += editclick;
+ relationship.MouseUpEventHandler += editclick;
+
}
for (int i = 0; i < ListConditions.Count; i++)
{
@@ -263,34 +254,80 @@
var addfl = new FrameLayout
{
- Height = Application.GetRealHeight(160),
+ Height = Application.GetRealHeight(160 + 30 + 50),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
middle.AddChidren(addfl);
var addbtn = new Button
{
- Height = Application.GetRealHeight(120),
- Width = Application.GetRealWidth(1000),
- X = Application.GetRealWidth(40),
- Y = Application.GetRealHeight(40),
- Radius = (uint)Application.GetRealHeight(30),
- //Text = "娣诲姞鏉′欢",
- BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID = MyInternationalizationString.addconditions,
+ Height = Application.GetRealHeight(130 + 50),
+ Width = Application.GetRealWidth(908),
+ Y = Application.GetRealHeight(30),
+ X = Application.GetRealWidth(86),
+ UnSelectedImagePath = "ZigeeLogic/logicaddcolor.png",
};
addfl.AddChidren(addbtn);
- addbtn.MouseUpEventHandler += (sender, e) =>
+
+
+ var addtextbtn = new Button
{
- ConditionView();
+ Height = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(300),
+ Y = Application.GetRealHeight(45 + 30),
+ TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ TextID = MyInternationalizationString.addconditions,
+ X = Application.GetRealWidth(390),
};
+ addfl.AddChidren(addtextbtn);
+
+ EventHandler<MouseEventArgs> addconditionsclick = (sender, e) =>
+ {
+ if (Common.Logic.CurrentLogic.Conditions.Count == 1)
+ {
+ ConditionView(false);
+ }
+ else
+ {
+ var addLogicPage = new AddLogicPage();
+ UserView.HomePage.Instance.AddChidren(addLogicPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ addLogicPage.Show();
+ }
+ };
+ addbtn.MouseUpEventHandler += addconditionsclick;
+ addtextbtn.MouseUpEventHandler += addconditionsclick;
}
else
{
- var conditionsowLayout = new RowLayout
+ var devicesFrameLayout = new FrameLayout
{
- Height = Application.GetRealHeight(160),
+ Height = Application.GetRealHeight(130),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- middle.AddChidren(conditionsowLayout);
+ middle.AddChidren(devicesFrameLayout);
+
+ ///鏄剧ず鍥炬爣
+ var conditionIcon = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(104),
+ Y = Application.GetRealHeight(25),
+ //UnSelectedImagePath = "ZigeeLogic/time.png",
+
+ };
+ devicesFrameLayout.AddChidren(conditionIcon);
+
+
+ var conditionsRowLayout = new RowLayout
+ {
+ Width = Application.GetRealWidth(800),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(222),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ devicesFrameLayout.AddChidren(conditionsRowLayout);
+
var Type = int.Parse(ListConditions[i]["Type"]);
var conditions = ListConditions[i];
switch (Type)
@@ -302,31 +339,39 @@
///鏄剧ず鏃堕棿
var timevalue = new Button
{
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(800),
+ Width = Application.GetRealWidth(200),
TextAlignment = TextAlignment.CenterLeft,
Gravity = Gravity.CenterVertical,
- //Text = starttime,
- //TextColor = 0xff121212,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
};
- conditionsowLayout.AddChidren(timevalue);
+ conditionsRowLayout.AddChidren(timevalue);
+
+
+ var timeTxet = new Button
+ {
+ Width = Application.GetRealWidth(400),
+ TextAlignment = TextAlignment.CenterRight,
+ Gravity = Gravity.CenterVertical,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ X = conditionsRowLayout.Width - Application.GetRealWidth(400),
+ };
+ conditionsRowLayout.AddChidren(timeTxet);
var timeedit = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- conditionsowLayout.AddRightView(timeedit);
+ conditionsRowLayout.AddRightView(timeedit);
timeedit.MouseUpEventHandler += (sender, e) =>
{
var timePoint = new TimePoint();
UserView.HomePage.Instance.AddChidren(timePoint);
UserView.HomePage.Instance.PageIndex += 1;
- timePoint.IsDeviceEditor = true;
+ timePoint.IsEditor = true;
timePoint.Show(conditions);
};
@@ -337,49 +382,57 @@
{
string s = "";
s = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
- timevalue.Text = Language.StringByID(MyInternationalizationString.time) + conditions["StartHour"] + ":" + s;
+ timevalue.Text = conditions["StartHour"] + ":" + s;
+ timeTxet.TextID = MyInternationalizationString.immediateexecution;
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/timepoint.png";
}
break;
case 1:
+ timevalue.TextID = MyInternationalizationString.sunrise;
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/sunrise.png";
if (int.Parse(conditions["AdjustTime"]) > 0)
{
- timevalue.Text = Language.StringByID(MyInternationalizationString.sunriseafter) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
+ timeTxet.Text = Language.StringByID(MyInternationalizationString.delayed) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
}
else if (int.Parse(conditions["AdjustTime"]) < 0)
{
- timevalue.Text = Language.StringByID(MyInternationalizationString.sunrisebefore) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
+ timeTxet.Text = Language.StringByID(MyInternationalizationString.advance) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
}
else
{
- timevalue.Text = Language.StringByID(MyInternationalizationString.sunrise);
+ //timeTxet.Text = Language.StringByID(MyInternationalizationString.sunrise);
}
break;
case 2:
+ timevalue.TextID = MyInternationalizationString.sunset;
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/sunset.png";
if (int.Parse(conditions["AdjustTime"]) > 0)
{
- timevalue.Text = Language.StringByID(MyInternationalizationString.sunsetafter) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
+ timeTxet.Text = Language.StringByID(MyInternationalizationString.delayed) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
}
else if (int.Parse(conditions["AdjustTime"]) < 0)
{
- timevalue.Text = Language.StringByID(MyInternationalizationString.sunsetbefore) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
+ timeTxet.Text = Language.StringByID(MyInternationalizationString.advance) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
}
else
{
- timevalue.Text = Language.StringByID(MyInternationalizationString.sunset);
+ // timevalue.Text = Language.StringByID(MyInternationalizationString.sunset);
}
break;
case 3:
+ timevalue.TextID = MyInternationalizationString.noon;
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/noon.png";
if (int.Parse(conditions["AdjustTime"]) > 0)
{
- timevalue.Text = Language.StringByID(MyInternationalizationString.noonafter) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
+ timeTxet.Text = Language.StringByID(MyInternationalizationString.delayed) + conditions["AdjustTime"] + Language.StringByID(MyInternationalizationString.logicminute);
}
else if (int.Parse(conditions["AdjustTime"]) < 0)
{
- timevalue.Text = Language.StringByID(MyInternationalizationString.noonbefore) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
+ timeTxet.Text = Language.StringByID(MyInternationalizationString.advance) + Math.Abs(int.Parse(conditions["AdjustTime"])).ToString() + Language.StringByID(MyInternationalizationString.logicminute);
}
else
{
- timevalue.Text = Language.StringByID(MyInternationalizationString.noon);
+ // timeTxet.Text = Language.StringByID(MyInternationalizationString.noon);
}
break;
}
@@ -388,37 +441,46 @@
break;
case 5:
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/timeparagraph.png";
string s1 = "", s2 = "";
s1 = conditions["StartMin"].Length < 2 ? "0" + conditions["StartMin"] : conditions["StartMin"];
s2 = conditions["StopMin"].Length < 2 ? "0" + conditions["StopMin"] : conditions["StopMin"];
///鏄剧ず鏃堕棿
var timevalue = new Button
{
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(500),
+ Width = Application.GetRealWidth(400),
TextAlignment = TextAlignment.CenterLeft,
Gravity = Gravity.CenterVertical,
Text = conditions["StartHour"] + ":" + s1 + "-" + conditions["StopHour"] + ":" + s2,
//TextColor = 0xff121212,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
};
- conditionsowLayout.AddChidren(timevalue);
-
+ conditionsRowLayout.AddChidren(timevalue);
+ var timeTxet = new Button
+ {
+ Width = Application.GetRealWidth(400),
+ TextAlignment = TextAlignment.CenterRight,
+ Gravity = Gravity.CenterVertical,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ X = conditionsRowLayout.Width - Application.GetRealWidth(400),
+ TextID = MyInternationalizationString.timeframe,
+ };
+ conditionsRowLayout.AddChidren(timeTxet);
var timeedit = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- //TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- conditionsowLayout.AddRightView(timeedit);
+ conditionsRowLayout.AddRightView(timeedit);
timeedit.MouseUpEventHandler += (sender, e) =>
{
var timePage = new TimePage();
UserView.HomePage.Instance.AddChidren(timePage);
UserView.HomePage.Instance.PageIndex += 1;
timePage.str1 = conditions["StartHour"] + ":" + conditions["StartMin"] + "-" + conditions["StopHour"] + ":" + conditions["StopMin"];
- timePage.IsDeviceEditor1 = true;
+ timePage.IsEditor = true;
timePage.Show();
};
}
@@ -433,52 +495,75 @@
///鏄剧ず璁惧鍚嶇О
var btndevice = new Button
{
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(500),
+ Y = Application.GetRealHeight(20),
+ Height = Application.GetRealHeight(50),
+ Width = Application.GetRealWidth(400),
TextAlignment = TextAlignment.CenterLeft,
- Gravity = Gravity.CenterVertical,
Text = deviceinof.DeviceEpointName,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //TextColor = 0xff121212,
};
- conditionsowLayout.AddChidren(btndevice);
+ conditionsRowLayout.AddChidren(btndevice);
+
+ ///鍖哄煙(鎴块棿)鍚嶇ОButton
+ var btnregionname = new Button
+ {
+ Y = btndevice.Bottom + Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(400),
+ TextAlignment = TextAlignment.CenterLeft,
+ Height = Application.GetRealHeight(50),
+ Text = "",//Language.StringByID(MyInternationalizationString.customroom),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ };
+ conditionsRowLayout.AddChidren(btnregionname);
+ ///閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
+ Send.RoomNmae(btnregionname, deviceinof);
var deviceedit = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- conditionsowLayout.AddRightView(deviceedit);
+ conditionsRowLayout.AddRightView(deviceedit);
deviceedit.MouseUpEventHandler += (sender, e) =>
{
- //var selectedDeviceState = new SelectedDeviceState();
- //UserView.HomePage.Instance.AddChidren(selectedDeviceState);
- //UserView.HomePage.Instance.PageIndex += 1;
- //selectedDeviceState.IsDeviceEditor = true;
- //selectedDeviceState.Show(deviceinof);
- var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
- this.AddChidren(flMain);
- DeviceStateCondition.CurrentDeviceView(flMain, deviceinof, true);
+
+
+ if (deviceinof.Type != DeviceType.DoorLock)
+ {
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ DeviceStateCondition.CurrentDeviceView(flMain, deviceinof, true);
+ }
+ else
+ {
+ var memberList = new MemberList();
+ UserView.HomePage.Instance.AddChidren(memberList);
+ UserView.HomePage.Instance.PageIndex += 1;
+ MemberList.edit = true;
+ memberList.Show(deviceinof);
+ }
+
};
///鏄剧ず璁惧鏉′欢鐘舵�佹帶浠�
var devicestatus = new Button
{
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(160),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(130),
Gravity = Gravity.CenterVertical,
TextAlignment = TextAlignment.CenterRight,
- X = Application.GetRealWidth(1080 - 340),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ X = Application.GetRealWidth(400),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
};
- conditionsowLayout.AddChidren(devicestatus);
+ conditionsRowLayout.AddChidren(devicestatus);
switch (deviceinof.Type)
{
case DeviceType.OnOffOutput:
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/light.png";
if (conditions["AttriButeId"] == "0")
{
if (conditions["AttriButeData1"] == "1")
@@ -512,6 +597,7 @@
{
var iASZonedevice = deviceinof as IASZone;
var intvalue = conditions["AttriButeData1"];
+ conditionIcon.UnSelectedImagePath = $"ZigeeLogic/sensor{iASZonedevice.IasDeviceType}.png";
switch (iASZonedevice.IasDeviceType)
{
case 13:
@@ -522,36 +608,56 @@
}
else
{
- devicestatus.TextID = MyInternationalizationString.unmanned;
+ int minute = int.Parse(conditions["IgnoreTime"]) / 60;
+ int second = int.Parse(conditions["IgnoreTime"]) % 60;
+ if (second != 0)
+ {
+ devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+ }
+ else
+ {
+ devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+ }
}
}
break;
case 21:
- {
- if (intvalue == "1")
- {
- devicestatus.TextID = MyInternationalizationString.logicopen;
- }
- else
- {
- devicestatus.TextID = MyInternationalizationString.logicclose;
- }
- }
- break;
case 22:
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/doormagnetism.png";
if (intvalue == "1")
{
devicestatus.TextID = MyInternationalizationString.logicopen;
}
else
{
- devicestatus.TextID = MyInternationalizationString.logicclose;
+ if (conditions.ContainsKey("IgnoreTime"))
+ {
+
+ int minute = int.Parse(conditions["IgnoreTime"]) / 60;
+ int second = int.Parse(conditions["IgnoreTime"]) % 60;
+ if (second != 0)
+ {
+ devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.closetime);
+
+ }
+ else
+ {
+ devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.closetime);
+ }
+
+ }
+ else
+ {
+ devicestatus.TextID = MyInternationalizationString.logicclose;
+ }
}
}
break;
case 40:
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/smoke.png";
if (intvalue == "1")
{
devicestatus.TextID = MyInternationalizationString.smokescreen;
@@ -561,6 +667,7 @@
break;
case 42:
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/waterleakage.png";
if (intvalue == "1")
{
devicestatus.TextID = MyInternationalizationString.waterleakage;
@@ -573,6 +680,7 @@
break;
case 43:
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/gas.png";
if (intvalue == "1")
{
devicestatus.TextID = MyInternationalizationString.gas;
@@ -582,6 +690,7 @@
break;
case 277:
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/waterleakage.png";
if (intvalue == "1")
{
devicestatus.TextID = MyInternationalizationString.callthepolice;
@@ -591,6 +700,7 @@
break;
default:
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/infraredsensor.png";
if (intvalue == "1")
{
devicestatus.TextID = MyInternationalizationString.callthepolice;
@@ -603,23 +713,25 @@
break;
case DeviceType.OnOffSwitch:
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/panel.png";
devicestatus.Text = Language.StringByID(MyInternationalizationString.OnOffSwitch) + conditions["Epoint"];
- //if (conditions["Epoint"] == "1")
- //{
- // devicestatus.TextID = MyInternationalizationString.button1;
- //}
- //else if (conditions["Epoint"] == "2")
- //{
- // devicestatus.TextID = MyInternationalizationString.button2;
- //}
- //else if (conditions["Epoint"] == "3")
- //{
- // devicestatus.TextID = MyInternationalizationString.button3;
- //}
- //else if (conditions["Epoint"] == "4")
- //{
- // devicestatus.TextID = MyInternationalizationString.button4;
- //}
+ }
+ break;
+ case DeviceType.DoorLock:
+ {
+ for (int a = 0; a < Common.Logic.CurrentLogic.Accounts.Count; a++)
+ {
+ if (Common.Logic.CurrentLogic.Accounts[a]["Type"] == "1")
+ {
+ if (Common.Logic.CurrentLogic.Accounts[a]["UserId"] == conditions["AttriButeData2"])
+ {
+ devicestatus.Text = conditions["Account"];
+ break;
+
+ }
+ }
+
+ }
}
break;
@@ -637,7 +749,6 @@
///鏄剧ず閫昏緫鍚嶇О
var btnlogic = new Button
{
- X = Application.GetRealWidth(40),
Width = Application.GetRealWidth(700),
TextAlignment = TextAlignment.CenterLeft,
Gravity = Gravity.CenterVertical,
@@ -645,16 +756,16 @@
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
//TextColor = 0xff121212,
};
- conditionsowLayout.AddChidren(btnlogic);
+ conditionsRowLayout.AddChidren(btnlogic);
var logicedit = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- conditionsowLayout.AddRightView(logicedit);
+ conditionsRowLayout.AddRightView(logicedit);
logicedit.MouseUpEventHandler += (sender, e) =>
{
var selectedLogicStatus = new SelectedLogicStatus();
@@ -668,14 +779,13 @@
var logicstatus = new Button
{
Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(160),
+ Height = Application.GetRealHeight(130),
Gravity = Gravity.CenterVertical,
- //TextColor = 0xff121212,
- X = Application.GetRealWidth(1080 - 330),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterRight,
+ X = Application.GetRealWidth(500),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
};
- conditionsowLayout.AddChidren(logicstatus);
+ conditionsRowLayout.AddChidren(logicstatus);
if (conditions["IsValid"] == "1")
{
@@ -691,7 +801,6 @@
{
var btnsecurity = new Button
{
- X = Application.GetRealWidth(40),
Width = Application.GetRealWidth(700),
TextAlignment = TextAlignment.CenterLeft,
Gravity = Gravity.CenterVertical,
@@ -700,16 +809,16 @@
//TextColor = 0xff121212,
TextID = MyInternationalizationString.security,
};
- conditionsowLayout.AddChidren(btnsecurity);
+ //conditionsRowLayout.AddChidren(btnsecurity);
var btnsecurityedit = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- conditionsowLayout.AddRightView(btnsecurityedit);
+ conditionsRowLayout.AddRightView(btnsecurityedit);
btnsecurityedit.MouseUpEventHandler += (sender, e) =>
{
//var securityPage = new SecurityPage();
@@ -726,22 +835,33 @@
///鏄剧ず瀹夐槻鏉′欢鐘舵�佹帶浠�
var securitystatus = new Button
{
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(160),
+ Width = Application.GetRealWidth(500),
+ Height = Application.GetRealHeight(130),
Gravity = Gravity.CenterVertical,
- TextAlignment = TextAlignment.CenterRight,
- X = Application.GetRealWidth(1080 - 330),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
};
- conditionsowLayout.AddChidren(securitystatus);
+ conditionsRowLayout.AddChidren(securitystatus);
if (conditions["EnOrWithdrawMode"] == "1")
{
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/withdrawal.png";
securitystatus.Text = Language.StringByID(MyInternationalizationString.withdrawal);
}
else
{
- securitystatus.Text = Language.StringByID(MyInternationalizationString.defence);
+ if (conditions["ModeId"] == "1")
+ {
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/athome.png";
+ securitystatus.Text = Language.StringByID(MyInternationalizationString.logicathomegarrison);
+
+ }
+ else
+ {
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/leavehome.png";
+ securitystatus.Text = Language.StringByID(MyInternationalizationString.logicremovehomegarrison);
+
+ }
}
}
break;
@@ -749,7 +869,6 @@
{
var btnlocation = new Button
{
- X = Application.GetRealWidth(40),
Width = Application.GetRealWidth(700),
TextAlignment = TextAlignment.CenterLeft,
Gravity = Gravity.CenterVertical,
@@ -758,16 +877,16 @@
//TextColor = 0xff121212,
TextID = MyInternationalizationString.geographicalposition,
};
- conditionsowLayout.AddChidren(btnlocation);
+ conditionsRowLayout.AddChidren(btnlocation);
var btnlocationedit = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- conditionsowLayout.AddRightView(btnlocationedit);
+ conditionsRowLayout.AddRightView(btnlocationedit);
btnlocationedit.MouseUpEventHandler += (sender, e) =>
{
@@ -779,21 +898,26 @@
var locationstatus = new Button
{
Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(160),
+ Height = Application.GetRealHeight(130),
Gravity = Gravity.CenterVertical,
TextAlignment = TextAlignment.CenterRight,
- X = Application.GetRealWidth(1080 - 330),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ X = Application.GetRealWidth(500),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
};
- conditionsowLayout.AddChidren(locationstatus);
-
- if (conditions["AtHome"] == "1")
+ conditionsRowLayout.AddChidren(locationstatus);
+ foreach (var radius in Common.Logic.CurrentLogic.Accounts)
{
- locationstatus.Text = Language.StringByID(MyInternationalizationString.athome);
- }
- else
- {
- locationstatus.Text = Language.StringByID(MyInternationalizationString.leavehome);
+ if (radius["Type"] == "7")
+ {
+ if (conditions["AtHome"] == "1")
+ {
+ locationstatus.Text = Language.StringByID(MyInternationalizationString.athome) + radius["Radius"] + "绫�";
+ }
+ else
+ {
+ locationstatus.Text = Language.StringByID(MyInternationalizationString.leavehome) + radius["Radius"] + "绫�";
+ }
+ }
}
}
break;
@@ -802,10 +926,10 @@
///鍒犻櫎鎺т欢
var del = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicDelBackgroundColor,
+ BackgroundColor = ZigbeeColor.Current.LogicDelBlackColor1,
Text = Language.StringByID(MyInternationalizationString.del),
};
- conditionsowLayout.AddRightView(del);
+ conditionsRowLayout.AddRightView(del);
del.MouseUpEventHandler += (sender, e) =>
{
@@ -834,38 +958,59 @@
#endregion
#region ----鏄剧ず鎵ц鐩爣----
+
+ var targetFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(targetFrameLayout);
+
+
var targetRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(150),
- // BackgroundColor = 0xff323232,
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- middle.AddChidren(targetRowLayout);
+ targetFrameLayout.AddChidren(targetRowLayout);
var btntargettitle = new Button
{
- //Text = "灏辨墽琛�",
+
+ Text = Language.StringByID(MyInternationalizationString.execute),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- TextColor = ZigbeeColor.Current.LogicViewBackgroundColor,
- Y = Application.GetRealHeight(90),
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
Width = Application.GetRealWidth(300),
Height = Application.GetRealHeight(60),
TextSize = 16,
- TextID = MyInternationalizationString.execute,
+ Gravity = Gravity.CenterVertical,
};
targetRowLayout.AddChidren(btntargettitle);
+ var btntargetadd1 = new Button
+ {
+
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(57),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(965+58),
+ };
+ targetFrameLayout.AddChidren(btntargetadd1);
+
var btntargetadd = new Button
{
- Width = Application.GetRealWidth(100),
- Height = Application.GetRealHeight(100),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/add.png",
- X = Application.GetRealWidth(1080 - 140),
+ X = Application.GetRealWidth(965 - 58),
Gravity = Gravity.CenterVertical,
};
targetRowLayout.AddChidren(btntargetadd);
- btntargetadd.MouseUpEventHandler += (sender, e) =>
+ EventHandler<MouseEventArgs> btntargetaddclick = (sender, e) =>
{
Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
var deviceTarget = new DeviceTarget();
@@ -873,55 +1018,13 @@
UserView.HomePage.Instance.PageIndex += 1;
deviceTarget.Show();
};
-
+ btntargetadd1.MouseUpEventHandler += btntargetaddclick;
+ btntargetadd.MouseUpEventHandler += btntargetaddclick;
List<Dictionary<string, object>> ListActions = new List<Dictionary<string, object>>();
ListActions.Clear();
ListActions.AddRange(Common.Logic.CurrentLogic.Actions);
- //ListActions.Add(new Dictionary<string, object>());
- ListActions.Add(new Dictionary<string, object>() { ["LinkType"] = "11" });
- bool tag = false;
- for (int i = 0; i < ListActions.Count; i++)
- {
- var linkType = ListActions[i]["LinkType"].ToString();
- if (linkType == "10")
- {
- if (ListActions[i + 1]["LinkType"].ToString() == "0")
- {
- var delaytime = ListActions[i]["DelayTime"].ToString();
- if (ListActions[i + 1].ContainsKey("Time"))
- {
- ListActions[i + 1].Remove("Time");
- }
- ListActions[i + 1].Add("Time", delaytime);
- }
- tag = true;
- //break;
- }
-
- }
-
- if (!tag)
- {
- for (int i = 0; i < ListActions.Count; i++)
- {
- var linkType = ListActions[i]["LinkType"].ToString();
- if (linkType == "0")
- {
- var second = ListActions[i]["Time"].ToString();
- if (second != "0")
- {
- Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
- actionsInfo.Add("LinkType", 10);
- actionsInfo.Add("DelayTime", second);
- ListActions.Insert(i, actionsInfo);
- }
-
- }
-
- }
- }
-
+ ListActions.Add(new Dictionary<string, object>());
for (int i = 0; i < ListActions.Count; i++)
{
@@ -930,23 +1033,32 @@
var addfl = new FrameLayout
{
- Height = Application.GetRealHeight(160),
+ Height = Application.GetRealHeight(160 + 30 + 50),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
middle.AddChidren(addfl);
var addbtn = new Button
{
- Height = Application.GetRealHeight(120),
- Width = Application.GetRealWidth(1000),
- X = Application.GetRealWidth(40),
- Y = Application.GetRealHeight(40),
- Radius = (uint)Application.GetRealHeight(30),
- //Text = "娣诲姞鍔熻兘",
- BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID = MyInternationalizationString.addfunction,
+ Height = Application.GetRealHeight(130 + 50),
+ Width = Application.GetRealWidth(908),
+ Y = Application.GetRealHeight(30),
+ X = Application.GetRealWidth(86),
+ UnSelectedImagePath = "ZigeeLogic/logicaddcolor.png",
};
addfl.AddChidren(addbtn);
- addbtn.MouseUpEventHandler += (sender, e) =>
+
+
+ var addtextbtn = new Button
+ {
+ Height = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(300),
+ Y = Application.GetRealHeight(45 + 30),
+ TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ TextID = MyInternationalizationString.addfunction,
+ X = Application.GetRealWidth(390),
+ };
+ addfl.AddChidren(addtextbtn);
+ EventHandler<MouseEventArgs> addfunctionclick = (sender, e) =>
{
Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
var deviceTarget = new DeviceTarget();
@@ -954,67 +1066,49 @@
UserView.HomePage.Instance.PageIndex += 1;
deviceTarget.Show();
};
+ addbtn.MouseUpEventHandler += addfunctionclick;
+ addtextbtn.MouseUpEventHandler += addfunctionclick;
}
else
{
+
+ var devicesFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(130),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(devicesFrameLayout);
+
+ ///鏄剧ず鍥炬爣
+ var actionsIcon = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(104),
+ Y = Application.GetRealHeight(25),
+ // UnSelectedImagePath = "ZigeeLogic/time.png",
+
+ };
+ devicesFrameLayout.AddChidren(actionsIcon);
+
+
var actionsrowLayout = new RowLayout
{
- Height = Application.GetRealHeight(160),
+ Width = Application.GetRealWidth(800),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(222),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- middle.AddChidren(actionsrowLayout);
+ devicesFrameLayout.AddChidren(actionsrowLayout);
+
var linkType = int.Parse(ListActions[i]["LinkType"].ToString());
var actions = ListActions[i];
switch (linkType)
{
- case 10:
- {
- var delaytime = actions["DelayTime"].ToString();
-
- var btnDelayTime = new Button
- {
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(382),
- Height = Application.GetRealHeight(80),
- TextAlignment = TextAlignment.CenterLeft,
- Text = delaytime,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- actionsrowLayout.AddChidren(btnDelayTime);
-
- ///缂栬緫璁惧鐘舵�丅utton
- var timeedit = new Button
- {
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
- Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- actionsrowLayout.AddRightView(timeedit);
- timeedit.MouseUpEventHandler += (sender, e) =>
- {
- DeviceTarget.DelayTimeView(actions);
- };
-
- //if (tag)
- //{
- // if (ListActions[i + 1]["LinkType"].ToString() == "0")
- // {
- // if (ListActions[i + 1].ContainsKey("Time"))
- // {
- // ListActions[i + 1].Remove("Time");
- // }
- // ListActions[i + 1].Add("Time", delaytime);
- // ///绉婚櫎鏃ф暟鎹啀娣诲姞鏂版暟鎹�
- // //Common.Logic.CurrentLogic.Actions.RemoveAt(i+1);
- // //Common.Logic.CurrentLogic.Actions.Insert(i + 1, Common.Logic.CurrentLogic.Actions[i + 1]);
- // }
- //}
- }
- break;
case 0:
{
-
var obj1 = actions["DeviceAddr"].ToString();
var obj2 = actions["Epoint"].ToString();
var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return ((obj.DeviceAddr == obj1) && (obj.DeviceEpoint.ToString() == obj2)); });
@@ -1023,21 +1117,12 @@
continue;
}
- if (i != 0 && ListActions[i - 1]["LinkType"].ToString() != "10")
- {
- if (ListActions[i].ContainsKey("Time"))
- {
- ListActions[i].Remove("Time");
- }
- ListActions[i].Add("Time", 0);
- }
-
///璁惧鍚嶇ОButton
var btndevicename = new Button
{
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(382),
- Height = Application.GetRealHeight(80),
+ Y = Application.GetRealHeight(20),
+ Height = Application.GetRealHeight(50),
+ Width = Application.GetRealWidth(450),
TextAlignment = TextAlignment.CenterLeft,
Text = deviceinof.DeviceEpointName,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
@@ -1047,13 +1132,12 @@
///鍖哄煙(鎴块棿)鍚嶇ОButton
var btnregionname = new Button
{
- X = Application.GetRealWidth(40),
- Y = Application.GetRealHeight(80),
- Width = Application.GetRealWidth(382),
+ Y = btndevicename.Bottom + Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(450),
TextAlignment = TextAlignment.CenterLeft,
- Height = Application.GetRealHeight(80),
+ Height = Application.GetRealHeight(50),
Text = "",//Language.StringByID(MyInternationalizationString.customroom),
- TextColor = ZigbeeColor.Current.LogicViewBackgroundColor,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
};
actionsrowLayout.AddChidren(btnregionname);
///閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
@@ -1061,21 +1145,21 @@
///鏄剧ず璁惧鏉′欢鐘舵�佹帶浠�
var devicestatus = new Button
{
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(160),
+ Width = Application.GetRealWidth(350),
+ Height = Application.GetRealHeight(130),
Gravity = Gravity.CenterVertical,
TextAlignment = TextAlignment.CenterRight,
- X = Application.GetRealWidth(1080 - 340),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ X = Application.GetRealWidth(450),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
};
actionsrowLayout.AddChidren(devicestatus);
///缂栬緫璁惧鐘舵�丅utton
var deviceedit = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
actionsrowLayout.AddRightView(deviceedit);
@@ -1099,6 +1183,8 @@
{
case DeviceType.OnOffOutput:
{
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/light.png";
+
var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
if (TaskList == null)
{
@@ -1108,13 +1194,20 @@
{
if (status["TaskType"].ToString() == "1")
{
- if (status["Data1"].ToString() == "1")
+ if (status["Data1"].ToString() == "0")
{
- devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.open);
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
+
}
- else
+ else if (status["Data1"].ToString() == "1")
{
- devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.close);
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.open);
+
+ }
+ else if (status["Data1"].ToString() == "2")
+ {
+
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.onoff);
}
}
@@ -1124,6 +1217,7 @@
break;
case DeviceType.DimmableLight:
{
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/dimmableLight.png";
var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
if (TaskList == null)
{
@@ -1139,13 +1233,14 @@
}
else if (status["TaskType"].ToString() == "1")
{
- if (status["Data1"].ToString() == "1")
+
+ if (status["Data1"].ToString() == "0")
{
- devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.open);
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
}
- else
+ else if (status["Data1"].ToString() == "2")
{
- devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.close);
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.onoff);
}
}
@@ -1156,6 +1251,7 @@
break;
case DeviceType.WindowCoveringDevice:
{
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/curtain.png";
var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
if (TaskList == null)
{
@@ -1167,17 +1263,161 @@
{
if (status["Data1"] == "0")
{
- devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.open);
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.open);
}
else if (status["Data1"] == "1")
{
- devicestatus.Text = devicestatus.Text + Language.StringByID(MyInternationalizationString.close);
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
}
else if (status["Data1"] == "5")
{
- devicestatus.Text = devicestatus.Text + status["Data2"] + "%";
+ devicestatus.Text = status["Data2"] + "%";
}
}
+
+ }
+ }
+ break;
+ case DeviceType.AirSwitch:
+ {
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/airswitch.png";
+
+ var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+ if (TaskList == null)
+ {
+ continue;
+ }
+ foreach (var status in TaskList)
+ {
+ if (status["TaskType"].ToString() == "1")
+ {
+ if (status["Data1"].ToString() == "0")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
+
+ }
+ else if (status["Data1"].ToString() == "1")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.open);
+
+ }
+ else if (status["Data1"].ToString() == "2")
+ {
+
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.onoff);
+ }
+ }
+
+ }
+
+ }
+ break;
+ case DeviceType.Thermostat:
+ {
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/ac.png";
+
+ var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+ if (TaskList == null)
+ {
+ continue;
+ }
+ string modetext = "", temperaturetext="", speedtext = "";
+ bool ifclose = false;
+ foreach (var status in TaskList)
+ {
+ if (status["TaskType"].ToString() == "1")
+ {
+ if (status["Data1"].ToString() == "0")
+ {
+ // devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
+
+ ifclose = false;
+ }
+ else if (status["Data1"].ToString() == "1")
+ {
+ //devicestatus.Text = Language.StringByID(MyInternationalizationString.open);
+ ifclose = true;
+ }
+
+ }
+ else if (status["TaskType"].ToString() == "5")
+ {
+ if (status["Data1"] == "3")
+ {//3---璁剧疆宸ヤ綔妯″紡(1:鑷姩;3:鍒跺喎;4:鍒剁儹;7:閫侀;8:闄ゆ箍)
+ switch (status["Data2"])
+ {
+ case "3":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logiccool);
+ }
+ break;
+ case "4":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicheat);
+ }
+ break;
+ case "1":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicauto);
+ }
+ break;
+ case "8":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicdry);
+ }
+ break;
+ case "7":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicfanonly);
+ }
+ break;
+ }
+ }
+ else if (status["Data1"] == "6")
+ {//6---璁剧疆椋庢墖妯″紡(1:浣庨;2:涓;3:楂橀;)
+ switch (status["Data2"])
+ {
+ case "1":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logiclow);
+ }
+ break;
+
+ case "2":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logicmedium);
+ }
+ break;
+ case "3":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logichigh);
+ }
+ break;
+
+ }
+ }
+ //4---璁剧疆鍔犵儹搴︽暟;5---璁剧疆鍒跺喎銆侀櫎婀垮害鏁�;7---璁剧疆鑷姩搴︽暟
+ else if (status["Data1"] == "4" || status["Data1"] == "5" || status["Data1"] == "7")
+ {
+ var s = int.Parse(status["Data2"]) /100;
+ temperaturetext = s.ToString();
+ }
+ else if (status["Data1"] == "20")
+ {
+ temperaturetext = "鏃�";
+ }
+
+
+ }
+
+ }
+ if (ifclose)
+ {
+ devicestatus.Text = modetext + ";" + temperaturetext + "鈩�;" + speedtext;
+ }
+ else
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
}
}
@@ -1196,18 +1436,37 @@
{
continue;
}
- ///鏄剧ず閫昏緫鍚嶇О
- var btnlogic = new Button
+
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/scene.png";
+ ///璁惧鍚嶇ОButton
+ var btndevicename = new Button
{
- X = Application.GetRealWidth(40),
+ Y = Application.GetRealHeight(20),
+ Height = Application.GetRealHeight(50),
Width = Application.GetRealWidth(500),
TextAlignment = TextAlignment.CenterLeft,
- Gravity = Gravity.CenterVertical,
Text = sceneinof.Name,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //TextColor = 0xff121212,
};
- actionsrowLayout.AddChidren(btnlogic);
+ actionsrowLayout.AddChidren(btndevicename);
+
+ ///鍖哄煙(鎴块棿)鍚嶇ОButton
+ var btnregionname = new Button
+ {
+ Y = btndevicename.Bottom + Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(500),
+ TextAlignment = TextAlignment.CenterLeft,
+ Height = Application.GetRealHeight(50),
+ Text = "",//Language.StringByID(MyInternationalizationString.customroom),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ };
+ actionsrowLayout.AddChidren(btnregionname);
+ /////閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
+ Common.Room room = new Common.Room();
+ btnregionname.Text = room.GetRoomNameBySceneId(sceneinof.Id);
+ //Send.RoomNmae(btnregionname, deviceinof);
+
+
}
break;
@@ -1221,7 +1480,6 @@
///鏄剧ず閫昏緫鍚嶇О
var btnlogic = new Button
{
- X = Application.GetRealWidth(40),
Width = Application.GetRealWidth(500),
TextAlignment = TextAlignment.CenterLeft,
Gravity = Gravity.CenterVertical,
@@ -1234,9 +1492,9 @@
var logicedit = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
actionsrowLayout.AddRightView(logicedit);
logicedit.MouseUpEventHandler += (sender, e) =>
@@ -1275,7 +1533,6 @@
{
var btnsecurity = new Button
{
- X = Application.GetRealWidth(40),
Width = Application.GetRealWidth(700),
TextAlignment = TextAlignment.CenterLeft,
Gravity = Gravity.CenterVertical,
@@ -1283,14 +1540,14 @@
//TextColor = 0xff121212,
TextID = MyInternationalizationString.security,
};
- actionsrowLayout.AddChidren(btnsecurity);
+ //actionsrowLayout.AddChidren(btnsecurity);
var btnsecurityedit = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor,
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
Text = Language.StringByID(MyInternationalizationString.edit),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
actionsrowLayout.AddRightView(btnsecurityedit);
btnsecurityedit.MouseUpEventHandler += (sender, e) =>
@@ -1305,13 +1562,11 @@
///鏄剧ず瀹夐槻鏉′欢鐘舵�佹帶浠�
var securitystatus = new Button
{
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(160),
+ Width = Application.GetRealWidth(500),
+ Height = Application.GetRealHeight(130),
Gravity = Gravity.CenterVertical,
- //TextColor = 0xff121212,
- X = Application.GetRealWidth(1080 - 330),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextAlignment = TextAlignment.CenterRight,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
};
actionsrowLayout.AddChidren(securitystatus);
@@ -1320,11 +1575,12 @@
{
if (actions["Password"].ToString() == "888888")
{
-
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/withdrawal.png";
securitystatus.Text = Language.StringByID(MyInternationalizationString.urgentwithdrawal);
}
else
{
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/withdrawal.png";
securitystatus.Text = Language.StringByID(MyInternationalizationString.withdrawal);
}
@@ -1333,22 +1589,77 @@
{
if (actions["SecurityModeId"].ToString() == "1")
{
-
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/athome.png";
securitystatus.Text = Language.StringByID(MyInternationalizationString.logicathomegarrison);
}
else if (actions["SecurityModeId"].ToString() == "2")
{
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/leavehome.png";
securitystatus.Text = Language.StringByID(MyInternationalizationString.logicremovehomegarrison);
}
}
}
break;
+ case 7:
+ {
+ var delaytimevalue = int.Parse(actions["DelayTime"].ToString());
+ var Minutes = delaytimevalue / 60;
+ var seconds = delaytimevalue % 60;
+
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/delay.png";
+ ///寤舵椂Button
+ var delaytimeBtn = new Button
+ {
+ Width = Application.GetRealWidth(500),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ };
+ actionsrowLayout.AddChidren(delaytimeBtn);
+ if (Minutes != 0)
+ {
+ if (seconds == 0)
+ {
+ delaytimeBtn.Text = Minutes.ToString() + Language.StringByID(MyInternationalizationString.minute);
+ }
+ else
+ {
+ delaytimeBtn.Text = Minutes.ToString() + Language.StringByID(MyInternationalizationString.minute) + seconds.ToString() + Language.StringByID(MyInternationalizationString.second);
+
+ }
+ }
+ else
+ {
+ delaytimeBtn.Text = seconds.ToString() + Language.StringByID(MyInternationalizationString.second);
+ }
+
+
+ ///寤舵椂缂栬緫Button
+ var delaytimeedit = new Button
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
+ Text = Language.StringByID(MyInternationalizationString.edit),
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ Tag = i,
+ };
+ actionsrowLayout.AddRightView(delaytimeedit);
+
+ ///缂栬緫鐐瑰嚮浜嬩欢
+ delaytimeedit.MouseUpEventHandler += (sender, e) =>
+ {
+ var delayTime = new DelayTime();
+ UserView.HomePage.Instance.AddChidren(delayTime);
+ UserView.HomePage.Instance.PageIndex += 1;
+ delayTime.Show(int.Parse(delaytimeedit.Tag.ToString()), true);
+ };
+
+ };
+ break;
}
///鍒犻櫎鎺т欢
var del = new Button
{
- BackgroundColor = ZigbeeColor.Current.LogicDelBackgroundColor,
+ BackgroundColor = ZigbeeColor.Current.LogicDelBlackColor1,
Text = Language.StringByID(MyInternationalizationString.del),
};
actionsrowLayout.AddRightView(del);
@@ -1377,98 +1688,173 @@
#endregion
- #region ----鎺ㄩ�佽缃�----
- /*
- var pushRowLayout = new RowLayout
+ #region -----姣忓ぉ 璁剧疆鍛ㄦ湡-----
+
+ var fraline1 = new FrameLayout
{
- Height = Application.GetRealHeight(150),
+ Height = Application.GetRealHeight(30),
};
- middle.AddChidren(pushRowLayout);
-
- var btnpushtitle = new Button
- {
- //Text = "鎺ㄩ�佽缃�",
- //TextSize = 16,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- //Gravity = Gravity.CenterVertical,
- TextID = MyInternationalizationString.pushset,
- TextColor = ZigbeeColor.Current.LogicViewBackgroundColor,
- Y = Application.GetRealHeight(90),
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(60),
- TextSize = 16,
- //TextID = MyInternationalizationString.execute,
- };
- pushRowLayout.AddChidren(btnpushtitle);
-
- var pushswitchRowlayout = new RowLayout
+ middle.AddChidren(fraline1);
+
+
+ var weekFrameLayout = new FrameLayout
{
Height = Application.GetRealHeight(160),
- LineColor = ZigbeeColor.Current.LogicLineColor,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- middle.AddChidren(pushswitchRowlayout);
-
+ middle.AddChidren(weekFrameLayout);
+ var weekRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ weekFrameLayout.AddChidren(weekRowLayout);
+
+ var settxet = new Button
+ {
+ Text = Language.StringByID(MyInternationalizationString.setupcycle),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ Gravity = Gravity.CenterVertical,
+ };
+ weekRowLayout.AddChidren(settxet);
+ var btnweektext = new Button
+ {
+ Width = Application.GetRealWidth(595),
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.CenterRight,
+ //Text = "姣忓ぉ",
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ TextID = MyInternationalizationString.everyday,
+ Y = Application.GetRealHeight(35),
+ X = settxet.Right,
+ };
+ weekRowLayout.AddChidren(btnweektext);
+
+ var nextBtn = new Button
+ {
+
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = Application.GetRealWidth(965 - 58),
+ Gravity = Gravity.CenterVertical,
+
+ };
+ weekRowLayout.AddChidren(nextBtn);
+
+ UpdateWeek(btnweektext);
+ EventHandler<MouseEventArgs> cycleclick = (sender, e) =>
+ {
+ /*------淇濈暀姣忔湀,姣忓勾绫诲瀷*/
+ var cycle = new Cycle(() => { UpdateWeek(btnweektext); });
+ UserView.HomePage.Instance.AddChidren(cycle);
+ UserView.HomePage.Instance.PageIndex += 1;
+ cycle.Show();
+
+ //var cyclicCycle = new CyclicCycle(() => { UpdateWeek(btnweektext); });
+ //UserView.HomePage.Instance.AddChidren(cyclicCycle);
+ //UserView.HomePage.Instance.PageIndex += 1;
+ //cyclicCycle.Show();
+ };
+ btnweektext.MouseUpEventHandler += cycleclick;
+ nextBtn.MouseUpEventHandler += cycleclick;
+ #endregion
+
+ #region ----鎺ㄩ�佽缃�----
+
+ var pushFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(pushFrameLayout);
+
+ var pushswitchRowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ pushFrameLayout.AddChidren(pushswitchRowlayout);
+
var btnswitchtxet = new Button
{
- //Text = "鎺ㄩ�佸紑鍏�",
- X = Application.GetRealWidth(40),
TextAlignment = TextAlignment.CenterLeft,
- Gravity = Gravity.CenterVertical,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ Gravity = Gravity.CenterVertical,
TextID = MyInternationalizationString.pushswitch,
};
pushswitchRowlayout.AddChidren(btnswitchtxet);
-
+
var btnswitch = new Button
{
- Width = Application.GetMinRealAverage(183),
- Height = Application.GetMinRealAverage(123),
- UnSelectedImagePath = "ZigeeLogic/Switch.png",
- SelectedImagePath = "ZigeeLogic/SwitchSelected.png",
- X = Application.GetRealWidth(1080 - 200),
+ Width = Application.GetMinRealAverage(104),
+ Height = Application.GetMinRealAverage(63),
+ UnSelectedImagePath = "ZigeeLogic/logicclose.png",
+ SelectedImagePath = "ZigeeLogic/logicopen.png",
+ X = Application.GetRealWidth(965 - 104),
Gravity = Gravity.CenterVertical,
};
pushswitchRowlayout.AddChidren(btnswitch);
-
btnswitch.MouseUpEventHandler += (sender1, e1) =>
{
btnswitch.IsSelected = !btnswitch.IsSelected;
if (btnswitch.IsSelected)
{
-
+
}
else
{
-
+
}
};
-
- var custompushRowLayout = new RowLayout
+
+
+ var custompushFrameLayout = new FrameLayout
{
Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- middle.AddChidren(custompushRowLayout);
-
+ middle.AddChidren(custompushFrameLayout);
+
+ var custompushRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ custompushFrameLayout.AddChidren(custompushRowLayout);
+
var btncustompush = new Button
{
TextID = MyInternationalizationString.custompush,
- //Text = "鑷畾涔夋帹閫�",
TextAlignment = TextAlignment.CenterLeft,
- Width = Application.GetRealWidth(300),
- X = Application.GetRealWidth(40),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ Gravity = Gravity.CenterVertical,
};
custompushRowLayout.AddChidren(btncustompush);
-
-
+
+
var custompushback = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080 - 140),
+ X = Application.GetRealWidth(965 - 58),
Gravity = Gravity.CenterVertical,
};
custompushRowLayout.AddChidren(custompushback);
@@ -1478,34 +1864,41 @@
UserView.HomePage.Instance.AddChidren(CustomText);
UserView.HomePage.Instance.PageIndex += 1;
CustomText.Show();
-
+
};
btncustompush.MouseUpEventHandler += customclick;
custompushback.MouseUpEventHandler += customclick;
custompushRowLayout.MouseUpEventHandler += customclick;
- */
+
#endregion
+ var saveFrameLayout = new FrameLayout
+ {
+ Y = middle.Bottom,
+ Height = Application.GetRealHeight(180),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(saveFrameLayout);
+
var btnsave = new Button
{
- Height = Application.GetRealHeight(150),//194
- Y = middle.Bottom + Application.GetRealHeight(15),
- //Text = "淇濆瓨",
- Width = Application.GetRealWidth(500),
- Radius = (uint)Application.GetRealHeight(50),
- BackgroundColor = ZigbeeColor.Current.LogicButtonBlueColor,
- X = Application.GetRealWidth(290),
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),//194
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- if (Common.Logic.CurrentLogic.Conditions.Count != 0 && Common.Logic.CurrentLogic.Actions.Count != 0)
- {
- AddChidren(btnsave);
- }
+ saveFrameLayout.AddChidren(btnsave);
btnsave.MouseUpEventHandler += async (sender, e) =>
{
var name = logicTextBox.Text.Trim();
-
+ //if (Common.Logic.CurrentLogic.Conditions.Count != 0 && Common.Logic.CurrentLogic.Actions.Count != 0)
+ //{
+ // AddChidren(btnsave);
+ //}
if (string.IsNullOrEmpty(logicTextBox.Text.Trim()))
{
new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), Language.StringByID(MyInternationalizationString.Close)).Show();
@@ -1572,41 +1965,23 @@
case 3:
{
- string len = "";
- int maxvalue = 0, minvalue = 0;
+ string len = "", value = "";
var stringvalue = Convert.ToString(Common.Logic.CurrentLogic.TimeAttribute.MonthDate, 2);
var str = stringvalue.Insert(0, new string('0', 32 - stringvalue.Length));
for (int j = 31; j >= 0; j--)
{
len += str.Substring(j, 1);
}
- //鎵惧嚭鏈�灏忓��
for (int j = 0; j < len.Length; j++)
{
var strvalue = len.Substring(j, 1);
if (strvalue == "1")
{
- minvalue = j + 1;
- break;
+ value += (j + 1).ToString() + ",";
}
}
- //鎵惧嚭鏈�澶у��
- for (int j = 0; j < len.Length; j++)
- {
- var strvalue = len.Substring(j, 1);
- if (strvalue == "1")
- {
- maxvalue = j + 1;
- }
- }
- if (minvalue == maxvalue)
- {
- btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.monthly) + minvalue.ToString() + Language.StringByID(MyInternationalizationString.day);
- }
- else
- {
- btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.monthly) + minvalue.ToString() + Language.StringByID(MyInternationalizationString.day) + "-" + Language.StringByID(MyInternationalizationString.monthly) + maxvalue.ToString() + Language.StringByID(MyInternationalizationString.day);
- }
+ btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.monthly) + value.TrimEnd(',') + Language.StringByID(MyInternationalizationString.day);
+
}; break;
case 4:
{
@@ -1827,129 +2202,240 @@
}
- void ConditionView()
+ void ConditionView(bool edit)
{
Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
- if (Common.Logic.CurrentLogic.Conditions.Count == 1)
+
+ #region 缁勫悎鏉′欢View
+ FrameLayout flMain = new FrameLayout { BackgroundColor = 0x50000000 };
+ this.AddChidren(flMain);
+ flMain.MouseUpEventHandler += (sender2, e2) =>
{
- #region 缁勫悎鏉′欢View
- FrameLayout flMain = new FrameLayout { BackgroundColor = 0x00000000 };
- this.AddChidren(flMain);
- flMain.MouseUpEventHandler += (sender2, e2) =>
- {
- flMain.RemoveFromParent();
- };
+ flMain.RemoveFromParent();
+ };
- var frameLayout = new FrameLayout
- {
- Y = Application.GetRealHeight(1920 - 680 - 50),
- Height = Application.GetRealHeight(680),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Width = Application.GetRealWidth(1000),
- X = Application.GetRealWidth(40),
- Radius = (uint)Application.GetRealHeight(40),
- };
- flMain.AddChidren(frameLayout);
+ var timetypeframelayout1 = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ flMain.AddChidren(timetypeframelayout1);
+ var framelayout = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(530),
+ Y = Application.GetRealHeight(1920 - 530),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(60),
+ };
+ flMain.AddChidren(framelayout);
- var titlerow = new FrameLayout
- {
- Height = Application.GetRealHeight(150),
- };
- frameLayout.AddChidren(titlerow);
+ #region -------鍙栨秷 瀹屾垚
+ var timetype = new RowLayout
+ {
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ framelayout.AddChidren(timetype);
+ var Btncancel = new Button
+ {
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(80),
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ timetype.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
- var titlebtn = new Button
- {
- //Text = "璇烽�夋嫨澶氭潯浠剁粍鍚�",
- TextID = MyInternationalizationString.multicondition,
- TextSize = 16,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- titlerow.AddChidren(titlebtn);
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.condition,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ };
+ timetype.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
- var androw = new RowLayout
- {
- Height = Application.GetRealHeight(160),
- Y = titlerow.Bottom,
- };
- frameLayout.AddChidren(androw);
- var andbtn = new Button
- {
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.Allconditions,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //Text = "婊¤冻鍏ㄩ儴鏉′欢鏃�",
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealHeight(50),
- };
- androw.AddChidren(andbtn);
+ };
+ timetype.AddChidren(Btncomplete);
+ #endregion
- var orrow = new RowLayout
- {
- Height = Application.GetRealHeight(160),
- Y = androw.Bottom,
- };
- frameLayout.AddChidren(orrow);
- var orbtn = new Button
- {
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.anycondition,
- //Text = "婊¤冻浠讳竴鏉′欢鏃�",
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealHeight(50)
- };
- orrow.AddChidren(orbtn);
+ #region -------婊¤冻鎵�鏈夋潯浠� 婊¤冻鍏朵腑涓�涓潯浠�
- var cancelbtn = new Button
- {
- TextID = MyInternationalizationString.cancel,
- TextSize = 16,
- Y = orrow.Bottom + Application.GetRealHeight(30),
- Height = Application.GetRealHeight(160),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- };
- frameLayout.AddChidren(cancelbtn);
- cancelbtn.MouseUpEventHandler += (sender4, e4) =>
- {
- flMain.RemoveFromParent();
- };
- #endregion
- //婊¤冻鍏ㄩ儴鏉′欢鏃剁偣鍑讳簨浠� simulation;
- EventHandler<MouseEventArgs> andclick = (sender6, e6) =>
+ #region -------婊¤冻鎵�鏈夋潯浠�
+
+
+ var andFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ framelayout.AddChidren(andFrameLayout);
+
+
+ var androw = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ andFrameLayout.AddChidren(androw);
+ var andbtn = new Button
+ {
+
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.Allconditions,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+
+ };
+ androw.AddChidren(andbtn);
+
+ var andSelected = new SelectedButton();
+ androw.AddChidren(andSelected);
+ #endregion
+ #region -------婊¤冻鍏朵腑涓�涓潯浠�
+
+ var orFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = andFrameLayout.Bottom,
+
+ };
+ framelayout.AddChidren(orFrameLayout);
+
+
+
+ var orrow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ orFrameLayout.AddChidren(orrow);
+ var orbtn = new Button
+ {
+
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.anycondition,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ orrow.AddChidren(orbtn);
+
+ var orSelected = new SelectedButton();
+ orrow.AddChidren(orSelected);
+ #endregion
+ ///婊¤冻鎵�鏈夋潯浠剁偣鍑讳簨浠�
+ EventHandler<MouseEventArgs> andclick = (sedner14, e14) =>
+ {
+ andSelected.Visible = true;
+ orSelected.Visible = false;
+ andbtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ orbtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ };
+ androw.MouseUpEventHandler += andclick;
+ andbtn.MouseUpEventHandler += andclick;
+ andSelected.MouseUpEventHandler += andclick;
+ andFrameLayout.MouseUpEventHandler += andclick;
+
+
+ ///婊¤冻鍏朵腑涓�涓潯浠剁偣鍑讳簨浠�
+ EventHandler<MouseEventArgs> orclick = (sedner15, e15) =>
+ {
+ andSelected.Visible = false;
+ orSelected.Visible = true;
+ andbtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ orbtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ };
+ orrow.MouseUpEventHandler += orclick;
+ orbtn.MouseUpEventHandler += orclick;
+ orSelected.MouseUpEventHandler += orclick;
+ orFrameLayout.MouseUpEventHandler += orclick;
+
+ #endregion
+ #endregion
+
+ if (edit)
+ {
+ if (Common.Logic.CurrentLogic.Relationship == 0)
{
- flMain.RemoveFromParent();
+ andSelected.Visible = true;
+ orSelected.Visible = false;
+ andbtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ orbtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ }
+ else
+ {
+ andSelected.Visible = false;
+ orSelected.Visible = true;
+ andbtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ orbtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ }
+ }
+ Btncomplete.MouseUpEventHandler += (sender, e) =>
+ {
+ if (!andSelected.Visible && !orSelected.Visible)
+ {
+ ///鍙互鎻愮ず鏈�変腑鐘舵�侊紱
+ return;
+ }
+ flMain.RemoveFromParent();
+
+ if (andSelected.Visible)
+ {
Common.Logic.CurrentLogic.Relationship = 0;
- var addLogicPage = new AddLogicPage();
- UserView.HomePage.Instance.AddChidren(addLogicPage);
- UserView.HomePage.Instance.PageIndex += 1;
- addLogicPage.Show();
- };
- androw.MouseUpEventHandler += andclick;
- andbtn.MouseUpEventHandler += andclick;
- //婊¤冻浠讳竴鏉′欢鏃剁偣鍑讳簨浠�
- EventHandler<MouseEventArgs> orclick = (sender6, e6) =>
+ }
+ if (orSelected.Visible)
{
- flMain.RemoveFromParent();
Common.Logic.CurrentLogic.Relationship = 1;
+
+ }
+ if (edit)
+ {
+ if (Common.Logic.CurrentLogic.LogicId != 0)
+ {
+ Send.LogicControlSwitch(Common.Logic.CurrentLogic);
+ }
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+ }
+ else
+ {
var addLogicPage = new AddLogicPage();
UserView.HomePage.Instance.AddChidren(addLogicPage);
UserView.HomePage.Instance.PageIndex += 1;
addLogicPage.Show();
- };
- orrow.MouseUpEventHandler += orclick;
- orbtn.MouseUpEventHandler += orclick;
- }
- else
- {
- var addLogicPage = new AddLogicPage();
- UserView.HomePage.Instance.AddChidren(addLogicPage);
- UserView.HomePage.Instance.PageIndex += 1;
- addLogicPage.Show();
- }
- }
+ }
+ };
+ }
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
index 296d3fb..2baeb78 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicDevicePage.cs
@@ -16,83 +16,139 @@
{
Tag = "Logic";
}
- Button SelectedButton = new Button();
- HorizontalScrolViewLayout horizontalScrol;
+ Button roombjButton = new Button();
+ Button roomTextButton = new Button();
+ Button devicetypeButton = new Button();
VerticalScrolViewLayout middle;
+ FrameLayout clickframeLayout = new FrameLayout();
+ Button clickbutton = new Button();
+ Button clicktextcolcrbutton = new Button();
public void Show()
{
- UserView.HomePage.Instance.ScrollEnabled = false;
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- var topFrameLayout = new RowLayout
+ UserView.HomePage.Instance.ScrollEnabled = false;
+ this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(220),
- Y = Application.GetRealHeight(80),
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- TextID = MyInternationalizationString.devicestate,
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
+ X = Application.GetRealWidth(160),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.devicestate,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
var back = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
};
- topFrameLayout.AddChidren(back);
+ topRowLayout.AddChidren(back);
back.MouseDownEventHandler += (sender, e) =>
{
RemoveFromParent();
UserView.HomePage.Instance.ScrollEnabled = true;
};
- var roomname = new Button
+ var foolrname = new Button
{
- Width = Application.GetMinRealAverage(300 + 300-30),
- Height = Application.GetMinRealAverage(80),
- X = Application.GetRealWidth(1080 - 300 - 30 - 300),
- Y = Application.GetRealHeight(120),
- TextAlignment = TextAlignment.CenterRight,
- //Text = "鑷畾涔夋埧闂�",
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID=MyInternationalizationString.customroom,
+ TextAlignment = TextAlignment.CenterRight,
+ X = Application.GetRealWidth(1080 - 400 - 120),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ //TextID = MyInternationalizationString.customroom,
+ Text = Config.Instance.Home.GetCurrentFloorName,
};
- topFrameLayout.AddChidren(roomname);
-
- var horizontalScrolfl = new FrameLayout
+ topRowLayout.AddChidren(foolrname);
+ var dropdown = new Button
{
- Height = Application.GetRealHeight(220 + 30),
- Y = topFrameLayout.Bottom,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterRight,
+ X = foolrname.Right,
+ Width = Application.GetRealWidth(72),
+ Height = Application.GetRealHeight(72),
+ Y = Application.GetRealHeight(92),
+ UnSelectedImagePath = "ZigeeLogic/drop-down.png",
+ };
+ topRowLayout.AddChidren(dropdown);
+ #endregion
+
+
+ ///娌℃湁鎴块棿鐩存帴杩斿洖鍘伙紱
+ if (Common.Room.Lists.Count == 0)
+ {
+ return;
+ }
+ ///鎴块棿婊戝姩鎺т欢
+ var roomhorizontalScrol = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(200),
+ Y = topRowLayout.Bottom,
+ X = Application.GetRealWidth(58),
+ };
+ this.AddChidren(roomhorizontalScrol);
+
+
+ var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58-200),
+ Height = Application.GetRealHeight(280),
+ Y = roomhorizontalScrol.Bottom,
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ X = Application.GetRealWidth(58+200),
};
- AddChidren(horizontalScrolfl);
-
-
- horizontalScrol = new HorizontalScrolViewLayout()
+ this.AddChidren(devicetypehorizontalScrol1);
+ ///璁惧绫诲瀷婊戝姩鎺т欢
+ var devicetypehorizontalScrol = new HorizontalScrolViewLayout()
{
- Width = Application.GetRealWidth(1080 - 40),
- Height = Application.GetRealHeight(180 + 30),
- Y = Application.GetRealHeight(40),
- X = Application.GetRealWidth(40),
- Radius = (uint)Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(280),
+ Y = roomhorizontalScrol.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ X = Application.GetRealWidth(58),
+ Radius = (uint)Application.GetRealHeight(50),
+
};
- horizontalScrolfl.AddChidren(horizontalScrol);
+ this.AddChidren(devicetypehorizontalScrol);
middle = new VerticalScrolViewLayout();
- middle.Y = horizontalScrolfl.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 300 - 250);
+ middle.Y = devicetypehorizontalScrol.Bottom + Application.GetRealHeight(40);
+ middle.Height = Application.GetRealHeight(1920) - devicetypehorizontalScrol.Y;
middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+ middle.X = Application.GetRealWidth(58);
+ middle.Radius = (uint)Application.GetRealHeight(50);
this.AddChidren(middle);
///鐩墠鏀寔鐨勮澶�
@@ -100,10 +156,14 @@
DeviceType.OnOffOutput,
DeviceType.DimmableLight,
DeviceType.WindowCoveringDevice,
+ DeviceType.Thermostat,
+ DeviceType.AirSwitch,
};
- ///鎴块棿鐐瑰嚮浜嬩欢
- roomname.MouseUpEventHandler += (sender, e) =>
+
+
+ ///妤煎眰鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> foorlclick = (sender, e) =>
{
var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
@@ -112,101 +172,191 @@
{
flMain.RemoveFromParent();
};
- var roombj = new VerticalScrolViewLayout
+ var foolrbj = new VerticalScrolViewLayout
{
Width = Application.GetRealWidth(400),
Height = Application.GetRealHeight(600),
X = Application.GetRealWidth(1080 - 400 - 60),
- Y = Application.GetRealHeight(220 + 30 + 80),
+ Y = Application.GetRealHeight(184 + 50),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
Radius = (uint)Application.GetRealHeight(30),
};
- flMain.AddChidren(roombj);
- List<Common.Room> roomlist = new List<Common.Room>();
- roomlist.Clear();
- Common.Room customroom = new Common.Room();
- customroom.Name = Language.StringByID(MyInternationalizationString.customroom);
- foreach (var device in Common.Logic.LogicDviceList)
+ flMain.AddChidren(foolrbj);
+ foreach (var foolr in Config.Instance.Home.FloorDics)
{
-
- var deviceui = customroom.GetDeviceUI(device);
- if (deviceui != null)
- {
- customroom.DeviceUIList.Add(deviceui);
- }
- }
- roomlist.Add(customroom);
- roomlist.AddRange(Common.Room.Lists);
- foreach (var room in roomlist)
- {
- var rowLayout = new RowLayout
+ var foolrRowLayout = new FrameLayout
{
Height = Application.GetRealHeight(150),
};
- roombj.AddChidren(rowLayout);
+ foolrbj.AddChidren(foolrRowLayout);
- var btnroomname = new Button
+ var btnfoolrname = new Button
{
- Width = Application.GetRealWidth(300),
- Text = room.Name,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(30),
+ Width = Application.GetRealWidth(250),
+ Height = Application.GetRealHeight(160),
+ Text = foolr.Value,
+ TextAlignment = TextAlignment.Center,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ //SelectedTextColor=0xfffc744b,
+ Tag = foolr.Key,
};
- rowLayout.AddChidren(btnroomname);
+ foolrRowLayout.AddChidren(btnfoolrname);
- EventHandler<MouseEventArgs> roomclick = (sender1, e1) =>
+
+ EventHandler<MouseEventArgs> foolrnameclick = (sender13, e13) =>
{
-
+ roomhorizontalScrol.RemoveAll();
+ devicetypehorizontalScrol.RemoveAll();
+ middle.RemoveAll();
+ foolrname.Text = btnfoolrname.Text;
flMain.RemoveFromParent();
- roomname.Text = room.Name;
- var list = new List<DeviceUI>();
- foreach (var device in room.DeviceUIList) {
- if (!deviceTypeList.Contains(device.CommonDevice.Type))
- {
- continue;
- }
- list.Add(device);
- }
- AllDeviceTypeView(list);
-
+ var list = Send.GetRoomList(btnfoolrname.Tag.ToString());
+ AllRoomView(list, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
};
- rowLayout.MouseUpEventHandler += roomclick;
- btnroomname.MouseUpEventHandler += roomclick;
+ foolrRowLayout.MouseUpEventHandler += foolrnameclick;
+ btnfoolrname.MouseUpEventHandler += foolrnameclick;
+
}
+
};
-
- Common.Room customroom1 = new Common.Room();
- foreach (var device in Common.Logic.LogicDviceList)
+ foolrname.MouseUpEventHandler += foorlclick;
+ dropdown.MouseUpEventHandler += foorlclick;
+ ///绗竴娆¤繘鏉�
+ var roomlists = new List<Common.Room>();
+ roomlists.Clear();
+ if (Config.Instance.Home.FloorDics.Count < 1)
{
- //杩囨护鎺夋病鏈夌敤鍒拌澶囷紱
- if (!deviceTypeList.Contains(device.Type))
+ foolrname.Visible = false;
+ dropdown.Visible = false;
+ if (Config.Instance.Home.FloorDics.Count == 0)
{
- continue;
+ roomlists.AddRange(Common.Room.Lists);
}
- var deviceui = customroom1.GetDeviceUI(device);
- if (deviceui != null)
+ else
{
- customroom1.DeviceUIList.Add(deviceui);
+ roomlists = Send.GetRoomList(Config.Instance.Home.CurrentFloorId);
}
+ }
+ else
+ {
+ roomlists = Send.GetRoomList(Config.Instance.Home.CurrentFloorId);
}
- AllDeviceTypeView(customroom1.DeviceUIList);
+
+ AllRoomView(roomlists, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
+
+
+ }
+ /// <summary>
+ /// 鍔犺浇鎵�鏈夋埧闂寸殑瑙嗗浘鏂规硶
+ /// </summary>
+ void AllRoomView(List<Common.Room> roomlist, List<DeviceType> deviceTypeList, HorizontalScrolViewLayout roomhorizontalScrol, HorizontalScrolViewLayout devicetypehorizontalScrol)
+ {
+ for (int i = 0; i < roomlist.Count; i++)
+ {
+ var room = roomlist[i];
+ var fra = new FrameLayout
+ {
+ Height = Application.GetRealHeight(200),
+ Width = Application.GetRealWidth(255),
+ };
+ roomhorizontalScrol.AddChidren(fra);
+
+ var roombjBtn = new Button
+ {
+ Height = Application.GetRealHeight(158),
+ Width = Application.GetRealWidth(255),
+ UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png",
+ SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png",
+ Y = Application.GetRealHeight(21),
+ };
+ fra.AddChidren(roombjBtn);
+
+ var roomnameBtn = new Button
+ {
+
+ Height = Application.GetRealHeight(152 - 26 - 20),
+ Width = Application.GetRealWidth(255 - 20 - 50),
+ Text = room.Name,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = Application.GetRealHeight(21 + 13 + 10),
+ X = Application.GetRealWidth(10 + 25),
+
+ };
+ fra.AddChidren(roomnameBtn);
+ if (i == 0)
+ {
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+ var list = new List<DeviceUI>();
+ foreach (var device in room.DeviceUIList)
+ {
+ if (device.CommonDevice == null)
+ {
+ continue;
+ }
+ if (!deviceTypeList.Contains(device.CommonDevice.Type))
+ {
+ continue;
+ }
+ list.Add(device);
+ }
+ AllDeviceTypeView(list, devicetypehorizontalScrol);
+
+ }
+
+
+ EventHandler<MouseEventArgs> roomclick = (sender, e) =>
+ {
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+ var list = new List<DeviceUI>();
+ foreach (var device in room.DeviceUIList)
+ {
+ if (device.CommonDevice == null)
+ {
+ continue;
+ }
+ if (!deviceTypeList.Contains(device.CommonDevice.Type))
+ {
+ continue;
+ }
+ list.Add(device);
+ }
+ AllDeviceTypeView(list, devicetypehorizontalScrol);
+
+
+ };
+ roomnameBtn.MouseUpEventHandler += roomclick;
+ roombjBtn.MouseUpEventHandler += roomclick;
+
+ }
}
/// <summary>
///鍔犺浇璇ュ尯鍩熸墍鏈夎澶囩殑瑙嗗浘鏂规硶
/// </summary>
- void AllDeviceTypeView(List<DeviceUI> devicelist)
+ void AllDeviceTypeView(List<DeviceUI> devicelist, HorizontalScrolViewLayout devicetypehorizontalScrol)
{
List<string> devicetypelist = new List<string>();
devicetypelist.Clear();
-
+
#region ------鎺掑垪璁惧绫诲瀷------
var lightjosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.DimmableLight || device.CommonDevice.Type == DeviceType.OnOffOutput);
if (lightjosn != null)
@@ -218,58 +368,99 @@
{
devicetypelist.Add(Language.StringByID(MyInternationalizationString.Curtains));
}
-
- #endregion
-
- horizontalScrol.RemoveAll();
- foreach (var devicetype in devicetypelist)
+ var ac = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.Thermostat);
+ if (ac != null)
{
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.AC));
+ }
+ var airSwitch = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.AirSwitch);
+ if (airSwitch != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.Airswitch));
+ }
+
+ #endregion
+
+ devicetypehorizontalScrol.RemoveAll();
+ for (int i = 0; i < devicetypelist.Count; i++)
+ {
+
+ var devicetype = devicetypelist[i];
+
+ var spaceRowLayout = new FrameLayout();
+ devicetypehorizontalScrol.AddChidren(spaceRowLayout);
+ if (i == 0)
+ {
+ spaceRowLayout.Width = Application.GetRealWidth(37);
+ }
+ else
+ {
+ spaceRowLayout.Width = Application.GetRealWidth(80);
+ }
var deviceRowLayout = new FrameLayout
{
- Height = Application.GetRealHeight(180 + 30),
- Width = Application.GetRealWidth(250),
+ Width = Application.GetRealWidth(156 + 20),
+ Height = Application.GetRealHeight(280 - 30),
+ Y = Application.GetRealHeight(30),
};
- horizontalScrol.AddChidren(deviceRowLayout);
+ devicetypehorizontalScrol.AddChidren(deviceRowLayout);
+
+ var backgroundColor = new Button
+ {
+ Width = Application.GetRealWidth(156),
+ Height = Application.GetRealHeight(180),
+ X = Application.GetRealWidth(10),
+ UnSelectedImagePath = "ZigeeLogic/deviceunselectedbackgroundcolor.png",
+ SelectedImagePath = "ZigeeLogic/deviceselectedbackgroundcolor.png",
+ };
+ deviceRowLayout.AddChidren(backgroundColor);
+
var devicetypeicon = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(70),
+ Width = Application.GetRealWidth(84),
+ Height = Application.GetRealHeight(84),
+ X = Application.GetRealWidth(46),
+ Y = Application.GetRealHeight(30),
};
deviceRowLayout.AddChidren(devicetypeicon);
- if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
- {
- devicetypeicon.UnSelectedImagePath = "ZigeeLogic/Light.png";
- devicetypeicon.SelectedImagePath = "ZigeeLogic/LightSelected.png";
- }
- else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains))
- {
- devicetypeicon.UnSelectedImagePath = "ZigeeLogic/Curtain.png";
- devicetypeicon.SelectedImagePath = "ZigeeLogic/CurtainSelected.png";
- }
-
-
var devicetypename = new Button
{
- Width = Application.GetRealWidth(250),
- Height = Application.GetRealHeight(50),
+ Width = Application.GetRealWidth(176),
+ Height = Application.GetRealHeight(40),
Text = devicetype,
TextAlignment = TextAlignment.Center,
- Y = devicetypeicon.Bottom + Application.GetRealHeight(20),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Y = backgroundColor.Bottom,
+ TextColor = ZigbeeColor.Current.LogicAddColor,
+ TextSize = 10,
};
deviceRowLayout.AddChidren(devicetypename);
-
+ if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedlight.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedcurtain.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.AC))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedac.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Airswitch))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedairswitch.png";
+ }
EventHandler<MouseEventArgs> devicetypeclick = (sender13, e13) =>
{
+
+ devicetypeButton.IsSelected = false;
+ devicetypeButton = backgroundColor;
+ backgroundColor.IsSelected = true;
List<DeviceType> list = new List<DeviceType>();
list.Clear();
- SelectedButton.IsSelected = false;
- SelectedButton = devicetypeicon;
- SelectedButton.IsSelected = true;
///鍒嗙被鏄剧ず锛堜緥濡傜伅鍏夛細{鐏厜1锛岀伅鍏�2...}锛�
if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
{
@@ -280,6 +471,14 @@
{
list.Add(DeviceType.WindowCoveringDevice);
}
+ else if (devicetype == Language.StringByID(MyInternationalizationString.AC))
+ {
+ list.Add(DeviceType.Thermostat);
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Airswitch))
+ {
+ list.Add(DeviceType.AirSwitch);
+ }
ActionDeviceView(list, devicelist);
@@ -287,16 +486,17 @@
deviceRowLayout.MouseUpEventHandler += devicetypeclick;
devicetypename.MouseUpEventHandler += devicetypeclick;
devicetypeicon.MouseUpEventHandler += devicetypeclick;
+ backgroundColor.MouseUpEventHandler += devicetypeclick;
}
///鏄剧ず鎴块棿鎵�鏈夎澶�
- ActionDeviceView( new List<DeviceType>(), devicelist);
+ ActionDeviceView(new List<DeviceType>(), devicelist);
}
/// <summary>
/// 鍔犺浇璇ョ被鍨嬭澶囪鍥炬柟娉�
/// </summary>
/// <param name="devicelist">璁惧鍒楄〃</param>
- void ActionDeviceView( List<DeviceType> deviceTypelist, List<DeviceUI> devicelist)
+ void ActionDeviceView(List<DeviceType> deviceTypelist, List<DeviceUI> devicelist)
{
middle.RemoveAll();
foreach (var common in devicelist)
@@ -306,45 +506,109 @@
{
continue;
}
-
- var row = new RowLayout
+
+ var deviceFramelayout = new FrameLayout
{
- Height = Application.GetRealHeight(180),
+ Height = Application.GetRealHeight(160),
+ };
+ middle.AddChidren(deviceFramelayout);
+
+ var bjFramelayout = new FrameLayout
+ {
+ Width = Application.GetRealWidth(112),
+ Height = Application.GetRealHeight(112),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(30 + 9),
+ Radius = (uint)Application.GetRealHeight(56),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ deviceFramelayout.AddChidren(bjFramelayout);
+
+ var deviceIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(82),
+ Height = Application.GetRealHeight(82),
+ Gravity = Gravity.Center,
};
- middle.AddChidren(row);
+ bjFramelayout.AddChidren(deviceIconBtn);
+
+ var deviceRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176 + 10),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+
+ };
+ deviceFramelayout.AddChidren(deviceRow);
var devicename = new Button
{
- Gravity = Gravity.CenterVertical,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(600),
- //SelectedBackgroundColor = 0xFFE9652D,
Text = common.CommonDevice.DeviceEpointName,
+ TextAlignment = TextAlignment.CenterLeft,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
};
- row.AddChidren(devicename);
-
- var btndeviceback = new Button
+ deviceRow.AddChidren(devicename);
+ switch (common.CommonDevice.Type)
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "ZigeeLogic/Next.png",
- X = Application.GetRealWidth(1080 - 140),
- Gravity = Gravity.CenterVertical,
- };
- row.AddChidren(btndeviceback);
+
+ case DeviceType.OnOffOutput:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/light.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedlight.png";
+ }
+ break;
+ case DeviceType.DimmableLight:
+ {
+
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/dimmableLight.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selecteddimmableLight.png";
+ }
+ break;
+ case DeviceType.WindowCoveringDevice:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/curtain.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedcurtain.png";
+ }
+ break;
+ case DeviceType.Thermostat:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/ac.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedac.png";
+ }
+ break;
+ case DeviceType.AirSwitch:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/airswitch.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedairswitch.png";
+ }
+ break;
+ }
EventHandler<MouseEventArgs> devicclick = (sen, e) =>
{
+ clickbutton.IsSelected = false;
+ clickbutton = deviceIconBtn;
+ deviceIconBtn.IsSelected = true;
+ clickframeLayout.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ clickframeLayout = bjFramelayout;
+ bjFramelayout.BackgroundColor = ZigbeeColor.Current.LogicIconBackgroundColor;
+ clicktextcolcrbutton.IsSelected = false;
+ clicktextcolcrbutton = devicename;
+ devicename.IsSelected = true;
+
var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
this.AddChidren(flMain);
CurrentDeviceStateView(flMain, common.CommonDevice, false);
};
- row.MouseUpEventHandler += devicclick;
+ deviceFramelayout.MouseUpEventHandler += devicclick;
+ bjFramelayout.MouseUpEventHandler += devicclick;
+ deviceIconBtn.MouseUpEventHandler += devicclick;
+ deviceRow.MouseUpEventHandler += devicclick;
devicename.MouseUpEventHandler += devicclick;
- btndeviceback.MouseUpEventHandler += devicclick;
}
}
@@ -364,50 +628,76 @@
{
flMain.RemoveFromParent();
};
+ var devicefra1 = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ flMain.AddChidren(devicefra1);
+
var devicefra = new FrameLayout
{
- Width = Application.GetRealWidth(1080 - 80),
- X = Application.GetRealWidth(40),
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(530 + 160),
+ Y = Application.GetRealHeight(1920 - 530 - 160),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(50),
+ Radius = (uint)Application.GetRealHeight(60),
};
flMain.AddChidren(devicefra);
-
-
- var devicename = new Button
+ #region -------鍙栨秷 瀹屾垚
+ var timetype = new RowLayout
{
- Y = Application.GetRealHeight(20),
- Text = common.DeviceEpointName,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Height = Application.GetRealHeight(150),
- Width = Application.GetRealWidth(1080 - 80),
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- devicefra.AddChidren(devicename);
+ devicefra.AddChidren(timetype);
+ var Btncancel = new Button
+ {
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(80),
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ timetype.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.security,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ Text = common.DeviceEpointName,
+ };
+ timetype.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
+
+ };
+ timetype.AddChidren(Btncomplete);
+ #endregion
-
- if (actionsInfo.ContainsKey("LinkType"))
- {
- actionsInfo.Remove("LinkType");
- }
- if (actionsInfo.ContainsKey("DeviceAddr"))
- {
- actionsInfo.Remove("DeviceAddr");
- }
- if (actionsInfo.ContainsKey("Epoint"))
- {
- actionsInfo.Remove("Epoint");
- }
- if (actionsInfo.ContainsKey("Time"))
- {
- actionsInfo.Remove("Time");
- }
- if (actionsInfo.ContainsKey("TaskList"))
- {
- actionsInfo.Remove("TaskList");
- }
+ string SelectedDeviceStatusaction = "no";
actionsInfo.Add("LinkType", 0);
actionsInfo.Add("DeviceAddr", common.DeviceAddr);
actionsInfo.Add("Epoint", common.DeviceEpoint);
@@ -432,6 +722,7 @@
}
switch (common.Type)
{
+
///鐏厜
case DeviceType.OnOffOutput:
{
@@ -454,123 +745,162 @@
switchdictionary.Add("Data1", "0");
switchdictionary.Add("Data2", "0");
taskListInfo.Add(switchdictionary);
-
+
#endregion
#region 鐏厜View
- devicefra.Y = Application.GetRealHeight(1920 - 30 - 720);
- devicefra.Height = Application.GetRealHeight(720);
- var OnOffOutputfra = new FrameLayout
+ #region 寮�
+
+ var openframelayout = new FrameLayout
{
- Y = Application.GetRealHeight(180),
- Height = Application.GetRealHeight(180 * 2+ 30),
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
};
- devicefra.AddChidren(OnOffOutputfra);
+ devicefra.AddChidren(openframelayout);
var openrowlayout = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- OnOffOutputfra.AddChidren(openrowlayout);
+ openframelayout.AddChidren(openrowlayout);
var btnopen = new Button
{
- //Text = "寮�",
+ Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(180),
- //SelectedBackgroundColor = 0xfffe5e00,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
openrowlayout.AddChidren(btnopen);
- var openBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var openBtnSelected = new SelectedButton();
openrowlayout.AddChidren(openBtnSelected);
-
+ #endregion
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
var closerowlayout = new RowLayout
{
- Y = openrowlayout.Bottom,
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- OnOffOutputfra.AddChidren(closerowlayout);
+ closeframelayout.AddChidren(closerowlayout);
var btnclose = new Button
{
//Text = "鍏�",
TextID = MyInternationalizationString.close,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(180),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
closerowlayout.AddChidren(btnclose);
- var closeBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical,
- };
+ var closeBtnSelected = new SelectedButton();
closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+ #region 鍙栧弽
+ var takebackframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = closeframelayout.Bottom,
+ };
+ devicefra.AddChidren(takebackframelayout);
+ var takebackrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ takebackframelayout.AddChidren(takebackrowlayout);
+
+ var btntakeback = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.onoff,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ takebackrowlayout.AddChidren(btntakeback);
+
+ var takebackBtnSelected = new SelectedButton();
+ takebackrowlayout.AddChidren(takebackBtnSelected);
+
+ #endregion
+
#endregion
///纭浜嬩欢
EventHandler<MouseEventArgs> openclick = (sender, e) =>
{
+ SelectedDeviceStatusaction = "yes";
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
if (switchdictionary.ContainsKey("Data1"))
{
switchdictionary.Remove("Data1");
}
switchdictionary.Add("Data1", "1");//榛樿鍊�
- LogicIfon.AddDeviceactions(common,actionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+
};
openrowlayout.MouseUpEventHandler += openclick;
btnopen.MouseUpEventHandler += openclick;
openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
///鍙栨秷浜嬩欢
EventHandler<MouseEventArgs> closeclick = (sender, e) =>
{
+ SelectedDeviceStatusaction = "yes";
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
if (switchdictionary.ContainsKey("Data1"))
{
switchdictionary.Remove("Data1");
}
switchdictionary.Add("Data1", "0");//榛樿鍊�
- LogicIfon.AddDeviceactions(common, actionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+
};
closerowlayout.MouseUpEventHandler += closeclick;
btnclose.MouseUpEventHandler += closeclick;
closeBtnSelected.MouseUpEventHandler += closeclick;
-
+ closeframelayout.MouseUpEventHandler += closeclick;
+ //鍙栧弽
+ EventHandler<MouseEventArgs> takebackclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "2");//榛樿鍊�
+ };
+ takebackrowlayout.MouseUpEventHandler += takebackclick;
+ btntakeback.MouseUpEventHandler += takebackclick;
+ takebackBtnSelected.MouseUpEventHandler += takebackclick;
+ takebackframelayout.MouseUpEventHandler += takebackclick;
if (edit && TaskList != null)
{
foreach (var value in TaskList)
@@ -586,12 +916,21 @@
switchdictionary.Add("Data1", "1");
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
}
- else
+ else if (value["Data1"] == "0")
{
switchdictionary.Add("Data1", "0");
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ }
+ else if (value["Data1"] == "2")
+ {
+ switchdictionary.Add("Data1", "2");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
}
break;
}
@@ -607,208 +946,290 @@
#region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
- if (switchdictionary.ContainsKey("TaskType"))
- {
- switchdictionary.Remove("TaskType");
- }
- if (switchdictionary.ContainsKey("Data1"))
- {
- switchdictionary.Remove("Data1");
- }
if (switchdictionary.ContainsKey("Data2"))
{
switchdictionary.Remove("Data2");
}
- switchdictionary.Add("TaskType", "1");
- switchdictionary.Add("Data1", "0");
switchdictionary.Add("Data2", "0");
taskListInfo.Add(switchdictionary);
- //Dictionary<string, string> brightnessdictionary = new Dictionary<string, string>();
- //if (brightnessdictionary.ContainsKey("TaskType"))
- //{
- // switchdictionary.Remove("TaskType");
- //}
- //if (brightnessdictionary.ContainsKey("Data1"))
- //{
- // brightnessdictionary.Remove("Data1");
- //}
- //if (brightnessdictionary.ContainsKey("Data2"))
- //{
- // switchdictionary.Remove("Data2");
- //}
- //brightnessdictionary.Add("TaskType", "3");
- //brightnessdictionary.Add("Data1", "0");
- //brightnessdictionary.Add("Data2", "0");
- //taskListInfo.Add(brightnessdictionary);
+
#endregion
#region 鐏厜View
- devicefra.Y = Application.GetRealHeight(1920 - 30 - 900);
- devicefra.Height = Application.GetRealHeight(900);
- var OnOffOutputfra = new FrameLayout
+ devicefra.Y = Application.GetRealHeight(1920 - 160 * 3 - 210 - 160);
+ devicefra.Height = Application.GetRealHeight(160 * 3 + 210 + 160);
+
+ #region 寮�
+
+ var openframelayout = new FrameLayout
{
- Y = Application.GetRealHeight(180),
- Height = Application.GetRealHeight(180 * 3 + 30),
+ Height = Application.GetRealHeight(160 + 160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
};
- devicefra.AddChidren(OnOffOutputfra);
+ devicefra.AddChidren(openframelayout);
var openrowlayout = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
};
- OnOffOutputfra.AddChidren(openrowlayout);
+ openframelayout.AddChidren(openrowlayout);
var btnopen = new Button
{
- //Text = "寮�",
+ Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(180),
- //SelectedBackgroundColor = 0xfffe5e00,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
openrowlayout.AddChidren(btnopen);
- var openBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var openBtnSelected = new SelectedButton();
openrowlayout.AddChidren(openBtnSelected);
- var closerowlayout = new RowLayout
+ var horizontalSeekBarRow = new RowLayout
{
Y = openrowlayout.Bottom,
- Height = Application.GetRealHeight(180),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(160),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- OnOffOutputfra.AddChidren(closerowlayout);
+ openframelayout.AddChidren(horizontalSeekBarRow);
+ var horizontalSeekBarVol = new HorizontalSeekBar
+ {
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(80),
+ Radius = (uint)Application.GetRealHeight(25),
+ Y = Application.GetRealHeight(25),
+ //Gravity = Gravity.CenterVertical,
+ ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected,
+ Max = 100,
+ SleepTime = 1000,
+ ThumbRadius = 9,
+ IsCanMove = false
+ };
+ horizontalSeekBarRow.AddChidren(horizontalSeekBarVol);
+
+ #endregion
+
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
var btnclose = new Button
{
//Text = "鍏�",
TextID = MyInternationalizationString.close,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(180),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
closerowlayout.AddChidren(btnclose);
- var closeBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical,
- };
+ var closeBtnSelected = new SelectedButton();
closerowlayout.AddChidren(closeBtnSelected);
-
- var customrowlayout = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- Y = closerowlayout.Bottom,
- };
- OnOffOutputfra.AddChidren(customrowlayout);
-
- var Btncustom = new Button
- {
- //Text = "鑷畾涔変寒搴�",
- TextID = MyInternationalizationString.custombrightness,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(180),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-
- };
- customrowlayout.AddChidren(Btncustom);
#endregion
- ///纭浜嬩欢
- EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ #region 鍙栧弽
+ var takebackframelayout = new FrameLayout
{
- openBtnSelected.Visible = true;
- closeBtnSelected.Visible = false;
+ Height = Application.GetRealHeight(160),
+ Y = closeframelayout.Bottom,
+ };
+ devicefra.AddChidren(takebackframelayout);
+ var takebackrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ takebackframelayout.AddChidren(takebackrowlayout);
+
+ var btntakeback = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.onoff,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ takebackrowlayout.AddChidren(btntakeback);
+
+ var takebackBtnSelected = new SelectedButton();
+ takebackrowlayout.AddChidren(takebackBtnSelected);
+
+ #endregion
+
+
+ #endregion
+
+ int Progressvalue = 100;
+ horizontalSeekBarVol.ProgressChanged += (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ Progressvalue = horizontalSeekBarVol.Progress;
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
if (switchdictionary.ContainsKey("Data1"))
{
switchdictionary.Remove("Data1");
}
- switchdictionary.Add("Data1", "1");//榛樿鍊�
- LogicIfon.AddDeviceactions(common, actionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+ switchdictionary.Add("TaskType", "3");
+ //鏈�澶т寒搴﹀�兼槸254闇�瑕佽浆鎹紱
+ var lightbrightnessvalue = (254 * horizontalSeekBarVol.Progress) / 100;
+ switchdictionary.Add("Data1", lightbrightnessvalue.ToString());
+
+ };
+ ///纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = true;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ horizontalSeekBarVol.Progress = Progressvalue;
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("TaskType", "3");
+ //鏈�澶т寒搴﹀�兼槸254闇�瑕佽浆鎹紱
+ var lightbrightnessvalue = (254 * horizontalSeekBarVol.Progress) / 100;
+ switchdictionary.Add("Data1", lightbrightnessvalue.ToString());
};
openrowlayout.MouseUpEventHandler += openclick;
btnopen.MouseUpEventHandler += openclick;
openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
///鍙栨秷浜嬩欢
EventHandler<MouseEventArgs> closeclick = (sender, e) =>
{
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
if (switchdictionary.ContainsKey("Data1"))
{
switchdictionary.Remove("Data1");
}
+ switchdictionary.Add("TaskType", "1");
switchdictionary.Add("Data1", "0");//榛樿鍊�
- LogicIfon.AddDeviceactions(common, actionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+
};
closerowlayout.MouseUpEventHandler += closeclick;
btnclose.MouseUpEventHandler += closeclick;
closeBtnSelected.MouseUpEventHandler += closeclick;
- ///鑷畾涔変寒搴︿簨浠�
- EventHandler<MouseEventArgs> customclick = (sender, e) =>
+ closeframelayout.MouseUpEventHandler += closeclick;
+ //鍙栧弽
+ EventHandler<MouseEventArgs> takebackclick = (sender, e) =>
{
- var setDeviceState = new SetDeviceState();
- UserView.HomePage.Instance.AddChidren(setDeviceState);
- UserView.HomePage.Instance.PageIndex += 1;
- setDeviceState.Show(common, Btncustom.Text, edit);
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("TaskType", "1");
+ switchdictionary.Add("Data1", "2");//榛樿鍊�
};
- customrowlayout.MouseUpEventHandler += customclick;
- Btncustom.MouseUpEventHandler += customclick;
+ takebackrowlayout.MouseUpEventHandler += takebackclick;
+ btntakeback.MouseUpEventHandler += takebackclick;
+ takebackBtnSelected.MouseUpEventHandler += takebackclick;
+ takebackframelayout.MouseUpEventHandler += takebackclick;
if (edit && TaskList != null)
{
foreach (var value in TaskList)
{
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
if (value["TaskType"] == "1")
{
- if (switchdictionary.ContainsKey("Data1"))
- {
- switchdictionary.Remove("Data1");
- }
- if (value["Data1"] == "1")
- {
- switchdictionary.Add("Data1", "1");
- openBtnSelected.Visible = true;
- closeBtnSelected.Visible = false;
- }
- else
+ switchdictionary.Add("TaskType", "1");
+ if (value["Data1"] == "0")
{
switchdictionary.Add("Data1", "0");
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
}
- break;
+ else if (value["Data1"] == "2")
+ {
+ switchdictionary.Add("Data1", "2");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ }
+
}
+ else if (value["TaskType"] == "3")
+ {
+ switchdictionary.Add("TaskType", "3");
+ switchdictionary.Add("Data1", value["Data1"]);
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ horizontalSeekBarVol.IsCanMove = true;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ horizontalSeekBarVol.Progress = int.Parse(value["Data1"])*100/254;
+ Progressvalue = horizontalSeekBarVol.Progress;
+
+ }
+ break;
}
}
@@ -824,198 +1245,201 @@
{
switchdictionary.Remove("TaskType");
}
- if (switchdictionary.ContainsKey("Data1"))
- {
- switchdictionary.Remove("Data1");
- }
- if (switchdictionary.ContainsKey("Data2"))
- {
- switchdictionary.Remove("Data2");
- }
switchdictionary.Add("TaskType", "6");
- switchdictionary.Add("Data1", "1");
- switchdictionary.Add("Data2", "0");
+
taskListInfo.Add(switchdictionary);
- //Dictionary<string, string> brightnessdictionary = new Dictionary<string, string>();
- //if (brightnessdictionary.ContainsKey("TaskType"))
- //{
- // brightnessdictionary.Remove("TaskType");
- //}
- //if (brightnessdictionary.ContainsKey("Data2"))
- //{
- // brightnessdictionary.Remove("Data2");
- //}
- //if (brightnessdictionary.ContainsKey("Data1"))
- //{
- // brightnessdictionary.Remove("Data1");
- //}
- //brightnessdictionary.Add("TaskType", "6");
- //brightnessdictionary.Add("Data1", "5");
- //brightnessdictionary.Add("Data2", "0");
- //taskListInfo.Add(brightnessdictionary);
- #endregion
-
+ #endregion
+ devicefra.Y = Application.GetRealHeight(1920 - 160 * 2 - 210 - 160);
+ devicefra.Height = Application.GetRealHeight(160 * 2 + 210 + 160);
#region 绐楀笜View
- devicefra.Y = Application.GetRealHeight(1920 - 30 - 900);
- devicefra.Height = Application.GetRealHeight(900);
- var windowCoveringfra = new FrameLayout
+
+ #region 寮�
+
+ var openframelayout = new FrameLayout
{
- Y = Application.GetRealHeight(180),
- Height = Application.GetRealHeight(180 * 3 + 30),
+ Height = Application.GetRealHeight(160 + 160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
};
- devicefra.AddChidren(windowCoveringfra);
+ devicefra.AddChidren(openframelayout);
var openrowlayout = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- windowCoveringfra.AddChidren(openrowlayout);
+ openframelayout.AddChidren(openrowlayout);
var btnopen = new Button
{
- //Text = "寮�",
+ Width = Application.GetRealWidth(600),
TextID = MyInternationalizationString.open,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(180),
- //SelectedBackgroundColor = 0xfffe5e00,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
openrowlayout.AddChidren(btnopen);
- var openBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var openBtnSelected = new SelectedButton();
openrowlayout.AddChidren(openBtnSelected);
- var closerowlayout = new RowLayout
+
+ var horizontalSeekBarRow = new RowLayout
{
Y = openrowlayout.Bottom,
- Height = Application.GetRealHeight(180),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(160),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- windowCoveringfra.AddChidren(closerowlayout);
+ openframelayout.AddChidren(horizontalSeekBarRow);
+ var horizontalSeekBarVol = new HorizontalSeekBar
+ {
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(80),
+ Radius = (uint)Application.GetRealHeight(25),
+ Y = Application.GetRealHeight(25),
+ //Gravity = Gravity.CenterVertical,
+ ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected,
+ Max = 100,
+ SleepTime = 1000,
+ ThumbRadius = 9,
+ IsCanMove = false
+ };
+ horizontalSeekBarRow.AddChidren(horizontalSeekBarVol);
+
+ #endregion
+
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
var btnclose = new Button
{
//Text = "鍏�",
TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(300),
- Height = Application.GetRealHeight(180),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
};
closerowlayout.AddChidren(btnclose);
- var closeBtnSelected = new Button
- {
- X = Application.GetRealWidth(1000 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
+ var closeBtnSelected = new SelectedButton();
closerowlayout.AddChidren(closeBtnSelected);
-
-
- var customrowlayout = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- Y = closerowlayout.Bottom,
- };
- windowCoveringfra.AddChidren(customrowlayout);
-
- var Btncustom = new Button
- {
- //Text = "鑷畾涔夌櫨鍒嗘瘮",
- TextID = MyInternationalizationString.custompercentage,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(180),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
-
- };
- customrowlayout.AddChidren(Btncustom);
#endregion
- ///鐐瑰嚮纭浜嬩欢
- EventHandler<MouseEventArgs> openclick = (sender, e) =>
- {
- openBtnSelected.Visible = true;
- closeBtnSelected.Visible = false;
+
+ #endregion
+ int Progressvalue = 100;
+ horizontalSeekBarVol.ProgressChanged += (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ Progressvalue = horizontalSeekBarVol.Progress;
if (switchdictionary.ContainsKey("Data1"))
{
switchdictionary.Remove("Data1");
}
- switchdictionary.Add("Data1", "0");
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("Data1", "5");
+ switchdictionary.Add("Data2", horizontalSeekBarVol.Progress.ToString());
- LogicIfon.AddDeviceactions(common, actionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+ };
+ ///纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = true;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ horizontalSeekBarVol.Progress = Progressvalue;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("Data1", "5");
+ switchdictionary.Add("Data2", horizontalSeekBarVol.Progress.ToString());
};
openrowlayout.MouseUpEventHandler += openclick;
btnopen.MouseUpEventHandler += openclick;
openBtnSelected.MouseUpEventHandler += openclick;
- ///鐐瑰嚮鍙栨秷浜嬩欢
+ openframelayout.MouseUpEventHandler += openclick;
+ ///鍙栨秷浜嬩欢
EventHandler<MouseEventArgs> closeclick = (sender, e) =>
{
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
+
if (switchdictionary.ContainsKey("Data1"))
{
switchdictionary.Remove("Data1");
}
- switchdictionary.Add("Data1", "1");
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("Data2", "0");
+ switchdictionary.Add("Data1", "1");//榛樿鍊�
- LogicIfon.AddDeviceactions(common, actionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
};
closerowlayout.MouseUpEventHandler += closeclick;
btnclose.MouseUpEventHandler += closeclick;
closeBtnSelected.MouseUpEventHandler += closeclick;
- ///鑷畾涔変寒搴︿簨浠�
- EventHandler<MouseEventArgs> customclick = (sender, e) =>
- {
- var setDeviceState = new SetDeviceState();
- UserView.HomePage.Instance.AddChidren(setDeviceState);
- UserView.HomePage.Instance.PageIndex += 1;
- setDeviceState.Show(common, Btncustom.Text, edit);
+ closeframelayout.MouseUpEventHandler += closeclick;
- };
- customrowlayout.MouseUpEventHandler += customclick;
- Btncustom.MouseUpEventHandler += customclick;
+
+
if (edit && TaskList != null)
{
foreach (var value in TaskList)
{
if (value["TaskType"] == "6")
{
- if (value["Data1"] == "0")
+ if (value["Data1"] == "5")
{
if (switchdictionary.ContainsKey("Data1"))
{
switchdictionary.Remove("Data1");
}
- switchdictionary.Add("Data1", "0");
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("Data1", "5");
+ switchdictionary.Add("Data2", value["Data2"]);
+ horizontalSeekBarVol.IsCanMove = true;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
openBtnSelected.Visible = true;
closeBtnSelected.Visible = false;
+ horizontalSeekBarVol.Progress = int.Parse(value["Data2"]);
+ Progressvalue = horizontalSeekBarVol.Progress;
}
else if (value["Data1"] == "1")
{
@@ -1026,6 +1450,8 @@
switchdictionary.Add("Data1", "1");
openBtnSelected.Visible = false;
closeBtnSelected.Visible = true;
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
}
}
@@ -1034,28 +1460,645 @@
}
}
break;
+ ///绌烘皵寮�鍏�
+ case DeviceType.AirSwitch: {
+ {
+
+ #region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
+ Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("TaskType", "1");
+ switchdictionary.Add("Data1", "0");
+ switchdictionary.Add("Data2", "0");
+ taskListInfo.Add(switchdictionary);
+
+ #endregion
+
+ #region 绌烘皵鐏厜View
+
+ #region 寮�
+
+ var openframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(openframelayout);
+
+ var openrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ openframelayout.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new SelectedButton();
+ openrowlayout.AddChidren(openBtnSelected);
+ #endregion
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new SelectedButton();
+ closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+ #region 鍙栧弽
+ var takebackframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = closeframelayout.Bottom,
+ };
+ devicefra.AddChidren(takebackframelayout);
+ var takebackrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ takebackframelayout.AddChidren(takebackrowlayout);
+
+ var btntakeback = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.onoff,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ takebackrowlayout.AddChidren(btntakeback);
+
+ var takebackBtnSelected = new SelectedButton();
+ takebackrowlayout.AddChidren(takebackBtnSelected);
+
+ #endregion
+
+
+ #endregion
+
+ ///纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "1");//榛樿鍊�
+
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
+ ///鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "0");//榛樿鍊�
+
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
+ //鍙栧弽
+ EventHandler<MouseEventArgs> takebackclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "2");//榛樿鍊�
+
+ };
+ takebackrowlayout.MouseUpEventHandler += takebackclick;
+ btntakeback.MouseUpEventHandler += takebackclick;
+ takebackBtnSelected.MouseUpEventHandler += takebackclick;
+ takebackframelayout.MouseUpEventHandler += takebackclick;
+ if (edit && TaskList != null)
+ {
+ foreach (var value in TaskList)
+ {
+ if (value["TaskType"] == "1")
+ {
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (value["Data1"] == "1")
+ {
+ switchdictionary.Add("Data1", "1");
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ }
+ else if (value["Data1"] == "0")
+ {
+ switchdictionary.Add("Data1", "0");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ }
+ else if (value["Data1"] == "2")
+ {
+ switchdictionary.Add("Data1", "2");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ }
+ break;
+ }
+
+ }
+ }
+
+ }
+ }
+ break;
+
+ case DeviceType.Thermostat:
+ {
+
+ #region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
+ Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
+ Dictionary<string, string> temperaturedictionary = new Dictionary<string, string>();
+ Dictionary<string, string> modedictionary = new Dictionary<string, string>();
+ Dictionary<string, string> speeddictionary = new Dictionary<string, string>();
+ taskListInfo.Add(switchdictionary);
+ taskListInfo.Add(temperaturedictionary);
+ taskListInfo.Add(modedictionary);
+ taskListInfo.Add(speeddictionary);
+ dictionary(switchdictionary, "TaskType", "1");
+ dictionary(switchdictionary, "Data2", "0");
+ dictionary(temperaturedictionary, "TaskType", "5");
+ dictionary(modedictionary, "TaskType", "5");
+ dictionary(modedictionary, "Data1", "3");
+ dictionary(speeddictionary, "TaskType", "5");
+ dictionary(speeddictionary, "Data1", "6");
+
+ #endregion
+
+ #region 绌鸿皟View
+
+ devicefra.Y = Application.GetRealHeight(1920 - 600 - 210 - 160*2);
+ devicefra.Height = Application.GetRealHeight(600+ 210 + 160*2);
+
+ #region 寮�
+
+ var openframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(openframelayout);
+
+ var openrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ openframelayout.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new SelectedButton();
+ openrowlayout.AddChidren(openBtnSelected);
+ #endregion
+
+ #region 绌鸿皟鐘舵�乂iew
+ var PickerViewfra = new FrameLayout
+ {
+ Y = openframelayout.Bottom,
+ Height = Application.GetRealHeight(600),
+ };
+ devicefra.AddChidren(PickerViewfra);
+
+
+ var pausePickerViewfra= new FrameLayout
+ {
+ Y = openframelayout.Bottom,
+ Height = Application.GetRealHeight(600),
+ };
+ devicefra.AddChidren(pausePickerViewfra);
+
+
+
+ var mUIPickerView = new UIPickerView
+ {
+ Height = Application.GetRealHeight(600-5),
+ };
+ PickerViewfra.AddChidren(mUIPickerView);
+ var line = new Button
+ {
+ Y = Application.GetRealHeight(600-5),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(5),
+ X = Application.GetRealWidth(80),
+ BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ PickerViewfra.AddChidren(line);
+
+ var mList1 = new List<string>();
+ var mList2 = new List<string> {
+ Language.StringByID(MyInternationalizationString.logiccool),
+ Language.StringByID(MyInternationalizationString.logicheat),
+ Language.StringByID(MyInternationalizationString.logicauto),
+ Language.StringByID(MyInternationalizationString.logicdry),
+ Language.StringByID(MyInternationalizationString.logicfanonly),
+ };
+ var mList3 = new List<string>{
+ Language.StringByID(MyInternationalizationString.logiclow),
+ Language.StringByID(MyInternationalizationString.logicmedium),
+ Language.StringByID(MyInternationalizationString.logichigh),
+ };
+ for (int i = 16; i < 33; i++)
+ {
+ mList1.Add(i.ToString() +" " + "鈩�");
+ }
+ mUIPickerView.setNPicker(mList1, mList2, mList3);
+ ///榛樿鐘舵��
+
+
+ #endregion
+
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = PickerViewfra.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new SelectedButton();
+ closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+
+
+
+ mUIPickerView.OnSelectChangeEvent += (s1, s2, s3) =>
+ {
+ if (openBtnSelected.Visible)
+ {
+ SelectedDeviceStatusaction = "yes";
+ var temperature = mList1[s1].Split(' ')[0];
+ var modestring = mList2[s2].Split(' ')[0];
+ var speedstring = mList3[s3].Split(' ')[0];
+ ModeState(modestring, temperaturedictionary, modedictionary);
+ var a = int.Parse(temperature) * 100;
+ dictionary(temperaturedictionary, "Data2", a.ToString());
+
+ SpeedState(speedstring, speeddictionary);
+
+
+ }
+ };
+
+ #endregion
+ //榛樿26,鑷姩,涓
+ int indextemperature = 10, indexmode = 2, indexspeed = 1;
+ if (edit && TaskList != null)
+ {
+ foreach (var value in TaskList)
+ {
+ if (value["TaskType"] == "1")
+ {
+ dictionary(switchdictionary, "Data1", value["Data1"]);
+ if (value["Data1"] == "1")
+ {
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ pausePickerViewfra.Height = Application.GetRealHeight(0);
+ }
+ else if (value["Data1"] == "0")
+ {
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ pausePickerViewfra.Height = Application.GetRealHeight(600);
+ }
+
+ }
+ else if (value["TaskType"] == "5")
+ {
+ if (value["Data1"] == "3")
+ {//3---璁剧疆宸ヤ綔妯″紡(1:鑷姩;3:鍒跺喎;4:鍒剁儹;7:閫侀;8:闄ゆ箍)
+ dictionary(modedictionary, "Data2", value["Data2"]);
+ string modetext = "";
+ switch (value["Data2"])
+ {
+ case "3":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logiccool);
+ //indexmode = 0;
+ }
+ break;
+ case "4":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicheat);
+ // indexmode = 1;
+ }
+ break;
+ case "1":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicauto);
+ // indexmode = 2;
+ }
+ break;
+ case "8":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicdry);
+ // indexmode = 3;
+ }
+ break;
+ case "7":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicfanonly);
+ //indexmode = 4;
+ }
+ break;
+ }
+ indexmode = mList2.IndexOf(modetext);
+ }
+ else if (value["Data1"] == "6")
+ {//6---璁剧疆椋庢墖妯″紡(1:浣庨;2:涓;3:楂橀;)
+ dictionary(speeddictionary, "Data2", value["Data2"]);
+ string speedtext = "";
+ switch (value["Data2"])
+ {
+ case "1":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logiclow);
+ //indexspeed = 0;
+ }
+ break;
+
+ case "2":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logicmedium);
+ // indexspeed = 1;
+ }
+ break;
+ case "3":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logichigh);
+ // indexspeed = 2;
+ }
+ break;
+
+ }
+ indexspeed = mList3.IndexOf(speedtext);
+ }
+ //4---璁剧疆鍔犵儹搴︽暟;5---璁剧疆鍒跺喎銆侀櫎婀垮害鏁�;7---璁剧疆鑷姩搴︽暟
+ else if (value["Data1"] == "4" || value["Data1"] == "5" || value["Data1"] == "7")
+ {
+ var s = int.Parse(value["Data2"]) / 100;
+ indextemperature = mList1.IndexOf(s.ToString() + " " + "鈩�");
+ dictionary(temperaturedictionary, "Data1", value["Data1"]);
+ dictionary(temperaturedictionary, "Data2", value["Data2"]);
+ }
+
+ }
+ }
+ }
+ ///鏇存柊鏈�鏂扮┖璋冪姸鎬侊紱
+ mUIPickerView.setCurrentItems(indextemperature, indexmode, indexspeed);
+
+ ///纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ pausePickerViewfra.Height = Application.GetRealHeight(0);
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ dictionary(switchdictionary, "Data1", "1");
+ var temperature = mList1[indextemperature].Split(' ')[0];
+ var modestring = mList2[indexmode].Split(' ')[0];
+ var speedstring = mList3[indexspeed].Split(' ')[0];
+
+ ModeState(modestring, temperaturedictionary, modedictionary);
+ var a = int.Parse(temperature) * 100;
+ dictionary(temperaturedictionary, "Data2", a.ToString());
+ SpeedState(speedstring, speeddictionary);
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
+
+ ///鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ pausePickerViewfra.Height = Application.GetRealHeight(600);
+
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ dictionary(switchdictionary, "Data1", "0");
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
+ }
+ break;
+
+
}
-
- var cancel = new Button
+ Btncomplete.MouseUpEventHandler += (sender, e) =>
{
- Height = Application.GetRealHeight(160),
- TextID = MyInternationalizationString.cancel,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 16,
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- Y = devicefra.Height - Application.GetRealHeight(160),
- };
- devicefra.AddChidren(cancel);
- cancel.MouseUpEventHandler += (sender, e) =>
- {
+ if (SelectedDeviceStatusaction == "yes")
+ {
+ LogicIfon.AddDeviceactions(common, actionsInfo);
+ }
+ else
+ {
+ if (!edit)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
+ Language.StringByID(MyInternationalizationString.complete));
+ alert.Show();
+ return;
+ }
+
+ }
flMain.RemoveFromParent();
- UserView.HomePage.Instance.ScrollEnabled = true;
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+
};
-
-
}
+
+ public static void dictionary(Dictionary<string, string> deviceactionsInfo, string Key, string Value)
+ {
+ if (deviceactionsInfo.ContainsKey(Key))
+ {
+ deviceactionsInfo.Remove(Key);
+ }
+ deviceactionsInfo.Add(Key, Value);
+ }
+ /// <summary>
+ /// 绌鸿皟妯″紡鐨勭姸鎬�
+ /// </summary>
+ /// <param name="modestring"></param>
+ /// <param name="temperaturedictionary"></param>
+ /// <param name="modedictionary"></param>
+ public static void ModeState(string modestring,Dictionary<string,string> temperaturedictionary, Dictionary<string, string> modedictionary)
+ {
+
+ if (modestring == Language.StringByID(MyInternationalizationString.logiccool))
+ {
+ dictionary(modedictionary, "Data2", "3");
+ dictionary(temperaturedictionary, "Data1", "5");
+ }
+ else if (modestring == Language.StringByID(MyInternationalizationString.logicheat))
+ {
+
+ dictionary(modedictionary, "Data2", "4");
+ dictionary(temperaturedictionary, "Data1", "4");
+ }
+ else if (modestring == Language.StringByID(MyInternationalizationString.logicauto))
+ {
+
+ dictionary(modedictionary, "Data2", "1");
+ dictionary(temperaturedictionary, "Data1", "7");
+ }
+ else if (modestring == Language.StringByID(MyInternationalizationString.logicdry))
+ {
+
+ dictionary(modedictionary, "Data2", "8");
+ dictionary(temperaturedictionary, "Data1", "5");
+ }
+ else if (modestring == Language.StringByID(MyInternationalizationString.logicfanonly))
+ {
+ dictionary(temperaturedictionary, "Data1", "20");
+ dictionary(modedictionary, "Data2", "7");
+ }
+
+ }
+ /// <summary>
+ /// 椋庨�熺殑妯″紡
+ /// </summary>
+ /// <param name="speedstring"></param>
+ /// <param name="speeddictionary"></param>
+ public static void SpeedState(string speedstring, Dictionary<string, string> speeddictionary) {
+
+ if (speedstring == Language.StringByID(MyInternationalizationString.logiclow))
+ {
+
+ dictionary(speeddictionary, "Data2", "1");
+
+ }
+ else if (speedstring == Language.StringByID(MyInternationalizationString.logicmedium))
+ {
+
+ dictionary(speeddictionary, "Data2", "2");
+
+ }
+ else if (speedstring == Language.StringByID(MyInternationalizationString.logichigh))
+ {
+
+ dictionary(speeddictionary, "Data2", "3");
+ }
+
+ }
+
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
index 6d3e7a7..99a78c5 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicIfon.cs
@@ -1,10 +1,11 @@
锘縰sing System;
using System.Collections.Generic;
+using Shared;
namespace Shared.Phone.Device.Logic
{
public class LogicIfon
{
- #region ----閫昏緫鏉′欢杈撳叆----
+ #region ----閫昏緫鏉′欢杈撳叆----
/// <summary>
/// 娣诲姞璁惧鏉′欢鐨勬柟娉�
/// </summary>
@@ -39,7 +40,7 @@
if (Common.Logic.CurrentLogic.Conditions[i]["Type"] == "2")
{
- if (Common.Logic.CurrentLogic.Conditions[i]["Condition_LogicId"] ==logic.LogicId.ToString())
+ if (Common.Logic.CurrentLogic.Conditions[i]["Condition_LogicId"] == logic.LogicId.ToString())
{
Common.Logic.CurrentLogic.Conditions.RemoveAt(i);
Common.Logic.CurrentLogic.Conditions.Insert(i, objecttype);
@@ -80,7 +81,7 @@
{
for (int i = 0; i < Common.Logic.CurrentLogic.Conditions.Count; i++)
{
- if (Common.Logic.CurrentLogic.Conditions[i]["Type"] == "7")
+ if (Common.Logic.CurrentLogic.Conditions[i]["Type"] == objecttype["Type"])
{
Common.Logic.CurrentLogic.Conditions.RemoveAt(i);
@@ -107,7 +108,7 @@
{
if (Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString() == "0")
{
- if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() ==common.DeviceAddr&& Common.Logic.CurrentLogic.Actions[i]["Epoint"].ToString() ==common.DeviceEpoint.ToString())
+ if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() == common.DeviceAddr && Common.Logic.CurrentLogic.Actions[i]["Epoint"].ToString() == common.DeviceEpoint.ToString())
{
Common.Logic.CurrentLogic.Actions.RemoveAt(i);
Common.Logic.CurrentLogic.Actions.Insert(i, actionsInfo);
@@ -122,13 +123,13 @@
/// </summary>
/// <param name="Scene">Common.</param>
/// <param name="actionsInfo">Objecttype.</param>
- public static void AddSceneactions(Shared.Common.SceneUI Scene,Dictionary<string, object> actionsInfo)
+ public static void AddSceneactions(Shared.Common.SceneUI Scene, Dictionary<string, object> actionsInfo)
{
for (int i = 0; i < Common.Logic.CurrentLogic.Actions.Count; i++)
{
if (Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString() == "2")
{
- if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() ==Scene.Id.ToString())
+ if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() == Scene.Id.ToString())
{
Common.Logic.CurrentLogic.Actions.RemoveAt(i);
Common.Logic.CurrentLogic.Actions.Insert(i, actionsInfo);
@@ -162,14 +163,14 @@
/// </summary>
/// <param name="objecttype">Objecttype.</param>
/// <param name="o">O.</param>
- public static void AddLogicactions(Common.Logic logic,Dictionary<string, object> actionsInfo)
+ public static void AddLogicactions(Common.Logic logic, Dictionary<string, object> actionsInfo)
{
for (int i = 0; i < Common.Logic.CurrentLogic.Actions.Count; i++)
{
if (Common.Logic.CurrentLogic.Actions[i]["LinkType"].ToString() == "4")
{
- if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() ==logic.LogicId.ToString())
+ if (Common.Logic.CurrentLogic.Actions[i]["DeviceAddr"].ToString() == logic.LogicId.ToString())
{
Common.Logic.CurrentLogic.Actions.RemoveAt(i);
Common.Logic.CurrentLogic.Actions.Insert(i, actionsInfo);
@@ -181,7 +182,26 @@
}
#endregion
+ #region ----鍏宠仈app璐﹀彿----
+ /// <summary>
+ /// 鍏宠仈app璐﹀彿
+ /// </summary>
+ /// <param name="accountsInfo"></param>
+ public static void Addaccounts(Dictionary<string, string> accountsInfo)
+ {
+ for (int i = 0; i < Common.Logic.CurrentLogic.Accounts.Count; i++)
+ {
+ if (Common.Logic.CurrentLogic.Accounts[i]["Type"] == accountsInfo["Type"])
+ {
+ Common.Logic.CurrentLogic.Accounts.RemoveAt(i);
+ Common.Logic.CurrentLogic.Accounts.Insert(i, accountsInfo);
+ return;
+ }
+ }
+ Common.Logic.CurrentLogic.Accounts.Add(accountsInfo);
+ }
+ #endregion
}
-
+
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
new file mode 100755
index 0000000..39fe971
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs
@@ -0,0 +1,389 @@
+锘縰sing System;
+using Shared;
+using Shared.R;
+using System.Collections.Generic;
+using Newtonsoft.Json.Linq;
+using ZigBee.Device;
+using Shared.Common;
+namespace Shared.Phone.Device.Logic
+{
+ public class MemberList : FrameLayout
+ {
+ Button selectedIcon = new Button();
+ public static Action action;
+ public static bool edit=false;
+ Dictionary<string, string> deviceConditionsInfo = new Dictionary<string, string>();
+ Dictionary<string, string> userdictionary = new Dictionary<string, string>();
+
+ public void Show(CommonDevice common, Dictionary<string, string> editdeviceConditionsInfo=null)
+ {
+ if (!edit)
+ {
+ deviceConditionsInfo.Add("Type", "1");
+ deviceConditionsInfo.Add("IsValid", "1");
+ deviceConditionsInfo.Add("MacAddr", common.DeviceAddr);
+ deviceConditionsInfo.Add("Epoint", common.DeviceEpoint.ToString());
+ deviceConditionsInfo.Add("Cluster_ID", "64529");
+ deviceConditionsInfo.Add("AttriButeData1", "2");
+ deviceConditionsInfo.Add("Range", "0");
+ editdeviceConditionsInfo = deviceConditionsInfo;
+ }
+ UserView.HomePage.Instance.ScrollEnabled = false;
+ this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
+ };
+ this.AddChidren(topRowLayout);
+
+ var titleName = new Button
+ {
+ TextSize = 16,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.userlist,
+ };
+ topRowLayout.AddChidren(titleName);
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ action();
+ };
+
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+ #endregion
+
+ var middle = new VerticalScrolViewLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(middle);
+
+ foreach (var user in Send.UserList)
+ {
+
+ var userFramelayout = new RowLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(userFramelayout);
+
+
+ var userRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(1080 - 81 - 58),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(81),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ userFramelayout.AddChidren(userRow);
+
+ var userBtn = new Button
+ {
+ Text = user.MembershipName,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ userRow.AddChidren(userBtn);
+
+ var userBack = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = Application.GetRealWidth(1080 - 81 - 58 - 58),
+ Gravity = Gravity.CenterVertical,
+ };
+ userRow.AddChidren(userBack);
+
+ EventHandler<MouseEventArgs> useridclick = (sender, e) =>
+ {
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ flMain.MouseUpEventHandler += (sender1, e1) =>
+ {
+ flMain.RemoveFromParent();
+ };
+
+ var lockcolorfra = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ flMain.AddChidren(lockcolorfra);
+
+ var lockcolorfra1 = new FrameLayout
+ {
+
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(530),
+ Y = Application.GetRealHeight(1920 - 530),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(60),
+ };
+ flMain.AddChidren(lockcolorfra1);
+
+ #region -------鍙栨秷 瀹屾垚
+ var lockRow = new RowLayout
+ {
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ lockcolorfra1.AddChidren(lockRow);
+ var Btncancel = new Button
+ {
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(80),
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ lockRow.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.security,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ Text = user.MembershipName,
+ };
+ lockRow.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
+
+ };
+ lockRow.AddChidren(Btncomplete);
+ #endregion
+
+ string SelectedDeviceStatuscondition = "";
+ lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * user.UserIdMode.Count) - 20 - 50);
+ lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * user.UserIdMode.Count) + 20 + 50);
+ for (int i = 0; i < user.UserIdMode.Count; i++)
+ {
+ var userid = user.UserIdMode[i];
+ var doorlockfra = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = lockRow.Bottom + Application.GetRealHeight(20 + 160 * i),
+ };
+ lockcolorfra1.AddChidren(doorlockfra);
+
+ var doorlockRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ doorlockfra.AddChidren(doorlockRow);
+
+ var doorlockBtn = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ doorlockRow.AddChidren(doorlockBtn);
+ //(1鎸夐敭/3鍗�/15鎸囩汗)
+ string[] s = userid.Split('_');
+ switch (s[1])
+ {
+ case "0":
+ {
+ doorlockBtn.Text = Language.StringByID(MyInternationalizationString.lockpassword);
+ }
+ break;
+ case "3":
+ {
+ doorlockBtn.Text = Language.StringByID(MyInternationalizationString.ic);
+ }
+ break;
+ case "15":
+ {
+ doorlockBtn.Text = Language.StringByID(MyInternationalizationString.fingerprint);
+ }
+ break;
+ }
+ var doorlockSelected = new Button
+ {
+ X = Application.GetRealWidth(860),
+ Width = Application.GetMinRealAverage(60),
+ Height = Application.GetMinRealAverage(60),
+ UnSelectedImagePath = "ZigeeLogic/selected.png",
+ Visible = false,
+ Gravity = Gravity.CenterVertical,
+
+ };
+ doorlockRow.AddChidren(doorlockSelected);
+ if ((user.UserIdMode.Count - 1) == i)
+ {
+ doorlockRow.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
+ }
+ EventHandler<MouseEventArgs> doorlockclick = (sender2, e2) =>
+ {
+ SelectedDeviceStatuscondition = "DoorLock";
+ selectedIcon.Visible = false;
+ selectedIcon = doorlockSelected;
+ doorlockSelected.Visible = true;
+ //doorlockBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ if (deviceConditionsInfo.ContainsKey("AttriButeId"))
+ {
+ deviceConditionsInfo.Remove("AttriButeId");
+ }
+ if (deviceConditionsInfo.ContainsKey("AttriButeData2"))
+ {
+ deviceConditionsInfo.Remove("AttriButeData2");
+ }
+ deviceConditionsInfo.Add("AttriButeId", s[1]);
+ deviceConditionsInfo.Add("AttriButeData2", s[0]);
+
+ if (userdictionary.ContainsKey("Account"))
+ {
+ userdictionary.Remove("Account");
+ }
+ if (userdictionary.ContainsKey("Type"))
+ {
+ userdictionary.Remove("Type");
+ }
+ if (userdictionary.ContainsKey("UserId"))
+ {
+ userdictionary.Remove("UserId");
+ }
+ userdictionary.Add("Account", Btntitle.Text+doorlockBtn.Text);
+ userdictionary.Add("Type", "1");
+ userdictionary.Add("UserId", s[0]);
+ };
+ doorlockRow.MouseUpEventHandler += doorlockclick;
+ doorlockBtn.MouseUpEventHandler += doorlockclick;
+ doorlockSelected.MouseUpEventHandler += doorlockclick;
+ doorlockfra.MouseUpEventHandler += doorlockclick;
+ if (edit)
+ {
+ if (editdeviceConditionsInfo["AttriButeData2"] == s[1])
+ {
+ selectedIcon.Visible = false;
+ selectedIcon = doorlockSelected;
+ doorlockSelected.Visible = true;
+
+ }
+
+ }
+
+ }
+
+
+ Btncomplete.MouseUpEventHandler += (sender3, e3) =>
+ {
+ if (SelectedDeviceStatuscondition != "")
+ {
+
+ for (int i = 0; i < Common.Logic.CurrentLogic.Conditions.Count; i++)
+ {
+ if (Common.Logic.CurrentLogic.Conditions[i]["Type"] == "1")
+ {
+ if ((Common.Logic.CurrentLogic.Conditions[i]["MacAddr"] == common.DeviceAddr) && (Common.Logic.CurrentLogic.Conditions[i]["Epoint"] == common.DeviceEpoint.ToString()))
+ {
+ if (Common.Logic.CurrentLogic.Conditions[i]["AttriButeId"] == editdeviceConditionsInfo["AttriButeId"] && Common.Logic.CurrentLogic.Conditions[i]["AttriButeData2"] == editdeviceConditionsInfo["AttriButeData2"])
+ {
+ Common.Logic.CurrentLogic.Conditions.RemoveAt(i);
+ Common.Logic.CurrentLogic.Conditions.Insert(i, deviceConditionsInfo);
+ for (int j = 0; j < Common.Logic.CurrentLogic.Accounts.Count; j++)
+ {
+ if (Common.Logic.CurrentLogic.Accounts[j]["UserId"] == editdeviceConditionsInfo["AttriButeData2"])
+ {
+ Common.Logic.CurrentLogic.Accounts.RemoveAt(j);
+ Common.Logic.CurrentLogic.Accounts.Insert(j, userdictionary);
+ }
+ }
+ return;
+ }
+ }
+ }
+ }
+
+ Common.Logic.CurrentLogic.Accounts.Add(userdictionary);
+ Common.Logic.CurrentLogic.Conditions.Add(deviceConditionsInfo);
+
+ }
+ else
+ {
+ if (!edit)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
+ Language.StringByID(MyInternationalizationString.complete));
+ alert.Show();
+ return;
+ }
+
+ }
+ flMain.RemoveFromParent();
+ var logicCommunalPage = new LogicCommunalPage();
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+
+ };
+
+ };
+ userBtn.MouseUpEventHandler += useridclick;
+ userBack.MouseUpEventHandler += useridclick;
+ userFramelayout.MouseUpEventHandler += useridclick;
+ userRow.MouseUpEventHandler += useridclick;
+
+ }
+ }
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs
index 4cfcdd7..395bc71 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SecurityMode.cs
@@ -20,230 +20,318 @@
public void Show()
{
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- this.AddChidren(new Button
- {
- Height = Application.GetRealHeight(80),
- });
- var topFrameLayout = new FrameLayout
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- TextID = MyInternationalizationString.securitymode,
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.securitymode,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
- var back = new Button
+ var clickBtn = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
};
- topFrameLayout.AddChidren(back);
- back.MouseDownEventHandler += (sender, e) =>
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
{
RemoveFromParent();
};
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) => {
+ RemoveFromParent();
+ };
+ #endregion
- var middle = new VerticalScrolViewLayout();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 220);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+ var middle = new FrameLayout();
+ middle.Y = topRowLayout.Bottom;
+ middle.Height = Application.GetRealHeight(1920 - 184);
+ middle.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
this.AddChidren(middle);
- if (actionsInfo.ContainsKey("LinkType"))
+ var btnsave = new Button
{
- actionsInfo.Remove("LinkType");
- }
- if (actionsInfo.ContainsKey("SecurityModeId"))
- {
- actionsInfo.Remove("SecurityModeId");
- }
- if (actionsInfo.ContainsKey("CheckIASStatus"))
- {
- actionsInfo.Remove("CheckIASStatus");
- }
- if (actionsInfo.ContainsKey("IsDelayStart"))
- {
- actionsInfo.Remove("IsDelayStart");
- }
-
- actionsInfo.Add("LinkType", 6);
- actionsInfo.Add("SecurityModeId", 0);
- actionsInfo.Add("CheckIASStatus", 0);
- actionsInfo.Add("IsDelayStart", 0);
-
+ Y= middle.Height-Application.GetRealHeight(260),
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
- #region ----甯冮槻 鎾ら槻 鑳佽揩鎾ら槻----
- var defenceRowLayout = new RowLayout
- {
- Height = Application.GetRealHeight(180),
};
- middle.AddChidren(defenceRowLayout);
+ middle.AddChidren(btnsave);
- var btndefence = new Button
+
+
+
+ #region ----(鍦ㄥ/绂诲)甯冮槻 鎾ら槻 鑳佽揩鎾ら槻----
+ #region 鍦ㄥ甯冮槻
+
+
+ var athomeFrameLayout = new FrameLayout
{
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.defence,
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(athomeFrameLayout);
+
+ var athomeiconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/athome.png",
+
+ };
+ athomeFrameLayout.AddChidren(athomeiconBtn);
+
+ var athomedefenceRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ athomeFrameLayout.AddChidren(athomedefenceRowLayout);
+
+ var btnathomedefence = new Button
+ {
+ Text = Language.StringByID(MyInternationalizationString.logicathomegarrison),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //Text="甯冮槻",
};
- defenceRowLayout.AddChidren(btndefence);
+ athomedefenceRowLayout.AddChidren(btnathomedefence);
+ var athomedefenceSelected = new SelectedButton(789);
+ athomedefenceRowLayout.AddChidren(athomedefenceSelected);
+ #endregion
- var defenceSelected = new Button
+ #region 绂诲甯冮槻
+
+ var leavehomeFrameLayout = new FrameLayout
{
- X = Application.GetRealWidth(1080 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
+ Height = Application.GetRealHeight(160),
+ Y = athomeFrameLayout.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- defenceRowLayout.AddChidren(defenceSelected);
+ middle.AddChidren(leavehomeFrameLayout);
- var withdrawalRowLayout = new RowLayout
+
+ var leavehomeiconBtn = new Button
{
- Height = Application.GetRealHeight(180),
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/leavehome.png",
+
};
- middle.AddChidren(withdrawalRowLayout);
+ leavehomeFrameLayout.AddChidren(leavehomeiconBtn);
- var btnwithdrawal = new Button
+
+ var leavehomedefenceRowLayout = new RowLayout
{
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.withdrawal,
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ leavehomeFrameLayout.AddChidren(leavehomedefenceRowLayout);
+
+ var leavehomebtndefence = new Button
+ {
+ Text = Language.StringByID(MyInternationalizationString.logicremovehomegarrison),
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //Text = "鎾ら槻",
- };
- withdrawalRowLayout.AddChidren(btnwithdrawal);
- var withdrawalSelected = new Button
- {
- X = Application.GetRealWidth(1080 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
};
- withdrawalRowLayout.AddChidren(withdrawalSelected);
-
- var urgentwithdrawalRowLayout = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- };
- middle.AddChidren(urgentwithdrawalRowLayout);
-
- var btnurgentwithdrawal = new Button
- {
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.urgentwithdrawal,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(40),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- //Text = "鑳佽揩鎾ら槻",
- };
- urgentwithdrawalRowLayout.AddChidren(btnurgentwithdrawal);
-
- var urgentwithdrawalSelected = new Button
- {
- X = Application.GetRealWidth(1080 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
- urgentwithdrawalRowLayout.AddChidren(urgentwithdrawalSelected);
+ leavehomedefenceRowLayout.AddChidren(leavehomebtndefence);
+ var leavehomedefenceSelected = new SelectedButton(789);
+ leavehomedefenceRowLayout.AddChidren(leavehomedefenceSelected);
#endregion
- string strvalue = "";
- ///甯冮槻鐐瑰嚮浜嬩欢
- EventHandler<MouseEventArgs> copenclick = (seder, e) =>
+ #region 鎾ら槻
+
+
+ var withdrawalFrameLayout = new FrameLayout
{
- defenceSelected.Visible = true;
- withdrawalSelected.Visible = false;
- urgentwithdrawalSelected.Visible = false;
- SecurityView(strvalue);
+ Height = Application.GetRealHeight(160),
+ Y = leavehomeFrameLayout.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(withdrawalFrameLayout);
+
+
+ var withdrawaliconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/withdrawal.png",
};
- btndefence.MouseUpEventHandler += copenclick;
- defenceRowLayout.MouseUpEventHandler += copenclick;
+ withdrawalFrameLayout.AddChidren(withdrawaliconBtn);
+
+
+ var withdrawalRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ withdrawalFrameLayout.AddChidren(withdrawalRowLayout);
+
+ var btnwithdrawal = new Button
+ {
+
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextID = MyInternationalizationString.withdrawal,
+
+ };
+ withdrawalRowLayout.AddChidren(btnwithdrawal);
+ var withdrawalSelected = new SelectedButton(789);
+ withdrawalRowLayout.AddChidren(withdrawalSelected);
+
+ #endregion
+
+ #region 鑳佽揩鎾ら槻
+ var urgentwithdFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = withdrawalFrameLayout.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(urgentwithdFrameLayout);
+
+
+ var urgentwithdiconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ UnSelectedImagePath = "ZigeeLogic/withdrawal.png",
+
+ };
+ urgentwithdFrameLayout.AddChidren(urgentwithdiconBtn);
+
+ var urgentwithdrawalRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ urgentwithdFrameLayout.AddChidren(urgentwithdrawalRowLayout);
+
+ var btnurgentwithdrawal = new Button
+ {
+ TextID = MyInternationalizationString.urgentwithdrawal,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ urgentwithdrawalRowLayout.AddChidren(btnurgentwithdrawal);
+
+ var urgentwithdrawalSelected = new SelectedButton(789);
+ urgentwithdrawalRowLayout.AddChidren(urgentwithdrawalSelected);
+ #endregion
+
+ #endregion
+
+ ///鍦ㄥ甯冮槻鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> athomeclick = (sedner14, e14) =>
+ {
+ athomedefenceSelected.Visible = true;
+ leavehomedefenceSelected.Visible = false;
+ withdrawalSelected.Visible = false;
+ urgentwithdrawalSelected.Visible = false;
+ };
+ athomedefenceRowLayout.MouseUpEventHandler += athomeclick;
+ btnathomedefence.MouseUpEventHandler += athomeclick;
+ athomedefenceSelected.MouseUpEventHandler += athomeclick;
+ athomeFrameLayout.MouseUpEventHandler += athomeclick;
+ athomeiconBtn.MouseUpEventHandler += athomeclick;
+
+ ///绂诲甯冮槻鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> leavehomeclick = (sedner14, e14) =>
+ {
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = true;
+ withdrawalSelected.Visible = false;
+ urgentwithdrawalSelected.Visible = false;
+ };
+ leavehomedefenceRowLayout.MouseUpEventHandler += leavehomeclick;
+ leavehomebtndefence.MouseUpEventHandler += leavehomeclick;
+ leavehomedefenceSelected.MouseUpEventHandler += leavehomeclick;
+ leavehomeFrameLayout.MouseUpEventHandler += leavehomeclick;
+ leavehomeiconBtn.MouseUpEventHandler += leavehomeclick;
///鎾ら槻鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> disableclick = (seder, e) =>
{
- defenceSelected.Visible = false;
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = false;
withdrawalSelected.Visible = true;
urgentwithdrawalSelected.Visible = false;
- if (actionsInfo.ContainsKey("Password"))
- {
- actionsInfo.Remove("Password");
- }
- actionsInfo.Add("Password", "999999");
- if (actionsInfo.ContainsKey("SecurityModeId"))
- {
- actionsInfo.Remove("SecurityModeId");
- }
- if (actionsInfo.ContainsKey("SecuritySetting"))
- {
- actionsInfo.Remove("SecuritySetting");
- }
- actionsInfo.Add("SecurityModeId", "0");
- actionsInfo.Add("SecuritySetting", "0");
- LogicIfon.AddSecurityactions(actionsInfo);
- this.RemoveFromParent();
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
+
};
withdrawalRowLayout.MouseUpEventHandler += disableclick;
btnwithdrawal.MouseUpEventHandler += disableclick;
+ withdrawalSelected.MouseUpEventHandler += disableclick;
+ withdrawalFrameLayout.MouseUpEventHandler += disableclick;
+ withdrawaliconBtn.MouseUpEventHandler += disableclick;
///鑳佽揩鎾ら槻鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs> urgentwithdrawalclick = (seder, e) =>
{
- defenceSelected.Visible = false;
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = false;
withdrawalSelected.Visible = false;
urgentwithdrawalSelected.Visible = true;
- if (actionsInfo.ContainsKey("Password"))
- {
- actionsInfo.Remove("Password");
- }
- if (actionsInfo.ContainsKey("SecuritySetting"))
- {
- actionsInfo.Remove("SecuritySetting");
- }
- actionsInfo.Add("Password", "888888");
- actionsInfo.Add("SecuritySetting", "0");
- LogicIfon.AddSecurityactions(actionsInfo);
- this.RemoveFromParent();
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
};
urgentwithdrawalRowLayout.MouseUpEventHandler += urgentwithdrawalclick;
btnurgentwithdrawal.MouseUpEventHandler += urgentwithdrawalclick;
+ urgentwithdrawalSelected.MouseUpEventHandler+= urgentwithdrawalclick;
+ urgentwithdFrameLayout.MouseUpEventHandler += urgentwithdrawalclick;
+ urgentwithdiconBtn.MouseUpEventHandler += urgentwithdrawalclick;
if (IsDeviceEditor)
{
@@ -251,18 +339,20 @@
{
if (actions["LinkType"].ToString() == "6")
{
-
+
if (actions["SecuritySetting"].ToString() == "0")
{
if (actions["Password"].ToString() == "888888")
{
- defenceSelected.Visible = false;
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = false;
withdrawalSelected.Visible = false;
urgentwithdrawalSelected.Visible = true;
}
else
{
- defenceSelected.Visible = false;
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = false;
withdrawalSelected.Visible = true;
urgentwithdrawalSelected.Visible = false;
}
@@ -270,10 +360,18 @@
}
else if (actions["SecuritySetting"].ToString() == "1")
{
- strvalue = actions["SecurityModeId"].ToString();
- defenceSelected.Visible = true;
+ athomedefenceSelected.Visible = true;
+ leavehomedefenceSelected.Visible = false;
withdrawalSelected.Visible = false;
urgentwithdrawalSelected.Visible = false;
+ }
+ else if (actions["SecuritySetting"].ToString() == "2")
+ {
+ athomedefenceSelected.Visible = false;
+ leavehomedefenceSelected.Visible = true;
+ withdrawalSelected.Visible = false;
+ urgentwithdrawalSelected.Visible = false;
+
}
break;
@@ -282,146 +380,87 @@
}
}
+
-
- }
-
- void SecurityView(string strvalue)
- {
- FrameLayout flMain = new FrameLayout { BackgroundColor = 0x00000000 };
- this.AddChidren(flMain);
- flMain.MouseUpEventHandler += (sender, e) =>
+ btnsave.MouseUpEventHandler += (sender, e) =>
{
- flMain.RemoveFromParent();
- };
-
- var frameLayout = new FrameLayout
- {
- Y = Application.GetRealHeight(1920 - 360),
- Height = Application.GetRealHeight(360),
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- };
- flMain.AddChidren(frameLayout);
-
- var athomeRow = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- };
- frameLayout.AddChidren(athomeRow);
-
- var athomeBtn = new Button
- {
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.athome,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- athomeRow.AddChidren(athomeBtn);
-
- var athomeSelected = new Button
- {
- X = Application.GetRealWidth(1080 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
- athomeRow.AddChidren(athomeSelected);
-
- var leavehomeRow = new RowLayout
- {
- Height = Application.GetRealHeight(180),
- Y = athomeRow.Bottom,
- };
- frameLayout.AddChidren(leavehomeRow);
- var leavehomeBtn = new Button
- {
- Width = Application.GetRealWidth(600),
- TextID = MyInternationalizationString.leavehome,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- };
- leavehomeRow.AddChidren(leavehomeBtn);
-
- var leavehomeSelected = new Button
- {
- X = Application.GetRealWidth(1080 - 150),
- Width = Application.GetMinRealAverage(110),
- Height = Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Item/YesSelected.png",
- Visible = false,
- Gravity = Gravity.CenterVertical
- };
- leavehomeRow.AddChidren(leavehomeSelected);
-
- EventHandler<MouseEventArgs> athomeclick = (sender6, e6) =>
- {
- flMain.RemoveFromParent();
- if (actionsInfo.ContainsKey("SecurityModeId"))
+ if (!athomedefenceSelected.Visible && !leavehomedefenceSelected.Visible && !withdrawalSelected.Visible && !urgentwithdrawalSelected.Visible)
{
- actionsInfo.Remove("SecurityModeId");
+ return;
}
- if (actionsInfo.ContainsKey("SecuritySetting"))
+
+ if (actionsInfo.ContainsKey("LinkType"))
{
- actionsInfo.Remove("SecuritySetting");
+ actionsInfo.Remove("LinkType");
}
+ if (actionsInfo.ContainsKey("CheckIASStatus"))
+ {
+ actionsInfo.Remove("CheckIASStatus");
+ }
+ if (actionsInfo.ContainsKey("IsDelayStart"))
+ {
+ actionsInfo.Remove("IsDelayStart");
+ }
+
+ actionsInfo.Add("LinkType", 6);
+ actionsInfo.Add("CheckIASStatus", 0);
+ actionsInfo.Add("IsDelayStart", 0);
+
if (actionsInfo.ContainsKey("Password"))
{
actionsInfo.Remove("Password");
}
- actionsInfo.Add("Password", "666666");
- actionsInfo.Add("SecurityModeId", "1");
- actionsInfo.Add("SecuritySetting", "1");
- LogicIfon.AddSecurityactions(actionsInfo);
- var logicCommunalPage = new LogicCommunalPage();
- UserView.HomePage.Instance.AddChidren(logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show(() => { });
-
- };
- athomeRow.MouseUpEventHandler += athomeclick;
- athomeBtn.MouseUpEventHandler += athomeclick;
- athomeSelected.MouseUpEventHandler += athomeclick;
-
- EventHandler<MouseEventArgs> leavehomeclick = (sender6, e6) =>
- {
- flMain.RemoveFromParent();
- if (actionsInfo.ContainsKey("SecurityModeId"))
- {
- actionsInfo.Remove("SecurityModeId");
- }
if (actionsInfo.ContainsKey("SecuritySetting"))
{
actionsInfo.Remove("SecuritySetting");
}
- if(actionsInfo.ContainsKey("Password"))
+ if (actionsInfo.ContainsKey("SecurityModeId"))
{
- actionsInfo.Remove("Password");
+ actionsInfo.Remove("SecurityModeId");
}
- actionsInfo.Add("Password", "666666");
- actionsInfo.Add("SecurityModeId", "2");
- actionsInfo.Add("SecuritySetting", "1");
+ ///鍦ㄥ甯冮槻
+ if (athomedefenceSelected.Visible)
+ {
+ actionsInfo.Add("SecuritySetting", "1");
+ actionsInfo.Add("SecurityModeId", "1");
+ actionsInfo.Add("Password", "666666");
+
+ }
+ ///绂诲甯冮槻
+ if (leavehomedefenceSelected.Visible)
+ {
+ actionsInfo.Add("SecuritySetting", "1");
+ actionsInfo.Add("SecurityModeId", "2");
+ actionsInfo.Add("Password", "666666");
+
+ }
+ ///鎾ら槻
+ if (withdrawalSelected.Visible)
+ {
+ actionsInfo.Add("SecuritySetting", "0");
+ actionsInfo.Add("SecurityModeId", "0");
+ actionsInfo.Add("Password", "999999");
+
+ }
+ ///绱ц揩鎾ら槻
+ if (urgentwithdrawalSelected.Visible)
+ {
+ actionsInfo.Add("SecuritySetting", "0");
+ actionsInfo.Add("SecurityModeId", "0");
+ actionsInfo.Add("Password", "888888");
+
+ }
LogicIfon.AddSecurityactions(actionsInfo);
+ this.RemoveFromParent();
var logicCommunalPage = new LogicCommunalPage();
UserView.HomePage.Instance.AddChidren(logicCommunalPage);
UserView.HomePage.Instance.PageIndex += 1;
logicCommunalPage.Show(() => { });
+
};
- leavehomeRow.MouseUpEventHandler += leavehomeclick;
- leavehomeBtn.MouseUpEventHandler += leavehomeclick;
- leavehomeSelected.MouseUpEventHandler += leavehomeclick;
-
- if (strvalue == "1")
- {
- athomeSelected.Visible = true;
- leavehomeSelected.Visible = false;
- }
- else if (strvalue == "2")
- {
- leavehomeSelected.Visible = true;
- athomeSelected.Visible = false;
-
- }
}
+
+
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SelectedButton.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SelectedButton.cs
new file mode 100755
index 0000000..8c3bfec
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SelectedButton.cs
@@ -0,0 +1,45 @@
+锘縰sing System;
+using Shared;
+namespace Shared.Phone.Device.Logic
+{
+ public class SelectedButton : Button
+ {
+
+ /// <summary>
+ /// 妯潗鏍囦綅缃�
+ /// </summary>
+ /// <param name="Xwidth"></param>
+ public SelectedButton(int Xwidth = 860)
+ {
+ X = Application.GetRealWidth(Xwidth);
+ Width = Application.GetMinRealAverage(60);
+ Height = Application.GetMinRealAverage(60);
+ UnSelectedImagePath = "ZigeeLogic/selected.png";
+ Visible = false;
+ Gravity = Gravity.CenterVertical;
+ }
+ ///// <summary>
+ ///// 妯潗鏍囦綅缃�
+ ///// </summary>
+ ///// <param name="Xwidth"></param>
+ //public void SelectedBtnIcon(int Xwidth = 860)
+ //{
+ // X = Application.GetRealWidth(Xwidth);
+ // Width = Application.GetMinRealAverage(60);
+ // Height = Application.GetMinRealAverage(60);
+ // UnSelectedImagePath = "ZigeeLogic/selected.png";
+ // Visible = false;
+ // Gravity = Gravity.CenterVertical;
+ //}
+ //public void BackBtnIcon()
+ //{
+ // Width = Application.GetRealWidth(30);
+ // Height = Application.GetRealHeight(51);
+ // X = Application.GetRealWidth(58);
+ // Y = Application.GetRealHeight(98);
+ // //Gravity = Gravity.CenterVertical;
+ // UnSelectedImagePath = "ZigeeLogic/back.png";
+ //}
+
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
index 3cb527e..1915625 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs
@@ -3,11 +3,13 @@
using Newtonsoft.Json.Linq;
using ZigBee.Device;
using ZigBee.Common;
+using Shared.Common;
namespace Shared.Phone.Device.Logic
{
public class Send
{
+
/// <summary>
/// 鑾峰彇LogicId鐨勬柟娉�
/// </summary>
@@ -97,8 +99,9 @@
logic.LogicName = Logicifon["LogicName"]?.ToString();
logic.Relationship = int.Parse(Logicifon["Relationship"]?.ToString());
- logic.TimeAttribute = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.TimeAttributeObj>(Logicifon["TimeAttribute"].ToString());
+ logic.TimeAttribute = Newtonsoft.Json.JsonConvert.DeserializeObject<TimeAttributeObj>(Logicifon["TimeAttribute"].ToString());
logic.Conditions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Conditions"].ToString());
+ logic.Accounts = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, string>>>(Logicifon["Accounts"].ToString());
var listactions = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(Logicifon["Actions"].ToString());
if (listactions != null)
{
@@ -133,7 +136,7 @@
}
- };
+ }
};
var mainGateWay = ZbGateway.MainGateWay;
if (mainGateWay == null)
@@ -251,10 +254,6 @@
try
{
- //var bytes = new byte[64];
- //var LogicNameBytes = System.Text.Encoding.UTF8.GetBytes(logic.LogicName);
- //Array.Copy(LogicNameBytes, 0, bytes, 0, 64 < LogicNameBytes.Length ? 64 : LogicNameBytes.Length);
- //logic.LogicName = System.Text.Encoding.UTF8.GetString(bytes);
var jObject = new JObject { { "Cluster_ID", 0 }, { "Command", 2000 } };
var selectMonthList = new JArray { };
@@ -310,8 +309,13 @@
["AttriButeId"] = int.Parse(dictionary["AttriButeId"]),
["AttriButeData1"] = int.Parse(dictionary["AttriButeData1"]),
["AttriButeData2"] = int.Parse(dictionary["AttriButeData2"]),
- ["Range"] = int.Parse(dictionary["Range"]),
+ ["Range"] = int.Parse(dictionary["Range"])
};
+ if (dictionary.ContainsKey("IgnoreTime"))
+ {
+ dInfo.Add("IgnoreTime", int.Parse(dictionary["IgnoreTime"]));
+ }
+
conditions.Add(dInfo);
break;
case 2:
@@ -434,16 +438,51 @@
};
actions.Add(cdInfo);
break;
+ case 7:
+ var timeInfo = new JObject
+ {
+ ["LinkType"] = int.Parse(dictionary["LinkType"].ToString()),
+ ["DelayTime"] = int.Parse(dictionary["DelayTime"].ToString()),
+ };
+ actions.Add(timeInfo);
+ break;
}
+ }
+ var accounts = new JArray();
+ foreach (var dictionary in logic.Accounts) {
+ var Type = int.Parse(dictionary["Type"]);
+ switch (Type)
+ {
+ case 1: {
+ ///
+ } break;
+ case 7:
+ {
+ var location = new JObject
+ {
+ ["Type"] = int.Parse(dictionary["Type"]),
+ ["Account"] = dictionary["Account"],
+ ["Longitude"] = int.Parse(dictionary["Longitude"]),
+ ["Latitude"] = int.Parse(dictionary["Latitude"]),
+ ["Radius"] = int.Parse(dictionary["Radius"]),
+
+ };
+ accounts.Add(location);
+ }
+ break;
+ }
+
}
var data = new JObject{
{ "LogicId",logic.LogicId},
{ "IsEnable", logic.IsEnable} ,
{ "LogicName", logic.LogicName},
{ "Relationship",logic.Relationship} ,
+ { "LogicCustomPushText",logic.LogicCustomPushText} ,
{ "TimeAttribute", timeAttribute} ,
{ "Conditions", conditions },
{ "Actions", actions },
+ { "Accounts", accounts },
};
jObject.Add("Data", data);
ZbGateway.MainGateWay?.Send("Logic/AddLogic", jObject.ToString());
@@ -503,8 +542,9 @@
jObject.Add("Data", date);
date.Add("LogicId", logic.LogicId);
date.Add("IsEnable", logic.IsEnable);
- //date.Add("LogicName", logic.LogicName);
- //date.Add("Relationship", logic.Relationship);
+ date.Add("LogicName", logic.LogicName);
+ date.Add("Relationship", logic.Relationship);
+ date.Add("LogicCustomPushText", logic.LogicCustomPushText);
mainGateWay?.Send("Logic/ReviseAttribute", jObject.ToString());
//await System.Threading.Tasks.Task.Run(async () =>
//{
@@ -635,14 +675,227 @@
});
}
// <summary>
- /// 閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
+ /// 閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
/// </summary>
/// <param name="btnregionname">Btnregionname.</param>
/// <param name="device">Device.</param>
public static void RoomNmae(Button btnregionname, CommonDevice device)
{
- var room = new Common.Room();
+ var room = new Common.Room();
btnregionname.Text = room.GetRoomNameByDevice(device);
}
+
+ public static List<Common.Room> GetRoomList(string floorId)
+ {
+ return Common.Room.Lists.FindAll((obj) => obj.FloorId == floorId);
+
+ }
+
+ #region ----鑾峰彇闂ㄩ攣
+ public static List<DoorLock> ReadDoorLockIfon(string doorlockMac)
+ {
+ List<DoorLock> list = new List<DoorLock>();
+ string url = "https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetHomePager";
+ System.Net.WebClient webClient = new System.Net.WebClient();
+ System.Collections.Specialized.NameValueCollection postValues = new System.Collections.Specialized.NameValueCollection();
+ postValues.Add("RequestVersion", CommonPage.RequestVersion);
+ postValues.Add("ReqDto.LoginAccessToken", Config.Instance.Token);
+ System.Threading.Tasks.Task.Run(() =>
+ {
+ try
+ {
+
+ byte[] responseArray = webClient.UploadValues(url, postValues);
+ var str = System.Text.Encoding.UTF8.GetString(responseArray);
+ var jObject = JObject.Parse(str);
+ if (jObject == null || jObject["StateCode"].ToString() != "Success")
+ {
+ return;
+ }
+ var pageData = jObject["ResponseData"]["PageData"].ToString();
+ var datalist = JArray.Parse(pageData);
+ for (int i = 0; i < datalist.Count; i++)
+ {
+ var data = JObject.Parse(datalist[i].ToString());
+ if (Config.Instance.HomeId == data["Id"].ToString())
+ {
+ Residential residential = new Residential();
+
+ if (Convert.ToBoolean(data["IsOthreShare"].ToString()))
+ {
+ //鍒嗕韩鑰匢D
+ residential.Id = data["Id"].ToString();
+ //鏄惁鏄垎浜处鍙穂true(鏄垎浜�);false;(涓嶆槸鍒嗕韩)];
+ residential.IsOthreShare = Convert.ToBoolean(data["IsOthreShare"].ToString());
+ //鍒嗕韩鑰呬綇瀹匢D
+ residential.MainUserDistributedMark = data["MainUserDistributedMark"].ToString();
+ residential.IsOtherAccountCtrl = true;
+ residential.doorlockmac = doorlockMac;
+ list = ReadToken(residential);
+ }
+ else
+ {
+ residential.Url = "https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetDoorLockPager";
+ residential.Token = Config.Instance.Token;
+ residential.Id = Config.Instance.HomeId;
+ residential.IsOtherAccountCtrl = false;
+ residential.doorlockmac = doorlockMac;
+ list = ReadDoorLock(residential);
+
+ }
+ }
+
+ }
+ }
+ catch { }
+ });
+ var datetime = DateTime.Now;
+ while ((DateTime.Now - datetime).TotalMilliseconds < 3*1000)
+ {
+ if (list.Count != 0)
+ {
+ break;
+ }
+ }
+ return list;
+
+ }
+
+ public static List<DoorLock> ReadToken(Residential residential)
+ {
+ List<DoorLock> list = new List<DoorLock>();
+ string url = "https://global.hdlcontrol.com/HangZhouHdlCloudApi/App/GetSharedHomeApiControl";
+ System.Net.WebClient webClient = new System.Net.WebClient();
+ System.Collections.Specialized.NameValueCollection postValues = new System.Collections.Specialized.NameValueCollection();
+ postValues.Add("RequestVersion", CommonPage.RequestVersion);
+ postValues.Add("LoginAccessToken", Config.Instance.Token);
+ postValues.Add("MainAccountId", residential.MainUserDistributedMark);
+ postValues.Add("SharedHid", residential.Id);
+ System.Threading.Tasks.Task.Run(() =>
+ {
+ try
+ {
+ byte[] responseArray = webClient.UploadValues(url, postValues);
+ var str = System.Text.Encoding.UTF8.GetString(responseArray);
+ var jObject = JObject.Parse(str);
+ if (jObject == null || jObject["StateCode"].ToString() != "Success")
+ {
+ return;
+ }
+ var RequestBaseUrl = jObject["ResponseData"]["RequestBaseUrl"].ToString();
+ var RequestToken = jObject["ResponseData"]["RequestToken"].ToString();
+ Residential lockifon = new Residential();
+ lockifon.Url = RequestBaseUrl + "/App/GetDoorLockPager";
+ lockifon.Token = RequestToken;
+ lockifon.Id = Config.Instance.HomeId;
+ lockifon.IsOtherAccountCtrl = true;
+ lockifon.doorlockmac = residential.doorlockmac;
+ list = ReadDoorLock(lockifon);
+
+ }
+ catch { }
+ });
+ var datetime = DateTime.Now;
+ while ((DateTime.Now - datetime).TotalMilliseconds < 3 * 1000)
+ {
+ if (list.Count != 0)
+ {
+ break;
+ }
+ }
+ return list;
+ }
+
+ public static List<DoorLock> ReadDoorLock(Residential lockifon)
+ {
+ List<DoorLock> list = new List<DoorLock>();
+ System.Net.WebClient webClient = new System.Net.WebClient();
+ System.Collections.Specialized.NameValueCollection postValues = new System.Collections.Specialized.NameValueCollection();
+ postValues.Add("RequestVersion", CommonPage.RequestVersion);
+ postValues.Add("LoginAccessToken", lockifon.Token);
+ postValues.Add("HomeId", lockifon.Id);
+ postValues.Add("DoorLockId", lockifon.doorlockmac);//闂ㄩ攣Mac19091
+ postValues.Add("IsOtherAccountCtrl", lockifon.IsOtherAccountCtrl.ToString());
+ System.Threading.Tasks.Task.Run(() =>
+ {
+ try
+ {
+
+ byte[] responseArray = webClient.UploadValues(lockifon.Url, postValues);
+ var str = System.Text.Encoding.UTF8.GetString(responseArray);
+ var jObject = JObject.Parse(str);
+ if (jObject == null || jObject["StateCode"].ToString() != "Success")
+ {
+ return;
+ }
+ var pageData = jObject["ResponseData"]["PageData"].ToString();
+ var datalist = JArray.Parse(pageData);
+ for (int i = 0; i < datalist.Count; i++)
+ {
+ var data = JObject.Parse(datalist[i].ToString());
+ DoorLock doorLock = new DoorLock();
+ doorLock.DoorLockLocalUserId = data["DoorLockLocalUserId"].ToString();
+ doorLock.OpenLockMode = int.Parse(data["OpenLockMode"].ToString());
+ doorLock.CloudAccountId = data["CloudAccountId"].ToString();
+ list.Add(doorLock);
+ }
+
+ }
+ catch
+ {
+
+ }
+
+ });
+ var datetime = DateTime.Now;
+ while ((DateTime.Now - datetime).TotalMilliseconds < 3 * 1000)
+ {
+ if (list.Count != 0)
+ {
+ break;
+ }
+ }
+ return list;
+ }
+
+ public class Residential
+ {
+ public string Id = string.Empty;
+ public bool IsOthreShare;
+ public string MainUserDistributedMark = string.Empty;
+ public string Url = string.Empty;
+ public string Token = string.Empty;
+ public bool IsOtherAccountCtrl;
+ public string doorlockmac;
+ }
+
+ public class DoorLock
+ {
+ public string DoorLockLocalUserId = string.Empty;
+ public int OpenLockMode;
+ public string CloudAccountId = string.Empty;
+ /// <summary>
+ /// 韬唤+瑙﹀彂婧�(0鎸夐敭/3鍗�/15鎸囩汗)
+ /// </summary>
+ public string UserIdMode
+ {
+ get
+ {
+ return DoorLockLocalUserId + "_" + OpenLockMode.ToString();
+ }
+ }
+ }
+
+ public class MembershipIfon
+ {
+ public string MembershipId = string.Empty;
+ public List<string> UserIdMode=new List<string>();
+ public string MembershipName = string.Empty;
+ }
+
+ public static List<MembershipIfon> UserList = new List<MembershipIfon>();
+
+
+ #endregion
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SetDeviceState.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SetDeviceState.cs
deleted file mode 100755
index bd9932d..0000000
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SetDeviceState.cs
+++ /dev/null
@@ -1,681 +0,0 @@
-锘縰sing System;
-using System.Collections.Generic;
-using Shared;
-using Shared.R;
-using Shared.Phone;
-using ZigBee.Device;
-using Shared.Common;
-
-namespace Shared.Phone.Device.Logic
-{
- public class SetDeviceState:FrameLayout
- {
- public SetDeviceState()
- {
- Tag = "Logic";
- }
- Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
- List<Dictionary<string, string>> taskListInfo = new List<Dictionary<string, string>>();
- public void Show (CommonDevice common,string topText,bool edit)
- {
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- UserView.HomePage.Instance.ScrollEnabled = false;
- var topFrameLayout = new FrameLayout
- {
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
- };
- AddChidren(topFrameLayout);
-
- var titleName = new Button {
- Text =topText,
- //TextID = MyInternationalizationString.adddevice,
- TextSize = 17,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
- };
- topFrameLayout.AddChidren (titleName);
-
- var back = new Button {
- Width = Application.GetRealWidth (110),
- Height = Application.GetRealHeight (110),
- X = Application.GetRealWidth (20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
- };
- topFrameLayout.AddChidren (back);
- back.MouseDownEventHandler += (sender, e) => {
- RemoveFromParent ();
- UserView.HomePage.Instance.ScrollEnabled = true;
- };
-
-
- var middle = new FrameLayout ();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight (1920 - 220);
- middle.BackgroundColor =ZigbeeColor.Current.LogicBackgroundColor;
- this.AddChidren (middle);
-
- var bjframelayout = new FrameLayout
- {
- X = Application.GetRealWidth(50),
- Width = Application.GetRealWidth(1080 - 100),
- Height = Application.GetRealHeight(1300),
- Y=Application.GetRealHeight(50),
- BackgroundColor= ZigbeeColor.Current.LogicTopViewBackgroundColor,
- };
- middle.AddChidren(bjframelayout);
-
- List<Dictionary<string,string>> TaskList = null;
- foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions)
- {
- if (deviceinfo["LinkType"].ToString() == "0")
- {
-
- if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr &&deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString())
- {
- TaskList = deviceinfo["TaskList"] as List<Dictionary<string, string>>;
- break;
- }
- }
- }
- string SelectedDeviceStatus = "no";
-
- if (actionsInfo.ContainsKey("LinkType"))
- {
- actionsInfo.Remove("LinkType");
- }
- if (actionsInfo.ContainsKey("DeviceAddr"))
- {
- actionsInfo.Remove("DeviceAddr");
- }
- if (actionsInfo.ContainsKey("Epoint"))
- {
- actionsInfo.Remove("Epoint");
- }
- if (actionsInfo.ContainsKey("Time"))
- {
- actionsInfo.Remove("Time");
- }
- if (actionsInfo.ContainsKey("TaskList"))
- {
- actionsInfo.Remove("TaskList");
- }
- actionsInfo.Add("LinkType", 0);
- actionsInfo.Add("DeviceAddr", common.DeviceAddr);
- actionsInfo.Add("Epoint", common.DeviceEpoint);
- actionsInfo.Add("Time", 0);
- actionsInfo.Add("TaskList", taskListInfo);
- switch (common.Type)
- {
- case DeviceType.DimmableLight:
- {
- #region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
- //Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
- //if (switchdictionary.ContainsKey("TaskType"))
- //{
- // switchdictionary.Remove("TaskType");
- //}
- //if (switchdictionary.ContainsKey("Data1"))
- //{
- // switchdictionary.Remove("Data1");
- //}
- //if (switchdictionary.ContainsKey("Data2"))
- //{
- // switchdictionary.Remove("Data2");
- //}
- //switchdictionary.Add("TaskType", "1");
- //switchdictionary.Add("Data1", "0");
- //switchdictionary.Add("Data2", "0");
- //taskListInfo.Add(switchdictionary);
- Dictionary<string, string> brightnessdictionary = new Dictionary<string, string>();
- if (brightnessdictionary.ContainsKey("TaskType"))
- {
- brightnessdictionary.Remove("TaskType");
- }
- if (brightnessdictionary.ContainsKey("Data1"))
- {
- brightnessdictionary.Remove("Data1");
- }
- if (brightnessdictionary.ContainsKey("Data2"))
- {
- brightnessdictionary.Remove("Data2");
- }
- brightnessdictionary.Add("TaskType", "3");
- brightnessdictionary.Add("Data1", "0");
- brightnessdictionary.Add("Data2", "0");
- taskListInfo.Add(brightnessdictionary);
- #endregion
-
- #region 鐏厜View
- var Btndevicename = new Button
- {
- Text = common.DeviceEpointName,
- Y = Application.GetRealHeight(150),
- X = Application.GetRealWidth(190),
- Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(150),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 16,
- TextAlignment = TextAlignment.Center,
- };
- bjframelayout.AddChidren(Btndevicename);
-
-
- var Btniocn = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "Room/Light.png",
- X = Application.GetRealWidth(440),
- Y = Btndevicename.Bottom + Application.GetRealHeight(100),
- };
- bjframelayout.AddChidren(Btniocn);
-
- var Btnvelue = new Button
- {
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(390),
- Y = Btniocn.Bottom + Application.GetRealHeight(100),
- TextAlignment = TextAlignment.Center,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Text = "0%",
- };
- bjframelayout.AddChidren(Btnvelue);
-
- var horizontalSeekBarVolframelayout = new FrameLayout
- {
- Y = Btnvelue.Bottom,
- Width = Application.GetRealWidth(880),
- Height = Application.GetRealHeight(80),
- X = Application.GetRealWidth(50),
- };
- bjframelayout.AddChidren(horizontalSeekBarVolframelayout);
-
-
- var horizontalSeekBarVol = new HorizontalSeekBar
- {
- Width = Application.GetRealWidth(880 - 50),
- Height = Application.GetRealHeight(80),
- Radius = (uint)Application.GetRealHeight(25),
- X = Application.GetRealWidth(25),
- Gravity = Gravity.CenterVertical,
- ProgressColor = 0xffFE5E00,
- Max = 100,
- SleepTime = 1000,
- ThumbRadius = 9,
- //IsCanClick=false
- };
- horizontalSeekBarVolframelayout.AddChidren(horizontalSeekBarVol);
-
-
- var Btnswitch = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "Room/Light.png",
- SelectedImagePath = "Room/LightSelected.png",
- X = Application.GetRealWidth(440),
- Y = horizontalSeekBarVolframelayout.Bottom + Application.GetRealHeight(80),
- };
- //bjframelayout.AddChidren(Btnswitch);
-
- var textfl = new FrameLayout
- {
- Width = Application.GetRealWidth(980),
- Height = Application.GetRealHeight(160),
- BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor,
- Y = Application.GetRealHeight(1300 - 160),
- };
- bjframelayout.AddChidren(textfl);
-
- var Btnregioniocn = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "Room/Light.png",
- X = Application.GetRealWidth(40),
- Y = Application.GetRealHeight(25),
- };
- textfl.AddChidren(Btnregioniocn);
-
- var Btnregionname = new Button
- {
- Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(150 + 30),
- TextAlignment = TextAlignment.CenterLeft,
- Text ="",
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Y = Application.GetRealHeight(25),
- };
- textfl.AddChidren(Btnregionname);
- Send.RoomNmae(Btnregionname,common);
- #endregion
- horizontalSeekBarVol.ProgressChanged += (sender, e) =>
- {
- SelectedDeviceStatus = "selected";
- Btnvelue.Text = horizontalSeekBarVol.Progress.ToString() + "%";
-
- if (brightnessdictionary.ContainsKey("Data1"))
- {
- brightnessdictionary.Remove("Data1");
- }
- var lightbrightnessvalue = (254 * horizontalSeekBarVol.Progress) / 100;//鏈�澶т寒搴﹀�兼槸254闇�瑕佽浆鎹紱
- brightnessdictionary.Add("Data1", lightbrightnessvalue.ToString());
- //var dd = (lightbrightnessvalue * 100)/254+1;
- };
-
- Btnswitch.MouseUpEventHandler += (sender, e) =>
- {
- SelectedDeviceStatus = "selected";
- Btnswitch.IsSelected = !Btnswitch.IsSelected;
-
- //if (switchdictionary.ContainsKey("Data1"))
- //{
- // switchdictionary.Remove("Data1");
- //}
- //if (Btnswitch.IsSelected)
- //{
- // switchdictionary.Add("Data1", "1");
- //}
- //else
- //{
- // switchdictionary.Add("Data1", "0");
- //}
- };
-
- if (edit&&TaskList!=null)
- {
- foreach (var value in TaskList)
- {
- if (value["TaskType"] == "1")
- {
- //if (switchdictionary.ContainsKey("Data1"))
- //{
- // switchdictionary.Remove("Data1");
- //}
- //if (value["Data1"] == "1")
- //{
- // switchdictionary.Add("Data1", "1");
- // Btnswitch.IsSelected = true;
- //}
- //else
- //{
- // switchdictionary.Add("Data1", "0");
- // Btnswitch.IsSelected = false;
- //}
- }
- else if (value["TaskType"] == "3")
- {
- if (brightnessdictionary.ContainsKey("Data1"))
- {
- brightnessdictionary.Remove("Data1");
- }
- var intvalue = int.Parse(value["Data1"]);
- brightnessdictionary.Add("Data1", intvalue.ToString());
- var lightbrightnessvalue = (intvalue * 100) / 254;
- Btnvelue.Text = lightbrightnessvalue.ToString() + "%";
- horizontalSeekBarVol.Progress = lightbrightnessvalue;
-
- }
- }
- }
-
- }
- break;
- case DeviceType.WindowCoveringDevice:
- {
- #region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
- //Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
- //if (switchdictionary.ContainsKey("TaskType"))
- //{
- // switchdictionary.Remove("TaskType");
- //}
- //if (switchdictionary.ContainsKey("Data1"))
- //{
- // switchdictionary.Remove("Data1");
- //}
- //if (switchdictionary.ContainsKey("Data2"))
- //{
- // switchdictionary.Remove("Data2");
- //}
- //switchdictionary.Add("TaskType", "6");
- //switchdictionary.Add("Data1", "1");
- //switchdictionary.Add("Data2", "0");
- //taskListInfo.Add(switchdictionary);
-
- Dictionary<string, string> brightnessdictionary = new Dictionary<string, string>();
- if (brightnessdictionary.ContainsKey("TaskType"))
- {
- brightnessdictionary.Remove("TaskType");
- }
- if (brightnessdictionary.ContainsKey("Data2"))
- {
- brightnessdictionary.Remove("Data2");
- }
- if (brightnessdictionary.ContainsKey("Data1"))
- {
- brightnessdictionary.Remove("Data1");
- }
- brightnessdictionary.Add("TaskType", "6");
- brightnessdictionary.Add("Data1", "5");
- brightnessdictionary.Add("Data2", "0");
- taskListInfo.Add(brightnessdictionary);
- #endregion
-
- #region 绐楀笜View
-
- var Btndevicename = new Button
- {
- Text = common.DeviceEpointName,
- Y = Application.GetRealHeight(150),
- X = Application.GetRealWidth(190),
- Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(150),
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 16,
- TextAlignment = TextAlignment.Center,
- };
- bjframelayout.AddChidren(Btndevicename);
-
-
- var Btniocn = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "Room/Curtain.png",
- X = Application.GetRealWidth(440),
- Y = Btndevicename.Bottom + Application.GetRealHeight(100),
- };
- bjframelayout.AddChidren(Btniocn);
-
- var Btnvelue = new Button
- {
- Width = Application.GetRealWidth(200),
- Height = Application.GetRealHeight(130),
- X = Application.GetRealWidth(390),
- Y = Btniocn.Bottom + Application.GetRealHeight(100),
- TextAlignment = TextAlignment.Center,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Text = "0%",
- };
- bjframelayout.AddChidren(Btnvelue);
-
- var horizontalSeekBarVolframelayout = new FrameLayout
- {
- Y = Btnvelue.Bottom,
- Width = Application.GetRealWidth(880),
- Height = Application.GetRealHeight(80),
- X = Application.GetRealWidth(50),
- };
- bjframelayout.AddChidren(horizontalSeekBarVolframelayout);
-
-
- var horizontalSeekBarVol = new HorizontalSeekBar
- {
- Width = Application.GetRealWidth(880 - 50),
- Height = Application.GetRealHeight(80),
- Radius = (uint)Application.GetRealHeight(25),
- X = Application.GetRealWidth(25),
- Gravity = Gravity.CenterVertical,
- ProgressColor = 0xffFE5E00,
- Max = 100,
- SleepTime = 1000,
- ThumbRadius = 9,
- //IsCanClick=false
- };
- horizontalSeekBarVolframelayout.AddChidren(horizontalSeekBarVol);
-
-
- var Btnswitch = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "Room/Curtain.png",
- SelectedImagePath = "Room/CurtainSelected.png",
- X = Application.GetRealWidth(440),
- Y = horizontalSeekBarVolframelayout.Bottom + Application.GetRealHeight(80),
- };
- //bjframelayout.AddChidren(Btnswitch);
-
- var textfl = new FrameLayout
- {
- Width = Application.GetRealWidth(980),
- Height = Application.GetRealHeight(160),
- BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor,
- Y = Application.GetRealHeight(1300 - 160),
- };
- bjframelayout.AddChidren(textfl);
-
- var Btnregioniocn = new Button
- {
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- UnSelectedImagePath = "Room/Curtain.png",
- X = Application.GetRealWidth(40),
- Y = Application.GetRealHeight(25),
- };
- textfl.AddChidren(Btnregioniocn);
-
- var Btnregionname = new Button
- {
- Width = Application.GetRealWidth(600),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(150 + 30),
- TextAlignment = TextAlignment.CenterLeft,
- Text ="",
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Y = Application.GetRealHeight(25),
- };
- textfl.AddChidren(Btnregionname);
- Send.RoomNmae(Btnregionname,common);
- #endregion
-
- horizontalSeekBarVol.ProgressChanged += (sender, e) =>
- {
- SelectedDeviceStatus = "selected";
- Btnvelue.Text = horizontalSeekBarVol.Progress.ToString() + "%";
- if (brightnessdictionary.ContainsKey("Data1"))
- {
- brightnessdictionary.Remove("Data1");
- }
- brightnessdictionary.Add("Data1", "5");
- if (brightnessdictionary.ContainsKey("Data2"))
- {
- brightnessdictionary.Remove("Data2");
- }
- brightnessdictionary.Add("Data2", horizontalSeekBarVol.Progress.ToString());
-
-
- };
-
- Btnswitch.MouseUpEventHandler += (sender, e) =>
- {
- SelectedDeviceStatus = "selected";
- Btnswitch.IsSelected = !Btnswitch.IsSelected;
- //if (switchdictionary.ContainsKey("Data1"))
- //{
- // switchdictionary.Remove("Data1");
- //}
- //if (Btnswitch.IsSelected)
- //{
- // switchdictionary.Add("Data1", "0");
- //}
- //else
- //{
- // switchdictionary.Add("Data1", "1");
- //}
- };
-
-
- if (edit && TaskList != null)
- {
- foreach (var value in TaskList)
- {
- if (value["TaskType"] == "6")
- {
- if (value["Data1"] == "5")
- {
- if (brightnessdictionary.ContainsKey("Data2"))
- {
- brightnessdictionary.Remove("Data2");
- }
- var lightbrightnessvalue = int.Parse(value["Data2"]);
- brightnessdictionary.Add("Data2", lightbrightnessvalue.ToString());
- Btnvelue.Text = lightbrightnessvalue.ToString() + "%";
- horizontalSeekBarVol.Progress = lightbrightnessvalue;
- }
- }
-
- }
- }
-
- /*
- if (edit && TaskList != null)
- {
- foreach (var value in TaskList)
- {
- if (value["TaskType"] == "6")
- {
-
- if (value["Data1"] == "0")
- {
- if (switchdictionary.ContainsKey("Data1"))
- {
- switchdictionary.Remove("Data1");
- }
- switchdictionary.Add("Data1", "0");
- Btnswitch.IsSelected = true;
- }
- else if (value["Data1"] == "1")
- {
- if (switchdictionary.ContainsKey("Data1"))
- {
- switchdictionary.Remove("Data1");
- }
- switchdictionary.Add("Data1", "1");
- Btnswitch.IsSelected = false;
- }
- else if (value["Data1"] == "5")
- {
- if (brightnessdictionary.ContainsKey("Data2"))
- {
- brightnessdictionary.Remove("Data2");
- }
- var lightbrightnessvalue = int.Parse(value["Data2"]);
- brightnessdictionary.Add("Data2", lightbrightnessvalue.ToString());
- Btnvelue.Text = lightbrightnessvalue.ToString() + "%";
- horizontalSeekBarVol.Progress = lightbrightnessvalue;
- }
- }
-
- }
- }
- */
-
- }
- break;
-
- }
- var btnsave = new Button
- {
- Height = Application.GetRealHeight(150),//194
- Y = bjframelayout.Bottom+Application.GetRealHeight(100),
- //Text = "淇濆瓨",
- Width = Application.GetRealWidth(500),
- Radius = (uint)Application.GetRealHeight(50),
- BackgroundColor = ZigbeeColor.Current.LogicButtonBlueColor,
- X = Application.GetRealWidth(290),
- TextID=MyInternationalizationString.Save,
- };
- middle.AddChidren(btnsave);
- btnsave.MouseUpEventHandler += (sedder, e) => {
- if (SelectedDeviceStatus == "selected")
- {
- LogicIfon.AddDeviceactions(common,actionsInfo);
- }
- else
- {
- if (!edit)
- {
- var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
- Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
- Language.StringByID(MyInternationalizationString.complete));
-
- alert.Show();
- return;
- }
- edit = false;
- }
- this.RemoveFromParent ();
- var logicCommunalPage = new LogicCommunalPage ();
- UserView.HomePage.Instance.AddChidren (logicCommunalPage);
- UserView.HomePage.Instance.PageIndex += 1;
- logicCommunalPage.Show (()=>{});
- };
-
- }
-
- void FreshAirReadupdateModeImage (int mode, Button btn,Button btn1)
- {
- ///鏂伴:mode:(0:鏅鸿兘锛�1:鏂伴锛�2:鍐呭惊鐜紝3:鎭掓俯)
- switch (mode) {
- case 0:
- btn.UnSelectedImagePath = "FreshAir/FASmart.png";
- btn1.UnSelectedImagePath = "FreshAir/FASmart.png";
- break;
- case 1:
- btn.UnSelectedImagePath = "FreshAir/FAManual.png";
- btn1.UnSelectedImagePath = "FreshAir/FAManual.png";
- break;
- case 2:
- btn.UnSelectedImagePath = "FreshAir/FAInternalCirculation.png";
- btn1.UnSelectedImagePath = "FreshAir/FAInternalCirculation.png";
- break;
- case 3:
- btn.UnSelectedImagePath = "FreshAir/FAConstantTemp.png";
- btn1.UnSelectedImagePath = "FreshAir/FAConstantTemp.png";
- break;
- default:
- btn.UnSelectedImagePath = "FreshAir/FASmart.png";
- btn1.UnSelectedImagePath = "FreshAir/FASmart.png";
- break;
- }
- }
-
- void ACupdateModeImage (int mode, Button btn,Button btn1)
- {
- ///绌鸿皟:mode:(0锛氬埗鍐凤紝1锛氬埗鐑紝2锛氶�氶锛�3锛氳嚜鍔紝4锛氭娊婀�)
- switch (mode) {
- case 0:
- btn.UnSelectedImagePath = "AC/ACRefrigeration.png";
- btn1.UnSelectedImagePath = "AC/ACRefrigeration.png";
- break;
- case 1:
- btn.UnSelectedImagePath = "AC/ACHeating.png";
- btn1.UnSelectedImagePath = "AC/ACHeating.png";
- break;
- case 2:
- btn.UnSelectedImagePath = "AC/ACModeAuto.png";
- btn1.UnSelectedImagePath = "AC/ACModeAuto.png";
- break;
- case 3:
- btn.UnSelectedImagePath = "AC/ACAuto.png";
- btn1.UnSelectedImagePath = "AC/ACAuto.png";
- break;
- case 4:
- btn.UnSelectedImagePath = "AC/ACDehumidification.png";
- btn1.UnSelectedImagePath = "AC/ACDehumidification.png";
- break;
- default:
- btn.UnSelectedImagePath = "AC/ACRefrigeration.png";
- btn1.UnSelectedImagePath = "AC/ACRefrigeration.png";
- break;
- }
- }
-
- }
-}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs
new file mode 100755
index 0000000..b16a8d5
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceAction.cs
@@ -0,0 +1,2102 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Newtonsoft.Json.Linq;
+using Shared;
+using Shared.Common;
+using Shared.Phone;
+using Shared.R;
+using ZigBee.Device;
+namespace Shared.Phone.Device.Logic
+{
+ public class TemplateDeviceAction:FrameLayout
+ {
+ public TemplateDeviceAction()
+ {
+ Tag = "Logic";
+ }
+ Button roombjButton = new Button();
+ Button roomTextButton = new Button();
+ Button devicetypeButton = new Button();
+ VerticalScrolViewLayout middle;
+ FrameLayout clickframeLayout = new FrameLayout();
+ Button clickbutton = new Button();
+ Button clicktextcolcrbutton = new Button();
+
+ public void Show()
+ {
+
+ UserView.HomePage.Instance.ScrollEnabled = false;
+ this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
+ };
+ this.AddChidren(topRowLayout);
+
+ var titleName = new Button
+ {
+ TextSize = 16,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(160),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.devicestate,
+ };
+ topRowLayout.AddChidren(titleName);
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
+ var foolrname = new Button
+ {
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterRight,
+ X = Application.GetRealWidth(1080 - 400 - 120),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ //TextID = MyInternationalizationString.customroom,
+ Text = Config.Instance.Home.GetCurrentFloorName,
+ };
+ topRowLayout.AddChidren(foolrname);
+ var dropdown = new Button
+ {
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterRight,
+ X = foolrname.Right,
+ Width = Application.GetRealWidth(72),
+ Height = Application.GetRealHeight(72),
+ Y = Application.GetRealHeight(92),
+ UnSelectedImagePath = "ZigeeLogic/drop-down.png",
+ };
+ topRowLayout.AddChidren(dropdown);
+ #endregion
+
+
+ ///娌℃湁鎴块棿鐩存帴杩斿洖鍘伙紱
+ if (Common.Room.Lists.Count == 0)
+ {
+ return;
+ }
+ ///鎴块棿婊戝姩鎺т欢
+ var roomhorizontalScrol = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(200),
+ Y = topRowLayout.Bottom,
+ X = Application.GetRealWidth(58),
+ };
+ this.AddChidren(roomhorizontalScrol);
+
+
+ var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58 - 200),
+ Height = Application.GetRealHeight(280),
+ Y = roomhorizontalScrol.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ X = Application.GetRealWidth(58 + 200),
+ };
+ this.AddChidren(devicetypehorizontalScrol1);
+ ///璁惧绫诲瀷婊戝姩鎺т欢
+ var devicetypehorizontalScrol = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(280),
+ Y = roomhorizontalScrol.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ X = Application.GetRealWidth(58),
+ Radius = (uint)Application.GetRealHeight(50),
+
+ };
+ this.AddChidren(devicetypehorizontalScrol);
+
+ middle = new VerticalScrolViewLayout();
+ middle.Y = devicetypehorizontalScrol.Bottom + Application.GetRealHeight(40);
+ middle.Height = Application.GetRealHeight(1920) - devicetypehorizontalScrol.Y;
+ middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+ middle.X = Application.GetRealWidth(58);
+ middle.Radius = (uint)Application.GetRealHeight(50);
+ this.AddChidren(middle);
+
+ ///鐩墠鏀寔鐨勮澶�
+ List<DeviceType> deviceTypeList = new List<DeviceType> {
+ DeviceType.OnOffOutput,
+ //DeviceType.DimmableLight,
+ //DeviceType.WindowCoveringDevice,
+ //DeviceType.Thermostat,
+ //DeviceType.AirSwitch,
+ };
+
+
+
+ ///妤煎眰鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> foorlclick = (sender, e) =>
+ {
+
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ flMain.MouseUpEventHandler += (sender2, e2) =>
+ {
+ flMain.RemoveFromParent();
+ };
+ var foolrbj = new VerticalScrolViewLayout
+ {
+
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(600),
+ X = Application.GetRealWidth(1080 - 400 - 60),
+ Y = Application.GetRealHeight(184 + 50),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(30),
+ };
+ flMain.AddChidren(foolrbj);
+ foreach (var foolr in Config.Instance.Home.FloorDics)
+ {
+
+ var foolrRowLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(150),
+ };
+ foolrbj.AddChidren(foolrRowLayout);
+
+ var btnfoolrname = new Button
+ {
+ Width = Application.GetRealWidth(250),
+ Height = Application.GetRealHeight(160),
+ Text = foolr.Value,
+ TextAlignment = TextAlignment.Center,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ //SelectedTextColor=0xfffc744b,
+ Tag = foolr.Key,
+ };
+ foolrRowLayout.AddChidren(btnfoolrname);
+
+
+ EventHandler<MouseEventArgs> foolrnameclick = (sender13, e13) =>
+ {
+ roomhorizontalScrol.RemoveAll();
+ devicetypehorizontalScrol.RemoveAll();
+ middle.RemoveAll();
+ foolrname.Text = btnfoolrname.Text;
+ flMain.RemoveFromParent();
+ var list = Send.GetRoomList(btnfoolrname.Tag.ToString());
+ AllRoomView(list, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
+ };
+ foolrRowLayout.MouseUpEventHandler += foolrnameclick;
+ btnfoolrname.MouseUpEventHandler += foolrnameclick;
+
+
+ }
+
+ };
+ foolrname.MouseUpEventHandler += foorlclick;
+ dropdown.MouseUpEventHandler += foorlclick;
+
+ ///绗竴娆¤繘鏉�
+ var roomlists = new List<Common.Room>();
+ roomlists.Clear();
+ if (Config.Instance.Home.FloorDics.Count < 1)
+ {
+ foolrname.Visible = false;
+ dropdown.Visible = false;
+ if (Config.Instance.Home.FloorDics.Count == 0)
+ {
+ roomlists.AddRange(Common.Room.Lists);
+ }
+ else
+ {
+ roomlists = Send.GetRoomList(Config.Instance.Home.CurrentFloorId);
+ }
+ }
+ else
+ {
+ roomlists = Send.GetRoomList(Config.Instance.Home.CurrentFloorId);
+
+ }
+ AllRoomView(roomlists, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
+ }
+ /// <summary>
+ /// 鍔犺浇鎵�鏈夋埧闂寸殑瑙嗗浘鏂规硶
+ /// </summary>
+ void AllRoomView(List<Common.Room> roomlist, List<DeviceType> deviceTypeList, HorizontalScrolViewLayout roomhorizontalScrol, HorizontalScrolViewLayout devicetypehorizontalScrol)
+ {
+ for (int i = 0; i < roomlist.Count; i++)
+ {
+ var room = roomlist[i];
+ var fra = new FrameLayout
+ {
+ Height = Application.GetRealHeight(200),
+ Width = Application.GetRealWidth(255),
+ };
+ roomhorizontalScrol.AddChidren(fra);
+
+ var roombjBtn = new Button
+ {
+ Height = Application.GetRealHeight(158),
+ Width = Application.GetRealWidth(255),
+ UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png",
+ SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png",
+ Y = Application.GetRealHeight(21),
+ };
+ fra.AddChidren(roombjBtn);
+
+ var roomnameBtn = new Button
+ {
+
+ Height = Application.GetRealHeight(152 - 26 - 20),
+ Width = Application.GetRealWidth(255 - 20 - 50),
+ Text = room.Name,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = Application.GetRealHeight(21 + 13 + 10),
+ X = Application.GetRealWidth(10 + 25),
+
+ };
+ fra.AddChidren(roomnameBtn);
+ if (i == 0)
+ {
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+ var list = new List<DeviceUI>();
+ foreach (var device in room.DeviceUIList)
+ {
+ if (device.CommonDevice == null)
+ {
+ continue;
+ }
+ if (!deviceTypeList.Contains(device.CommonDevice.Type))
+ {
+ continue;
+ }
+ list.Add(device);
+ }
+ AllDeviceTypeView(list, devicetypehorizontalScrol);
+
+ }
+
+
+ EventHandler<MouseEventArgs> roomclick = (sender, e) =>
+ {
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+ var list = new List<DeviceUI>();
+ foreach (var device in room.DeviceUIList)
+ {
+ if (device.CommonDevice == null)
+ {
+ continue;
+ }
+ if (!deviceTypeList.Contains(device.CommonDevice.Type))
+ {
+ continue;
+ }
+ list.Add(device);
+ }
+ AllDeviceTypeView(list, devicetypehorizontalScrol);
+
+
+ };
+ roomnameBtn.MouseUpEventHandler += roomclick;
+ roombjBtn.MouseUpEventHandler += roomclick;
+
+ }
+ }
+
+ /// <summary>
+ ///鍔犺浇璇ュ尯鍩熸墍鏈夎澶囩殑瑙嗗浘鏂规硶
+ /// </summary>
+ void AllDeviceTypeView(List<DeviceUI> devicelist, HorizontalScrolViewLayout devicetypehorizontalScrol)
+ {
+
+ List<string> devicetypelist = new List<string>();
+ devicetypelist.Clear();
+
+ #region ------鎺掑垪璁惧绫诲瀷------
+ var lightjosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.DimmableLight || device.CommonDevice.Type == DeviceType.OnOffOutput);
+ if (lightjosn != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.Lights));
+ }
+ var curtainjosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.WindowCoveringDevice);
+ if (curtainjosn != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.Curtains));
+ }
+ var ac = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.Thermostat);
+ if (ac != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.AC));
+ }
+ var airSwitch = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.AirSwitch);
+ if (airSwitch != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.Airswitch));
+ }
+
+ #endregion
+
+ devicetypehorizontalScrol.RemoveAll();
+ for (int i = 0; i < devicetypelist.Count; i++)
+ {
+
+ var devicetype = devicetypelist[i];
+
+ var spaceRowLayout = new FrameLayout();
+ devicetypehorizontalScrol.AddChidren(spaceRowLayout);
+ if (i == 0)
+ {
+ spaceRowLayout.Width = Application.GetRealWidth(37);
+ }
+ else
+ {
+ spaceRowLayout.Width = Application.GetRealWidth(80);
+ }
+
+ var deviceRowLayout = new FrameLayout
+ {
+ Width = Application.GetRealWidth(156 + 20),
+ Height = Application.GetRealHeight(280 - 30),
+ Y = Application.GetRealHeight(30),
+ };
+ devicetypehorizontalScrol.AddChidren(deviceRowLayout);
+
+ var backgroundColor = new Button
+ {
+ Width = Application.GetRealWidth(156),
+ Height = Application.GetRealHeight(180),
+ X = Application.GetRealWidth(10),
+ UnSelectedImagePath = "ZigeeLogic/deviceunselectedbackgroundcolor.png",
+ SelectedImagePath = "ZigeeLogic/deviceselectedbackgroundcolor.png",
+ };
+ deviceRowLayout.AddChidren(backgroundColor);
+
+
+ var devicetypeicon = new Button
+ {
+ Width = Application.GetRealWidth(84),
+ Height = Application.GetRealHeight(84),
+ X = Application.GetRealWidth(46),
+ Y = Application.GetRealHeight(30),
+ };
+ deviceRowLayout.AddChidren(devicetypeicon);
+
+ var devicetypename = new Button
+ {
+ Width = Application.GetRealWidth(176),
+ Height = Application.GetRealHeight(40),
+ Text = devicetype,
+ TextAlignment = TextAlignment.Center,
+ Y = backgroundColor.Bottom,
+ TextColor = ZigbeeColor.Current.LogicAddColor,
+ TextSize = 10,
+ };
+ deviceRowLayout.AddChidren(devicetypename);
+ if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedlight.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedcurtain.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.AC))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedac.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Airswitch))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedairswitch.png";
+ }
+ EventHandler<MouseEventArgs> devicetypeclick = (sender13, e13) =>
+ {
+
+ devicetypeButton.IsSelected = false;
+ devicetypeButton = backgroundColor;
+ backgroundColor.IsSelected = true;
+ List<DeviceType> list = new List<DeviceType>();
+ list.Clear();
+ ///鍒嗙被鏄剧ず锛堜緥濡傜伅鍏夛細{鐏厜1锛岀伅鍏�2...}锛�
+ if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
+ {
+ list.Add(DeviceType.OnOffOutput);//0x0101鍗佽繘鍒�257
+ list.Add(DeviceType.DimmableLight);
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains))
+ {
+ list.Add(DeviceType.WindowCoveringDevice);
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.AC))
+ {
+ list.Add(DeviceType.Thermostat);
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Airswitch))
+ {
+ list.Add(DeviceType.AirSwitch);
+ }
+
+ ActionDeviceView(list, devicelist);
+
+ };
+ deviceRowLayout.MouseUpEventHandler += devicetypeclick;
+ devicetypename.MouseUpEventHandler += devicetypeclick;
+ devicetypeicon.MouseUpEventHandler += devicetypeclick;
+ backgroundColor.MouseUpEventHandler += devicetypeclick;
+
+ }
+ ///鏄剧ず鎴块棿鎵�鏈夎澶�
+ ActionDeviceView(new List<DeviceType>(), devicelist);
+ }
+ /// <summary>
+ /// 鍔犺浇璇ョ被鍨嬭澶囪鍥炬柟娉�
+ /// </summary>
+ /// <param name="devicelist">璁惧鍒楄〃</param>
+ void ActionDeviceView(List<DeviceType> deviceTypelist, List<DeviceUI> devicelist)
+ {
+ middle.RemoveAll();
+ foreach (var common in devicelist)
+ {
+
+ if (deviceTypelist.Count != 0 && !deviceTypelist.Contains(common.CommonDevice.Type))
+ {
+ continue;
+ }
+
+ var deviceFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ };
+ middle.AddChidren(deviceFramelayout);
+
+ var bjFramelayout = new FrameLayout
+ {
+ Width = Application.GetRealWidth(112),
+ Height = Application.GetRealHeight(112),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(30 + 9),
+ Radius = (uint)Application.GetRealHeight(56),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ deviceFramelayout.AddChidren(bjFramelayout);
+
+ var deviceIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(82),
+ Height = Application.GetRealHeight(82),
+ Gravity = Gravity.Center,
+
+ };
+ bjFramelayout.AddChidren(deviceIconBtn);
+
+ var deviceRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176 + 10),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+
+ };
+ deviceFramelayout.AddChidren(deviceRow);
+
+ var devicename = new Button
+ {
+ Text = common.CommonDevice.DeviceEpointName,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
+ };
+ deviceRow.AddChidren(devicename);
+ switch (common.CommonDevice.Type)
+ {
+
+ case DeviceType.OnOffOutput:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/light.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedlight.png";
+ }
+ break;
+ case DeviceType.DimmableLight:
+ {
+
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/dimmableLight.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selecteddimmableLight.png";
+ }
+ break;
+ case DeviceType.WindowCoveringDevice:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/curtain.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedcurtain.png";
+ }
+ break;
+ case DeviceType.Thermostat:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/ac.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedac.png";
+ }
+ break;
+ case DeviceType.AirSwitch:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/airswitch.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedairswitch.png";
+ }
+ break;
+ }
+
+ EventHandler<MouseEventArgs> devicclick = (sen, e) =>
+ {
+ clickbutton.IsSelected = false;
+ clickbutton = deviceIconBtn;
+ deviceIconBtn.IsSelected = true;
+ clickframeLayout.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ clickframeLayout = bjFramelayout;
+ bjFramelayout.BackgroundColor = ZigbeeColor.Current.LogicIconBackgroundColor;
+ clicktextcolcrbutton.IsSelected = false;
+ clicktextcolcrbutton = devicename;
+ devicename.IsSelected = true;
+
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ CurrentDeviceStateView(flMain, common.CommonDevice, false);
+ };
+ deviceFramelayout.MouseUpEventHandler += devicclick;
+ bjFramelayout.MouseUpEventHandler += devicclick;
+ deviceIconBtn.MouseUpEventHandler += devicclick;
+ deviceRow.MouseUpEventHandler += devicclick;
+ devicename.MouseUpEventHandler += devicclick;
+
+ }
+ }
+ /// <summary>
+ /// 閫変腑璇ヨ澶囧姛鑳戒綔涓烘潯浠剁殑瑙嗗浘鏂规硶
+ /// </summary>
+ /// <param name="common">Common.</param>
+ public static void CurrentDeviceStateView(FrameLayout flMain, CommonDevice common, bool edit)
+ {
+ //涓嶈褰撳墠鐣岄潰婊戝姩
+ UserView.HomePage.Instance.ScrollEnabled = false;
+ Dictionary<string, object> actionsInfo = new Dictionary<string, object>();
+ List<Dictionary<string, string>> taskListInfo = new List<Dictionary<string, string>>();
+ //var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ //this.AddChidren(flMain);
+ flMain.MouseUpEventHandler += (sender, e) =>
+ {
+ flMain.RemoveFromParent();
+ };
+ var devicefra1 = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ flMain.AddChidren(devicefra1);
+
+ var devicefra = new FrameLayout
+ {
+
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(530 + 160),
+ Y = Application.GetRealHeight(1920 - 530 - 160),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(60),
+ };
+ flMain.AddChidren(devicefra);
+
+ #region -------鍙栨秷 瀹屾垚
+ var timetype = new RowLayout
+ {
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ devicefra.AddChidren(timetype);
+ var Btncancel = new Button
+ {
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(80),
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ timetype.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.security,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ Text = common.DeviceEpointName,
+ };
+ timetype.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
+
+ };
+ timetype.AddChidren(Btncomplete);
+ #endregion
+
+
+ string SelectedDeviceStatusaction = "no";
+ actionsInfo.Add("LinkType", 0);
+ actionsInfo.Add("DeviceAddr", common.DeviceAddr);
+ actionsInfo.Add("Epoint", common.DeviceEpoint);
+ actionsInfo.Add("Time", 0);
+ actionsInfo.Add("TaskList", taskListInfo);
+
+ List<Dictionary<string, string>> TaskList = null;
+ if (edit)
+ {
+ foreach (var deviceinfo in Common.Logic.CurrentLogic.Actions)
+ {
+ if (deviceinfo["LinkType"].ToString() == "0")
+ {
+
+ if (deviceinfo["DeviceAddr"].ToString() == common.DeviceAddr && deviceinfo["Epoint"].ToString() == common.DeviceEpoint.ToString())
+ {
+ TaskList = deviceinfo["TaskList"] as List<Dictionary<string, string>>;
+ break;
+ }
+ }
+ }
+ }
+ switch (common.Type)
+ {
+
+ ///鐏厜
+ case DeviceType.OnOffOutput:
+ {
+
+ #region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
+ Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("TaskType", "1");
+ switchdictionary.Add("Data1", "0");
+ switchdictionary.Add("Data2", "0");
+ taskListInfo.Add(switchdictionary);
+
+ #endregion
+
+ #region 鐏厜View
+
+ #region 寮�
+
+ var openframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(openframelayout);
+
+ var openrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ openframelayout.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new SelectedButton();
+ openrowlayout.AddChidren(openBtnSelected);
+ #endregion
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new SelectedButton();
+ closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+ #region 鍙栧弽
+ var takebackframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = closeframelayout.Bottom,
+ };
+ devicefra.AddChidren(takebackframelayout);
+ var takebackrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ takebackframelayout.AddChidren(takebackrowlayout);
+
+ var btntakeback = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.onoff,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ takebackrowlayout.AddChidren(btntakeback);
+
+ var takebackBtnSelected = new SelectedButton();
+ takebackrowlayout.AddChidren(takebackBtnSelected);
+
+ #endregion
+
+
+ #endregion
+
+ ///纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "1");//榛樿鍊�
+
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
+ ///鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "0");//榛樿鍊�
+
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
+ //鍙栧弽
+ EventHandler<MouseEventArgs> takebackclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "2");//榛樿鍊�
+
+ };
+ takebackrowlayout.MouseUpEventHandler += takebackclick;
+ btntakeback.MouseUpEventHandler += takebackclick;
+ takebackBtnSelected.MouseUpEventHandler += takebackclick;
+ takebackframelayout.MouseUpEventHandler += takebackclick;
+ if (edit && TaskList != null)
+ {
+ foreach (var value in TaskList)
+ {
+ if (value["TaskType"] == "1")
+ {
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (value["Data1"] == "1")
+ {
+ switchdictionary.Add("Data1", "1");
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ }
+ else if (value["Data1"] == "0")
+ {
+ switchdictionary.Add("Data1", "0");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ }
+ else if (value["Data1"] == "2")
+ {
+ switchdictionary.Add("Data1", "2");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ }
+ break;
+ }
+
+ }
+ }
+
+ }
+ break;
+ ///璋冨厜鐏厜
+ case DeviceType.DimmableLight:
+ {
+
+ #region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
+ Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("Data2", "0");
+ taskListInfo.Add(switchdictionary);
+
+ #endregion
+
+ #region 鐏厜View
+
+ devicefra.Y = Application.GetRealHeight(1920 - 160 * 3 - 210 - 160);
+ devicefra.Height = Application.GetRealHeight(160 * 3 + 210 + 160);
+
+ #region 寮�
+
+ var openframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160 + 160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(openframelayout);
+
+ var openrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ openframelayout.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new SelectedButton();
+ openrowlayout.AddChidren(openBtnSelected);
+
+ var horizontalSeekBarRow = new RowLayout
+ {
+ Y = openrowlayout.Bottom,
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(160),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ openframelayout.AddChidren(horizontalSeekBarRow);
+ var horizontalSeekBarVol = new HorizontalSeekBar
+ {
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(80),
+ Radius = (uint)Application.GetRealHeight(25),
+ Y = Application.GetRealHeight(25),
+ //Gravity = Gravity.CenterVertical,
+ ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected,
+ Max = 100,
+ SleepTime = 1000,
+ ThumbRadius = 9,
+ IsCanMove = false
+ };
+ horizontalSeekBarRow.AddChidren(horizontalSeekBarVol);
+
+ #endregion
+
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new SelectedButton();
+ closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+
+ #region 鍙栧弽
+ var takebackframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = closeframelayout.Bottom,
+ };
+ devicefra.AddChidren(takebackframelayout);
+ var takebackrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ takebackframelayout.AddChidren(takebackrowlayout);
+
+ var btntakeback = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.onoff,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ takebackrowlayout.AddChidren(btntakeback);
+
+ var takebackBtnSelected = new SelectedButton();
+ takebackrowlayout.AddChidren(takebackBtnSelected);
+
+ #endregion
+
+
+ #endregion
+
+ int Progressvalue = 100;
+ horizontalSeekBarVol.ProgressChanged += (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ Progressvalue = horizontalSeekBarVol.Progress;
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("TaskType", "3");
+ //鏈�澶т寒搴﹀�兼槸254闇�瑕佽浆鎹紱
+ var lightbrightnessvalue = (254 * horizontalSeekBarVol.Progress) / 100;
+ switchdictionary.Add("Data1", lightbrightnessvalue.ToString());
+
+ };
+ ///纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = true;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ horizontalSeekBarVol.Progress = Progressvalue;
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("TaskType", "3");
+ //鏈�澶т寒搴﹀�兼槸254闇�瑕佽浆鎹紱
+ var lightbrightnessvalue = (254 * horizontalSeekBarVol.Progress) / 100;
+ switchdictionary.Add("Data1", lightbrightnessvalue.ToString());
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
+ ///鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("TaskType", "1");
+ switchdictionary.Add("Data1", "0");//榛樿鍊�
+
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
+ //鍙栧弽
+ EventHandler<MouseEventArgs> takebackclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("TaskType", "1");
+ switchdictionary.Add("Data1", "2");//榛樿鍊�
+
+ };
+ takebackrowlayout.MouseUpEventHandler += takebackclick;
+ btntakeback.MouseUpEventHandler += takebackclick;
+ takebackBtnSelected.MouseUpEventHandler += takebackclick;
+ takebackframelayout.MouseUpEventHandler += takebackclick;
+
+ if (edit && TaskList != null)
+ {
+ foreach (var value in TaskList)
+ {
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (value["TaskType"] == "1")
+ {
+ switchdictionary.Add("TaskType", "1");
+ if (value["Data1"] == "0")
+ {
+ switchdictionary.Add("Data1", "0");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ }
+ else if (value["Data1"] == "2")
+ {
+ switchdictionary.Add("Data1", "2");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ }
+
+ }
+ else if (value["TaskType"] == "3")
+ {
+ switchdictionary.Add("TaskType", "3");
+ switchdictionary.Add("Data1", value["Data1"]);
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ horizontalSeekBarVol.IsCanMove = true;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ horizontalSeekBarVol.Progress = int.Parse(value["Data1"]) * 100 / 254;
+ Progressvalue = horizontalSeekBarVol.Progress;
+
+ }
+ break;
+
+ }
+ }
+
+ }
+ break;
+ ///绐楀笜
+ case DeviceType.WindowCoveringDevice:
+ {
+ #region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
+ Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ switchdictionary.Add("TaskType", "6");
+
+ taskListInfo.Add(switchdictionary);
+
+ #endregion
+ devicefra.Y = Application.GetRealHeight(1920 - 160 * 2 - 210 - 160);
+ devicefra.Height = Application.GetRealHeight(160 * 2 + 210 + 160);
+ #region 绐楀笜View
+
+ #region 寮�
+
+ var openframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160 + 160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(openframelayout);
+
+ var openrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ openframelayout.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new SelectedButton();
+ openrowlayout.AddChidren(openBtnSelected);
+
+
+ var horizontalSeekBarRow = new RowLayout
+ {
+ Y = openrowlayout.Bottom,
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(160),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ openframelayout.AddChidren(horizontalSeekBarRow);
+ var horizontalSeekBarVol = new HorizontalSeekBar
+ {
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(80),
+ Radius = (uint)Application.GetRealHeight(25),
+ Y = Application.GetRealHeight(25),
+ //Gravity = Gravity.CenterVertical,
+ ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected,
+ Max = 100,
+ SleepTime = 1000,
+ ThumbRadius = 9,
+ IsCanMove = false
+ };
+ horizontalSeekBarRow.AddChidren(horizontalSeekBarVol);
+
+ #endregion
+
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new SelectedButton();
+ closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+
+
+
+ #endregion
+ int Progressvalue = 100;
+ horizontalSeekBarVol.ProgressChanged += (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ Progressvalue = horizontalSeekBarVol.Progress;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("Data1", "5");
+ switchdictionary.Add("Data2", horizontalSeekBarVol.Progress.ToString());
+
+ };
+ ///纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = true;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ horizontalSeekBarVol.Progress = Progressvalue;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("Data1", "5");
+ switchdictionary.Add("Data2", horizontalSeekBarVol.Progress.ToString());
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
+ ///鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("Data2", "0");
+ switchdictionary.Add("Data1", "1");//榛樿鍊�
+
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
+
+
+
+ if (edit && TaskList != null)
+ {
+ foreach (var value in TaskList)
+ {
+ if (value["TaskType"] == "6")
+ {
+ if (value["Data1"] == "5")
+ {
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("Data1", "5");
+ switchdictionary.Add("Data2", value["Data2"]);
+ horizontalSeekBarVol.IsCanMove = true;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColorSelected;
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ horizontalSeekBarVol.Progress = int.Parse(value["Data2"]);
+ Progressvalue = horizontalSeekBarVol.Progress;
+ }
+ else if (value["Data1"] == "1")
+ {
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "1");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ horizontalSeekBarVol.IsCanMove = false;
+ horizontalSeekBarVol.ProgressColor = ZigbeeColor.Current.LogicProgressColor;
+ }
+
+ }
+
+ }
+ }
+ }
+ break;
+ ///绌烘皵寮�鍏�
+ case DeviceType.AirSwitch:
+ {
+ {
+
+ #region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
+ Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
+ if (switchdictionary.ContainsKey("TaskType"))
+ {
+ switchdictionary.Remove("TaskType");
+ }
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (switchdictionary.ContainsKey("Data2"))
+ {
+ switchdictionary.Remove("Data2");
+ }
+ switchdictionary.Add("TaskType", "1");
+ switchdictionary.Add("Data1", "0");
+ switchdictionary.Add("Data2", "0");
+ taskListInfo.Add(switchdictionary);
+
+ #endregion
+
+ #region 绌烘皵鐏厜View
+
+ #region 寮�
+
+ var openframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(openframelayout);
+
+ var openrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ openframelayout.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new SelectedButton();
+ openrowlayout.AddChidren(openBtnSelected);
+ #endregion
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new SelectedButton();
+ closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+ #region 鍙栧弽
+ var takebackframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = closeframelayout.Bottom,
+ };
+ devicefra.AddChidren(takebackframelayout);
+ var takebackrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ takebackframelayout.AddChidren(takebackrowlayout);
+
+ var btntakeback = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.onoff,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ takebackrowlayout.AddChidren(btntakeback);
+
+ var takebackBtnSelected = new SelectedButton();
+ takebackrowlayout.AddChidren(takebackBtnSelected);
+
+ #endregion
+
+
+ #endregion
+
+ ///纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "1");//榛樿鍊�
+
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
+ ///鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "0");//榛樿鍊�
+
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
+ //鍙栧弽
+ EventHandler<MouseEventArgs> takebackclick = (sender, e) =>
+ {
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ switchdictionary.Add("Data1", "2");//榛樿鍊�
+
+ };
+ takebackrowlayout.MouseUpEventHandler += takebackclick;
+ btntakeback.MouseUpEventHandler += takebackclick;
+ takebackBtnSelected.MouseUpEventHandler += takebackclick;
+ takebackframelayout.MouseUpEventHandler += takebackclick;
+ if (edit && TaskList != null)
+ {
+ foreach (var value in TaskList)
+ {
+ if (value["TaskType"] == "1")
+ {
+ if (switchdictionary.ContainsKey("Data1"))
+ {
+ switchdictionary.Remove("Data1");
+ }
+ if (value["Data1"] == "1")
+ {
+ switchdictionary.Add("Data1", "1");
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = false;
+ }
+ else if (value["Data1"] == "0")
+ {
+ switchdictionary.Add("Data1", "0");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ takebackBtnSelected.Visible = false;
+ }
+ else if (value["Data1"] == "2")
+ {
+ switchdictionary.Add("Data1", "2");
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ takebackBtnSelected.Visible = true;
+ }
+ break;
+ }
+
+ }
+ }
+
+ }
+ }
+ break;
+
+ case DeviceType.Thermostat:
+ {
+
+ #region ----鍒濆鍖栬澶囧姛鑳芥暟鎹�----
+ Dictionary<string, string> switchdictionary = new Dictionary<string, string>();
+ Dictionary<string, string> temperaturedictionary = new Dictionary<string, string>();
+ Dictionary<string, string> modedictionary = new Dictionary<string, string>();
+ Dictionary<string, string> speeddictionary = new Dictionary<string, string>();
+ taskListInfo.Add(switchdictionary);
+ taskListInfo.Add(temperaturedictionary);
+ taskListInfo.Add(modedictionary);
+ taskListInfo.Add(speeddictionary);
+ dictionary(switchdictionary, "TaskType", "1");
+ dictionary(switchdictionary, "Data2", "0");
+ dictionary(temperaturedictionary, "TaskType", "5");
+ dictionary(modedictionary, "TaskType", "5");
+ dictionary(modedictionary, "Data1", "3");
+ dictionary(speeddictionary, "TaskType", "5");
+ dictionary(speeddictionary, "Data1", "6");
+
+ #endregion
+
+ #region 绌鸿皟View
+
+ devicefra.Y = Application.GetRealHeight(1920 - 600 - 210 - 160 * 2);
+ devicefra.Height = Application.GetRealHeight(600 + 210 + 160 * 2);
+
+ #region 寮�
+
+ var openframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(openframelayout);
+
+ var openrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ openframelayout.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new SelectedButton();
+ openrowlayout.AddChidren(openBtnSelected);
+ #endregion
+
+ #region 绌鸿皟鐘舵�乂iew
+ var PickerViewfra = new FrameLayout
+ {
+ Y = openframelayout.Bottom,
+ Height = Application.GetRealHeight(600),
+ };
+ devicefra.AddChidren(PickerViewfra);
+
+
+ var pausePickerViewfra = new FrameLayout
+ {
+ Y = openframelayout.Bottom,
+ Height = Application.GetRealHeight(600),
+ };
+ devicefra.AddChidren(pausePickerViewfra);
+
+
+
+ var mUIPickerView = new UIPickerView
+ {
+ Height = Application.GetRealHeight(600 - 5),
+ };
+ PickerViewfra.AddChidren(mUIPickerView);
+ var line = new Button
+ {
+ Y = Application.GetRealHeight(600 - 5),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(5),
+ X = Application.GetRealWidth(80),
+ BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ PickerViewfra.AddChidren(line);
+
+ var mList1 = new List<string>();
+ var mList2 = new List<string> {
+ Language.StringByID(MyInternationalizationString.logiccool),
+ Language.StringByID(MyInternationalizationString.logicheat),
+ Language.StringByID(MyInternationalizationString.logicauto),
+ Language.StringByID(MyInternationalizationString.logicdry),
+ Language.StringByID(MyInternationalizationString.logicfanonly),
+ };
+ var mList3 = new List<string>{
+ Language.StringByID(MyInternationalizationString.logiclow),
+ Language.StringByID(MyInternationalizationString.logicmedium),
+ Language.StringByID(MyInternationalizationString.logichigh),
+ };
+ for (int i = 16; i < 33; i++)
+ {
+ mList1.Add(i.ToString() + " " + "鈩�");
+ }
+ mUIPickerView.setNPicker(mList1, mList2, mList3);
+ ///榛樿鐘舵��
+
+
+ #endregion
+
+ #region 鍏�
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = PickerViewfra.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new SelectedButton();
+ closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+
+
+
+ mUIPickerView.OnSelectChangeEvent += (s1, s2, s3) =>
+ {
+ if (openBtnSelected.Visible)
+ {
+ SelectedDeviceStatusaction = "yes";
+ var temperature = mList1[s1].Split(' ')[0];
+ var modestring = mList2[s2].Split(' ')[0];
+ var speedstring = mList3[s3].Split(' ')[0];
+ ModeState(modestring, temperaturedictionary, modedictionary);
+ var a = int.Parse(temperature) * 100;
+ dictionary(temperaturedictionary, "Data2", a.ToString());
+
+ SpeedState(speedstring, speeddictionary);
+
+
+ }
+ };
+
+ #endregion
+ //榛樿26,鑷姩,涓
+ int indextemperature = 10, indexmode = 2, indexspeed = 1;
+ if (edit && TaskList != null)
+ {
+ foreach (var value in TaskList)
+ {
+ if (value["TaskType"] == "1")
+ {
+ dictionary(switchdictionary, "Data1", value["Data1"]);
+ if (value["Data1"] == "1")
+ {
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ pausePickerViewfra.Height = Application.GetRealHeight(0);
+ }
+ else if (value["Data1"] == "0")
+ {
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ pausePickerViewfra.Height = Application.GetRealHeight(600);
+ }
+
+ }
+ else if (value["TaskType"] == "5")
+ {
+ if (value["Data1"] == "3")
+ {//3---璁剧疆宸ヤ綔妯″紡(1:鑷姩;3:鍒跺喎;4:鍒剁儹;7:閫侀;8:闄ゆ箍)
+ dictionary(modedictionary, "Data2", value["Data2"]);
+ string modetext = "";
+ switch (value["Data2"])
+ {
+ case "3":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logiccool);
+ //indexmode = 0;
+ }
+ break;
+ case "4":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicheat);
+ // indexmode = 1;
+ }
+ break;
+ case "1":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicauto);
+ // indexmode = 2;
+ }
+ break;
+ case "8":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicdry);
+ // indexmode = 3;
+ }
+ break;
+ case "7":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicfanonly);
+ //indexmode = 4;
+ }
+ break;
+ }
+ indexmode = mList2.IndexOf(modetext);
+ }
+ else if (value["Data1"] == "6")
+ {//6---璁剧疆椋庢墖妯″紡(1:浣庨;2:涓;3:楂橀;)
+ dictionary(speeddictionary, "Data2", value["Data2"]);
+ string speedtext = "";
+ switch (value["Data2"])
+ {
+ case "1":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logiclow);
+ //indexspeed = 0;
+ }
+ break;
+
+ case "2":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logicmedium);
+ // indexspeed = 1;
+ }
+ break;
+ case "3":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logichigh);
+ // indexspeed = 2;
+ }
+ break;
+
+ }
+ indexspeed = mList3.IndexOf(speedtext);
+ }
+ //4---璁剧疆鍔犵儹搴︽暟;5---璁剧疆鍒跺喎銆侀櫎婀垮害鏁�;7---璁剧疆鑷姩搴︽暟
+ else if (value["Data1"] == "4" || value["Data1"] == "5" || value["Data1"] == "7")
+ {
+ var s = int.Parse(value["Data2"]) / 100;
+ indextemperature = mList1.IndexOf(s.ToString() + " " + "鈩�");
+ dictionary(temperaturedictionary, "Data1", value["Data1"]);
+ dictionary(temperaturedictionary, "Data2", value["Data2"]);
+ }
+
+ }
+ }
+ }
+ ///鏇存柊鏈�鏂扮┖璋冪姸鎬侊紱
+ mUIPickerView.setCurrentItems(indextemperature, indexmode, indexspeed);
+
+ ///纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ pausePickerViewfra.Height = Application.GetRealHeight(0);
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ dictionary(switchdictionary, "Data1", "1");
+ var temperature = mList1[indextemperature].Split(' ')[0];
+ var modestring = mList2[indexmode].Split(' ')[0];
+ var speedstring = mList3[indexspeed].Split(' ')[0];
+
+ ModeState(modestring, temperaturedictionary, modedictionary);
+ var a = int.Parse(temperature) * 100;
+ dictionary(temperaturedictionary, "Data2", a.ToString());
+ SpeedState(speedstring, speeddictionary);
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
+
+ ///鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ pausePickerViewfra.Height = Application.GetRealHeight(600);
+
+ SelectedDeviceStatusaction = "yes";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ dictionary(switchdictionary, "Data1", "0");
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
+ }
+ break;
+
+
+ }
+
+ Btncomplete.MouseUpEventHandler += (sender, e) =>
+ {
+
+ if (SelectedDeviceStatusaction == "yes")
+ {
+ LogicIfon.AddDeviceactions(common, actionsInfo);
+ }
+ else
+ {
+ if (!edit)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
+ Language.StringByID(MyInternationalizationString.complete));
+ alert.Show();
+ return;
+ }
+
+ }
+ flMain.RemoveFromParent();
+ var templatePage = new TemplatePage();
+ UserView.HomePage.Instance.AddChidren(templatePage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ templatePage.Show();
+
+ };
+
+ }
+
+ public static void dictionary(Dictionary<string, string> deviceactionsInfo, string Key, string Value)
+ {
+ if (deviceactionsInfo.ContainsKey(Key))
+ {
+ deviceactionsInfo.Remove(Key);
+ }
+ deviceactionsInfo.Add(Key, Value);
+ }
+ /// <summary>
+ /// 绌鸿皟妯″紡鐨勭姸鎬�
+ /// </summary>
+ /// <param name="modestring"></param>
+ /// <param name="temperaturedictionary"></param>
+ /// <param name="modedictionary"></param>
+ public static void ModeState(string modestring, Dictionary<string, string> temperaturedictionary, Dictionary<string, string> modedictionary)
+ {
+
+ if (modestring == Language.StringByID(MyInternationalizationString.logiccool))
+ {
+ dictionary(modedictionary, "Data2", "3");
+ dictionary(temperaturedictionary, "Data1", "5");
+ }
+ else if (modestring == Language.StringByID(MyInternationalizationString.logicheat))
+ {
+
+ dictionary(modedictionary, "Data2", "4");
+ dictionary(temperaturedictionary, "Data1", "4");
+ }
+ else if (modestring == Language.StringByID(MyInternationalizationString.logicauto))
+ {
+
+ dictionary(modedictionary, "Data2", "1");
+ dictionary(temperaturedictionary, "Data1", "7");
+ }
+ else if (modestring == Language.StringByID(MyInternationalizationString.logicdry))
+ {
+
+ dictionary(modedictionary, "Data2", "8");
+ dictionary(temperaturedictionary, "Data1", "5");
+ }
+ else if (modestring == Language.StringByID(MyInternationalizationString.logicfanonly))
+ {
+ dictionary(temperaturedictionary, "Data1", "20");
+ dictionary(modedictionary, "Data2", "7");
+ }
+
+ }
+ /// <summary>
+ /// 椋庨�熺殑妯″紡
+ /// </summary>
+ /// <param name="speedstring"></param>
+ /// <param name="speeddictionary"></param>
+ public static void SpeedState(string speedstring, Dictionary<string, string> speeddictionary)
+ {
+
+ if (speedstring == Language.StringByID(MyInternationalizationString.logiclow))
+ {
+
+ dictionary(speeddictionary, "Data2", "1");
+
+ }
+ else if (speedstring == Language.StringByID(MyInternationalizationString.logicmedium))
+ {
+
+ dictionary(speeddictionary, "Data2", "2");
+
+ }
+ else if (speedstring == Language.StringByID(MyInternationalizationString.logichigh))
+ {
+
+ dictionary(speeddictionary, "Data2", "3");
+ }
+
+ }
+
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs
new file mode 100755
index 0000000..bdec8f7
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplateDeviceCondition.cs
@@ -0,0 +1,1452 @@
+锘縰sing System;
+using Shared;
+using Shared.R;
+using System.Collections.Generic;
+using Newtonsoft.Json.Linq;
+using ZigBee.Device;
+using Shared.Common;
+namespace Shared.Phone.Device.Logic
+{
+
+ public class TemplateDeviceCondition : FrameLayout
+ {
+ public TemplateDeviceCondition()
+ {
+ Tag = "Logic";
+
+ }
+ Button roombjButton = new Button();
+ Button roomTextButton = new Button();
+ Button devicetypeButton = new Button();
+ VerticalScrolViewLayout middle;
+ FrameLayout clickframeLayout = new FrameLayout();
+ Button clickbutton = new Button();
+ Button clicktextcolcrbutton = new Button();
+
+ public void Show()
+ {
+
+ UserView.HomePage.Instance.ScrollEnabled = false;
+ this.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
+ };
+ this.AddChidren(topRowLayout);
+
+ var titleName = new Button
+ {
+ TextSize = 16,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(160),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.devicestate,
+ };
+ topRowLayout.AddChidren(titleName);
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
+ var foolrname = new Button
+ {
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterRight,
+ X = Application.GetRealWidth(1080 - 400 - 120),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ // TextID = MyInternationalizationString.customroom,
+ Text = Config.Instance.Home.GetCurrentFloorName,
+ };
+ topRowLayout.AddChidren(foolrname);
+ var dropdown = new Button
+ {
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterRight,
+ X = foolrname.Right,
+ Width = Application.GetRealWidth(72),
+ Height = Application.GetRealHeight(72),
+ Y = Application.GetRealHeight(92),
+ UnSelectedImagePath = "ZigeeLogic/drop-down.png",
+ };
+ topRowLayout.AddChidren(dropdown);
+ #endregion
+
+ ///娌℃湁鎴块棿鐩存帴杩斿洖鍘伙紱
+ if (Common.Room.Lists.Count == 0)
+ {
+ return;
+ }
+ ///鎴块棿婊戝姩鎺т欢
+ var roomhorizontalScrol = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(200),
+ Y = topRowLayout.Bottom,
+ X = Application.GetRealWidth(58),
+ };
+ this.AddChidren(roomhorizontalScrol);
+
+ var devicetypehorizontalScrol1 = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58 - 200),
+ Height = Application.GetRealHeight(280),
+ Y = roomhorizontalScrol.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ X = Application.GetRealWidth(58 + 200),
+ };
+ this.AddChidren(devicetypehorizontalScrol1);
+ ///璁惧绫诲瀷婊戝姩鎺т欢
+ var devicetypehorizontalScrol = new HorizontalScrolViewLayout()
+ {
+ Width = Application.GetRealWidth(1080 - 58),
+ Height = Application.GetRealHeight(280),
+ Y = roomhorizontalScrol.Bottom,
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ X = Application.GetRealWidth(58),
+ Radius = (uint)Application.GetRealHeight(50),
+
+ };
+ this.AddChidren(devicetypehorizontalScrol);
+
+ middle = new VerticalScrolViewLayout();
+ middle.Y = devicetypehorizontalScrol.Bottom + Application.GetRealHeight(40);
+ middle.Height = Application.GetRealHeight(1920) - devicetypehorizontalScrol.Y;
+ middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+ middle.X = Application.GetRealWidth(58);
+ middle.Radius = (uint)Application.GetRealHeight(50);
+ this.AddChidren(middle);
+
+ ///鐩墠鏀寔鐨勮澶�
+ var deviceTypeList = new List<DeviceType> {
+ DeviceType.IASZone,
+ //DeviceType.OnOffSwitch,
+ //DeviceType.OnOffOutput,//妤兼鐏�
+ //DeviceType.DoorLock
+ };
+
+ ///妤煎眰鐐瑰嚮浜嬩欢
+ EventHandler<MouseEventArgs> foorlclick=(sender,e) =>
+ {
+
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ flMain.MouseUpEventHandler += (sender2, e2) =>
+ {
+ flMain.RemoveFromParent();
+ };
+ var foolrbj = new VerticalScrolViewLayout
+ {
+
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(600),
+ X = Application.GetRealWidth(1080 - 400 - 60),
+ Y = Application.GetRealHeight(184 + 50),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(30),
+ };
+ flMain.AddChidren(foolrbj);
+ ///榛樿璋冭瘯
+ foreach (var foolr in Config.Instance.Home.FloorDics)
+ {
+ var foolrRowLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(150),
+ };
+ foolrbj.AddChidren(foolrRowLayout);
+
+ var btnfoolrname = new Button
+ {
+ Width = Application.GetRealWidth(250),
+ Height = Application.GetRealHeight(160),
+ Text = foolr.Value,
+ TextAlignment = TextAlignment.Center,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Tag = foolr.Key,
+ };
+ foolrRowLayout.AddChidren(btnfoolrname);
+
+
+ EventHandler<MouseEventArgs> foolrnameclick = (sender13, e13) =>
+ {
+ roomhorizontalScrol.RemoveAll();
+ devicetypehorizontalScrol.RemoveAll();
+ middle.RemoveAll();
+ foolrname.Text = btnfoolrname.Text;
+ flMain.RemoveFromParent();
+ var list = Send.GetRoomList(btnfoolrname.Tag.ToString());
+ AllRoomView(list, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
+
+ };
+ foolrRowLayout.MouseUpEventHandler += foolrnameclick;
+ btnfoolrname.MouseUpEventHandler += foolrnameclick;
+
+
+ }
+
+ };
+ foolrname.MouseUpEventHandler += foorlclick;
+ dropdown.MouseUpEventHandler += foorlclick;
+
+ var roomlists = new List<Common.Room>();
+ roomlists.Clear();
+ if (Config.Instance.Home.FloorDics.Count < 1)
+ {
+ foolrname.Visible = false;
+ dropdown.Visible = false;
+ if (Config.Instance.Home.FloorDics.Count == 0)
+ {
+ roomlists.AddRange(Common.Room.Lists);
+ }
+ else
+ {
+ roomlists = Send.GetRoomList(Config.Instance.Home.CurrentFloorId);
+ }
+ }
+ else
+ {
+ roomlists = Send.GetRoomList(Config.Instance.Home.CurrentFloorId);
+
+ }
+
+ AllRoomView(roomlists, deviceTypeList, roomhorizontalScrol, devicetypehorizontalScrol);
+ }
+ /// <summary>
+ /// 鍔犺浇鎵�鏈夋埧闂寸殑瑙嗗浘鏂规硶
+ /// </summary>
+ void AllRoomView(List<Common.Room> roomlist, List<DeviceType> deviceTypeList, HorizontalScrolViewLayout roomhorizontalScrol, HorizontalScrolViewLayout devicetypehorizontalScrol)
+ {
+ for (int i = 0; i < roomlist.Count; i++)
+ {
+ var room = roomlist[i];
+
+ var fra = new FrameLayout
+ {
+ Height = Application.GetRealHeight(200),
+ Width = Application.GetRealWidth(255),
+ };
+ roomhorizontalScrol.AddChidren(fra);
+
+ var roombjBtn = new Button
+ {
+ Height = Application.GetRealHeight(158),
+ Width = Application.GetRealWidth(255),
+ UnSelectedImagePath = "ZigeeLogic/iconBackgroundColor.png",
+ SelectedImagePath = "ZigeeLogic/iconSelectedBackgroundColor.png",
+ Y = Application.GetRealHeight(21),
+ };
+ fra.AddChidren(roombjBtn);
+
+ var roomnameBtn = new Button
+ {
+
+ Height = Application.GetRealHeight(152 - 26 - 20),
+ Width = Application.GetRealWidth(255 - 20 - 50),
+ Text = room.Name,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = Application.GetRealHeight(21 + 13 + 10),
+ X = Application.GetRealWidth(10 + 25),
+
+ };
+ fra.AddChidren(roomnameBtn);
+
+ if (i == 0)//
+ {
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+
+ var list = new List<DeviceUI>();
+ foreach (var device in room.DeviceUIList)
+ {
+ if (device.CommonDevice == null)
+ {
+ continue;
+ }
+ if (!deviceTypeList.Contains(device.CommonDevice.Type))
+ {
+ continue;
+ }
+ list.Add(device);
+ }
+ AllDeviceTypeView(list, devicetypehorizontalScrol);
+
+ }
+
+
+ EventHandler<MouseEventArgs> roomclick = (sender, e) =>
+ {
+
+
+ roombjButton.IsSelected = false;
+ roombjButton = roombjBtn;
+ roombjBtn.IsSelected = true;
+
+ roomTextButton.IsSelected = false;
+ roomTextButton = roomnameBtn;
+ roomnameBtn.IsSelected = true;
+
+ var list = new List<DeviceUI>();
+ foreach (var device in room.DeviceUIList)
+ {
+ if (device.CommonDevice == null)
+ {
+ continue;
+ }
+ if (!deviceTypeList.Contains(device.CommonDevice.Type))
+ {
+ continue;
+ }
+ list.Add(device);
+ }
+ AllDeviceTypeView(list, devicetypehorizontalScrol);
+
+
+ };
+ roomnameBtn.MouseUpEventHandler += roomclick;
+ roombjBtn.MouseUpEventHandler += roomclick;
+
+ }
+ }
+ /// <summary>
+ /// 鍔犺浇璇ュ尯鍩熸墍鏈夎澶囪鍥炬柟娉�
+ /// </summary>0
+ /// <param name="devicelist">Devicelist.</param>
+ void AllDeviceTypeView(List<DeviceUI> devicelist, HorizontalScrolViewLayout devicetypehorizontalScrol)
+ {
+ List<string> devicetypelist = new List<string>();
+ devicetypelist.Clear();
+ #region ------鎺掑垪璁惧绫诲瀷------
+ ///鏆傛椂闅愯棌鐏厜鍜岀獥甯樿澶�
+ var lightjosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.ColorDimmableLight || device.CommonDevice.Type == DeviceType.OnOffOutput);
+ if (lightjosn != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.Lights));
+ }
+ var curtainjosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.WindowCoveringDevice);
+ if (curtainjosn != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.Curtains));
+ }
+
+ var iASZonejosn = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.IASZone);
+ if (iASZonejosn != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.sensor));
+ }
+ var onOffSwitchjson = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.OnOffSwitch);
+ if (onOffSwitchjson != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.OnOffSwitch));
+ }
+ var doorLock = devicelist.Find((device) => device.CommonDevice.Type == DeviceType.DoorLock);
+ if (doorLock != null)
+ {
+ devicetypelist.Add(Language.StringByID(MyInternationalizationString.doorLock));
+ }
+ #endregion
+
+ devicetypehorizontalScrol.RemoveAll();
+ for (int i = 0; i < devicetypelist.Count; i++)
+ {
+
+ var devicetype = devicetypelist[i];
+
+ var spaceRowLayout = new FrameLayout();
+ devicetypehorizontalScrol.AddChidren(spaceRowLayout);
+ if (i == 0)
+ {
+ spaceRowLayout.Width = Application.GetRealWidth(37);
+ }
+ else
+ {
+ spaceRowLayout.Width = Application.GetRealWidth(80);
+ }
+
+ var deviceRowLayout = new FrameLayout
+ {
+ Width = Application.GetRealWidth(156 + 20),
+ Height = Application.GetRealHeight(280 - 30),
+ Y = Application.GetRealHeight(30),
+ };
+ devicetypehorizontalScrol.AddChidren(deviceRowLayout);
+
+ var backgroundColor = new Button
+ {
+ Width = Application.GetRealWidth(156),
+ Height = Application.GetRealHeight(180),
+ X = Application.GetRealWidth(10),
+ UnSelectedImagePath = "ZigeeLogic/deviceunselectedbackgroundcolor.png",
+ SelectedImagePath = "ZigeeLogic/deviceselectedbackgroundcolor.png",
+ };
+ deviceRowLayout.AddChidren(backgroundColor);
+
+
+ var devicetypeicon = new Button
+ {
+ Width = Application.GetRealWidth(84),
+ Height = Application.GetRealHeight(84),
+ X = Application.GetRealWidth(46),
+ Y = Application.GetRealHeight(30),
+ };
+ deviceRowLayout.AddChidren(devicetypeicon);
+
+ var devicetypename = new Button
+ {
+ Width = Application.GetRealWidth(176),
+ Height = Application.GetRealHeight(40),
+ Text = devicetype,
+ TextAlignment = TextAlignment.Center,
+ Y = backgroundColor.Bottom,
+ TextColor = ZigbeeColor.Current.LogicAddColor,
+ TextSize = 10,
+ };
+ deviceRowLayout.AddChidren(devicetypename);
+ if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedlight.png";
+ // devicetypeicon.SelectedImagePath = "ZigeeLogic/LightSelected.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedcurtain.png";
+ //devicetypeicon.SelectedImagePath = "ZigeeLogic/CurtainSelected.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.OnOffSwitch))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedpanel.png";
+ // devicetypeicon.SelectedImagePath = "ZigeeLogic/OnOffSwitchSelected.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.sensor))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selectedsenor.png";
+ // devicetypeicon.SelectedImagePath = "ZigeeLogic/SensorSelected.png";
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.doorLock))
+ {
+ devicetypeicon.UnSelectedImagePath = "ZigeeLogic/selecteddoorlock.png";
+ }
+ EventHandler<MouseEventArgs> devicetypeclick = (sender13, e13) =>
+ {
+ List<DeviceType> list = new List<DeviceType>();
+ list.Clear();
+ devicetypeButton.IsSelected = false;
+ devicetypeButton = backgroundColor;
+ backgroundColor.IsSelected = true;
+ ///鍒嗙被鏄剧ず锛堜緥濡傜伅鍏夛細{鐏厜1锛岀伅鍏�2...}锛�
+ if (devicetype == Language.StringByID(MyInternationalizationString.Lights))
+ {
+ list.Add(DeviceType.OnOffOutput);//0x0101鍗佽繘鍒�257
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.Curtains))
+ {
+ list.Add(DeviceType.WindowCoveringDevice);
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.OnOffSwitch))
+ {
+ list.Add(DeviceType.OnOffSwitch);
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.sensor))
+ {
+ list.Add(DeviceType.IASZone);
+ }
+ else if (devicetype == Language.StringByID(MyInternationalizationString.doorLock))
+ {
+ list.Add(DeviceType.DoorLock);
+ }
+
+ ConditionDeviceView(list, devicelist);
+
+ };
+ deviceRowLayout.MouseUpEventHandler += devicetypeclick;
+ devicetypename.MouseUpEventHandler += devicetypeclick;
+ devicetypeicon.MouseUpEventHandler += devicetypeclick;
+ backgroundColor.MouseUpEventHandler += devicetypeclick;
+
+ }
+ ///鏄剧ず鎴块棿鎵�鏈夎澶�
+ ConditionDeviceView(new List<DeviceType>(), devicelist);
+
+ }
+ /// <summary>
+ /// 鍔犺浇璇ョ被鍨嬭澶囪鍥炬柟娉�
+ /// </summary>
+ /// <param name="deviceTypelist">Device typelist.</param>
+ /// <param name="devicelist">璁惧鍒楄〃</param>
+ void ConditionDeviceView(List<DeviceType> deviceTypelist, List<DeviceUI> devicelist)
+ {
+ middle.RemoveAll();
+
+ foreach (var common in devicelist)
+ {
+
+ if (deviceTypelist.Count != 0 && !deviceTypelist.Contains(common.CommonDevice.Type))
+ {
+ continue;
+ }
+ if (common.CommonDevice.Type == DeviceType.IASZone)
+ {
+ var iASZonedevice = common.CommonDevice as IASZone;
+ if (iASZonedevice.DeviceID != 1026 || iASZonedevice.IasDeviceType != 13)
+ {
+ continue;
+ }
+ }
+
+ var deviceFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ };
+ middle.AddChidren(deviceFramelayout);
+
+ var bjFramelayout = new FrameLayout
+ {
+ Width = Application.GetRealWidth(112),
+ Height = Application.GetRealHeight(112),
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(30 + 9),
+ Radius = (uint)Application.GetRealHeight(56),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ deviceFramelayout.AddChidren(bjFramelayout);
+
+ var deviceIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(82),
+ Height = Application.GetRealHeight(82),
+ Gravity = Gravity.Center,
+
+ };
+ bjFramelayout.AddChidren(deviceIconBtn);
+
+ var deviceRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176 + 10),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+
+ };
+ deviceFramelayout.AddChidren(deviceRow);
+
+ var devicename = new Button
+ {
+ Text = common.CommonDevice.DeviceEpointName,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ SelectedTextColor = ZigbeeColor.Current.LogicAddColor,
+ };
+ deviceRow.AddChidren(devicename);
+ switch (common.CommonDevice.Type)
+ {
+ case DeviceType.OnOffOutput:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/light.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedlight.png";
+ }
+ break;
+ case DeviceType.IASZone:
+ {
+ var iASZonedevice = common.CommonDevice as IASZone;
+ if (iASZonedevice.DeviceID != 1026)
+ {
+ break;
+ }
+ deviceIconBtn.UnSelectedImagePath = $"ZigeeLogic/sensor{iASZonedevice.IasDeviceType}.png";
+ deviceIconBtn.SelectedImagePath = $"ZigeeLogic/selectedsensor{iASZonedevice.IasDeviceType}.png";
+
+
+ }
+ break;
+ case DeviceType.OnOffSwitch:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/panel.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selectedpanel.png";
+ }
+ break;
+ case DeviceType.DoorLock:
+ {
+ deviceIconBtn.UnSelectedImagePath = "ZigeeLogic/doorlock.png";
+ deviceIconBtn.SelectedImagePath = "ZigeeLogic/selecteddoorlock.png";
+ }
+ break;
+ }
+
+ EventHandler<MouseEventArgs> devicclick = (sen, e) =>
+ {
+ clickbutton.IsSelected = false;
+ clickbutton = deviceIconBtn;
+ deviceIconBtn.IsSelected = true;
+ clickframeLayout.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor;
+ clickframeLayout = bjFramelayout;
+ bjFramelayout.BackgroundColor = ZigbeeColor.Current.LogicIconBackgroundColor;
+ clicktextcolcrbutton.IsSelected = false;
+ clicktextcolcrbutton = devicename;
+ devicename.IsSelected = true;
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ CurrentDeviceView(flMain, common.CommonDevice, false);
+ };
+ deviceFramelayout.MouseUpEventHandler += devicclick;
+ bjFramelayout.MouseUpEventHandler += devicclick;
+ deviceIconBtn.MouseUpEventHandler += devicclick;
+ deviceRow.MouseUpEventHandler += devicclick;
+ devicename.MouseUpEventHandler += devicclick;
+
+
+ }
+ }
+ /// <summary>
+ /// 閫変腑璇ヨ澶囧姛鑳戒綔涓烘潯浠剁殑瑙嗗浘鏂规硶
+ /// </summary>
+ /// <param name="common">Common.</param>
+ public async static void CurrentDeviceView(FrameLayout flMain, CommonDevice common, bool edit)
+ {
+ //涓嶈褰撳墠鐣岄潰婊戝姩
+ UserView.HomePage.Instance.ScrollEnabled = false;
+ List<Dictionary<string, string>> doorlockConditionsInfo = new List<Dictionary<string, string>>();
+ Dictionary<string, string> deviceConditionsInfo = new Dictionary<string, string>();
+ dictionary(deviceConditionsInfo, "Type", "1");
+ dictionary(deviceConditionsInfo, "IsValid", "1");
+ dictionary(deviceConditionsInfo, "MacAddr", common.DeviceAddr);
+ dictionary(deviceConditionsInfo, "Epoint", common.DeviceEpoint.ToString());
+ //var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ //this.AddChidren(flMain);
+ flMain.MouseUpEventHandler += (sender, e) =>
+ {
+ flMain.RemoveFromParent();
+
+
+ };
+
+ var devicefra1 = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ flMain.AddChidren(devicefra1);
+
+ var devicefra = new FrameLayout
+ {
+
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(530),
+ Y = Application.GetRealHeight(1920 - 530),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(60),
+ };
+ flMain.AddChidren(devicefra);
+
+ #region -------鍙栨秷 瀹屾垚
+ var timetype = new RowLayout
+ {
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ devicefra.AddChidren(timetype);
+ var Btncancel = new Button
+ {
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(80),
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ timetype.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.security,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ Text = common.DeviceEpointName,
+ };
+ timetype.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
+
+ };
+ timetype.AddChidren(Btncomplete);
+ #endregion
+
+ string SelectedDeviceStatuscondition = "";
+
+ Dictionary<string, string> devices = null;
+ if (edit)
+ {
+ foreach (var deviceinfo in Common.Logic.CurrentLogic.Conditions)
+ {
+ if (deviceinfo["Type"] == "1")
+ {
+ if (common.DeviceAddr == deviceinfo["MacAddr"] && common.DeviceEpoint.ToString() == deviceinfo["Epoint"])
+ {
+ devices = deviceinfo;
+ break;
+
+ }
+ }
+ }
+ }
+ switch (common.Type)
+ {
+ ///鐏厜
+ case DeviceType.OnOffOutput:
+ {
+ dictionary(deviceConditionsInfo, "Cluster_ID", "6");
+ dictionary(deviceConditionsInfo, "AttriButeId", "0");
+ dictionary(deviceConditionsInfo, "Range", "1");
+ dictionary(deviceConditionsInfo, "AttriButeData2", "0");
+
+ #region 鐏厜View
+
+
+
+ var openframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(openframelayout);
+
+ var openrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ openframelayout.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new SelectedButton();
+ openrowlayout.AddChidren(openBtnSelected);
+
+
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new SelectedButton();
+ closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+
+ ///鐐瑰嚮纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ SelectedDeviceStatuscondition = "OnOffOutput";
+ dictionary(deviceConditionsInfo, "AttriButeData1", "1");//榛樿鍊�
+
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
+ ///鐐瑰嚮鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ SelectedDeviceStatuscondition = "OnOffOutput";
+ dictionary(deviceConditionsInfo, "AttriButeData1", "0");//榛樿鍊�
+
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
+ if (edit && devices != null)
+ {
+ if (devices["AttriButeId"] == "0")
+ {
+ if (devices["AttriButeData1"] == "1")
+ {
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ }
+ else
+ {
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+
+ }
+ }
+ }
+ }
+ break;
+ case DeviceType.WindowCoveringDevice:
+ {
+
+ dictionary(deviceConditionsInfo, "Cluster_ID", "258");
+ dictionary(deviceConditionsInfo, "AttriButeId", "8");
+ dictionary(deviceConditionsInfo, "Range", "0");
+ dictionary(deviceConditionsInfo, "AttriButeData2", "0");
+
+ #region 绐楀笜View
+ devicefra.Y = Application.GetRealHeight(1920 - 30 - 720);
+ devicefra.Height = Application.GetRealHeight(720);
+ var windowCoveringfra = new FrameLayout
+ {
+ Y = Application.GetRealHeight(180),
+ Height = Application.GetRealHeight(180 * 2 + 30),
+ };
+ devicefra.AddChidren(windowCoveringfra);
+
+ var openrowlayout = new RowLayout
+ {
+ Height = Application.GetRealHeight(180),
+ };
+ windowCoveringfra.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ //Text = "寮�",
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(50),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(180),
+ //SelectedBackgroundColor = 0xfffe5e00,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new Button
+ {
+ X = Application.GetRealWidth(1000 - 150),
+ Width = Application.GetMinRealAverage(110),
+ Height = Application.GetMinRealAverage(110),
+ UnSelectedImagePath = "Item/YesSelected.png",
+ Visible = false,
+ Gravity = Gravity.CenterVertical
+ };
+ openrowlayout.AddChidren(openBtnSelected);
+
+ var closerowlayout = new RowLayout
+ {
+ Y = openrowlayout.Bottom,
+ Height = Application.GetRealHeight(180),
+ };
+ windowCoveringfra.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(50),
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(180),
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new Button
+ {
+ X = Application.GetRealWidth(1000 - 150),
+ Width = Application.GetMinRealAverage(110),
+ Height = Application.GetMinRealAverage(110),
+ UnSelectedImagePath = "Item/YesSelected.png",
+ Visible = false,
+ Gravity = Gravity.CenterVertical
+ };
+ closerowlayout.AddChidren(closeBtnSelected);
+ #endregion
+
+ ///鐐瑰嚮纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ SelectedDeviceStatuscondition = "WindowCoveringDevice";
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ dictionary(deviceConditionsInfo, "AttriButeData1", "95");//榛樿鍊�
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ ///鐐瑰嚮鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ SelectedDeviceStatuscondition = "WindowCoveringDevice";
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ dictionary(deviceConditionsInfo, "AttriButeData1", "5");//榛樿鍊�
+
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+
+ if (edit && devices != null)
+ {
+ if (devices["AttriButeId"] == "8")
+ {
+ if (int.Parse(devices["AttriButeData1"]) > 5)
+ {
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ }
+ else
+ {
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ }
+ }
+ }
+ }
+ break;
+ case DeviceType.IASZone:
+ {
+
+ var iASZonedevice = common as IASZone;
+ if (iASZonedevice.DeviceID != 1026)
+ {
+ break;
+ }
+
+ dictionary(deviceConditionsInfo, "Cluster_ID", "1280");
+ dictionary(deviceConditionsInfo, "AttriButeId", "1281");
+ dictionary(deviceConditionsInfo, "AttriButeData2", "0");
+
+ #region 瀹夐槻璁惧View
+
+ var openframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(openframelayout);
+
+ var openrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ openframelayout.AddChidren(openrowlayout);
+
+ var btnopen = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.open,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ openrowlayout.AddChidren(btnopen);
+
+ var openBtnSelected = new SelectedButton();
+ openrowlayout.AddChidren(openBtnSelected);
+
+
+ var closeframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = openframelayout.Bottom,
+ };
+ devicefra.AddChidren(closeframelayout);
+ var closerowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ closeframelayout.AddChidren(closerowlayout);
+
+ var btnclose = new Button
+ {
+ //Text = "鍏�",
+ TextID = MyInternationalizationString.close,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ closerowlayout.AddChidren(btnclose);
+
+ var closeBtnSelected = new SelectedButton();
+ closerowlayout.AddChidren(closeBtnSelected);
+
+
+ #endregion
+
+ int timevalue = 0;
+ ///鐐瑰嚮纭浜嬩欢
+ EventHandler<MouseEventArgs> openclick = (sender, e) =>
+ {
+ SelectedDeviceStatuscondition = "IASZone";
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ if (iASZonedevice.IasDeviceType == 13)
+ {
+ closeBtnSelected.Visible = true;
+ }
+ dictionary(deviceConditionsInfo, "Range", "5");
+ dictionary(deviceConditionsInfo, "AttriButeData1", "1");
+
+
+ };
+ openrowlayout.MouseUpEventHandler += openclick;
+ btnopen.MouseUpEventHandler += openclick;
+ openBtnSelected.MouseUpEventHandler += openclick;
+ openframelayout.MouseUpEventHandler += openclick;
+ ///鐐瑰嚮鍙栨秷浜嬩欢
+ EventHandler<MouseEventArgs> closeclick = (sender, e) =>
+ {
+ SelectedDeviceStatuscondition = "IASZone";
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ dictionary(deviceConditionsInfo, "Range", "1");
+ dictionary(deviceConditionsInfo, "AttriButeData1", "0");
+ if (iASZonedevice.IasDeviceType == 13)
+ {
+ SelectedDeviceStatuscondition = "no";
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ var ignoreTime = new IgnoreTime();
+ UserView.HomePage.Instance.AddChidren(ignoreTime);
+ UserView.HomePage.Instance.PageIndex += 1;
+ ignoreTime.Show(common, btnclose.Text, edit, timevalue);
+ }
+
+
+ };
+ closerowlayout.MouseUpEventHandler += closeclick;
+ btnclose.MouseUpEventHandler += closeclick;
+ closeBtnSelected.MouseUpEventHandler += closeclick;
+ closeframelayout.MouseUpEventHandler += closeclick;
+
+
+
+ switch (iASZonedevice.IasDeviceType)
+ {
+ case 13:
+ {
+ btnopen.TextID = MyInternationalizationString.someone;
+ btnclose.TextID = MyInternationalizationString.unattendedtime1;
+ closeBtnSelected.UnSelectedImagePath = "ZigeeLogic/next.png";
+ closeBtnSelected.Visible = true;
+ openframelayout.AddChidren(openrowlayout);
+ closeframelayout.AddChidren(closerowlayout);
+ }
+ break;
+ case 21:
+ case 22:
+ {
+ #region
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 * 3 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 * 3 + 20 + 50);
+ btnopen.TextID = MyInternationalizationString.logicopen;
+ btnclose.TextID = MyInternationalizationString.logicclose;
+ closerowlayout.LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor;
+ openframelayout.AddChidren(openrowlayout);
+ closeframelayout.AddChidren(closerowlayout);
+
+
+
+ var timeoutframelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = closeframelayout.Bottom,
+ };
+ devicefra.AddChidren(timeoutframelayout);
+ var timeoutrowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ timeoutframelayout.AddChidren(timeoutrowlayout);
+
+ var btntimeout = new Button
+ {
+ TextID = MyInternationalizationString.closetimeout,
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ timeoutrowlayout.AddChidren(btntimeout);
+
+ var timeoutBtnSelected = new Button
+ {
+ X = Application.GetRealWidth(860),
+ Width = Application.GetMinRealAverage(60),
+ Height = Application.GetMinRealAverage(60),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ Gravity = Gravity.CenterVertical,
+ };
+ timeoutrowlayout.AddChidren(timeoutBtnSelected);
+ EventHandler<MouseEventArgs> timeoutclick = (sender, e) =>
+ {
+ SelectedDeviceStatuscondition = "no";
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = false;
+ var ignoreTime = new IgnoreTime();
+ UserView.HomePage.Instance.AddChidren(ignoreTime);
+ UserView.HomePage.Instance.PageIndex += 1;
+ ignoreTime.Show(common, btntimeout.Text, edit, timevalue);
+
+ };
+ timeoutframelayout.MouseUpEventHandler += timeoutclick;
+ timeoutrowlayout.MouseUpEventHandler += timeoutclick;
+ btntimeout.MouseUpEventHandler += timeoutclick;
+ timeoutBtnSelected.MouseUpEventHandler += timeoutclick;
+
+ #endregion
+ }
+ break;
+
+ case 40:
+ {
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
+ btnopen.TextID = MyInternationalizationString.smokescreen;
+ //btnclose.TextID = MyInternationalizationString.nosmokescreen;
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
+ }
+ break;
+ case 42:
+ {
+ btnopen.TextID = MyInternationalizationString.waterleakage;
+ btnclose.TextID = MyInternationalizationString.noleakage;
+ openframelayout.AddChidren(openrowlayout);
+ closeframelayout.AddChidren(closerowlayout);
+
+ }
+ break;
+ case 43:
+ {
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
+ btnopen.TextID = MyInternationalizationString.gas;
+ //btnclose.TextID = MyInternationalizationString.nogas;
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
+ }
+ break;
+ case 44:
+ {
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
+ btnopen.TextID = MyInternationalizationString.emergencybutton;
+ //btnclose.TextID = MyInternationalizationString.nosmokescreen;
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
+ }
+ break;
+
+ case 277:
+ {
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
+ btnopen.TextID = MyInternationalizationString.callthepolice;
+ //btnclose.TextID = MyInternationalizationString.nosmokescreen;
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
+ }
+ break;
+ default:
+ {
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
+ btnopen.TextID = MyInternationalizationString.callthepolice;
+ openframelayout.AddChidren(openrowlayout);
+ openrowlayout.LineColor = ZigbeeColor.Current.LogicBackgroundColor;
+ }
+ break;
+ }
+ if (edit && devices != null)
+ {
+ if (devices["AttriButeId"] == "1281")
+ {
+ if (devices["AttriButeData1"] == "1")
+ {
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ openBtnSelected.Visible = true;
+ closeBtnSelected.Visible = false;
+ }
+ else
+ {
+ if (devices.ContainsKey("IgnoreTime"))
+ {
+ timevalue = int.Parse(devices["IgnoreTime"]);
+ }
+ else
+ {
+ btnopen.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnclose.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ openBtnSelected.Visible = false;
+ closeBtnSelected.Visible = true;
+ }
+ }
+ }
+
+
+ }
+
+ }
+ break;
+ case DeviceType.OnOffSwitch:
+ {
+
+ dictionary(deviceConditionsInfo, "Cluster_ID", "1282");
+ dictionary(deviceConditionsInfo, "AttriButeId", "1283");
+ dictionary(deviceConditionsInfo, "Range", "0");//鎸夐敭鐗规畩
+ dictionary(deviceConditionsInfo, "AttriButeData1", "0");
+ dictionary(deviceConditionsInfo, "AttriButeData2", "0");
+
+ devicefra.Y = Application.GetRealHeight(1920 - 140 - 160 - 20 - 50);
+ devicefra.Height = Application.GetRealHeight(140 + 160 + 20 + 50);
+ var OnOffOutputfra = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ devicefra.AddChidren(OnOffOutputfra);
+
+ var buttonRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ OnOffOutputfra.AddChidren(buttonRow);
+
+ var button = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ Text = Language.StringByID(MyInternationalizationString.OnOffSwitch) + common.DeviceEpoint.ToString(),
+ //SelectedBackgroundColor = 0xfffe5e00,
+ };
+ buttonRow.AddChidren(button);
+
+ var buttonSelected = new SelectedButton();
+ buttonRow.AddChidren(buttonSelected);
+ EventHandler<MouseEventArgs> buttonclick = (sender, e) =>
+ {
+ buttonSelected.Visible = true;
+ SelectedDeviceStatuscondition = "OnOffSwitch";
+ button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+
+ };
+ buttonRow.MouseUpEventHandler += buttonclick;
+ button.MouseUpEventHandler += buttonclick;
+ buttonSelected.MouseUpEventHandler += buttonclick;
+ OnOffOutputfra.MouseUpEventHandler += buttonclick;
+
+ if (edit && devices != null)
+ {
+ buttonSelected.Visible = true;
+ button.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ }
+
+ }
+ break;
+ case DeviceType.DoorLock:
+ {
+ #region ------
+ var doorlockifonlist = Send.ReadDoorLockIfon("ccccccfffe300347");
+ //var list = Send.ReadDoorLockIfon(common.DeviceAddr);
+ var pra = new UserCenter.MemberListInfoPra();
+ string result = await UserCenter.UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra);
+ var listInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<UserCenter.MemberInfoRes>>(result);
+ Send.UserList.Clear();
+ for (int i = 0; i < listInfo.Count; i++)
+ {
+ var membership = new Send.MembershipIfon();
+ var membershipifon = listInfo[i];
+ for (int j = 0; j < doorlockifonlist.Count; j++)
+ {
+ ///鏌ユ壘鎴愬憳浠ュ強鎴愬憳闂ㄩ攣瑙﹀彂婧�(1鎸夐敭/3鍗�/15鎸囩汗)
+ if (doorlockifonlist[j].CloudAccountId == membershipifon.SubAccountDistributedMark)
+ {
+ membership.UserIdMode.Add(doorlockifonlist[j].UserIdMode);
+ membership.MembershipName = membershipifon.UserName;
+ membership.MembershipId = membershipifon.SubAccountDistributedMark;
+
+ }
+
+ }
+ if (membership.UserIdMode.Count != 0)
+ {
+ ///杩囨护鎺夐噸澶嶆暟鎹紱
+ var str = Send.UserList.Find((c) => { return c.MembershipId == membership.MembershipId; });
+ if (str == null)
+ {
+ Send.UserList.Add(membership);
+ }
+ }
+
+ }
+ #endregion
+
+ var memberList = new MemberList();
+ UserView.HomePage.Instance.AddChidren(memberList);
+ UserView.HomePage.Instance.PageIndex += 1;
+ MemberList.action += () => { flMain.RemoveFromParent(); };
+ memberList.Show(common);
+ }
+ break;
+
+ }
+
+ Btncomplete.MouseUpEventHandler += (sender2, e2) =>
+ {
+ //UserView.HomePage.Instance.ScrollEnabled = true;
+ if (SelectedDeviceStatuscondition != "")
+ {
+ LogicIfon.AddDeviceconditions(common, deviceConditionsInfo);
+ }
+ else
+ {
+ if (!edit)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectdevicestatuscondition),
+ Language.StringByID(MyInternationalizationString.complete));
+ alert.Show();
+ return;
+ }
+
+ }
+ flMain.RemoveFromParent();
+ var templatePage = new TemplatePage();
+ UserView.HomePage.Instance.AddChidren(templatePage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ templatePage.Show();
+
+ };
+
+
+ }
+
+ public static void dictionary(Dictionary<string, string> deviceConditionsInfo, string Key, string Value)
+ {
+ if (deviceConditionsInfo.ContainsKey(Key))
+ {
+ deviceConditionsInfo.Remove(Key);
+ }
+ deviceConditionsInfo.Add(Key, Value);
+ }
+
+
+
+ }
+
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
new file mode 100755
index 0000000..f78d342
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TemplatePage.cs
@@ -0,0 +1,1739 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Newtonsoft.Json.Linq;
+using Shared;
+using Shared.Common;
+using Shared.Phone;
+using Shared.R;
+using ZigBee.Device;
+
+namespace Shared.Phone.Device.Logic
+{
+ public class TemplatePage : FrameLayout
+ {
+
+ public TemplatePage()
+ {
+ UserView.HomePage.Instance.RemoveViewByTag("Logic");
+ Tag = "Logic";
+ }
+ EditText logicTextBox;
+ /// <summary>
+ /// 鍥炬爣鐨勭储寮�
+ /// </summary>
+ public static string s;
+ public void Show()
+ {
+
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
+ };
+ this.AddChidren(topRowLayout);
+
+ var titleName = new Button
+ {
+ TextSize = 16,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.selection,
+ };
+ topRowLayout.AddChidren(titleName);
+ if (Common.Logic.CurrentLogic.LogicId != 0)
+ {
+ titleName.Text = Language.StringByID(MyInternationalizationString.editautomation);
+ }
+ else
+ {
+ titleName.Text = Language.StringByID(MyInternationalizationString.newautomation);
+ }
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
+ };
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+
+
+
+ #endregion
+
+
+
+ var middle = new VerticalScrolViewLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184 - 180),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(middle);
+
+ var logiciconfl = new FrameLayout
+ {
+ Height = Application.GetRealHeight(436 + 30),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ middle.AddChidren(logiciconfl);
+ var iconBtn = new Button
+ {
+ Width = Application.GetRealWidth(936),
+ Height = Application.GetRealHeight(436),
+ X = Application.GetRealWidth(72),
+ Y = Application.GetRealHeight(30),
+ UnSelectedImagePath = "ZigeeLogic/logicbj" + s + ".png",
+ };
+ logiciconfl.AddChidren(iconBtn);
+
+
+ #region -----鑷姩鍖栧悕绉� 璁剧疆鍚嶇О-----
+ var logicnamefl = new FrameLayout
+ {
+ Height = Application.GetRealHeight(130),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ middle.AddChidren(logicnamefl);
+
+ var text = new Button
+ {
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ X = Application.GetRealWidth(58),
+ TextAlignment = TextAlignment.CenterLeft,
+ //Text = "鑷姩鍖栧悕绉�",
+ TextID = MyInternationalizationString.automationname,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Y = Application.GetRealHeight(35),
+ };
+ logicnamefl.AddChidren(text);
+
+ logicTextBox = new EditText
+ {
+ Y = Application.GetRealHeight(35),
+ Width = Application.GetRealWidth(900),
+ Height = Application.GetRealHeight(60),
+ X = text.Right,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ TextSize = 13,
+ Text = Common.Logic.CurrentLogic.LogicName,
+ //TextID=MyInternationalizationString.automation1,
+ };
+ logicnamefl.AddChidren(logicTextBox);
+
+ var fraline = new FrameLayout
+ {
+ Height = Application.GetRealHeight(30),
+ };
+ middle.AddChidren(fraline);
+ #endregion
+
+ #region -----鏄剧ず閫昏緫鏉′欢-----
+
+
+ var conditionFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(conditionFrameLayout);
+
+
+ var conditionRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ conditionFrameLayout.AddChidren(conditionRowLayout);
+
+
+ conditionRowLayout.AddChidren(new Button
+ {
+
+ Text = Language.StringByID(MyInternationalizationString.ifcondition),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ TextSize = 16,
+ Gravity = Gravity.CenterVertical,
+ });
+
+ var conditionadd1 = new Button
+ {
+
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(57),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(965 + 58),
+
+ };
+ conditionFrameLayout.AddChidren(conditionadd1);
+
+ var conditionadd = new Button
+ {
+
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/add.png",
+ X = Application.GetRealWidth(965 - 58),
+ Gravity = Gravity.CenterVertical,
+
+ };
+ conditionRowLayout.AddChidren(conditionadd);
+ ///娣诲姞鏉′欢鐨勭偣鍑讳簨浠�
+ EventHandler<MouseEventArgs> conditionaddclick = (sender, e) =>
+ {
+ if (Common.Logic.CurrentLogic.Conditions.Count == 1)
+ {
+ ConditionView(false);
+ }
+ else
+ {
+ Common.Logic.LogicDviceList.Clear();
+ if (Common.Logic.LogicDviceList.Count == 0)
+ {
+ Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
+ }
+ var templateDeviceCondition = new TemplateDeviceCondition();
+ UserView.HomePage.Instance.AddChidren(templateDeviceCondition);
+ UserView.HomePage.Instance.PageIndex += 1;
+ templateDeviceCondition.Show();
+ }
+ };
+ conditionadd.MouseUpEventHandler += conditionaddclick;
+ conditionadd1.MouseUpEventHandler += conditionaddclick;
+ List<Dictionary<string, string>> ListConditions = new List<Dictionary<string, string>>();
+ ListConditions.Clear();
+ ListConditions.AddRange(Common.Logic.CurrentLogic.Conditions);
+ ListConditions.Add(new Dictionary<string, string>());
+ if (Common.Logic.CurrentLogic.Conditions.Count > 1)
+ {
+ var row = new FrameLayout
+ {
+ Height = Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(row);
+ var relationship = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(58),
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ };
+ row.AddChidren(relationship);
+ if (Common.Logic.CurrentLogic.Relationship == 0)
+ {
+ relationship.Text = Language.StringByID(MyInternationalizationString.followingconditions) + Language.StringByID(MyInternationalizationString.Allconditions);
+ }
+ else
+ {
+ relationship.Text = Language.StringByID(MyInternationalizationString.followingconditions) + Language.StringByID(MyInternationalizationString.anycondition);
+ }
+ EventHandler<MouseEventArgs> editclick = (sender, e) =>
+ {
+
+ ConditionView(true);
+ };
+ row.MouseUpEventHandler += editclick;
+ relationship.MouseUpEventHandler += editclick;
+
+ }
+ for (int i = 0; i < ListConditions.Count; i++)
+ {
+ if (i == (ListConditions.Count - 1))
+ {
+
+ var addfl = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160 + 30 + 50),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(addfl);
+ var addbtn = new Button
+ {
+ Height = Application.GetRealHeight(130 + 50),
+ Width = Application.GetRealWidth(908),
+ Y = Application.GetRealHeight(30),
+ X = Application.GetRealWidth(86),
+ UnSelectedImagePath = "ZigeeLogic/logicaddcolor.png",
+ };
+ addfl.AddChidren(addbtn);
+
+
+ var addtextbtn = new Button
+ {
+ Height = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(300),
+ Y = Application.GetRealHeight(45 + 30),
+ TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ TextID = MyInternationalizationString.addconditions,
+ X = Application.GetRealWidth(390),
+ };
+ addfl.AddChidren(addtextbtn);
+
+ EventHandler<MouseEventArgs> addconditionsclick = (sender, e) =>
+ {
+ if (Common.Logic.CurrentLogic.Conditions.Count == 1)
+ {
+ ConditionView(false);
+ }
+ else
+ {
+ var templateDeviceCondition = new TemplateDeviceCondition();
+ UserView.HomePage.Instance.AddChidren(templateDeviceCondition);
+ UserView.HomePage.Instance.PageIndex += 1;
+ templateDeviceCondition.Show();
+ }
+ };
+ addbtn.MouseUpEventHandler += addconditionsclick;
+ addtextbtn.MouseUpEventHandler += addconditionsclick;
+ }
+ else
+ {
+ var devicesFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(130),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(devicesFrameLayout);
+
+ ///鏄剧ず鍥炬爣
+ var conditionIcon = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(104),
+ Y = Application.GetRealHeight(25),
+ UnSelectedImagePath = "ZigeeLogic/sensor13.png",
+
+ };
+ devicesFrameLayout.AddChidren(conditionIcon);
+
+
+ var conditionsRowLayout = new RowLayout
+ {
+ Width = Application.GetRealWidth(800),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(222),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ devicesFrameLayout.AddChidren(conditionsRowLayout);
+
+ var Type = int.Parse(ListConditions[i]["Type"]);
+ var conditions = ListConditions[i];
+ switch (Type)
+ {
+
+ /// (0:鏃堕棿鐐规潯浠�;1:璁惧鐘舵�佸彉鍖栨潯浠�;2:鍏朵粬閫昏緫鏉′欢;3:璁℃暟鍣ㄦ潯浠�;4:鍊掕鏃�;5:鏃堕棿娈垫潯浠�;6:瀹夐槻鏉′欢;7:鍦扮悊浣嶇疆)
+ case 1:
+ {
+ var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return obj.DeviceAddr == conditions["MacAddr"] && obj.DeviceEpoint.ToString() == conditions["Epoint"]; });
+ if (deviceinof == null)
+ {
+ continue;
+ }
+ ///鏄剧ず璁惧鍚嶇О
+ var btndevice = new Button
+ {
+ Y = Application.GetRealHeight(20),
+ Height = Application.GetRealHeight(50),
+ Width = Application.GetRealWidth(400),
+ TextAlignment = TextAlignment.CenterLeft,
+ Text = deviceinof.DeviceEpointName,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ conditionsRowLayout.AddChidren(btndevice);
+
+ ///鍖哄煙(鎴块棿)鍚嶇ОButton
+ var btnregionname = new Button
+ {
+ Y = btndevice.Bottom + Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(400),
+ TextAlignment = TextAlignment.CenterLeft,
+ Height = Application.GetRealHeight(50),
+ Text = "",//Language.StringByID(MyInternationalizationString.customroom),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ };
+ conditionsRowLayout.AddChidren(btnregionname);
+ ///閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
+ Send.RoomNmae(btnregionname, deviceinof);
+
+
+ var deviceedit = new Button
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
+ Text = Language.StringByID(MyInternationalizationString.edit),
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ };
+ conditionsRowLayout.AddRightView(deviceedit);
+ deviceedit.MouseUpEventHandler += (sender, e) =>
+ {
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ TemplateDeviceCondition.CurrentDeviceView(flMain, deviceinof, true);
+
+ };
+
+ ///鏄剧ず璁惧鏉′欢鐘舵�佹帶浠�
+ var devicestatus = new Button
+ {
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(130),
+ Gravity = Gravity.CenterVertical,
+ TextAlignment = TextAlignment.CenterRight,
+ X = Application.GetRealWidth(400),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ };
+ conditionsRowLayout.AddChidren(devicestatus);
+
+ switch (deviceinof.Type)
+ {
+ case DeviceType.IASZone:
+ {
+ var iASZonedevice = deviceinof as IASZone;
+ var intvalue = conditions["AttriButeData1"];
+ switch (iASZonedevice.IasDeviceType)
+ {
+ case 13:
+ {
+ if (intvalue == "1")
+ {
+ devicestatus.TextID = MyInternationalizationString.someone;
+ }
+ else
+ {
+ int minute = int.Parse(conditions["IgnoreTime"]) / 60;
+ int second = int.Parse(conditions["IgnoreTime"]) % 60;
+ if (second != 0)
+ {
+ devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.minute) + second.ToString() + Language.StringByID(MyInternationalizationString.second) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+
+ }
+ else
+ {
+ devicestatus.Text = minute.ToString() + Language.StringByID(MyInternationalizationString.Minute) + Language.StringByID(MyInternationalizationString.unattendedtime1);
+ }
+ }
+ }
+ break;
+
+ default:
+ {
+ conditionIcon.UnSelectedImagePath = "ZigeeLogic/infraredsensor.png";
+ if (intvalue == "1")
+ {
+ devicestatus.TextID = MyInternationalizationString.callthepolice;
+ }
+ }
+ break;
+
+ }
+ }
+ break;
+
+ }
+
+ }
+ break;
+ }
+ ///鍒犻櫎鎺т欢
+ var del = new Button
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicDelBlackColor1,
+ Text = Language.StringByID(MyInternationalizationString.del),
+ };
+ conditionsRowLayout.AddRightView(del);
+
+ del.MouseUpEventHandler += (sender, e) =>
+ {
+
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.tip), Language.StringByID(MyInternationalizationString.doyouwanttodelete),
+ Language.StringByID(MyInternationalizationString.cancel), Language.StringByID(MyInternationalizationString.confrim));
+ alert.ResultEventHandler += (sender1, e1) =>
+ {
+ if (e1)
+ {
+ Common.Logic.CurrentLogic.Conditions.Remove(conditions);
+ var templatePage = new TemplatePage();
+ UserView.HomePage.Instance.AddChidren(templatePage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ templatePage.Show();
+ }
+ };
+ alert.Show();
+
+ };
+
+ }
+ }
+
+
+ #endregion
+
+ #region ----鏄剧ず鎵ц鐩爣----
+
+ var targetFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(targetFrameLayout);
+
+
+ var targetRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ targetFrameLayout.AddChidren(targetRowLayout);
+
+
+ var btntargettitle = new Button
+ {
+
+ Text = Language.StringByID(MyInternationalizationString.execute),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ TextSize = 16,
+ Gravity = Gravity.CenterVertical,
+ };
+ targetRowLayout.AddChidren(btntargettitle);
+
+ var btntargetadd1 = new Button
+ {
+
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(57),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(965 + 58),
+ };
+ targetFrameLayout.AddChidren(btntargetadd1);
+
+ var btntargetadd = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/add.png",
+ X = Application.GetRealWidth(965 - 58),
+ Gravity = Gravity.CenterVertical,
+ };
+ targetRowLayout.AddChidren(btntargetadd);
+ EventHandler<MouseEventArgs> btntargetaddclick = (sender, e) =>
+ {
+ Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
+ var templateDeviceAction = new TemplateDeviceAction();
+ UserView.HomePage.Instance.AddChidren(templateDeviceAction);
+ UserView.HomePage.Instance.PageIndex += 1;
+ templateDeviceAction.Show();
+ };
+ btntargetadd1.MouseUpEventHandler += btntargetaddclick;
+ btntargetadd.MouseUpEventHandler += btntargetaddclick;
+
+ List<Dictionary<string, object>> ListActions = new List<Dictionary<string, object>>();
+ ListActions.Clear();
+ ListActions.AddRange(Common.Logic.CurrentLogic.Actions);
+ ListActions.Add(new Dictionary<string, object>());
+
+ for (int i = 0; i < ListActions.Count; i++)
+ {
+ if (i == (ListActions.Count - 1))
+ {
+
+ var addfl = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160 + 30 + 50),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(addfl);
+ var addbtn = new Button
+ {
+ Height = Application.GetRealHeight(130 + 50),
+ Width = Application.GetRealWidth(908),
+ Y = Application.GetRealHeight(30),
+ X = Application.GetRealWidth(86),
+ UnSelectedImagePath = "ZigeeLogic/logicaddcolor.png",
+ };
+ addfl.AddChidren(addbtn);
+
+
+ var addtextbtn = new Button
+ {
+ Height = Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(300),
+ Y = Application.GetRealHeight(45 + 30),
+ TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ TextID = MyInternationalizationString.addfunction,
+ X = Application.GetRealWidth(390),
+ };
+ addfl.AddChidren(addtextbtn);
+ EventHandler<MouseEventArgs> addfunctionclick = (sender, e) =>
+ {
+ Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
+ var templateDeviceAction = new TemplateDeviceAction();
+ UserView.HomePage.Instance.AddChidren(templateDeviceAction);
+ UserView.HomePage.Instance.PageIndex += 1;
+ templateDeviceAction.Show();
+ };
+ addbtn.MouseUpEventHandler += addfunctionclick;
+ addtextbtn.MouseUpEventHandler += addfunctionclick;
+ }
+ else
+ {
+
+ var devicesFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(130),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(devicesFrameLayout);
+
+ ///鏄剧ず鍥炬爣
+ var actionsIcon = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ X = Application.GetRealWidth(104),
+ Y = Application.GetRealHeight(25),
+ // UnSelectedImagePath = "ZigeeLogic/time.png",
+
+ };
+ devicesFrameLayout.AddChidren(actionsIcon);
+
+
+ var actionsrowLayout = new RowLayout
+ {
+ Width = Application.GetRealWidth(800),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(222),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ devicesFrameLayout.AddChidren(actionsrowLayout);
+
+
+ var linkType = int.Parse(ListActions[i]["LinkType"].ToString());
+ var actions = ListActions[i];
+
+ switch (linkType)
+ {
+ case 0:
+ {
+ var obj1 = actions["DeviceAddr"].ToString();
+ var obj2 = actions["Epoint"].ToString();
+ var deviceinof = Common.Logic.LogicDviceList.Find((obj) => { return ((obj.DeviceAddr == obj1) && (obj.DeviceEpoint.ToString() == obj2)); });
+ if (deviceinof == null)
+ {
+ continue;
+ }
+
+ ///璁惧鍚嶇ОButton
+ var btndevicename = new Button
+ {
+ Y = Application.GetRealHeight(20),
+ Height = Application.GetRealHeight(50),
+ Width = Application.GetRealWidth(450),
+ TextAlignment = TextAlignment.CenterLeft,
+ Text = deviceinof.DeviceEpointName,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ };
+ actionsrowLayout.AddChidren(btndevicename);
+
+ ///鍖哄煙(鎴块棿)鍚嶇ОButton
+ var btnregionname = new Button
+ {
+ Y = btndevicename.Bottom + Application.GetRealHeight(10),
+ Width = Application.GetRealWidth(450),
+ TextAlignment = TextAlignment.CenterLeft,
+ Height = Application.GetRealHeight(50),
+ Text = "",//Language.StringByID(MyInternationalizationString.customroom),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ };
+ actionsrowLayout.AddChidren(btnregionname);
+ ///閫氳繃璁惧鎵惧埌鍖哄煙(鎴块棿)鍚嶇О
+ Send.RoomNmae(btnregionname, deviceinof);
+ ///鏄剧ず璁惧鏉′欢鐘舵�佹帶浠�
+ var devicestatus = new Button
+ {
+ Width = Application.GetRealWidth(350),
+ Height = Application.GetRealHeight(130),
+ Gravity = Gravity.CenterVertical,
+ TextAlignment = TextAlignment.CenterRight,
+ X = Application.GetRealWidth(450),
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ };
+ actionsrowLayout.AddChidren(devicestatus);
+
+ ///缂栬緫璁惧鐘舵�丅utton
+ var deviceedit = new Button
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicEditBlackColor1,
+ Text = Language.StringByID(MyInternationalizationString.edit),
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ };
+ actionsrowLayout.AddRightView(deviceedit);
+
+ ///缂栬緫鐐瑰嚮浜嬩欢
+ deviceedit.MouseUpEventHandler += (sender, e) =>
+ {
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ this.AddChidren(flMain);
+ TemplateDeviceAction.CurrentDeviceStateView(flMain, deviceinof, true);
+ };
+
+
+ switch (deviceinof.Type)
+ {
+ case DeviceType.OnOffOutput:
+ {
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/light.png";
+
+ var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+ if (TaskList == null)
+ {
+ continue;
+ }
+ foreach (var status in TaskList)
+ {
+ if (status["TaskType"].ToString() == "1")
+ {
+ if (status["Data1"].ToString() == "0")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
+
+ }
+ else if (status["Data1"].ToString() == "1")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.open);
+
+ }
+ else if (status["Data1"].ToString() == "2")
+ {
+
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.onoff);
+ }
+ }
+
+ }
+
+ }
+ break;
+ case DeviceType.DimmableLight:
+ {
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/dimmableLight.png";
+ var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+ if (TaskList == null)
+ {
+ continue;
+ }
+ foreach (var status in TaskList)
+ {
+ if (status["TaskType"].ToString() == "3")
+ {
+ var intvalue = int.Parse(status["Data1"]);
+ var lightbrightnessvalue = (intvalue * 100) / 254;
+ devicestatus.Text = lightbrightnessvalue.ToString() + "%";
+ }
+ else if (status["TaskType"].ToString() == "1")
+ {
+
+ if (status["Data1"].ToString() == "0")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
+ }
+ else if (status["Data1"].ToString() == "2")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.onoff);
+ }
+ }
+
+
+ }
+
+ }
+ break;
+ case DeviceType.WindowCoveringDevice:
+ {
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/curtain.png";
+ var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+ if (TaskList == null)
+ {
+ continue;
+ }
+ foreach (var status in TaskList)
+ {
+ if (status["TaskType"] == "6")
+ {
+ if (status["Data1"] == "0")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.open);
+ }
+ else if (status["Data1"] == "1")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
+ }
+ else if (status["Data1"] == "5")
+ {
+ devicestatus.Text = status["Data2"] + "%";
+ }
+ }
+
+ }
+ }
+ break;
+ case DeviceType.AirSwitch:
+ {
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/airswitch.png";
+
+ var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+ if (TaskList == null)
+ {
+ continue;
+ }
+ foreach (var status in TaskList)
+ {
+ if (status["TaskType"].ToString() == "1")
+ {
+ if (status["Data1"].ToString() == "0")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
+
+ }
+ else if (status["Data1"].ToString() == "1")
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.open);
+
+ }
+ else if (status["Data1"].ToString() == "2")
+ {
+
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.onoff);
+ }
+ }
+
+ }
+
+ }
+ break;
+ case DeviceType.Thermostat:
+ {
+ actionsIcon.UnSelectedImagePath = "ZigeeLogic/ac.png";
+
+ var TaskList = actions["TaskList"] as List<Dictionary<string, string>>;
+ if (TaskList == null)
+ {
+ continue;
+ }
+ string modetext = "", temperaturetext = "", speedtext = "";
+ bool ifclose = false;
+ foreach (var status in TaskList)
+ {
+ if (status["TaskType"].ToString() == "1")
+ {
+ if (status["Data1"].ToString() == "0")
+ {
+ // devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
+
+ ifclose = false;
+ }
+ else if (status["Data1"].ToString() == "1")
+ {
+ //devicestatus.Text = Language.StringByID(MyInternationalizationString.open);
+ ifclose = true;
+ }
+
+ }
+ else if (status["TaskType"].ToString() == "5")
+ {
+ if (status["Data1"] == "3")
+ {//3---璁剧疆宸ヤ綔妯″紡(1:鑷姩;3:鍒跺喎;4:鍒剁儹;7:閫侀;8:闄ゆ箍)
+ switch (status["Data2"])
+ {
+ case "3":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logiccool);
+ }
+ break;
+ case "4":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicheat);
+ }
+ break;
+ case "1":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicauto);
+ }
+ break;
+ case "8":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicdry);
+ }
+ break;
+ case "7":
+ {
+ modetext = Language.StringByID(MyInternationalizationString.logicfanonly);
+ }
+ break;
+ }
+ }
+ else if (status["Data1"] == "6")
+ {//6---璁剧疆椋庢墖妯″紡(1:浣庨;2:涓;3:楂橀;)
+ switch (status["Data2"])
+ {
+ case "1":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logiclow);
+ }
+ break;
+
+ case "2":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logicmedium);
+ }
+ break;
+ case "3":
+ {
+ speedtext = Language.StringByID(MyInternationalizationString.logichigh);
+ }
+ break;
+
+ }
+ }
+ //4---璁剧疆鍔犵儹搴︽暟;5---璁剧疆鍒跺喎銆侀櫎婀垮害鏁�;7---璁剧疆鑷姩搴︽暟
+ else if (status["Data1"] == "4" || status["Data1"] == "5" || status["Data1"] == "7")
+ {
+ var s = int.Parse(status["Data2"]) / 100;
+ temperaturetext = s.ToString();
+ }
+ else if (status["Data1"] == "20")
+ {
+ temperaturetext = "鏃�";
+ }
+
+
+ }
+
+ }
+ if (ifclose)
+ {
+ devicestatus.Text = modetext + ";" + temperaturetext + "鈩�;" + speedtext;
+ }
+ else
+ {
+ devicestatus.Text = Language.StringByID(MyInternationalizationString.close);
+
+ }
+ }
+ break;
+
+ }
+
+
+ }
+ break;
+ }
+ ///鍒犻櫎鎺т欢
+ var del = new Button
+ {
+ BackgroundColor = ZigbeeColor.Current.LogicDelBlackColor1,
+ Text = Language.StringByID(MyInternationalizationString.del),
+ };
+ actionsrowLayout.AddRightView(del);
+
+ del.MouseUpEventHandler += (sender, e) =>
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.tip), Language.StringByID(MyInternationalizationString.doyouwanttodelete),
+ Language.StringByID(MyInternationalizationString.cancel), Language.StringByID(MyInternationalizationString.confrim));
+ alert.ResultEventHandler += (sender1, e1) =>
+ {
+ if (e1)
+ {
+ Common.Logic.CurrentLogic.Actions.Remove(actions);
+ var templatePage = new TemplatePage();
+ UserView.HomePage.Instance.AddChidren(templatePage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ templatePage.Show();
+ }
+ };
+ alert.Show();
+
+ };
+
+ }
+ }
+
+ #endregion
+
+ #region -----姣忓ぉ 璁剧疆鍛ㄦ湡-----
+
+ var fraline1 = new FrameLayout
+ {
+ Height = Application.GetRealHeight(30),
+ };
+ middle.AddChidren(fraline1);
+
+
+ var weekFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(weekFrameLayout);
+ var weekRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ weekFrameLayout.AddChidren(weekRowLayout);
+
+ var settxet = new Button
+ {
+ Text = Language.StringByID(MyInternationalizationString.setupcycle),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ Gravity = Gravity.CenterVertical,
+ };
+ weekRowLayout.AddChidren(settxet);
+ var btnweektext = new Button
+ {
+ Width = Application.GetRealWidth(595),
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.CenterRight,
+ //Text = "姣忓ぉ",
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ TextID = MyInternationalizationString.everyday,
+ Y = Application.GetRealHeight(35),
+ X = settxet.Right,
+ };
+ weekRowLayout.AddChidren(btnweektext);
+
+ var nextBtn = new Button
+ {
+
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = Application.GetRealWidth(965 - 58),
+ Gravity = Gravity.CenterVertical,
+
+ };
+ weekRowLayout.AddChidren(nextBtn);
+
+ UpdateWeek(btnweektext);
+ EventHandler<MouseEventArgs> cycleclick = (sender, e) =>
+ {
+ /*------淇濈暀姣忔湀,姣忓勾绫诲瀷*/
+ var cycle = new Cycle(() => { UpdateWeek(btnweektext); });
+ UserView.HomePage.Instance.AddChidren(cycle);
+ UserView.HomePage.Instance.PageIndex += 1;
+ cycle.Show();
+
+ //var cyclicCycle = new CyclicCycle(() => { UpdateWeek(btnweektext); });
+ //UserView.HomePage.Instance.AddChidren(cyclicCycle);
+ //UserView.HomePage.Instance.PageIndex += 1;
+ //cyclicCycle.Show();
+ };
+ btnweektext.MouseUpEventHandler += cycleclick;
+ nextBtn.MouseUpEventHandler += cycleclick;
+ #endregion
+
+ #region ----鎺ㄩ�佽缃�----
+
+ var pushFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(pushFrameLayout);
+
+ var pushswitchRowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ pushFrameLayout.AddChidren(pushswitchRowlayout);
+
+ var btnswitchtxet = new Button
+ {
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ Gravity = Gravity.CenterVertical,
+ TextID = MyInternationalizationString.pushswitch,
+ };
+ pushswitchRowlayout.AddChidren(btnswitchtxet);
+
+ var btnswitch = new Button
+ {
+ Width = Application.GetMinRealAverage(104),
+ Height = Application.GetMinRealAverage(63),
+ UnSelectedImagePath = "ZigeeLogic/logicclose.png",
+ SelectedImagePath = "ZigeeLogic/logicopen.png",
+ X = Application.GetRealWidth(965 - 104),
+ Gravity = Gravity.CenterVertical,
+ };
+ pushswitchRowlayout.AddChidren(btnswitch);
+ btnswitch.MouseUpEventHandler += (sender1, e1) =>
+ {
+ btnswitch.IsSelected = !btnswitch.IsSelected;
+ if (btnswitch.IsSelected)
+ {
+
+ }
+ else
+ {
+
+ }
+ };
+
+
+ var custompushFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(custompushFrameLayout);
+
+ var custompushRowLayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ custompushFrameLayout.AddChidren(custompushRowLayout);
+
+ var btncustompush = new Button
+ {
+ TextID = MyInternationalizationString.custompush,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(300),
+ Height = Application.GetRealHeight(60),
+ Gravity = Gravity.CenterVertical,
+ };
+ custompushRowLayout.AddChidren(btncustompush);
+
+
+ var custompushback = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = Application.GetRealWidth(965 - 58),
+ Gravity = Gravity.CenterVertical,
+ };
+ custompushRowLayout.AddChidren(custompushback);
+ EventHandler<MouseEventArgs> customclick = (sender, e) =>
+ {
+ var CustomText = new CustomText();
+ UserView.HomePage.Instance.AddChidren(CustomText);
+ UserView.HomePage.Instance.PageIndex += 1;
+ CustomText.Show();
+
+ };
+ btncustompush.MouseUpEventHandler += customclick;
+ custompushback.MouseUpEventHandler += customclick;
+ custompushRowLayout.MouseUpEventHandler += customclick;
+
+ #endregion
+
+
+ var saveFrameLayout = new FrameLayout
+ {
+ Y = middle.Bottom,
+ Height = Application.GetRealHeight(180),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(saveFrameLayout);
+
+ var btnsave = new Button
+ {
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),//194
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ };
+ saveFrameLayout.AddChidren(btnsave);
+ btnsave.MouseUpEventHandler += async (sender, e) =>
+ {
+ var name = logicTextBox.Text.Trim();
+ //if (Common.Logic.CurrentLogic.Conditions.Count != 0 && Common.Logic.CurrentLogic.Actions.Count != 0)
+ //{
+ // AddChidren(btnsave);
+ //}
+ if (string.IsNullOrEmpty(logicTextBox.Text.Trim()))
+ {
+ new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.PleaseEnterLogicName), Language.StringByID(MyInternationalizationString.Close)).Show();
+ return;
+ }
+ var logicname = Common.Logic.LogicList.Find((logic) => Common.Logic.CurrentLogic.LogicId != logic.LogicId && logic.LogicName == name);
+ if (logicname != null)
+ {
+ new Alert(Language.StringByID(MyInternationalizationString.Tip), Language.StringByID(MyInternationalizationString.Rename), Language.StringByID(MyInternationalizationString.Close)).Show();
+ return;
+ }
+
+ Common.Logic.CurrentLogic.LogicName = name;
+
+ //鍒ゆ柇鏄柊娣诲姞閫昏緫(榛樿0)杩樻槸淇敼閫昏緫
+ CommonPage.Loading.Start();
+ if (Common.Logic.CurrentLogic.LogicId == 0)
+ {
+ //鍙戦�佹坊鍔犻�昏緫鍛戒护
+ var logicifon = await Send.AddModifyLogic(Common.Logic.CurrentLogic);
+ if (logicifon != null && logicifon.LogicId != 0)
+ {
+ Common.Logic.CurrentLogic.LogicId = logicifon.LogicId;
+ Common.Logic.LogicList.Add(Common.Logic.CurrentLogic);
+ }
+ }
+ else
+ {
+ //鍙戦�佷慨鏀归�昏緫鍛戒护
+ Send.AddModifyLogic(Common.Logic.CurrentLogic);
+ }
+
+ CommonPage.Loading.Hide();
+ UserView.HomePage.Instance.RemoveViewByTag("Logic");
+ Category.Category.instance?.RefreshBodyView();
+ //UserView.HomePage.Instance.RemoveAt("Logic1");
+ //Category.Category category = new Category.Category();
+ //UserView.HomePage.Instance.AddChidren(category);
+ //UserView.HomePage.Instance.PageIndex += 1;
+ //category.Show(2);
+ };
+
+
+ }
+ /// <summary>
+ /// 鏇存柊鎵ц鍛ㄦ湡鐨勬柟娉�
+ /// </summary>
+ /// <param name="btndisplaycycle">Btndisplaycycle.</param>
+ void UpdateWeek(Button btndisplaycycle)
+ {
+
+ switch (Common.Logic.CurrentLogic.TimeAttribute.Repeat)
+ {
+ ///0:鍙墽琛屼竴娆★紝鎵ц鍚嶪sEnable鍊肩疆;1,浠婂勾鍐呮墽琛�;2锛氭瘡澶╂墽琛�;3锛氭瘡鏈堟墽琛�;4锛氭瘡骞存墽琛�;5锛氬懆閲嶅銆�
+ case 0:
+ {
+ btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.executeonce);
+ }; break;
+ case 1: { }; break;
+ case 2:
+ {
+ btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyday);
+ }; break;
+ case 3:
+ {
+
+ string len = "", value = "";
+ var stringvalue = Convert.ToString(Common.Logic.CurrentLogic.TimeAttribute.MonthDate, 2);
+ var str = stringvalue.Insert(0, new string('0', 32 - stringvalue.Length));
+ for (int j = 31; j >= 0; j--)
+ {
+ len += str.Substring(j, 1);
+ }
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ value += (j + 1).ToString() + ",";
+ }
+ }
+ btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.monthly) + value.TrimEnd(',') + Language.StringByID(MyInternationalizationString.day);
+
+ }; break;
+ case 4:
+ {
+
+ Dictionary<int, int> dictionary = new Dictionary<int, int>();
+ ///鎵惧嚭鎵ц鐨勬湀浠藉拰澶╂暟
+ if (Common.Logic.CurrentLogic.TimeAttribute.SelectMonDate.Count != 0)
+ {
+ for (int i = 0; i < Common.Logic.CurrentLogic.TimeAttribute.SelectMonDate.Count; i++)
+ {
+ var dayvalue = Common.Logic.CurrentLogic.TimeAttribute.SelectMonDate[i];
+ if (dayvalue != 0)
+ {
+ dictionary.Add(i + 1, dayvalue);
+ }
+ }
+ }
+ if (dictionary.Count != 0 && dictionary.Count == 1)
+ {
+ string len = "", leng = "";
+ int minvalue = 0, Maximum = 0;
+ foreach (var value in dictionary)
+ {
+ ///鍙栧嚭鏈堜唤
+ var month = value.Key;
+ ///鍙栧嚭鏃ユ暟
+ var day = value.Value;
+ var maxvalue = Convert.ToString(day, 2);
+ var str = maxvalue.Insert(0, new string('0', 32 - maxvalue.Length));
+ for (int j = 31; j >= 0; j--)
+ {
+ len += str.Substring(j, 1);
+ }
+
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ minvalue = j + 1;
+ break;
+ }
+ }
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ Maximum = j + 1;
+ }
+ }
+
+ if (month.ToString().Length < 2)
+ {
+ leng = "0" + month.ToString();
+ }
+ else
+ {
+ leng = month.ToString();
+ }
+ if (minvalue == Maximum)
+ {
+ btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString());
+ }
+ else
+ {
+ btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyyear) + leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-" + leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString());
+ }
+ }
+
+ }
+ else
+ {
+ int b = 0;
+ string stringtext = "";
+ foreach (var value in dictionary)
+ {
+ string len = "", leng = "";
+ int minvalue = 0, Maximum = 0;
+ ///鍙栧嚭鏈堜唤
+ var month = value.Key;
+ ///鍙栧嚭鏃ユ暟
+ var day = value.Value;
+ var maxvalue = Convert.ToString(day, 2);
+ var str = maxvalue.Insert(0, new string('0', 32 - maxvalue.Length));
+ for (int j = 31; j >= 0; j--)
+ {
+ len += str.Substring(j, 1);
+ }
+
+
+ if (month.ToString().Length < 2)
+ {
+ leng = "0" + month.ToString();
+ }
+ else
+ {
+ leng = month.ToString();
+ }
+
+
+
+ if (b == 0)
+ {
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ minvalue = j + 1;
+ break;
+ }
+ }
+ stringtext += leng + "/" + (minvalue.ToString().Length < 2 ? "0" + minvalue.ToString() : minvalue.ToString()) + "-";
+
+ }
+
+ if (b == dictionary.Count - 1)
+ {
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ Maximum = j + 1;
+ }
+ }
+ stringtext += leng + "/" + (Maximum.ToString().Length < 2 ? "0" + Maximum.ToString() : Maximum.ToString());
+
+ }
+ b++;
+ }
+ btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyyear) + stringtext;
+ }
+
+ }; break;
+ case 5:
+ {
+ string len = "", text = "";
+ List<int> listvalueInt = new List<int>();
+ listvalueInt.Clear();
+ var maxvalue = Convert.ToString(Common.Logic.CurrentLogic.TimeAttribute.WeekDay, 2);
+ var str = maxvalue.Insert(0, new string('0', 8 - maxvalue.Length));
+ for (int j = 7; j >= 0; j--)
+ {
+ len += str.Substring(j, 1);
+ }
+
+ for (int j = 0; j < len.Length; j++)
+ {
+ var strvalue = len.Substring(j, 1);
+ if (strvalue == "1")
+ {
+ listvalueInt.Add(j + 1);
+
+
+ if ((j + 1) == 1)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.mon1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.mon) + ",";
+ }
+ else if ((j + 1) == 2)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.tue1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.tue) + ",";
+ }
+ else if ((j + 1) == 3)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.wed1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.wed) + ",";
+ }
+ else if ((j + 1) == 4)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.thu1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.thu) + ",";
+ }
+ else if ((j + 1) == 5)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.frl1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.frl) + ",";
+ }
+ else if ((j + 1) == 6)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.sat1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.sat) + ",";
+ }
+ else if ((j + 1) == 7)
+ {
+ text += Language.StringByID(MyInternationalizationString.week1) + Language.StringByID(MyInternationalizationString.sun1) + ",";
+ //text += Language.StringByID(MyInternationalizationString.sun) + ",";
+ }
+
+
+ }
+ }
+ //鏆傛椂闅愯棌鎺夛紝闇�瑕佹樉绀哄懆鏈拰宸ヤ綔鏃ュ啀鏀惧紑锛�
+ //if (listvalueInt.Count == 5 && !listvalueInt.Contains(6) && !listvalueInt.Contains(7))
+ //{
+ // btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.workingday);
+ //}
+ //else if (listvalueInt.Count == 2 && listvalueInt.Contains(6) && listvalueInt.Contains(7))
+ //{
+ // btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.weekend);
+ //}
+ //else if (listvalueInt.Count == 7)
+ //{
+ // btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.everyday);
+ //}
+ //else
+ //{
+ // btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.week1) + text.Replace(Language.StringByID(MyInternationalizationString.week1), "").TrimEnd(',');
+ //}
+ btndisplaycycle.Text = Language.StringByID(MyInternationalizationString.week1) + text.Replace(Language.StringByID(MyInternationalizationString.week1), "").TrimEnd(',');
+ //btndisplaycycle.Text = text.TrimEnd(',');
+ }; break;
+ }
+
+
+ }
+
+ void ConditionView(bool edit)
+ {
+ Common.Logic.CurrentLogic.LogicName = logicTextBox.Text.Trim();
+
+ #region 缁勫悎鏉′欢View
+ FrameLayout flMain = new FrameLayout { BackgroundColor = 0x50000000 };
+ this.AddChidren(flMain);
+ flMain.MouseUpEventHandler += (sender2, e2) =>
+ {
+ flMain.RemoveFromParent();
+ };
+
+ var timetypeframelayout1 = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ flMain.AddChidren(timetypeframelayout1);
+ var framelayout = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(530),
+ Y = Application.GetRealHeight(1920 - 530),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(60),
+ };
+ flMain.AddChidren(framelayout);
+
+ #region -------鍙栨秷 瀹屾垚
+ var timetype = new RowLayout
+ {
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ framelayout.AddChidren(timetype);
+ var Btncancel = new Button
+ {
+ TextID = MyInternationalizationString.cancel,
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ X = Application.GetRealWidth(80),
+ TextAlignment = TextAlignment.CenterLeft,
+ };
+ timetype.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
+ {
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ };
+
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.condition,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ };
+ timetype.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
+
+ };
+ timetype.AddChidren(Btncomplete);
+ #endregion
+
+ #region -------婊¤冻鎵�鏈夋潯浠� 婊¤冻鍏朵腑涓�涓潯浠�
+
+
+ #region -------婊¤冻鎵�鏈夋潯浠�
+
+
+ var andFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = timetype.Bottom + Application.GetRealHeight(20),
+ };
+ framelayout.AddChidren(andFrameLayout);
+
+
+ var androw = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ andFrameLayout.AddChidren(androw);
+ var andbtn = new Button
+ {
+
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.Allconditions,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+
+ };
+ androw.AddChidren(andbtn);
+
+ var andSelected = new SelectedButton();
+ androw.AddChidren(andSelected);
+ #endregion
+ #region -------婊¤冻鍏朵腑涓�涓潯浠�
+
+ var orFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = andFrameLayout.Bottom,
+
+ };
+ framelayout.AddChidren(orFrameLayout);
+
+
+
+ var orrow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBackgroundColor,
+ };
+ orFrameLayout.AddChidren(orrow);
+ var orbtn = new Button
+ {
+
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.anycondition,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ orrow.AddChidren(orbtn);
+
+ var orSelected = new SelectedButton();
+ orrow.AddChidren(orSelected);
+ #endregion
+ ///婊¤冻鎵�鏈夋潯浠剁偣鍑讳簨浠�
+ EventHandler<MouseEventArgs> andclick = (sedner14, e14) =>
+ {
+ andSelected.Visible = true;
+ orSelected.Visible = false;
+ andbtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ orbtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ };
+ androw.MouseUpEventHandler += andclick;
+ andbtn.MouseUpEventHandler += andclick;
+ andSelected.MouseUpEventHandler += andclick;
+ andFrameLayout.MouseUpEventHandler += andclick;
+
+
+ ///婊¤冻鍏朵腑涓�涓潯浠剁偣鍑讳簨浠�
+ EventHandler<MouseEventArgs> orclick = (sedner15, e15) =>
+ {
+ andSelected.Visible = false;
+ orSelected.Visible = true;
+ andbtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ orbtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ };
+ orrow.MouseUpEventHandler += orclick;
+ orbtn.MouseUpEventHandler += orclick;
+ orSelected.MouseUpEventHandler += orclick;
+ orFrameLayout.MouseUpEventHandler += orclick;
+
+ #endregion
+ #endregion
+
+ if (edit)
+ {
+ if (Common.Logic.CurrentLogic.Relationship == 0)
+ {
+ andSelected.Visible = true;
+ orSelected.Visible = false;
+ andbtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ orbtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ }
+ else
+ {
+ andSelected.Visible = false;
+ orSelected.Visible = true;
+ andbtn.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ orbtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ }
+ }
+ Btncomplete.MouseUpEventHandler += (sender, e) =>
+ {
+ if (!andSelected.Visible && !orSelected.Visible)
+ {
+ ///鍙互鎻愮ず鏈�変腑鐘舵�侊紱
+ return;
+ }
+ flMain.RemoveFromParent();
+
+ if (andSelected.Visible)
+ {
+ Common.Logic.CurrentLogic.Relationship = 0;
+
+ }
+ if (orSelected.Visible)
+ {
+ Common.Logic.CurrentLogic.Relationship = 1;
+
+ }
+ var templateDeviceCondition = new TemplateDeviceCondition();
+ UserView.HomePage.Instance.AddChidren(templateDeviceCondition);
+ UserView.HomePage.Instance.PageIndex += 1;
+ templateDeviceCondition.Show();
+ };
+
+ }
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs
index 444f69b..f38c40f 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TimePage.cs
@@ -14,183 +14,256 @@
{
Tag = "Logic";
}
- public bool IsDeviceEditor1;
+ public bool IsEditor;
public string str1;
Dictionary<string, string> timeBucketConditionsInfo = new Dictionary<string, string>();
public void Show()
{
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- this.AddChidren(new Button
- {
- Height = Application.GetRealHeight(80),
- });
- var topFrameLayout = new FrameLayout
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- Text = Language.StringByID(MyInternationalizationString.addtime),
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.addtime,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
var back = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
};
- topFrameLayout.AddChidren(back);
- back.MouseDownEventHandler += (sender, e) =>
- {
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) => {
RemoveFromParent();
- IsDeviceEditor1 = false;
};
+ #endregion
-
- var middle = new VerticalScrolViewLayout();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight(1920- 220 - 200);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+
+
+
+ #region 鏈�涓嬮潰鐨勫竷灞�浠g爜
+ var middle = new FrameLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184-260),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
this.AddChidren(middle);
-
- #region -----绔嬪嵆鎵ц
- var row = new RowLayout
+ var fra = new FrameLayout
{
- Height = Application.GetRealHeight(250),
+ Y = middle.Bottom,
+ Height = Application.GetRealHeight(260),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
- middle.AddChidren(row);
-
- var btnTextTitle = new Button
+ this.AddChidren(fra);
+ var btnsave = new Button
{
- Height = Application.GetRealHeight(50),
- Width = Application.GetRealWidth(800),
- Y = Application.GetRealHeight(20),
- X = Application.GetRealWidth(40),
- // Text = "璇烽�夋嫨鏃堕棿绫诲瀷",
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID = MyInternationalizationString.Selectedtimetype,
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),//194
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
};
- row.AddChidren(btnTextTitle);
+ fra.AddChidren(btnsave);
+ #endregion
+
+ #region -----鏃堕棿鑼冨洿 寮�濮嬫椂闂� 缁撴潫鏃堕棿
+ #region -----鏃堕棿鑼冨洿
+
+
+ var typeFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(typeFramelayout);
+
+
+ var typeRowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ typeFramelayout.AddChidren(typeRowlayout);
var btnTypeTextTitle = new Button
{
- Y = Application.GetRealHeight(20 + 50),
- // Text = "绫诲瀷",
- X = Application.GetRealWidth(40),
+ Text = Language.StringByID(MyInternationalizationString.type),
TextAlignment = TextAlignment.CenterLeft,
- Height = Application.GetRealHeight(180),
- Width = Application.GetRealWidth(400),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID = MyInternationalizationString.type,
+ Width = Application.GetRealWidth(265)
};
- row.AddChidren(btnTypeTextTitle);
-
- var btnTypeText = new Button
+ typeRowlayout.AddChidren(btnTypeTextTitle);
+
+
+ var btnimmediateexecution = new Button
{
- Y = Application.GetRealHeight(20 + 50),
- X = Application.GetRealWidth(1080 - 500 - 40),
- //Text = "鏃堕棿鑼冨洿",
+ X = btnTypeTextTitle.Right,
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetRealWidth(630),
TextAlignment = TextAlignment.CenterRight,
- Height = Application.GetRealHeight(180),
- Width = Application.GetRealWidth(500),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextID = MyInternationalizationString.timeframe,
};
- row.AddChidren(btnTypeText);
+ typeRowlayout.AddChidren(btnimmediateexecution);
+
+
+ var btnimmediateexecutionBack = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = btnimmediateexecution.Right + Application.GetRealWidth(12),
+ Gravity = Gravity.CenterVertical,
+ };
+ typeRowlayout.AddChidren(btnimmediateexecutionBack);
+
+
#endregion
+
+ #region -----寮�濮嬫椂闂�
+ var timestarFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y= typeFramelayout.Bottom,
+ };
+ middle.AddChidren(timestarFramelayout);
var timestartrow = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- middle.AddChidren(timestartrow);
+ timestarFramelayout.AddChidren(timestartrow);
var btnstarttimetext = new Button
{
+ Text = Language.StringByID(MyInternationalizationString.starttime),
TextAlignment = TextAlignment.CenterLeft,
- Width = Application.GetRealWidth(300),
- X = Application.GetRealWidth(30),
- TextID = MyInternationalizationString.starttime,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(265)
+
};
timestartrow.AddChidren(btnstarttimetext);
var btnstarttime = new Button
{
- X = Application.GetRealWidth(330),
+ X = btnstarttimetext.Right,
Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(600),
- TextAlignment = TextAlignment.CenterLeft,
- Tag = "0",
+ Width = Application.GetRealWidth(630),
+ TextAlignment = TextAlignment.CenterRight,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Tag = "0",
};
timestartrow.AddChidren(btnstarttime);
var btnstartback = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080-140),
+ X = btnstarttime.Right + Application.GetRealWidth(12),
Gravity = Gravity.CenterVertical,
};
timestartrow.AddChidren(btnstartback);
+ #endregion
+
+ #region -----缁撴潫鏃堕棿
+ var timeendFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = timestarFramelayout.Bottom,
+ };
+ middle.AddChidren(timeendFramelayout);
+
var timeendrow = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- middle.AddChidren(timeendrow);
+ timeendFramelayout.AddChidren(timeendrow);
var btnendtimetext = new Button
{
+ Text = Language.StringByID(MyInternationalizationString.endtime),
TextAlignment = TextAlignment.CenterLeft,
- Width = Application.GetRealWidth(300),
- X = Application.GetRealWidth(30),
- TextID = MyInternationalizationString.endtime,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(265),
+
};
timeendrow.AddChidren(btnendtimetext);
var btnendtime = new Button
{
- X = Application.GetRealWidth(330),
+ X = btnendtimetext.Right,
Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(600),
- TextAlignment = TextAlignment.CenterLeft,
- Tag = "0",
+ Width = Application.GetRealWidth(630),
+ TextAlignment = TextAlignment.CenterRight,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Tag = "0",
};
timeendrow.AddChidren(btnendtime);
var btnendtimeback = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080-140),
+ X = btnendtime.Right + Application.GetRealWidth(12),
Gravity = Gravity.CenterVertical,
};
timeendrow.AddChidren(btnendtimeback);
+ #endregion
+ #endregion
- if (IsDeviceEditor1)
+ if (IsEditor)
{
if (str1 != null)
{
@@ -245,11 +318,10 @@
}
}
-
EventHandler<MouseEventArgs> stattimeclick = (sender, e) =>
{
- var flMain = new FrameLayout { BackgroundColor = 0x00000000 };
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
AddChidren(flMain);
flMain.MouseUpEventHandler += (sender11, e11) =>
{
@@ -319,11 +391,11 @@
btnstarttimetext.MouseUpEventHandler += stattimeclick;
btnstarttime.MouseUpEventHandler += stattimeclick;
btnstartback.MouseUpEventHandler += stattimeclick;
-
+ timestarFramelayout.MouseUpEventHandler += stattimeclick;
EventHandler<MouseEventArgs> endtimeclick = (sender, e) =>
{
- var flMain = new FrameLayout { BackgroundColor = 0x00000000 };
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
AddChidren(flMain);
flMain.MouseUpEventHandler += (sender11, e11) =>
{
@@ -394,30 +466,14 @@
btnendtimetext.MouseUpEventHandler += endtimeclick;
btnendtime.MouseUpEventHandler += endtimeclick;
btnendtimeback.MouseUpEventHandler += endtimeclick;
+ timeendFramelayout.MouseUpEventHandler += endtimeclick;
- var fra = new FrameLayout
- {
- Y = middle.Bottom,
- Height = Application.GetRealHeight(200),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- };
- this.AddChidren(fra);
- var btncomplete = new Button
- {
- X = Application.GetRealWidth(290),
- Height = Application.GetRealHeight(150),//194
- Width = Application.GetRealWidth(500),
- Radius = (uint)Application.GetRealHeight(50),
- BackgroundColor = ZigbeeColor.Current.LogicButtonBlueColor,
- TextID = MyInternationalizationString.Save,
- };
- fra.AddChidren(btncomplete);
-
- timeBucketConditionsInfo.Add("Type","5");
- timeBucketConditionsInfo.Add("IsValid", "1");
///瀹屾垚鐐瑰嚮浜嬩欢
EventHandler<MouseEventArgs>completeclick=(sender, e) =>
{
+
+ timeBucketConditionsInfo.Add("Type", "5");
+ timeBucketConditionsInfo.Add("IsValid", "1");
if (string.IsNullOrEmpty(btnstarttime.Text) || string.IsNullOrEmpty(btnendtime.Text))
{
@@ -436,7 +492,7 @@
return;
}
- if (IsDeviceEditor1)
+ if (IsEditor)
{
for (int i = 0; i < Common.Logic.CurrentLogic.Conditions.Count; i++)
{
@@ -466,9 +522,8 @@
UserView.HomePage.Instance.PageIndex += 1;
logicCommunalPage.Show(() => { });
};
-
fra.MouseUpEventHandler += completeclick;
- btncomplete.MouseUpEventHandler += completeclick;
+ btnsave.MouseUpEventHandler += completeclick;
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs b/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs
index ce9932e..dc7cbca 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/TimePoint.cs
@@ -13,7 +13,7 @@
{
Tag = "Logic";
}
- public bool IsDeviceEditor;
+
Dictionary<string, string> timeifon=new Dictionary<string, string>();
Button beforeClickButton = new Button();
TimeView timeview = new TimeView
@@ -22,9 +22,25 @@
BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
Width = Application.GetRealWidth(1080),
};
+ /// <summary>
+ /// 鏍囪(鏂板姞/杩涙潵缂栬緫)
+ /// </summary>
+ public bool IsEditor;
+ /// <summary>
+ /// 璁板綍杩涙潵涔嬪墠鐨勫垎閽�
+ /// </summary>
public string StartMin;
+ /// <summary>
+ /// 璁板綍杩涙潵涔嬪墠鐨勫皬鏃�
+ /// </summary>
public string StartHour;
+ /// <summary>
+ /// 璁板綍杩涙潵涔嬪墠鐨勬椂闂�(寤舵椂/鎻愬墠)
+ /// </summary>
public string AdjustTime;
+ /// <summary>
+ /// 璁板綍鏃跺埢鐨勭被鍨�(鏃ュ嚭/鏃ヨ惤/姝e父)
+ /// </summary>
public string DateType;
public void Show(Dictionary<string, string> dictionary)
{
@@ -50,51 +66,65 @@
timeifon.Add("AdjustTime", dictionary["AdjustTime"]);
AdjustTime = dictionary["AdjustTime"];
- }
-
-
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- this.AddChidren(new Button
- {
- Height = Application.GetRealHeight(80),
- });
+ }
- var topFrameLayout = new FrameLayout
+
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- Text = Language.StringByID(MyInternationalizationString.addtime),
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextAlignment = TextAlignment.CenterLeft,
- X = Application.GetRealWidth(150),
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ TextID = MyInternationalizationString.addtime,
};
- topFrameLayout.AddChidren(titleName);
+ topRowLayout.AddChidren(titleName);
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
+ };
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
var back = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
- X = Application.GetRealWidth(20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
};
- topFrameLayout.AddChidren(back);
- back.MouseDownEventHandler += (sender, e) =>
- {
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) => {
RemoveFromParent();
- IsDeviceEditor = false;
};
+ #endregion
- var middle = new VerticalScrolViewLayout();
- middle.Y = topFrameLayout.Bottom;
- middle.Height = Application.GetRealHeight(1920 - 220 - 200);
- middle.BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor;
+
+ var middle = new FrameLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184-260),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
this.AddChidren(middle);
SelectedTimeTypeView(middle,TypeValue);
@@ -106,96 +136,122 @@
/// </summary>
/// <param name="middle">Middle.</param>
/// <param name="TypeValue">Type value.</param>
- void SelectedTimeTypeView(VerticalScrolViewLayout middle, int TypeValue)
+ void SelectedTimeTypeView(FrameLayout middle, int TypeValue)
{
middle.RemoveAll();
#region -----绔嬪嵆鎵ц
- var row = new RowLayout
- {
- Height = Application.GetRealHeight(250),
- };
- middle.AddChidren(row);
+
- var btnTextTitle = new Button
+ var typeFramelayout = new FrameLayout
{
- Height = Application.GetRealHeight(50),
- Width = Application.GetRealWidth(800),
- Y = Application.GetRealHeight(20),
- X = Application.GetRealWidth(40),
- //Text = "璇烽�夋嫨鏃堕棿绫诲瀷",
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID=MyInternationalizationString.Selectedtimetype,
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- row.AddChidren(btnTextTitle);
+ middle.AddChidren(typeFramelayout);
+
+
+ var typeRowlayout = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ typeFramelayout.AddChidren(typeRowlayout);
var btnTypeTextTitle = new Button
{
- Y = Application.GetRealHeight(20 + 50),
- //Text = "绫诲瀷",
- TextID = MyInternationalizationString.type,
- X = Application.GetRealWidth(40),
+ Text = Language.StringByID(MyInternationalizationString.type),
TextAlignment = TextAlignment.CenterLeft,
- Height = Application.GetRealHeight(180),
- Width = Application.GetRealWidth(400),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(265)
};
- row.AddChidren(btnTypeTextTitle);
+ typeRowlayout.AddChidren(btnTypeTextTitle);
- var btnTypeText = new Button
+
+ ///鏄剧ず鏃堕棿绫诲瀷鐨勬帶浠�
+ var btnimmediateexecution = new Button
{
- Y = Application.GetRealHeight(20 + 50),
- X = Application.GetRealWidth(1080 - 500 - 40),
- //Text = "绔嬪嵆鎵ц",
- TextID = MyInternationalizationString.immediateexecution,
+ X = btnTypeTextTitle.Right,
+ Gravity = Gravity.CenterVertical,
+ Width = Application.GetRealWidth(630),
TextAlignment = TextAlignment.CenterRight,
- Height = Application.GetRealHeight(180),
- Width = Application.GetRealWidth(500),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextID=MyInternationalizationString.immediateexecution,
};
- row.AddChidren(btnTypeText);
+ typeRowlayout.AddChidren(btnimmediateexecution);
+
+
+ var btnimmediateexecutionBack = new Button
+ {
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
+ UnSelectedImagePath = "ZigeeLogic/next.png",
+ X = btnimmediateexecution.Right + Application.GetRealWidth(12),
+ Gravity = Gravity.CenterVertical,
+ };
+ typeRowlayout.AddChidren(btnimmediateexecutionBack);
+
#endregion
#region -----鏃跺埢
+
+
+ var timetypeFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y= typeFramelayout.Bottom,
+ };
+ middle.AddChidren(timetypeFramelayout);
+
+
var rowSelectedTimeType = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+
};
- middle.AddChidren(rowSelectedTimeType);
+ timetypeFramelayout.AddChidren(rowSelectedTimeType);
var btnTimeText = new Button
{
- //Text = "鏃跺埢",
- TextID = MyInternationalizationString.moment,
+ Text = Language.StringByID(MyInternationalizationString.moment),
TextAlignment = TextAlignment.CenterLeft,
- Width = Application.GetRealWidth(150),
- X = Application.GetRealWidth(40),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width=Application.GetRealWidth(265)
};
rowSelectedTimeType.AddChidren(btnTimeText);
-
+
///鏄剧ず鏃堕棿绫诲瀷鐨勬帶浠�
var btnTimeTpye = new Button
{
- X = Application.GetRealWidth(300),
+ X = btnTimeText.Right,
Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(600),
+ Width = Application.GetRealWidth(630),
TextAlignment = TextAlignment.CenterRight,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
rowSelectedTimeType.AddChidren(btnTimeTpye);
+
var btnTimeTpyeBack = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080 - 140),
+ X = btnTimeTpye.Right+ Application.GetRealWidth(12),
Gravity = Gravity.CenterVertical,
};
rowSelectedTimeType.AddChidren(btnTimeTpyeBack);
+
+
+
EventHandler<MouseEventArgs> timetpyeclick = (sedner, e) =>
{
TimeTypeView(middle, TypeValue);
@@ -204,6 +260,7 @@
btnTimeText.MouseUpEventHandler += timetpyeclick;
btnTimeTpye.MouseUpEventHandler += timetpyeclick;
btnTimeTpyeBack.MouseUpEventHandler += timetpyeclick;
+ timetypeFramelayout.MouseUpEventHandler += timetpyeclick;
#endregion
@@ -273,8 +330,20 @@
{
#region -----鑷畾涔夋椂闂�
+ rowSelectedTimeType.LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
+ btnTimeTpyeBack.UnSelectedImagePath = "ZigeeLogic/dropdown.png";
+ var linebtn = new Button
+ {
+ Y = timetypeFramelayout.Bottom,
+ Height = Application.GetRealHeight(5),
+ BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ X=Application.GetRealWidth(58),
+ Width = Application.GetRealWidth(965),
+ };
+ middle.AddChidren(linebtn);
var rowTimeView = new RowLayout
{
+ Y = linebtn.Bottom,
Height = Application.GetRealHeight(600),
};
middle.AddChidren(rowTimeView);
@@ -286,49 +355,143 @@
{
#region -----鎻愬墠/寤舵椂
+
+ var delayFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ Y = timetypeFramelayout.Bottom,
+ };
+ middle.AddChidren(delayFramelayout);
+
+
var rowDelayType = new RowLayout
{
- Height = Application.GetRealHeight(180),
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(965),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(58),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
};
- middle.AddChidren(rowDelayType);
+ delayFramelayout.AddChidren(rowDelayType);
var btnDelayTimeText = new Button
{
- //Text = "鎻愬墠/寤舵椂",
- TextID = MyInternationalizationString.Advancedelay,
+ Text = Language.StringByID(MyInternationalizationString.Advancedelay),
TextAlignment = TextAlignment.CenterLeft,
- Width = Application.GetRealWidth(250),
- X = Application.GetRealWidth(40),
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ Width = Application.GetRealWidth(265)
};
rowDelayType.AddChidren(btnDelayTimeText);
+
+
///鏄剧ず鏃堕棿绫诲瀷鐨勬帶浠�
var btnDelayTime = new Button
{
- X = Application.GetRealWidth(300),
+ X = btnTimeText.Right,
Gravity = Gravity.CenterVertical,
- Width = Application.GetRealWidth(600),
+ Width = Application.GetRealWidth(630),
TextAlignment = TextAlignment.CenterRight,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
Text = textvalue,
};
rowDelayType.AddChidren(btnDelayTime);
+
var btnDelayTimeBack = new Button
{
- Width = Application.GetRealWidth(110),
- Height = Application.GetRealHeight(110),
+ Width = Application.GetRealWidth(58),
+ Height = Application.GetRealHeight(58),
UnSelectedImagePath = "ZigeeLogic/next.png",
- SelectedImagePath = "ZigeeLogic/NextSelecte.png",
- X = Application.GetRealWidth(1080 - 140),
+ X = btnTimeTpye.Right + Application.GetRealWidth(12),
Gravity = Gravity.CenterVertical,
};
rowDelayType.AddChidren(btnDelayTimeBack);
+
+
EventHandler<MouseEventArgs> timeclick = (sedner, e) =>
{
- DelayView(middle, textvalue, TypeValue);
+
+ var mList = new List<string>();
+ mList.Add(Language.StringByID(MyInternationalizationString.advance));
+ mList.Add(Language.StringByID(MyInternationalizationString.nothing));
+ mList.Add(Language.StringByID(MyInternationalizationString.delayed));
+ var listValues = new List<string>();
+ for (int i = 1; i < 61; i++)
+ {
+ if (i < 10)
+ {
+ var a = "0" + i.ToString();
+ listValues.Add(a + " " + Language.StringByID(MyInternationalizationString.minute));
+ }
+ else
+ {
+ listValues.Add(i.ToString() + " " + Language.StringByID(MyInternationalizationString.minute));
+ }
+
+ }
+ var mList2 = new List<List<string>>();
+ mList2.Add(listValues);
+ mList2.Add(new List<string> { "0" });
+ mList2.Add(listValues);
+ int timevalue = 0;
+ int selectIndex = 1;
+ if (int.Parse(timeifon["AdjustTime"]) > 0)
+ {
+ selectIndex = 2;
+ timevalue = Math.Abs(int.Parse(timeifon["AdjustTime"]));
+ }
+ else if (int.Parse(timeifon["AdjustTime"]) < 0)
+ {
+ selectIndex = 0;
+ timevalue = Math.Abs(int.Parse(timeifon["AdjustTime"]));
+ }
+ else
+ {
+ selectIndex = 1;
+ timevalue = 1;
+ }
+ PickerView.ShowSecondary(mList, mList2, (selectIndex1, selectIndex2) =>
+ {
+
+ switch (selectIndex1)
+ {
+ case 0:
+ case 2:
+ {
+ timevalue = int.Parse(listValues[selectIndex2].Split(' ')[0]);
+ if (selectIndex1 == 0)
+ {
+ timevalue = timevalue * -1;
+ }
+ }
+ break;
+ case 1:
+ timevalue = 0;
+ break;
+
+ }
+
+ if (timeifon.ContainsKey("StartHour"))
+ {
+ timeifon.Remove("StartHour");
+ }
+ if (timeifon.ContainsKey("StartMin"))
+ {
+ timeifon.Remove("StartMin");
+ }
+ if (timeifon.ContainsKey("AdjustTime"))
+ {
+ timeifon.Remove("AdjustTime");
+ }
+ timeifon.Add("AdjustTime", timevalue.ToString());
+ UserView.HomePage.Instance.ScrollEnabled = false;
+ SelectedTimeTypeView(middle, TypeValue);
+ }, selectIndex, timevalue - 1, Language.StringByID(MyInternationalizationString.Advancedelay));
+
};
+ delayFramelayout.MouseUpEventHandler += timeclick;
rowDelayType.MouseUpEventHandler += timeclick;
btnDelayTimeText.MouseUpEventHandler += timeclick;
btnDelayTime.MouseUpEventHandler += timeclick;
@@ -341,18 +504,19 @@
var fra = new FrameLayout
{
Y = middle.Bottom,
- Height = Application.GetRealHeight(200),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Height = Application.GetRealHeight(260),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
};
- this.AddChidren(fra);
+ this.AddChidren(fra);
var btnsave = new Button
{
- X = Application.GetRealWidth(290),
- Height = Application.GetRealHeight(150),//194
- Width = Application.GetRealWidth(500),
- Radius = (uint)Application.GetRealHeight(50),
- BackgroundColor = ZigbeeColor.Current.LogicButtonBlueColor,
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),//194
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor =ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
TextID = MyInternationalizationString.Save,
+ TextColor= ZigbeeColor.Current.LogicBtnSaveTextColor,
};
fra.AddChidren(btnsave);
btnsave.MouseUpEventHandler += (sender, e) =>
@@ -375,7 +539,7 @@
timeifon.Add("StartMin", timeview.Minute.ToString());
}
- if (IsDeviceEditor)
+ if (IsEditor)
{
for (int i = 0; i < Common.Logic.CurrentLogic.Conditions.Count; i++)
{
@@ -400,7 +564,7 @@
}
}
}
- IsDeviceEditor = false;
+ IsEditor = false;
}
else
{
@@ -418,10 +582,10 @@
/// 澶勭悊閫変腑鏃堕棿绫诲瀷鐨勬柟娉�
/// </summary>
/// <param name="middle">Middle.</param>
- void TimeTypeView(VerticalScrolViewLayout middle,int TypeValue)
+ void TimeTypeView(FrameLayout middle, int TypeValue)
{
UserView.HomePage.Instance.ScrollEnabled = false;
- var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
+ var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
this.AddChidren(flMain);
flMain.MouseUpEventHandler += (sender12, e12) =>
{
@@ -429,269 +593,267 @@
flMain.RemoveFromParent();
};
- var fraview = new FrameLayout {
- Width = Application.GetRealWidth(1080 - 80),
- Height = Application.GetRealHeight(160*6),
- Y = Application.GetRealHeight(1920 - 50 - 960),
- X = Application.GetRealWidth(40),
+ var fraview1 = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(100),
+ Y = Application.GetRealHeight(1920 - 100),
BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(40),
+ };
+ flMain.AddChidren(fraview1);
+
+ var fraview = new FrameLayout
+ {
+ Width = Application.GetRealWidth(1080),
+ Height = Application.GetRealHeight(850),
+ Y = Application.GetRealHeight(1920 - 850),
+ BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ Radius = (uint)Application.GetRealHeight(60),
};
flMain.AddChidren(fraview);
- var textBtn = new Button {
- Width = Application.GetRealWidth(1080 - 80),
- Height = Application.GetRealHeight(120),
- TextAlignment=TextAlignment.Center,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextID=MyInternationalizationString.selectcommontimetype,
- };
- fraview.AddChidren(textBtn);
-
- var timetypeframelayout = new VerticalScrolViewLayout
+ #region -------鍙栨秷 瀹屾垚
+ var timetype = new RowLayout
{
- Width = Application.GetRealWidth(1080 - 80),
- Height = Application.GetRealHeight(160*4),
- Y = textBtn.Bottom,
+ Height = Application.GetRealHeight(140),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
- fraview.AddChidren(timetypeframelayout);
-
-
- var cancelBtn = new Button
+ fraview.AddChidren(timetype);
+ var Btncancel = new Button
{
- Width = Application.GetRealWidth(1080 - 80),
- Height = Application.GetRealHeight(160),
- TextAlignment = TextAlignment.Center,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
TextID = MyInternationalizationString.cancel,
- Y = timetypeframelayout.Bottom+Application.GetRealHeight(40),
- BackgroundColor= ZigbeeColor.Current.LogicTopViewBackgroundColor,
- };
- fraview.AddChidren(cancelBtn);
- cancelBtn.MouseUpEventHandler += (sender,e) => {
- UserView.HomePage.Instance.ScrollEnabled = true;
- flMain.RemoveFromParent();
- };
-
- List<string> timetypelist = new List<string> {
- Language.StringByID(MyInternationalizationString.sunrise),
- Language.StringByID(MyInternationalizationString.sunset),
- Language.StringByID(MyInternationalizationString.noon),
- Language.StringByID(MyInternationalizationString.logiccustom),
- };
-
- foreach (var typename in timetypelist)
- {
-
- var timerowlayout = new RowLayout
- {
- Height = Application.GetRealHeight(160),
- };
- timetypeframelayout.AddChidren(timerowlayout);
-
- var btntimetext = new Button
- {
- Text = typename,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextAlignment=TextAlignment.CenterLeft,
- X=Application.GetRealWidth(40),
- };
- timerowlayout.AddChidren(btntimetext);
-
-
- EventHandler<MouseEventArgs> timesclick = (sender, e) =>
- {
- UserView.HomePage.Instance.ScrollEnabled = true;
- flMain.RemoveFromParent();
- int a = 0;
- if(btntimetext.Text==Language.StringByID(MyInternationalizationString.logiccustom)){
- a = 0;
- }
- else if(btntimetext.Text == Language.StringByID(MyInternationalizationString.sunrise)){
- a = 1;
- }
- else if (btntimetext.Text == Language.StringByID(MyInternationalizationString.sunset)) {
- a = 2;
- }
- else if (btntimetext.Text == Language.StringByID(MyInternationalizationString.noon)) {
- a = 3;
-
- }
- if (a == TypeValue)
- {
- UserView.HomePage.Instance.ScrollEnabled = true;
- flMain.RemoveFromParent();
- return;
- }
-
- if (timeifon.ContainsKey("StartHour"))
- {
- timeifon.Remove("StartHour");
- }
- if (timeifon.ContainsKey("StartMin"))
- {
- timeifon.Remove("StartMin");
- }
- if (timeifon.ContainsKey("AdjustTime"))
- {
- timeifon.Remove("AdjustTime");
- }
- if (timeifon.ContainsKey("DateType"))
- {
- timeifon.Remove("DateType");
- }
- timeifon.Add("DateType", a.ToString());
- if (a == 0)
- {
- timeifon.Add("StartHour", "12");
- timeifon.Add("StartMin", "0");
- }
- else
- {
- timeifon.Add("AdjustTime", "0");
- }
-
- SelectedTimeTypeView(middle, a);
-
- };
- timerowlayout.MouseUpEventHandler += timesclick;
- btntimetext.MouseUpEventHandler += timesclick;
-
- }
- }
- /// <summary>
- /// 閫変腑寤舵椂鏃堕棿鐨勫鐞嗘柟娉�
- /// </summary>
- /// <param name="middle">Middle.</param>
- void DelayView(VerticalScrolViewLayout middle,string timename,int TypeValue)
- {
- UserView.HomePage.Instance.ScrollEnabled = false;
- var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor };
- this.AddChidren(flMain);
- flMain.MouseUpEventHandler += (sender12, e12) =>
- {
- UserView.HomePage.Instance.ScrollEnabled = true;
- flMain.RemoveFromParent();
- };
-
- var fraDelay = new FrameLayout
- {
- Width = Application.GetRealWidth(1080 - 80),
- X = Application.GetRealWidth(40),
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
- Radius = (uint)Application.GetRealHeight(50),
- Height=Application.GetRealHeight(1260-250),
- Y=Application.GetRealHeight(1920-1260+250),
- };
- flMain.AddChidren(fraDelay);
-
- var titleTextfra = new FrameLayout
- {
- Height = Application.GetRealHeight(180),
- };
- fraDelay.AddChidren(titleTextfra);
-
-
- var btnTxet = new Button
- {
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- Height = Application.GetRealHeight(180),
- Width = Application.GetRealWidth(400),
- //Text = "璇烽�夋嫨鏃堕棿",
- TextID=MyInternationalizationString.selectedtime,
- X = Application.GetRealWidth(300),
- };
- titleTextfra.AddChidren(btnTxet);
-
-
- var btnSave = new Button
- {
+ TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+ Height = Application.GetRealHeight(140),
Width = Application.GetRealWidth(200),
- Height = Application.GetRealHeight(180),
- Text = Language.StringByID(MyInternationalizationString.complete),
- TextColor = ZigbeeColor.Current.LogicTextBlueColor,
- X = Application.GetRealWidth(1000 - 200),
+ X = Application.GetRealWidth(80),
+ TextAlignment = TextAlignment.CenterLeft,
};
- titleTextfra.AddChidren(btnSave);
-
-
- var timetypeframelayout = new VerticalScrolViewLayout
+ timetype.AddChidren(Btncancel);
+ Btncancel.MouseUpEventHandler += (sender16, e16) =>
{
- Width = Application.GetRealWidth(1080 - 80),
- Height = Application.GetRealHeight(900-250+20),
- Y =titleTextfra.Bottom,
- BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor,
+ flMain.RemoveFromParent();
+ UserView.HomePage.Instance.ScrollEnabled = true;
};
- fraDelay.AddChidren(timetypeframelayout);
- var cancel = new Button
+ var Btntitle = new Button
+ {
+ TextID = MyInternationalizationString.type,
+ TextColor = ZigbeeColor.Current.LogicBtnTypeColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(320),
+ TextAlignment = TextAlignment.Center,
+ X = Btncancel.Right + Application.GetRealWidth(100),
+ TextSize = 16,
+ };
+ timetype.AddChidren(Btntitle);
+ var Btncomplete = new Button
+ {
+ TextID = MyInternationalizationString.complete,
+ TextColor = ZigbeeColor.Current.LogicBtnCompleteColor,
+ Height = Application.GetRealHeight(140),
+ Width = Application.GetRealWidth(200),
+ TextAlignment = TextAlignment.CenterRight,
+ X = Btntitle.Right + Application.GetRealWidth(100),
+
+ };
+ timetype.AddChidren(Btncomplete);
+ #endregion
+ #region -------鏃ュ嚭锛屾棩钀斤紝姝e崍锛岃嚜瀹氫箟
+ #region 鏃ュ嚭
+
+
+ var sunriseFrameLayout = new FrameLayout
{
Height = Application.GetRealHeight(160),
- TextID = MyInternationalizationString.cancel,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- TextSize = 16,
- BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- Y =fraDelay.Height- Application.GetRealHeight(160),
-
+ Y = timetype.Bottom + Application.GetRealHeight(50),
};
- fraDelay.AddChidren(cancel);
- cancel.MouseUpEventHandler += (sender, e) =>
+ fraview.AddChidren(sunriseFrameLayout);
+
+ var sunriseRow = new RowLayout
{
- flMain.RemoveFromParent();
- UserView.HomePage.Instance.ScrollEnabled = true;
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
};
+ sunriseFrameLayout.AddChidren(sunriseRow);
- List<string> timevaluelist = new List<string> {
- Language.StringByID(MyInternationalizationString.advance)+"10"+ Language.StringByID(MyInternationalizationString.logicminute),
- Language.StringByID(MyInternationalizationString.advance)+"5"+ Language.StringByID(MyInternationalizationString.logicminute),
- Language.StringByID(MyInternationalizationString.advance)+"1"+ Language.StringByID(MyInternationalizationString.logicminute),
- Language.StringByID(MyInternationalizationString.nothing),
- Language.StringByID(MyInternationalizationString.delayed)+"1"+ Language.StringByID(MyInternationalizationString.logicminute),
- Language.StringByID(MyInternationalizationString.delayed)+"5"+ Language.StringByID(MyInternationalizationString.logicminute),
- Language.StringByID(MyInternationalizationString.delayed)+"10"+ Language.StringByID(MyInternationalizationString.logicminute),
- };
- string strvalue = "";
- foreach (var typename in timevaluelist)
+ var btnsunrisetext = new Button
{
- var timerowlayout = new RowLayout
- {
- Height = Application.GetRealHeight(130),
- LineColor=ZigbeeColor.Current.LogicBackgroundColor,
- };
- timetypeframelayout.AddChidren(timerowlayout);
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.sunrise,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ sunriseRow.AddChidren(btnsunrisetext);
- var btntimetext = new Button
- {
- Text = typename,
- Gravity = Gravity.Center,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- SelectedBackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor,
- };
- timerowlayout.AddChidren(btntimetext);
- if (timename == typename)
- {
- beforeClickButton.IsSelected = false;
- beforeClickButton = btntimetext;
- btntimetext.IsSelected = true;
- strvalue = btntimetext.Text;
- }
+ var sunriseSelected = new SelectedButton();
+ sunriseRow.AddChidren(sunriseSelected);
+ #endregion
+ #region 鏃ヨ惤
- EventHandler<MouseEventArgs> timesclick = (sender, e) =>
- {
- strvalue = btntimetext.Text;
- beforeClickButton.IsSelected = false;
- beforeClickButton = btntimetext;
- btntimetext.IsSelected = true;
- };
- timerowlayout.MouseUpEventHandler += timesclick;
- btntimetext.MouseUpEventHandler += timesclick;
- }
- btnSave.MouseUpEventHandler += (sender2, e2) =>
+ var sunsetFrameLayout = new FrameLayout
{
- flMain.RemoveFromParent();
+ Height = Application.GetRealHeight(160),
+ Y = sunriseFrameLayout.Bottom,
+ };
+ fraview.AddChidren(sunsetFrameLayout);
+
+ var sunsetRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ sunsetFrameLayout.AddChidren(sunsetRow);
+
+ var btnsunsettext = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.sunset,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ sunsetRow.AddChidren(btnsunsettext);
+
+ var sunsetSelected = new SelectedButton();
+ sunsetRow.AddChidren(sunsetSelected);
+ #endregion
+
+ #region 姝e崍
+ //姝e崍
+
+
+
+ var noonFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = sunsetFrameLayout.Bottom,
+ };
+ fraview.AddChidren(noonFrameLayout);
+
+ var noonRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ noonFrameLayout.AddChidren(noonRow);
+
+ var btnnoontext = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.noon,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ noonRow.AddChidren(btnnoontext);
+
+ var noonSelected = new SelectedButton();
+ noonRow.AddChidren(noonSelected);
+
+ #endregion
+ #region 鑷畾涔�
+
+ var logiccustomFrameLayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ Y = noonFrameLayout.Bottom,
+ };
+ fraview.AddChidren(logiccustomFrameLayout);
+
+ var logiccustomRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(920),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(80),
+ LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ logiccustomFrameLayout.AddChidren(logiccustomRow);
+
+ var btnlogiccustomtext = new Button
+ {
+ Width = Application.GetRealWidth(600),
+ TextID = MyInternationalizationString.logiccustom,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor,
+ };
+ logiccustomRow.AddChidren(btnlogiccustomtext);
+
+ var logiccustomSelected = new SelectedButton();
+ logiccustomRow.AddChidren(logiccustomSelected);
+ #endregion
+ int value = -1;
+ EventHandler<MouseEventArgs> sunriseclick = (sender,e) => {
+ btnsunrisetext.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnsunsettext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnnoontext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnlogiccustomtext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ sunriseSelected.Visible = true;
+ sunsetSelected.Visible = false;
+ noonSelected.Visible = false;
+ logiccustomSelected.Visible = false;
+ value = 1;
+ };
+ sunriseFrameLayout.MouseUpEventHandler += sunriseclick;
+ sunriseRow.MouseUpEventHandler += sunriseclick;
+ btnsunrisetext.MouseUpEventHandler += sunriseclick;
+ sunriseSelected.MouseUpEventHandler += sunriseclick;
+
+ EventHandler<MouseEventArgs> sunsetclick = (sender, e) => {
+ btnsunrisetext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnsunsettext.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnnoontext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnlogiccustomtext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ sunriseSelected.Visible = false;
+ sunsetSelected.Visible = true;
+ noonSelected.Visible = false;
+ logiccustomSelected.Visible = false;
+ value = 2;
+ };
+ sunsetFrameLayout.MouseUpEventHandler += sunsetclick;
+ sunsetRow.MouseUpEventHandler += sunsetclick;
+ btnsunsettext.MouseUpEventHandler += sunsetclick;
+ sunsetSelected.MouseUpEventHandler += sunsetclick;
+
+ EventHandler<MouseEventArgs> noonclick = (sender, e) =>
+ {
+ btnsunrisetext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnsunsettext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnnoontext.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ btnlogiccustomtext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ sunriseSelected.Visible = false;
+ sunsetSelected.Visible = false;
+ noonSelected.Visible = true;
+ logiccustomSelected.Visible = false;
+ value = 3;
+ };
+ noonFrameLayout.MouseUpEventHandler += sunsetclick;
+ noonRow.MouseUpEventHandler += noonclick;
+ btnnoontext.MouseUpEventHandler += noonclick;
+ noonSelected.MouseUpEventHandler += noonclick;
+
+ EventHandler<MouseEventArgs> ogiccustomclick = (sender, e) =>
+ {
+ btnsunrisetext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnsunsettext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnnoontext.TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor;
+ btnlogiccustomtext.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor;
+ sunriseSelected.Visible = false;
+ sunsetSelected.Visible = false;
+ noonSelected.Visible = false;
+ logiccustomSelected.Visible = true;
UserView.HomePage.Instance.ScrollEnabled = true;
+ flMain.RemoveFromParent();
+
if (timeifon.ContainsKey("StartHour"))
{
timeifon.Remove("StartHour");
@@ -704,47 +866,51 @@
{
timeifon.Remove("AdjustTime");
}
- switch (strvalue)
+ if (timeifon.ContainsKey("DateType"))
{
- case "鎻愬墠10鍒嗛挓":
- {
- timeifon.Add("AdjustTime", "-10");
- }
- break;
- case "鎻愬墠5鍒嗛挓":
- {
- timeifon.Add("AdjustTime", "-5");
- }
- break;
- case "鎻愬墠1鍒嗛挓":
- {
- timeifon.Add("AdjustTime", "-1");
- }
- break;
- case "鏃�":
- {
- timeifon.Add("AdjustTime", "0");
- }
- break;
- case "寤舵椂1鍒嗛挓":
- {
- timeifon.Add("AdjustTime", "1");
- }
- break;
- case "寤舵椂5鍒嗛挓":
- {
- timeifon.Add("AdjustTime", "5");
- }
- break;
- case "寤舵椂10鍒嗛挓":
- {
- timeifon.Add("AdjustTime", "10");
- }
- break;
-
+ timeifon.Remove("DateType");
}
- SelectedTimeTypeView(middle, TypeValue);
+ timeifon.Add("DateType", "0");
+ timeifon.Add("StartHour", "12");
+ timeifon.Add("StartMin", "0");
+ SelectedTimeTypeView(middle, 0);
};
+ logiccustomFrameLayout.MouseUpEventHandler += ogiccustomclick;
+ logiccustomRow.MouseUpEventHandler += ogiccustomclick;
+ btnlogiccustomtext.MouseUpEventHandler += ogiccustomclick;
+ logiccustomSelected.MouseUpEventHandler += ogiccustomclick;
+
+ #endregion
+ Btncomplete.MouseUpEventHandler += (sender, e) =>
+ {
+ if (value == -1)
+ {
+ return;
+ }
+ UserView.HomePage.Instance.ScrollEnabled = true;
+ flMain.RemoveFromParent();
+ if (timeifon.ContainsKey("StartHour"))
+ {
+ timeifon.Remove("StartHour");
+ }
+ if (timeifon.ContainsKey("StartMin"))
+ {
+ timeifon.Remove("StartMin");
+ }
+ if (timeifon.ContainsKey("AdjustTime"))
+ {
+ timeifon.Remove("AdjustTime");
+ }
+ if (timeifon.ContainsKey("DateType"))
+ {
+ timeifon.Remove("DateType");
+ }
+ timeifon.Add("DateType", value.ToString());
+ timeifon.Add("AdjustTime", "0");
+ SelectedTimeTypeView(middle, value);
+ };
+
}
+
}
}
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs b/ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs
index b654589..e23911d 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/WeekPage.cs
@@ -13,61 +13,87 @@
Tag = "Logic";
}
- public void Show ()
+ public void Show (string titlename)
{
var weeklist = new List<string> ();
- this.BackgroundColor = ZigbeeColor.Current.LogicTopViewBackgroundColor;
- var topFrameLayout = new FrameLayout
+
+ #region 鏈�涓婇潰鐨勫竷灞�浠g爜
+ var topRowLayout = new RowLayout
{
- Height = Application.GetRealHeight(140),
- Y = Application.GetRealHeight(80),
+ BackgroundColor = ZigbeeColor.Current.LogicTopBackgroundColor,
+ Height = Application.GetRealHeight(184),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutTopLineColor,
};
- AddChidren(topFrameLayout);
+ this.AddChidren(topRowLayout);
var titleName = new Button
{
- TextID = MyInternationalizationString.cycle,
- TextSize = 17,
+ TextSize = 16,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+ TextAlignment = TextAlignment.CenterLeft,
+ X = Application.GetRealWidth(176),
+ Width = Application.GetRealWidth(400),
+ Height = Application.GetRealHeight(69),
+ Y = Application.GetRealHeight(92),
+ Text = titlename,
};
- topFrameLayout.AddChidren (titleName);
-
- var back = new Button {
- Width = Application.GetRealWidth (110),
- Height = Application.GetRealHeight (110),
- X = Application.GetRealWidth (20),
- Gravity = Gravity.CenterVertical,
- UnSelectedImagePath = "ZigeeLogic/Back.png",
+ topRowLayout.AddChidren(titleName);
+
+ var clickBtn = new Button
+ {
+ Width = Application.GetRealWidth(81 + 51),
+ Height = Application.GetRealHeight(58 + 40),
+ Y = Application.GetRealHeight(98 - 40),
};
- topFrameLayout.AddChidren (back);
- back.MouseDownEventHandler += (sender, e) =>
+ topRowLayout.AddChidren(clickBtn);
+ clickBtn.MouseDownEventHandler += (sender, e) =>
{
RemoveFromParent();
};
- var titlerl = new RowLayout {
- Height = Application.GetRealHeight (180),
- Y = Application.GetRealHeight (220),
+ var back = new Button
+ {
+ Width = Application.GetRealWidth(30),
+ Height = Application.GetRealHeight(51),
+ X = Application.GetRealWidth(81),
+ Y = Application.GetRealHeight(98),
+ //Gravity = Gravity.CenterVertical;
+ UnSelectedImagePath = "ZigeeLogic/back.png",
};
- AddChidren (titlerl);
+ topRowLayout.AddChidren(back);
+ back.MouseDownEventHandler += (sender, e) => {
+ RemoveFromParent();
+ };
+ #endregion
- titlerl.AddChidren (
- new Button {
- X = Application.GetRealWidth (40),
- //Text = "璇烽�夋嫨閲嶅鎵ц鍛ㄦ湡",
- TextID = MyInternationalizationString.repeat,
- TextSize = 17,
- TextAlignment = TextAlignment.CenterLeft,
- TextColor = ZigbeeColor.Current.LogicTextBlackColor,
- }
- );
- var middle = new VerticalScrolViewLayout ();
- middle.Y = titlerl.Bottom;
- middle.Height = Application.GetRealHeight (1920 - 220 - 180);
- middle.BackgroundColor =ZigbeeColor.Current.LogicBackgroundColor;
- this.AddChidren (middle);
+ var middle = new VerticalScrolViewLayout
+ {
+ Y = topRowLayout.Bottom,
+ Height = Application.GetRealHeight(1920 - 184-260),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(middle);
+
+ var saveFramelayout = new FrameLayout
+ {
+ Y = middle.Bottom,
+ Height = Application.GetRealHeight(260),
+ BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+ };
+ this.AddChidren(saveFramelayout);
+ var saveBtn= new Button
+ {
+ X = Application.GetRealWidth(85),
+ Height = Application.GetRealHeight(130),//194
+ Width = Application.GetRealWidth(910),
+ Radius = (uint)Application.GetRealHeight(60),
+ BackgroundColor = ZigbeeColor.Current.LogicBtnSaveBackgroundColor,
+ TextID = MyInternationalizationString.Save,
+ TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
+ };
+ saveFramelayout.AddChidren(saveBtn);
if (Common.Logic.CurrentLogic.TimeAttribute.Repeat == 5)
{
@@ -127,41 +153,70 @@
Language.StringByID(MyInternationalizationString.sat),
Language.StringByID(MyInternationalizationString.sun),
});
- foreach (var name in cyclelist) {
- var cyclerwLayout = new RowLayout {
- Height = Application.GetRealHeight (180),
- };
- middle.AddChidren (cyclerwLayout);
+ foreach (var name in cyclelist)
+ {
- var btnname = new Button {
- X = Application.GetRealWidth (40),
- Width = Application.GetRealWidth (600),
- Gravity = Gravity.CenterVertical,
+ var weekFramelayout = new FrameLayout
+ {
+ Height = Application.GetRealHeight(160),
+ BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+ };
+ middle.AddChidren(weekFramelayout);
+
+ var weekIconBtn = new Button
+ {
+ Width = Application.GetRealWidth(81),
+ Height = Application.GetRealHeight(81),
+ UnSelectedImagePath = "ZigeeLogic/point.png",
+ X = Application.GetRealWidth(58),
+ Y = Application.GetRealHeight(55),
+ };
+ weekFramelayout.AddChidren(weekIconBtn);
+
+ var weekRow = new RowLayout
+ {
+ Y = Application.GetRealHeight(30),
+ Width = Application.GetRealWidth(850),
+ Height = Application.GetRealHeight(130),
+ X = Application.GetRealWidth(176),
+ LineColor = ZigbeeColor.Current.LogicRowLayoutLineColor,
+ };
+ weekFramelayout.AddChidren(weekRow);
+
+
+ var weekTextBtn = new Button
+ {
TextAlignment = TextAlignment.CenterLeft,
Text = name,
TextColor = ZigbeeColor.Current.LogicTextBlackColor,
};
- cyclerwLayout.AddChidren (btnname);
+ weekRow.AddChidren(weekTextBtn);
- var btnCheck = new Button {
- Width = Application.GetRealWidth (115),
- Height = Application.GetRealHeight (110),
+ var selectedBtn = new Button
+ {
+ X = Application.GetRealWidth(789),
+ Width = Application.GetMinRealAverage(60),
+ Height = Application.GetMinRealAverage(60),
+ UnSelectedImagePath = "ZigeeLogic/selected.png",
Gravity = Gravity.CenterVertical,
- X = Application.GetRealWidth (1080-140),
- SelectedImagePath = "ZigeeLogic/CheckOn.png",
- UnSelectedImagePath = "ZigeeLogic/Check.png",
+ Visible = false,
};
- cyclerwLayout.AddChidren (btnCheck);
+ weekRow.AddChidren(selectedBtn);
- var str = weeklist.Find ((o) => { return o == name; });
- if (str != null) {
- btnCheck.IsSelected = true;
+ if (Language.StringByID(MyInternationalizationString.sun) == name)
+ {
+ weekRow.LineColor = ZigbeeColor.Current.LogicBlankBackgroundColor;
}
- ///閫変腑鏃堕棿
+
+ var str = weeklist.Find((o) => { return o == name; });
+ if (str != null)
+ {
+ selectedBtn.Visible = true;
+ }
EventHandler<MouseEventArgs> weekclick = (sender, e) =>
{
- btnCheck.IsSelected = !btnCheck.IsSelected;
- if (btnCheck.IsSelected)
+ selectedBtn.Visible = !selectedBtn.Visible;
+ if (selectedBtn.Visible)
{
var d = weeklist.Find((o) => { return o == name; });
if (d == null)
@@ -171,54 +226,74 @@
}
else
{
- weeklist.RemoveAll((o) => {
+ weeklist.RemoveAll((o) =>
+ {
return o == name;
});
}
- int weekvalue = 0;
- foreach (var strname in weeklist)
- {
- if (Language.StringByID(MyInternationalizationString.mon) == strname)
- {
- weekvalue += 1;
- }
- else if (Language.StringByID(MyInternationalizationString.tue) == strname)
- {
- weekvalue += 2;
- }
- else if (Language.StringByID(MyInternationalizationString.wed) == strname)
- {
- weekvalue += 4;
- }
- else if (Language.StringByID(MyInternationalizationString.thu) == strname)
- {
- weekvalue += 8;
- }
- else if (Language.StringByID(MyInternationalizationString.frl) == strname)
- {
- weekvalue += 16;
- }
- else if (Language.StringByID(MyInternationalizationString.sat) == strname)
- {
- weekvalue += 32;
- }
- else if (Language.StringByID(MyInternationalizationString.sun) == strname)
- {
- weekvalue += 64;
- }
- }
- Common.Logic.CurrentLogic.TimeAttribute.Repeat = 5;
- Common.Logic.CurrentLogic.TimeAttribute.WeekDay = weekvalue;
};
- cyclerwLayout.MouseUpEventHandler += weekclick;
- btnname.MouseUpEventHandler += weekclick;
- btnCheck.MouseUpEventHandler += weekclick;
-
+ weekFramelayout.MouseUpEventHandler += weekclick;
+ weekTextBtn.MouseUpEventHandler += weekclick;
+ selectedBtn.MouseUpEventHandler += weekclick;
+ weekIconBtn.MouseUpEventHandler += weekclick;
+ weekRow.MouseUpEventHandler += weekclick;
+
}
-
+ saveBtn.MouseUpEventHandler += (sender, e) =>
+ {
+
+ int weekvalue = 0;
+ foreach (var strname in weeklist)
+ {
+ if (Language.StringByID(MyInternationalizationString.mon) == strname)
+ {
+ weekvalue += 1;
+ }
+ else if (Language.StringByID(MyInternationalizationString.tue) == strname)
+ {
+ weekvalue += 2;
+ }
+ else if (Language.StringByID(MyInternationalizationString.wed) == strname)
+ {
+ weekvalue += 4;
+ }
+ else if (Language.StringByID(MyInternationalizationString.thu) == strname)
+ {
+ weekvalue += 8;
+ }
+ else if (Language.StringByID(MyInternationalizationString.frl) == strname)
+ {
+ weekvalue += 16;
+ }
+ else if (Language.StringByID(MyInternationalizationString.sat) == strname)
+ {
+ weekvalue += 32;
+ }
+ else if (Language.StringByID(MyInternationalizationString.sun) == strname)
+ {
+ weekvalue += 64;
+ }
+ }
+ if (weekvalue == 0)
+ {
+ var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt),
+ Language.StringByID(MyInternationalizationString.selectweek),
+ Language.StringByID(MyInternationalizationString.complete));
+
+ alert.Show();
+ return;
+ }
+ Common.Logic.CurrentLogic.TimeAttribute.Repeat = 5;
+ Common.Logic.CurrentLogic.TimeAttribute.WeekDay = weekvalue;
+
+ var logicCommunalPage = new LogicCommunalPage { };
+ UserView.HomePage.Instance.AddChidren(logicCommunalPage);
+ UserView.HomePage.Instance.PageIndex += 1;
+ logicCommunalPage.Show(() => { });
+ };
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
index 0cbb7ae..278128d 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs
@@ -2,6 +2,7 @@
using Shared.Common;
using Shared.Phone.Device.Category;
using Shared.Phone.Device.CommonForm;
+using Shared.Phone.UserView;
namespace Shared.Phone.Device.Room
{
@@ -76,7 +77,7 @@
UnSelectedImagePath = "Item/Drop_Down.png"
};
- floorBtn.Text = Config.Instance.Home.GetCurrentFloorName();
+ floorBtn.Text = Config.Instance.Home.GetCurrentFloorName;
top.topView.AddChidren(floorBtn);
top.topView.AddChidren(selectFloorBtn);
selectFloorBtn.MouseUpEventHandler += SelectedFloor_MouseUpEventHandler;
@@ -113,20 +114,18 @@
var roomScrolView = new VerticalScrolViewLayout { };
bodyFrameLayout.AddChidren(roomScrolView);
- for (int i = 0; i < Shared.Common.Room.Lists.Count; i++)
+ var roomList = Shared.Common.Room.Lists;
+ for (int i = 0; i < roomList.Count+1; i++)
{
- var room = Shared.Common.Room.Lists[i];
int xx = 43 + i % 2 * (20 + 487);
int yy = 0;
-
if (i == 0 || i == 1)
{
if (i % 2 == 0)
{
itemView = new FrameLayout()
{
- Height = Application.GetRealHeight(354 + 58),
- Tag = room
+ Height = Application.GetRealHeight(354 + 58)
};
roomScrolView.AddChidren(itemView);
}
@@ -136,19 +135,31 @@
{
itemView = new FrameLayout()
{
- Height = Application.GetRealHeight(354),
- Tag = room
+ Height = Application.GetRealHeight(354)
};
roomScrolView.AddChidren(itemView);
}
- var roomView = new RoomMainView(xx, yy);
- itemView.AddChidren(roomView);
- roomView.Init();
- roomView.SetRoomName(room.Name);
- roomView.SetRoomIcon(room.BackgroundImage);
- }
+ if (i< roomList.Count)
+ {
+ var room = roomList[i];
+ var roomView = new RoomMainView(xx, yy);
+ itemView.AddChidren(roomView);
+ roomView.Init();
+ roomView.SetRoomName(room.Name);
+ roomView.SetRoomIcon(room.BackgroundImage);
+ }
+ else
+ {
+ var roomView = new RoomNoNameMainView(xx, yy);
+ itemView.AddChidren(roomView);
+ roomView.Init();
+ roomView.Icon.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent;
+ roomView.RoomNameButton.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent;
+ roomView.iconFL.MouseUpEventHandler += ShowUnallocatedRoom_MouseUpEvent;
+ }
+ }
}
#endregion
@@ -159,138 +170,19 @@
void RoomPage()
{
BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+ }
- return;
-
-
-
- var RoomBodyView = new VerticalScrolViewLayout()
- {
- Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.Navigation_Height),
- BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
- };
-
-
-
- foreach (var roomFilePath in Config.Instance.Home.RoomFilePathList)
- {
- var room = Shared.Common.Room.GetRoomByFilePath(roomFilePath);
- if (room == null)
- {
- continue;
- }
-
- var roomFL = new FrameLayout()
- {
- Height = Application.GetRealHeight(570),
- Width = Application.GetRealWidth(CommonPage.AppRealWidth - CommonPage.XLeft * 2),
- BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
- Gravity = Gravity.CenterHorizontal,
- Radius = CommonPage.BigFormRadius,
- };
- RoomBodyView.AddChidren(roomFL);
-
- var roomRowView = new RowLayout()
- {
- Y = Application.GetRealHeight(20),
- Height = Application.GetMinRealAverage(550),
- Width = Application.GetRealWidth(CommonPage.AppRealWidth - CommonPage.XLeft * 2),
- BackgroundColor =ZigbeeColor.Current.GXCBackgroundColor,
- LineColor= ZigbeeColor.Current.GXCBackgroundColor,
- Radius = CommonPage.BigFormRadius,
- Gravity = Gravity.CenterHorizontal
- };
- roomFL.AddChidren(roomRowView);
-
- var backGroundBtn = new Button()
- {
- UnSelectedImagePath = room.BackgroundImage,
- Radius = CommonPage.BigFormRadius,
- Height = Application.GetMinRealAverage(550),
- Width = Application.GetRealWidth(CommonPage.AppRealWidth - CommonPage.XLeft * 2),
- };
- roomRowView.AddChidren(backGroundBtn);
-
- var hardBlackBG = new FrameLayout()
- {
- Radius = CommonPage.BigFormRadius,
- BackgroundColor = ZigbeeColor.Current.GXCBlack70Color
- };
- roomRowView.AddChidren(hardBlackBG);
-
- var btnRoomName = new Button()
- {
- Width = Application.GetRealWidth(500),
- Height=Application.GetRealHeight(200),
- Text = room.Name,
- TextAlignment = TextAlignment.Center,
- TextSize=25,
- TextColor=ZigbeeColor.Current.GXCTextWhiteColor,
- Gravity=Gravity.Center
- };
- roomRowView.AddChidren(btnRoomName);
-
- var btnEditRoom = new Device.CommonForm.SelectedStatuButton()
- {
- X = roomRowView.Width- Application.GetRealWidth(100+30),
- Y=backGroundBtn.Y,
- Width = Application.GetMinRealAverage(110),
- Height=Application.GetMinRealAverage(110),
- UnSelectedImagePath = "Room/More.png",
- SelectedImagePath="Room/MoreSelected.png",
- };
- roomRowView.AddChidren(btnEditRoom);
-
- var delBtn = new Shared.Phone.Device.CommonForm.RowLayoutDeleteButton();
- //绗竴涓槸鎴块棿鍠滅埍锛屼笉鍏佽婊戝姩鍒犻櫎 鍒嗕韩杩囨潵鐨勪篃涓嶅厑璁稿垹闄�
- if (room.IsLove || room.IsSharedRoom)
- {
-
- }
- else
- {
- roomRowView.AddRightView(delBtn);
- }
-
- //鍒犻櫎浣忓畢
- delBtn.MouseUpEventHandler += (sender, e) =>
- {
- var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.ConfirmDeleteThisRoom), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim));
- alert.Show();
- alert.ResultEventHandler += (send, ee) =>
- {
- if(ee)
- {
- Shared.Common.Room.CurrentRoom.Remove(roomFilePath);
- Show();
- }
- };
- };
-
- btnEditRoom.MouseUpEventHandler += (sender, e) =>
- {
- //AddOrUpdateRoom(action, roomFilePath);
- var addRoom = new AddRoom();
- Shared.Phone.UserView.HomePage.Instance.AddChidren(addRoom);
- Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
- addRoom.action = () =>
- {
- Show();
- };
- AddRoom.OldBackgroundImagePath = string.Empty;
- addRoom.Show(roomFilePath);
- };
-
- roomRowView.MouseUpEventHandler += (sender, e) =>
- {
- //var userRoom = new RoomAddDevice();
- //this.AddChidren(userRoom);
- //userRoom.Show(roomFilePath);
- };
-
- }
-
-
+ /// <summary>
+ ///
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="mouseEventArgs"></param>
+ private void ShowUnallocatedRoom_MouseUpEvent(object sender,MouseEventArgs mouseEventArgs)
+ {
+ var unalloctedRoom = new UnallocatedRoom();
+ HomePage.Instance.AddChidren(unalloctedRoom);
+ HomePage.Instance.PageIndex += 1;
+ unalloctedRoom.Show();
}
}
-}
\ No newline at end of file
+}
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
new file mode 100755
index 0000000..709f0be
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/Device/Room/UnallocatedRoom.cs
@@ -0,0 +1,628 @@
+锘縰sing System;
+using System.Collections.Generic;
+using Shared.Common;
+using Shared.Phone.Device.Category;
+using Shared.Phone.Device.CommonForm;
+using Shared.Phone.UserView;
+using ZigBee.Device;
+
+namespace Shared.Phone.Device.Room
+{
+ public class UnallocatedRoom:FrameLayout
+ {
+ #region 鈼� 鍙橀噺____________________________
+ /// <summary>
+ /// bodyFrameLayout
+ /// </summary>
+ private FrameLayout bodyFrameLayout;
+
+ private Button addBtn;
+
+ private FrameLayout itemView;
+ /// <summary>
+ /// editStatus
+ /// </summary>
+ private bool SelectAll;
+
+ /// <summary>
+ /// low_High
+ /// </summary>
+ private const int low_High = 127;
+ /// <summary>
+ /// 鍔熻兘
+ /// </summary>
+ private ButtonLineForm functionBtn;
+ /// <summary>
+ /// 鍦烘櫙
+ /// </summary>
+ private ButtonLineForm sceneBtn;
+ /// <summary>
+ /// 涓儴鑳屾櫙bodyView
+ /// </summary>
+ public FrameLayout functionSceneBodyView;
+ /// <summary>
+ /// 褰撳墠鍔熻兘绫诲瀷鎸夐挳
+ /// </summary>
+ private FunctionButton tempFunctionTypeBtn;
+ /// <summary>
+ /// 鍔熻兘绫诲瀷鎸夐挳
+ /// </summary>
+ private FunctionButton functionTypeIMG;
+ /// <summary>
+ /// 鍔熻兘绫诲瀷
+ /// </summary>
+ private HorizontalScrolViewLayout functionTypeScrowView;
+ /// <summary>
+ /// 璁惧绫诲瀷RowLayout
+ /// </summary>
+ private RowLayout typeRowLayout;
+ /// <summary>
+ /// 鐩稿悓鐨勮澶囧垪琛�
+ /// </summary>
+ public VerticalScrolViewLayout deviceListScrolView;
+
+ #endregion
+
+ public UnallocatedRoom()
+ {
+ BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor;
+ }
+
+ /// <summary>
+ /// 鏈垎閰嶆埧闂寸鐞�
+ /// </summary>
+ public void Show()
+ {
+ AddTop();
+
+ AddBodyView();
+ }
+
+
+ #region Add____________________________________
+
+ /// <summary>
+ /// AddTop
+ /// </summary>
+ public void AddTop()
+ {
+ var top = new TopFrameLayout();
+ AddChidren(top);
+ top.InitTopview();
+ top.SetTopTitle(R.MyInternationalizationString.Unallocated);
+ top.backButton.MouseUpEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
+
+ addBtn = new Button()
+ {
+ X = Application.GetRealWidth(800),
+ Width = Application.GetRealWidth(150),
+ Height = Application.GetRealHeight(80),
+ Gravity = Gravity.CenterVertical,
+ TextColor = ZigbeeColor.Current.GXCTextBlackColor,
+ TextSize = CommonFormResouce.TopTitle_TextSize,
+ TextAlignment = TextAlignment.CenterRight,
+ TextID = R.MyInternationalizationString.AllSelect
+ };
+ top.topView.AddChidren(addBtn);
+
+ addBtn.MouseUpEventHandler += Edit_MouseUpEventHandler;
+ }
+
+ /// <summary>
+ /// AddBodyView
+ /// </summary>
+ public void AddBodyView()
+ {
+ bodyFrameLayout = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(184),
+ Height = Application.GetRealHeight(1737),
+ BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+ };
+ AddChidren(bodyFrameLayout);
+
+ var functionSceneBG = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(low_High),
+ BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
+ };
+ bodyFrameLayout.AddChidren(functionSceneBG);
+
+ //鍔熻兘
+ functionBtn = new ButtonLineForm(CommonFormResouce.X_Left, 34, 150, 68);
+ functionSceneBG.AddChidren(functionBtn);
+ functionBtn.Init();
+ functionBtn.SetTitle(R.MyInternationalizationString.Function);
+ functionBtn.IsSelected = true;
+
+ //鍦烘櫙
+ sceneBtn = new ButtonLineForm(CommonFormResouce.X_Left + 150 + 20, 34, 150, 68);
+ functionSceneBG.AddChidren(sceneBtn);
+ sceneBtn.Init();
+ sceneBtn.SetTitle(R.MyInternationalizationString.Scence);
+
+ //閫夋嫨鍔熻兘鍒嗘爮
+ functionBtn.NameBtn.MouseUpEventHandler += FunctionBtn_MouseUpEventHandler;
+ //閫夋嫨鍦烘櫙鍒嗘爮
+ sceneBtn.NameBtn.MouseUpEventHandler += SceneBtn_MouseUpEventHandler;
+
+ //鍔熻兘鍜屽満鏅痓odyView
+ functionSceneBodyView = new FrameLayout()
+ {
+ Y= Application.GetRealHeight(187-58),
+ Height = Application.GetRealHeight(1607),
+ BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor
+ };
+ bodyFrameLayout.AddChidren(functionSceneBodyView);
+
+ RefreshBodyView();
+
+ }
+
+ /// <summary>
+ /// 閫夋嫨鍔熻兘鍒嗘爮
+ /// </summary>
+ /// <param name="sender">Sender.</param>
+ /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
+ private void FunctionBtn_MouseUpEventHandler(object sender, MouseEventArgs mouseEventArgs)
+ {
+ functionBtn.IsSelected = true;
+ sceneBtn.IsSelected = false;
+ RefreshBodyView();
+ }
+
+ /// <summary>
+ /// 閫夋嫨鍦烘櫙鍒嗘爮
+ /// </summary>
+ /// <param name="sender">Sender.</param>
+ /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
+ private void SceneBtn_MouseUpEventHandler(object sender, MouseEventArgs mouseEventArgs)
+ {
+ functionBtn.IsSelected = false;
+ sceneBtn.IsSelected = true;
+ RefreshBodyView();
+ }
+
+ /// <summary>
+ /// 缂栬緫
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="mouseEventArgs"></param>
+ private void Edit_MouseUpEventHandler(object sender, MouseEventArgs mouseEventArgs)
+ {
+ SelectAll = !SelectAll;
+ if (SelectAll)
+ {
+ addBtn.TextID = R.MyInternationalizationString.Cancel;
+ }
+ else
+ {
+ addBtn.TextID = R.MyInternationalizationString.AllSelect;
+ }
+
+ if (functionBtn.IsSelected)
+ {
+ functionSceneBodyView.RemoveAll();
+ ShowFunction(SelectAll);
+ }
+ else if (sceneBtn.IsSelected)
+ {
+ functionSceneBodyView.RemoveAll();
+ ShowScene(SelectAll);
+ }
+ }
+
+ #endregion
+
+ #region 鈼� 鍒锋柊____________________________
+ /// <summary>
+ /// 鍒锋柊bodyView
+ /// </summary>
+ public void RefreshBodyView()
+ {
+ functionSceneBodyView.RemoveAll();
+ SelectAll = false;
+ if (functionBtn.IsSelected)
+ {
+ ShowFunction(SelectAll);
+ }
+ else if (sceneBtn.IsSelected)
+ {
+ ShowScene(SelectAll);
+ }
+ }
+
+ #endregion
+
+ #region 鈼� 鍔熻兘____________________________
+ /// <summary>
+ /// 鍔熻兘
+ /// </summary>
+ public void ShowFunction(bool selectAll)
+ {
+ SelectAll = selectAll;
+ //閫夋嫨鍔熻兘--鐩存帴浠庢埧闂寸殑devicelist涓幏鍙�
+ Shared.Common.Room.GetAllRoomDeviceUIList();
+ Shared.Common.Room.GetAllRoomDeviceTypeList();
+ if (Common.Room.AllRoomDeviceUIList == null)
+ {
+ return;
+ }
+ if (Common.Room.AllRoomDeviceUIList.Count == 0)
+ {
+ ShowNoFunctionTip();
+ }
+ else
+ {
+ functionTypeScrowView = new HorizontalScrolViewLayout
+ {
+ X = Application.GetRealWidth(CommonFormResouce.X_Left),
+ Height = Application.GetRealHeight(279),
+ Width = Application.GetRealWidth(1028),
+ BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+ };
+ functionSceneBodyView.AddChidren(functionTypeScrowView);
+
+ deviceListScrolView = new VerticalScrolViewLayout
+ {
+ X = Application.GetRealWidth(CommonFormResouce.X_Left),
+ Y = functionTypeScrowView.Bottom + Application.GetRealHeight(50),
+ Width = Application.GetRealWidth(1028),
+ Height = functionSceneBodyView.Height - Application.GetRealHeight(279 + 50) - 1,
+ BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
+
+ };
+ functionSceneBodyView.AddChidren(deviceListScrolView);
+
+
+
+ tempFunctionTypeBtn = new FunctionButton();
+
+ foreach (var deviceType in Common.Room.AllRoomDeviceTypeList)
+ {
+ typeRowLayout = new RowLayout()
+ {
+ Width = Application.GetRealWidth(CommonPage.AppRealWidth / 5),
+ LineColor = ZigbeeColor.Current.GXCBackgroundColor,
+ Tag = deviceType
+ };
+ functionTypeScrowView.AddChidren(typeRowLayout);
+
+ functionTypeIMG = new FunctionButton()
+ {
+ Tag = deviceType
+ };
+ functionTypeIMG.Init(DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType), DeviceUI.GetDeviceTypeUnSelectedImagePath(deviceType));
+ functionTypeIMG.SetTitle(DeviceUI.GetDeviceTypeName(deviceType));
+ typeRowLayout.AddChidren(functionTypeIMG);
+
+
+ functionTypeIMG.ImageBtn.MouseUpEventHandler += ShowSameTypeFunction;
+ functionTypeIMG.NameBtn.MouseUpEventHandler += ShowSameTypeFunction;
+ functionTypeIMG.ImageBG.MouseUpEventHandler += ShowSameTypeFunction;
+
+ if (deviceType == Shared.Common.Room.AllRoomDeviceUIList[0].CommonDevice.Type)
+ {
+ ShowSameTypeFunction(functionTypeIMG.ImageBtn, null);
+ }
+ }
+ }
+ }
+
+ /// <summary>
+ /// 鏄剧ず鐩稿悓绫诲瀷鐨勫姛鑳�
+ /// </summary>
+ /// <param name="typeSender">typeSender.</param>
+ /// <param name="mouseEventArgs">The ${ParameterType} instance containing the event data.</param>
+ private void ShowSameTypeFunction(object typeSender, MouseEventArgs mouseEventArgs)
+ {
+ //閫夋嫨鍔熻兘--鐩存帴浠庢埧闂寸殑devicelist涓幏鍙�
+ Shared.Common.Room.GetAllRoomDeviceUIList();
+ tempFunctionTypeBtn.IsSelected = false;
+ tempFunctionTypeBtn = (typeSender as Button).Parent as FunctionButton;
+ ((typeSender as Button).Parent as FunctionButton).IsSelected = true;
+
+ deviceListScrolView.RemoveAll();
+
+ var sameTypeList = new List<DeviceUI> { };
+ var selectedList = new List<DeviceUI> { };
+ foreach (var devieceUI in Common.Room.AllRoomDeviceUIList)
+ {
+ if (devieceUI == null || devieceUI.CommonDevice == null)
+ {
+ continue;
+ }
+ if (devieceUI.CommonDevice.Type.ToString() == (typeSender as Button).Tag.ToString())
+ {
+ if (!sameTypeList.Contains(devieceUI))
+ {
+ sameTypeList.Add(devieceUI);
+ }
+ }
+ }
+
+ if (SelectAll)
+ {
+ selectedList.AddRange(sameTypeList);
+ }
+ foreach (var deviceUI in sameTypeList)
+ {
+ var deviceTypeRowLayout = new FrameLayout()
+ {
+ Height = Application.GetRealHeight(127 + 35),
+ Tag = deviceUI
+ };
+ deviceListScrolView.AddChidren(deviceTypeRowLayout);
+
+ var deviceRow = new SelectFunctionView(0, 35);
+ deviceRow.Init(deviceUI.IconPath, deviceUI.OnlineIconPath);
+ deviceRow.SetTitle(deviceUI.CommonDevice.DeviceEpointName);
+ deviceRow.SetStatu(deviceUI.CommonDevice.IsOnline == 1);
+ deviceRow.SetSelectStatu(SelectAll);
+ deviceTypeRowLayout.AddChidren(deviceRow);
+
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) =>
+ {
+ deviceRow.SelectBtn.IsSelected = !deviceRow.SelectBtn.IsSelected;
+ if (deviceRow.SelectBtn.IsSelected)
+ {
+ if (!selectedList.Contains(deviceUI))
+ {
+ selectedList.Add(deviceUI);
+ }
+ }
+ else
+ {
+ if (selectedList.Contains(deviceUI))
+ {
+ selectedList.Remove(deviceUI);
+ }
+ }
+ };
+ deviceRow.NameBtn.MouseUpEventHandler += eventHandler;
+ deviceRow.ImageBtn.MouseUpEventHandler += eventHandler;
+ deviceRow.MouseUpEventHandler+=eventHandler;
+ deviceRow.SelectBtn.MouseUpEventHandler += eventHandler;
+
+ var add = new Button
+ {
+ Y = Application.GetRealHeight(1428),
+ Width = Application.GetRealWidth(1034),
+ Height = Application.GetRealHeight(156),
+ BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+ TextColor = ZigbeeColor.Current.GXCTextSelectedColor4,
+ Radius = (uint)Application.GetRealHeight(17),
+ TextID = R.MyInternationalizationString.AddTo,
+ Gravity = Gravity.CenterHorizontal
+ };
+ functionSceneBodyView.AddChidren(add);
+ add.MouseUpEventHandler += (sender, e) =>
+ {
+ var selectZone = new SelectZone();
+ CommonPage.Instance.AddChidren(selectZone);
+ selectZone.Init();
+ selectZone.ZoneAction = (r) =>
+ {
+ foreach (var d in selectedList)
+ {
+ r.AddDevice(d.FileName);
+ }
+ };
+ };
+ }
+ }
+
+ /// <summary>
+ /// 鎻愮ず娌℃湁鍔熻兘
+ /// </summary>
+ private void ShowNoFunctionTip()
+ {
+ var noFunction = new Button()
+ {
+ Y = Application.GetRealHeight(320),
+ Width = Application.GetMinRealAverage(757),
+ Height = Application.GetMinRealAverage(435),
+ UnSelectedImagePath = "Item/NoFunction.png",
+ Gravity = Gravity.CenterHorizontal
+ };
+ functionSceneBodyView.AddChidren(noFunction);
+
+ var noFunctionTip = new Button()
+ {
+ Y = noFunction.Bottom + Application.GetRealHeight(32),
+ Height = Application.GetRealHeight(200),
+ Width = Application.GetRealWidth(700),
+ Gravity = Gravity.CenterHorizontal,
+ TextID = R.MyInternationalizationString.NoFunction,
+ //Text = "娌℃湁鍔熻兘 \n 璇峰湪涓汉涓績涓�--璁惧绠$悊澶勬坊鍔�",
+ TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+ TextAlignment = TextAlignment.Center,
+ IsMoreLines = true
+ };
+ functionSceneBodyView.AddChidren(noFunctionTip);
+ }
+
+ #endregion
+
+ #region 鈼� 鍦烘櫙____________________________
+ /// <summary>
+ /// 閫夋嫨鍦烘櫙--鎵�鏈夋埧闂寸殑鎵�鏈夊満鏅�
+ /// </summary>
+ public void ShowScene(bool selectAll)
+ {
+ //鍒锋柊鍦烘櫙
+ //var reFreshResult=await Shared.Common.Room.RefreshSceneUIList();
+ Shared.Common.SceneRoomUI.GetAllSceneRoomUIList();
+ if (SceneRoomUI.AllSceneRoomUIList == null)
+ {
+ return;
+ }
+ var sceneList = SceneRoomUI.AllSceneRoomUIList;
+ List<SceneRoomUI> selectedList = new List<SceneRoomUI>();
+ if(selectAll)
+ {
+ selectedList.AddRange(sceneList);
+ }
+ if (sceneList.Count == 0)
+ {
+ ShowNoSceneTip();
+ }
+ else
+ {
+ var sceneScrolView = new VerticalScrolViewLayout
+ {
+ Y = Application.GetRealHeight(0)
+ };
+ functionSceneBodyView.AddChidren(sceneScrolView);
+ foreach (var sceneRoomUI in sceneList)
+ {
+ var sceneFL = new FrameLayout()
+ {
+ Width=Application.GetRealWidth(CommonFormResouce.AppRealWidth),
+ Height = Application.GetRealHeight(397+58),
+ Gravity = Gravity.CenterHorizontal,
+ BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor,
+ Tag = sceneRoomUI
+ };
+ sceneScrolView.AddChidren(sceneFL);
+
+ var sceneImg = new Button()
+ {
+ X=Application.GetRealWidth(179),
+ Y=Application.GetRealHeight(58),
+ Width = Application.GetRealWidth(844),
+ Height = Application.GetRealHeight(397),
+ UnSelectedImagePath = sceneRoomUI.sceneUI.IconPath,
+ Radius = (uint)Application.GetRealHeight(17)
+ };
+ sceneImg.UnSelectedImagePath = "Room/r0.png";
+ sceneFL.AddChidren(sceneImg);
+
+ var selectedBtn = new Button
+ {
+ X = Application.GetRealWidth(919),
+ Y = Application.GetRealHeight(92),
+ Width = Application.GetMinRealAverage(60),
+ Height = Application.GetMinRealAverage(60),
+ UnSelectedImagePath = "Room/ItemUnSelected.png",
+ SelectedImagePath = "Room/ItemSelected.png",
+ IsSelected= selectAll
+ };
+ sceneFL.AddChidren(selectedBtn);
+
+ var leftFL = new FrameLayout
+ {
+ X = Application.GetRealWidth(CommonFormResouce.X_Left),
+ Y = Application.GetRealHeight(58 + 58),
+ Width = Application.GetRealWidth(251),
+ Height = Application.GetRealHeight(282),
+ BackgroundColor = ZigbeeColor.Current.GXCBlackBackgroundColor2
+ };
+ sceneFL.AddChidren(leftFL);
+
+ var collectionBtn = new Button
+ {
+ X = Application.GetRealWidth(23),
+ Y = Application.GetRealHeight(23),
+ Width = Application.GetMinRealAverage(65),
+ Height = Application.GetMinRealAverage(65),
+ UnSelectedImagePath = "Item/Collection.png",
+ SelectedImagePath = "Item/CollectionSelected.png"
+ };
+ leftFL.AddChidren(collectionBtn);
+
+ var sceneNameBtn = new Button()
+ {
+ Width = Application.GetRealWidth(176),
+ Height = Application.GetRealHeight(200),
+ TextColor = ZigbeeColor.Current.GXCTextWhiteColor,
+ Text = sceneRoomUI.sceneUI.Name,
+ Gravity = Gravity.Center,
+ IsMoreLines = true
+ };
+ leftFL.AddChidren(sceneNameBtn);
+
+ EventHandler<MouseEventArgs> eventHandler = (sender,e) =>
+ {
+ selectedBtn.IsSelected = !selectedBtn.IsSelected;
+ if(selectedBtn.IsSelected)
+ {
+ if(!selectedList.Contains(sceneRoomUI))
+ {
+ selectedList.Add(sceneRoomUI);
+ }
+ }
+ else
+ {
+ if (selectedList.Contains(sceneRoomUI))
+ {
+ selectedList.Remove(sceneRoomUI);
+ }
+ }
+ };
+ selectedBtn.MouseUpEventHandler += eventHandler;
+ sceneImg.MouseUpEventHandler += eventHandler;
+ }
+
+ var add = new Button
+ {
+ Y = Application.GetRealHeight(1428),
+ Width = Application.GetRealWidth(1034),
+ Height = Application.GetRealHeight(156),
+ BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
+ TextColor = ZigbeeColor.Current.GXCTextSelectedColor4,
+ Radius = (uint)Application.GetRealHeight(17),
+ TextID = R.MyInternationalizationString.AddTo,
+ Gravity=Gravity.CenterHorizontal
+ };
+ functionSceneBodyView.AddChidren(add);
+ add.MouseUpEventHandler += (sender, e) =>
+ {
+ var selectZone = new SelectZone();
+ CommonPage.Instance.AddChidren(selectZone);
+ selectZone.Init();
+ selectZone.ZoneAction = (r) =>
+ {
+ foreach(var s in selectedList)
+ {
+ r.AddScene(s.sceneUI);
+ }
+ };
+ };
+ }
+ }
+
+ /// <summary>
+ /// 鏄剧ず娌℃湁鍦烘櫙
+ /// </summary>
+ private void ShowNoSceneTip()
+ {
+ var noFunction = new Button()
+ {
+ Y = Application.GetRealHeight(320),
+ Width = Application.GetMinRealAverage(757),
+ Height = Application.GetMinRealAverage(435),
+ UnSelectedImagePath = "Item/NoFunction.png",
+ Gravity = Gravity.CenterHorizontal
+ };
+ functionSceneBodyView.AddChidren(noFunction);
+
+ var noScenceTip = new Button()
+ {
+ Y = noFunction.Bottom + Application.GetRealHeight(32),
+ Height = Application.GetRealHeight(200),
+ Width = Application.GetRealWidth(700),
+ Gravity = Gravity.CenterHorizontal,
+ TextID = R.MyInternationalizationString.NoScene,
+ TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
+ TextAlignment = TextAlignment.Center,
+ IsMoreLines = true
+ };
+ functionSceneBodyView.AddChidren(noScenceTip);
+ }
+ #endregion
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
new file mode 100755
index 0000000..4257b39
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/AccountOption.cs
@@ -0,0 +1,131 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter
+{
+ /// <summary>
+ /// 璐﹀彿璁剧疆淇℃伅
+ /// </summary>
+ public class AccountOption
+ {
+ /// <summary>
+ /// 鏄惁浣跨敤鎸囩汗楠岃瘉
+ /// </summary>
+ public bool FingerprintAuthentication = false;
+ /// <summary>
+ /// 瀵嗙爜楠岃瘉
+ /// </summary>
+ public string PswAuthentication = string.Empty;
+ /// <summary>
+ /// 鎵嬪娍楠岃瘉
+ /// </summary>
+ public string GestureAuthentication = string.Empty;
+ /// <summary>
+ /// 鏄惁浣跨敤杩滅▼寮�閿�
+ /// </summary>
+ public bool DoorUnLockByRemote = false;
+ /// <summary>
+ /// 瀵嗙爜鍓╀綑鍙緭鍏ユ鏁�
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public int PasswordInputCount = 3;
+ /// <summary>
+ /// 妫�娴婣PP鏄惁鑳藉閫�鍑�
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public bool AppCanSignout = false;
+ /// <summary>
+ /// 鍓嶄竴娆$殑浣忓畢ID锛岃繖涓笢瑗挎槸缁橴serCenterLogic.InitUserCenterMenmoryAndThread()鐢ㄧ殑
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public string OldHomeStringId = string.Empty;
+ /// <summary>
+ /// 鍓嶄竴娆$殑鐧诲綍璐﹀彿锛岃繖涓笢瑗挎槸缁橴serCenterLogic.InitUserCenterMenmoryAndThread()鐢ㄧ殑
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public string OldAccountId = string.Empty;
+ /// <summary>
+ /// 鐢ㄦ埛鍥剧墖鐩綍璺緞
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public string UserPictruePath = string.Empty;
+ /// <summary>
+ /// 瀹夐槻鎶ヨ淇℃伅璁板綍涓�澶╁唴鏈�澶х殑鎶ヨ鏁�
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public int SafetyOnedayMaxAlarmMsgCount = 50;
+ /// <summary>
+ /// 瀹夐槻鎶ヨ淇℃伅璁板綍鏈�澶уぉ鏁�
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public int SafetyMaxAlarmMsgDay = 5;
+ /// <summary>
+ /// 闂ㄩ攣鎶ヨ淇℃伅璁板綍涓�澶╁唴鏈�澶х殑鎶ヨ鏁�
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public int DoorLockOnedayMaxAlarmMsgCount = 200;
+ /// <summary>
+ /// 闂ㄩ攣鎶ヨ淇℃伅璁板綍鏈�澶уぉ鏁�
+ /// </summary>
+ [Newtonsoft.Json.JsonIgnore]
+ public int DoorLockMaxAlarmMsgDay = 5;
+
+ #region 鈻� 涓�鑸柟娉昣__________________________
+
+ /// <summary>
+ /// 淇濆瓨
+ /// </summary>
+ public void Save()
+ {
+ //鍔犲瘑瀵嗙爜
+ string hdlKey = "hD1(La3o";
+ string oldPswAuthentication = PswAuthentication;
+ PswAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldPswAuthentication);
+
+ string oldGestureAuthentication = GestureAuthentication;
+ GestureAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldGestureAuthentication);
+
+ var data = Newtonsoft.Json.JsonConvert.SerializeObject(this);
+ var byteData = System.Text.Encoding.UTF8.GetBytes(data);
+ string fullName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile);
+ //鍐欏叆鍐呭
+ Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
+ //杩樺師鏄庣爜
+ PswAuthentication = oldPswAuthentication;
+ GestureAuthentication = oldGestureAuthentication;
+ }
+
+ /// <summary>
+ /// 鍔犺浇鏁版嵁
+ /// </summary>
+ /// <returns></returns>
+ public AccountOption Load()
+ {
+ string fileName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile);
+ if (System.IO.File.Exists(fileName) == false)
+ {
+ return new AccountOption();
+ }
+ var varByte = Shared.IO.FileUtils.ReadFile(fileName);
+ string strValue = System.Text.Encoding.UTF8.GetString(varByte);
+ var info = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountOption>(strValue);
+ //瑙e瘑瀵嗙爜
+ string hdlKey = "hD1(La3o";
+ info.PswAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.PswAuthentication);
+ info.GestureAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.GestureAuthentication);
+
+ return info;
+ }
+
+ /// <summary>
+ /// 閲嶇疆瀵嗙爜鍓╀綑娆℃暟
+ /// </summary>
+ public void ResetPasswordCount()
+ {
+ this.PasswordInputCount = 3;
+ }
+
+ #endregion
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
index 080da65..3167003 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Common/UserCenterCommon.cs
@@ -899,9 +899,13 @@
/// </summary>
public Dictionary<string, string> dicAllShardKeys = new Dictionary<string, string>();
/// <summary>
- /// 鍒嗕韩鎴块棿鐨勫璞�(瀹冩槸浠庝簯绔潵鐨�)
+ /// 鍒嗕韩鎴块棿鐨勫璞�(瀹冩槸浠庝簯绔潵鐨�,keys:鏂囦欢鍚�)
/// </summary>
public Dictionary<string, Common.Room> dicShardRoom = new Dictionary<string, Common.Room>();
+ /// <summary>
+ /// 鍒嗕韩鐨勬ゼ灞�
+ /// </summary>
+ public Dictionary<string, string> dicShardFloor = new Dictionary<string, string>();
/// <summary>
/// 鏄惁闇�瑕佸埛鏂�
/// </summary>
@@ -983,77 +987,6 @@
/// 搴旇鍙繙绋嬭繛鎺ョ殑鍚嶅瓧鍚�
/// </summary>
public string ConnectZigbeeMqttBrokerName = string.Empty;
- }
-
- #endregion
-
- #region 鈻� 璐﹀彿璁剧疆绫籣_________________________
-
- /// <summary>
- /// 璐﹀彿璁剧疆淇℃伅
- /// </summary>
- public class AccountOption
- {
- /// <summary>
- /// 鏄惁浣跨敤鎸囩汗楠岃瘉
- /// </summary>
- public bool FingerprintAuthentication = false;
- /// <summary>
- /// 瀵嗙爜楠岃瘉
- /// </summary>
- public string PswAuthentication = string.Empty;
- /// <summary>
- /// 鎵嬪娍楠岃瘉
- /// </summary>
- public string GestureAuthentication = string.Empty;
- /// <summary>
- /// 鏄惁浣跨敤杩滅▼寮�閿�
- /// </summary>
- public bool DoorUnLockByRemote = false;
- /// <summary>
- /// 淇濆瓨
- /// </summary>
- public void Save()
- {
- //鍔犲瘑瀵嗙爜
- string hdlKey = "hD1(La3o";
- string oldPswAuthentication = PswAuthentication;
- PswAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldPswAuthentication);
-
- string oldGestureAuthentication = GestureAuthentication;
- GestureAuthentication = UserCenterLogic.EncryptPassword(hdlKey, oldGestureAuthentication);
-
- var data = Newtonsoft.Json.JsonConvert.SerializeObject(this);
- var byteData = System.Text.Encoding.UTF8.GetBytes(data);
- string fullName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile);
- //鍐欏叆鍐呭
- Shared.IO.FileUtils.WriteFileByBytes(fullName, byteData);
- //杩樺師鏄庣爜
- PswAuthentication = oldPswAuthentication;
- GestureAuthentication = oldGestureAuthentication;
- }
-
- /// <summary>
- /// 鍔犺浇鏁版嵁
- /// </summary>
- /// <returns></returns>
- public AccountOption Load()
- {
- string fileName = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Common.Config.Instance.Guid, DirNameResourse.AccountOptionFile);
- if (System.IO.File.Exists(fileName) == false)
- {
- return new AccountOption();
- }
- var varByte = Shared.IO.FileUtils.ReadFile(fileName);
- string strValue = System.Text.Encoding.UTF8.GetString(varByte);
- var info = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountOption>(strValue);
- //瑙e瘑瀵嗙爜
- string hdlKey = "hD1(La3o";
- info.PswAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.PswAuthentication);
- info.GestureAuthentication = UserCenterLogic.DecryptPassword(hdlKey, info.GestureAuthentication);
-
- return info;
- }
}
#endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
index 5e041ad..dd06c58 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/CompoundControls/VerificationCodeControl.cs
@@ -20,6 +20,10 @@
/// </summary>
public Action<string> FinishInputEvent = null;
/// <summary>
+ /// 瀵嗙爜杈撳叆绫诲瀷
+ /// </summary>
+ public bool SecureTextEntry = false;
+ /// <summary>
/// 楠岃瘉鐮侀暱搴�
/// </summary>
private int CodeLenth = 0;
@@ -66,6 +70,10 @@
this.AddChidren(frameCode);
var txtCode = new TextInputControl(frameCode.Width, frameCode.Height, false);
+ if (SecureTextEntry == true)
+ {
+ txtCode.SecureTextEntry = true;
+ }
txtCode.Name = i.ToString();
txtCode.TextAlignment = TextAlignment.Center;
frameCode.AddChidren(txtCode);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
index 98fe4b8..0c90fa4 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalFrameControl.cs
@@ -79,6 +79,24 @@
#region 鈻� 涓�鑸柟娉昣__________________________
/// <summary>
+ /// 璋冩暣瀛怓rameLayout鐨勯珮搴�
+ /// </summary>
+ /// <param name="frame"></param>
+ /// <param name="buttomSpace">搴曢儴绌虹櫧闂磋窛(鐪熷疄鍊�)</param>
+ public void AdjustChidrenFrameHeight(FrameLayout frame, int buttomSpace)
+ {
+ var child = frame.GetChildren(frame.ChildrenCount - 1);
+ if (child != null)
+ {
+ //璋冩暣妗屽竷楂樺害
+ if (frame.Height < child.Bottom + buttomSpace)
+ {
+ frame.Height = child.Bottom + buttomSpace;
+ }
+ }
+ }
+
+ /// <summary>
/// 璋冩暣妗屽竷楂樺害
/// </summary>
public void AdjustTableHeight()
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs
index be19a18..3be4e71 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs
@@ -149,14 +149,10 @@
UserView.HomePage.Instance.PageIndex += 1;
//鍒濆鍖栫晫闈㈡鏋�
- this.InitForm();
-
- //寮哄埗鏄剧ず鐣岄潰,鍒濆鍖栧畬妗嗘灦鍚�,灏辩洿鎺ユ樉绀虹晫闈�
- HdlThreadLogic.Current.RunMainInThread(() =>
- {
- //鎵цShowForm()鏂规硶
- this.LoadShowFormMethod(parameter);
- });
+ this.InitForm();
+
+ //鎵цShowForm()鏂规硶
+ this.LoadShowFormMethod(parameter);
}
#endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SecondaryPswSecurityForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SecondaryPswSecurityForm.cs
index 7de755f..7237f1f 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SecondaryPswSecurityForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/SecondaryPswSecurityForm.cs
@@ -64,10 +64,21 @@
{
if (UserCenterResourse.Option.PswAuthentication != strPsw)
{
+ UserCenterResourse.Option.PasswordInputCount--;
+ if (UserCenterResourse.Option.PasswordInputCount <= 0)
+ {
+ //绠$悊鍛樿韩浠介獙璇佸け璐�,璇烽噸鏂扮櫥褰�
+ string msg2 = Language.StringByID(R.MyInternationalizationString.uCheckAdministratorFailAndReload);
+ this.ShowMassage(ShowMsgType.Tip, msg2);
+ UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
+ return;
+ }
//瀵嗙爜閿欒锛岃閲嶆柊杈撳叆
pswControl.SetErrorMsg(Language.StringByID(R.MyInternationalizationString.uOldPsswordIsError));
return;
}
+ //閲嶇疆鍓╀綑瀵嗙爜娆℃暟
+ UserCenterResourse.Option.ResetPasswordCount();
//鐣岄潰鍏抽棴
this.CloseForm();
SuccessAction?.Invoke();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs
index 2c9951a..8b16438 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs
@@ -155,7 +155,7 @@
//闄愬埗瀹冪殑闀垮害
this.listSafetyAlarmInfo.Insert(0, data);
- if (this.listSafetyAlarmInfo.Count > UserCenterResourse.SafetyOnedayMaxAlarmMsgCount)
+ if (this.listSafetyAlarmInfo.Count > UserCenterResourse.Option.SafetyOnedayMaxAlarmMsgCount)
{
this.listSafetyAlarmInfo.RemoveAt(this.listSafetyAlarmInfo.Count - 1);
}
@@ -226,7 +226,7 @@
//闄愬埗瀹冪殑闀垮害
this.listSafetyAlarmInfo.Insert(0, data);
- if (this.listSafetyAlarmInfo.Count > UserCenterResourse.SafetyOnedayMaxAlarmMsgCount)
+ if (this.listSafetyAlarmInfo.Count > UserCenterResourse.Option.SafetyOnedayMaxAlarmMsgCount)
{
this.listSafetyAlarmInfo.RemoveAt(this.listSafetyAlarmInfo.Count - 1);
}
@@ -291,7 +291,7 @@
var listInfo = new List<SafeguardAlarmInfo>();
for (int j = 0; j < info.Count; j++)
{
- if (j == UserCenterResourse.SafetyOnedayMaxAlarmMsgCount)
+ if (j == UserCenterResourse.Option.SafetyOnedayMaxAlarmMsgCount)
{
//姣忓ぉ鏈�澶氫笁鍗佹潯鏁版嵁
break;
@@ -300,7 +300,7 @@
}
dic[listFile[i]] = listInfo;
- if (dic.Count == UserCenterResourse.SafetyMaxAlarmMsgDay)
+ if (dic.Count == UserCenterResourse.Option.SafetyMaxAlarmMsgDay)
{
//鍙涓夊ぉ鐨勯噺
break;
@@ -464,7 +464,7 @@
//闄愬埗瀹冪殑闀垮害
this.listDoorLockAlarmInfo.Insert(0, msgInfo);
- if (this.listDoorLockAlarmInfo.Count > UserCenterResourse.DoorLockOnedayMaxAlarmMsgCount)
+ if (this.listDoorLockAlarmInfo.Count > UserCenterResourse.Option.DoorLockOnedayMaxAlarmMsgCount)
{
this.listDoorLockAlarmInfo.RemoveAt(this.listDoorLockAlarmInfo.Count - 1);
}
@@ -504,7 +504,7 @@
var listInfo = new List<DeviceAlarmInfo>();
for (int j = 0; j < info.Count; j++)
{
- if (j == UserCenterResourse.DoorLockOnedayMaxAlarmMsgCount)
+ if (j == UserCenterResourse.Option.DoorLockOnedayMaxAlarmMsgCount)
{
//姣忓ぉ鏈�澶氫笁鍗佹潯鏁版嵁
break;
@@ -513,7 +513,7 @@
}
dic[listFile[i]] = listInfo;
- if (dic.Count == UserCenterResourse.DoorLockMaxAlarmMsgDay)
+ if (dic.Count == UserCenterResourse.Option.DoorLockMaxAlarmMsgDay)
{
//鍙涓夊ぉ鐨勯噺
break;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
index f7020c4..5e03dc6 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAutoBackupLogic.cs
@@ -151,7 +151,7 @@
}
//鍒犻櫎鏂囦欢
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var backPath = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupdeleteDirectory);
foreach (var file in listData)
{
@@ -183,7 +183,7 @@
}
//鍒犻櫎鏂囦欢
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var backPath = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
foreach (var file in listData)
{
@@ -219,7 +219,7 @@
/// <returns></returns>
public static List<string> GetAutoBackupEditorFile()
{
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var path = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
return GetFileFromDirectory(path);
@@ -231,7 +231,7 @@
/// <returns></returns>
public static List<string> GetAutoBackupDeleteFile()
{
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var path = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupdeleteDirectory);
return GetFileFromDirectory(path);
@@ -269,12 +269,12 @@
/// <param name="fileName">鏂囦欢鐨勫悕瀛�,涓嶅惈璺緞</param>
public static void AddOrEditorFile(string fileName)
{
- if (UserCenterResourse.LocalRootPath == string.Empty)
+ //鏍圭洰褰�
+ string strroot = Common.Config.Instance.FullPath;
+ if (strroot == string.Empty)
{
return;
}
- //鏍圭洰褰�
- string strroot = UserCenterResourse.LocalRootPath;
//鑷姩澶囦唤鐩綍
string strBackPath = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
@@ -306,12 +306,12 @@
/// <param name="fileName">鏂囦欢鐨勫悕瀛�,涓嶅惈璺緞</param>
public static void DeleteFile(string fileName)
{
- if (UserCenterResourse.LocalRootPath == string.Empty)
+ //鏍圭洰褰�
+ string strroot = Common.Config.Instance.FullPath;
+ if (strroot == string.Empty)
{
return;
}
- //鏍圭洰褰�
- string strroot = UserCenterResourse.LocalRootPath;
//鑷姩鍒犻櫎澶囦唤鐩綍
string strBackPath = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupdeleteDirectory);
@@ -477,7 +477,7 @@
//鏆備笉鏀寔鎴愬憳
return;
}
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
var path = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
List<string> listFile1 = GetFileFromDirectory(path);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
index a5ef6ca..8fd93bc 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlBackupLogic.cs
@@ -98,6 +98,10 @@
/// <returns></returns>
public async Task<string> GetBackFileFromDBAndSetToLocation(string BackupClassId, bool IsGatewayAutoBackup = false, string ZigbeeUniqueId = null)
{
+ //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭
+ Shared.Common.CommonPage.BackKeyCanClick = false;
+ UserCenterResourse.Option.AppCanSignout = false;
+
//棣栧厛鍏堝垱寤轰竴涓复鏃舵枃浠跺す,瀛樺湪鏂囦欢鍒欐竻绌�
string newDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadBackupTempDirectory);
Global.CreateEmptyDirectory(newDir, true);
@@ -111,6 +115,9 @@
{
//鍏抽棴杩涘害鏉�
ProgressBar.Close();
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return null;
}
//璁剧疆鏈�澶у��
@@ -131,6 +138,9 @@
{
//鍏抽棴杩涘害鏉�
ProgressBar.Close(true);
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return null;
}
@@ -141,6 +151,9 @@
{
//鍏抽棴杩涘害鏉�
ProgressBar.Close();
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return null;
}
//灏嗚緭鍏ュ啓鍏ユ湰鍦扮殑涓存椂鏂囦欢澶�
@@ -150,6 +163,9 @@
}
//鍏抽棴杩涘害鏉�
ProgressBar.Close();
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return newDir;
}
@@ -275,6 +291,10 @@
ProgressBar.Show();
}
+ //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭
+ Shared.Common.CommonPage.BackKeyCanClick = false;
+ UserCenterResourse.Option.AppCanSignout = false;
+
//浣犺涓轰粈涔堣繖閲屼笉鍒嗕竴涓嚱鏁板嚭鏉ワ紙鐞嗚涓婃槸鍒嗗嚱鏁板嚭鏉ョ殑锛�
//鏄洜涓哄鏋滃垎鍑芥暟鐨勮瘽锛屼細鍑虹幇鍙岄噸寮傛锛屽鑷翠富绾跨▼鐨勮繘搴︽潯鐨勭櫨鍒嗘瘮姘歌繙瀹氭0%
foreach (string file in listNormalFile)
@@ -284,6 +304,9 @@
{
//鍏抽棴杩涘害鏉�
ProgressBar.Close(true);
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return false;
}
//鍒ゆ柇鏄惁鏄簲璇ヤ笂浼犵殑鏂囦欢
@@ -306,6 +329,9 @@
{
//鍏抽棴杩涘害鏉�
ProgressBar.Close();
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return false;
}
//璁剧疆杩涘害鍊�
@@ -319,6 +345,9 @@
{
//鍏抽棴杩涘害鏉�
ProgressBar.Close(true);
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return false;
}
@@ -331,6 +360,9 @@
{
//鍏抽棴杩涘害鏉�
ProgressBar.Close();
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return false;
}
//璁剧疆杩涘害鍊�
@@ -346,6 +378,9 @@
//杩涘害鏉″叧闂�
ProgressBar.Close();
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return true;
}
@@ -670,7 +705,7 @@
/// <returns></returns>
private string GetBase64Text(string fileName)
{
- string path = UserCenterResourse.LocalRootPath;
+ string path = Config.Instance.FullPath;
string fullName = System.IO.Path.Combine(path, fileName);
FileStream fs = File.OpenRead(fullName);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
index 07ebc6e..0970bc3 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs
@@ -57,12 +57,19 @@
//鏂囦欢澶�
string strDir = System.IO.Path.Combine(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
+ //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭
+ Shared.Common.CommonPage.BackKeyCanClick = false;
+ UserCenterResourse.Option.AppCanSignout = false;
+
foreach (string keys in listDistributedMark)
{
var dataPra = new { DistributedMark = keys, HouseDistributedMark = Common.Config.Instance.Home.Id, IsOtherAccountControl = Common.Config.Instance.isAdministrator };
var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetOneShareData", false, dataPra);
if (result == null)
{
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return null;
}
var dataResult = Newtonsoft.Json.JsonConvert.DeserializeObject<GetShardInfoResult>(result);
@@ -73,6 +80,10 @@
//璁剧疆杩涘害鍊�
ProgressBar.SetValue(1);
}
+
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return listFile;
}
@@ -97,27 +108,28 @@
/// <summary>
/// 鑾峰彇鏈湴鍏ㄩ儴鐨勫叡浜枃浠�
/// </summary>
- /// <param name="room">鎸囧畾鍙幏鍙栨寚瀹氭埧闂寸殑</param>
/// <returns></returns>
- public List<string> GetLocalAllShardFile(Common.Room room = null)
+ public List<string> GetLocalAllShardFile()
{
string path = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory);
var listFile = HdlAutoBackupLogic.GetFileFromDirectory(path);
- if (room == null)
+
+ return listFile;
+ }
+
+ /// <summary>
+ /// 鏂囦欢鏄惁瀛樺湪
+ /// </summary>
+ /// <param name="fileName"></param>
+ /// <returns></returns>
+ public bool IsFileExists(string fileName)
+ {
+ string fullName = UserCenterLogic.CombinePath(DirNameResourse.LocalMemoryDirectory, DirNameResourse.DownLoadShardDirectory, fileName);
+ if (System.IO.File.Exists(fullName) == false)
{
- return listFile;
+ return false;
}
- //鎴块棿
- var listRoomFile = new List<string>() { room.FileName };
- //鍦烘櫙鏂囦欢
- listRoomFile.AddRange(room.SceneUIFilePathList);
- //璁惧鏂囦欢
- foreach (var uiName in room.DeviceUIFilePathList)
- {
- string deviceName = uiName.Replace("DeviceUI_", string.Empty);
- listRoomFile.Add(deviceName);
- }
- return null;
+ return true;
}
#endregion
@@ -468,6 +480,10 @@
//鑾峰彇涓婁紶鐨勬枃浠�,鐒跺悗灏嗘枃浠跺鍒跺埌鎸囧畾鏂囦欢澶�
var listFile = this.GetUploadListFile(ref roomTemp, listDevice, listScene, listChirdDevice, listChirdScene);
+ //涓嶅厑璁告寜绯荤粺鐨勮繑鍥為敭
+ Shared.Common.CommonPage.BackKeyCanClick = false;
+ UserCenterResourse.Option.AppCanSignout = false;
+
//鎵撳紑杩涘害鏉�
ProgressBar.Show();
//璁剧疆鏈�澶у��
@@ -477,6 +493,10 @@
//鍏抽棴杩涘害鏉�
ProgressBar.Close();
+ //鍏佽鎸夌郴缁熺殑杩斿洖閿�
+ Shared.Common.CommonPage.BackKeyCanClick = true;
+ UserCenterResourse.Option.AppCanSignout = true;
+
if (result == false)
{
//鎭㈠鍘熸暟鎹�
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
index a6b048b..04a1926 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs
@@ -534,7 +534,7 @@
/// <param name="all">true:鍏ㄩ儴鍒犻櫎(鐢ㄤ簬浣忓畢鍒犻櫎) false:閲嶈鐨勬枃浠朵笉鍒犻櫎</param>
public static void DeleteAllLocationFile(bool all = true)
{
- string dPath = UserCenterResourse.LocalRootPath;
+ string dPath = Config.Instance.FullPath;
if (System.IO.Directory.Exists(dPath) == false)
{
return;
@@ -596,7 +596,7 @@
/// <param name="noticeDb">鏄惁閫氱煡浜戠</param>
public static void ReLoginAgain(string account = "", bool noticeDb = true)
{
- UserCenterResourse.oldAccountId = string.Empty;
+ UserCenterResourse.Option.OldAccountId = string.Empty;
//鍏抽棴鎵�鏈夋帴鏀�
HdlDeviceAttributeLogic.Current.RemoveAllEvent();
//娓呴櫎鍗囩骇鍒楄〃
@@ -606,7 +606,7 @@
HdlThreadLogic.Current.RunThread(async () =>
{
//妫�娴婣PP鏄惁鑳藉閫�鍑�
- while (UserCenterResourse.AppCanSignout == false)
+ while (UserCenterResourse.Option.AppCanSignout == false)
{
await Task.Delay(500);
}
@@ -716,7 +716,7 @@
/// <returns></returns>
public static string CombinePath(params object[] listNames)
{
- string rootPath = UserCenterResourse.LocalRootPath;
+ string rootPath = Config.Instance.FullPath;
if (listNames == null || listNames.Length == 0)
{
return rootPath;
@@ -787,22 +787,20 @@
public async static Task<bool> InitUserCenterMenmoryAndThread()
{
//APP缂撳瓨鍔犺浇寮�濮�
- UserCenterResourse.AppCanSignout = false;
+ UserCenterResourse.Option.AppCanSignout = false;
//寮哄埗鎸囧畾涓嶅叧闂繘搴︽潯
ProgressBar.SetCloseBarFlag(true);
//鍙湁鍦ㄤ綇瀹匢D涓嶄竴鏍风殑鏃跺�欐墠鍋氳繖涓搷浣�
- if (Common.Config.Instance.HomeId != UserCenterResourse.oldHomeStringId
- || Common.Config.Instance.Account != UserCenterResourse.oldAccountId)
+ if (Common.Config.Instance.HomeId != UserCenterResourse.Option.OldHomeStringId
+ || Common.Config.Instance.Account != UserCenterResourse.Option.OldAccountId)
{
- //鍙樻洿鏍圭洰褰曡矾寰�
- UserCenterResourse.LocalRootPath = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, Config.Instance.Home.Id);
- UserCenterResourse.UserPictruePath = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, DirNameResourse.UserPictrueDirectory);
-
//鍔犺浇璐﹀彿閰嶇疆淇℃伅
var optionInfo = UserCenterResourse.Option.Load();
UserCenterResourse.Option = optionInfo;
+ //鍙樻洿鏍圭敤鎴峰浘鐗囩洰褰曡矾寰�
+ UserCenterResourse.Option.UserPictruePath = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Config.Instance.Guid, DirNameResourse.UserPictrueDirectory);
//鍒濆鍖栫櫥闄嗚处鍙风殑淇℃伅
await InitUserAccoutInfo();
@@ -828,8 +826,8 @@
//淇濆瓨鐢ㄦ埛鐨勭櫥闄嗕俊鎭埌鏈湴
SaveUserInformationToLocation();
- UserCenterResourse.oldHomeStringId = Common.Config.Instance.HomeId;
- UserCenterResourse.oldAccountId = Common.Config.Instance.Account;
+ UserCenterResourse.Option.OldHomeStringId = Common.Config.Instance.HomeId;
+ UserCenterResourse.Option.OldAccountId = Common.Config.Instance.Account;
//鍚屾鏁版嵁(浜屾璋冪敤娌″叧绯�)
var result = await HdlAutoBackupLogic.SynchronizeDbAutoBackupData();
@@ -862,7 +860,7 @@
//鎭㈠鍙叧闂繘搴︽潯
ProgressBar.SetCloseBarFlag(false);
//APP缂撳瓨鍔犺浇瀹屾垚
- UserCenterResourse.AppCanSignout = true;
+ UserCenterResourse.Option.AppCanSignout = true;
return true;
}
@@ -879,7 +877,7 @@
{
//鑾峰彇鏈湴璁板綍鐨勭敤鎴蜂俊鎭�
UserCenterResourse.UserInfo = GetUserInformationFromLocation();
- UserCenterResourse.UserInfo.UserIconFile = System.IO.Path.Combine(UserCenterResourse.UserPictruePath, "Admin.png");
+ UserCenterResourse.UserInfo.UserIconFile = System.IO.Path.Combine(UserCenterResourse.Option.UserPictruePath, "Admin.png");
//鑾峰彇鐧诲綍璐﹀彿鐨勪俊鎭�
var pra = new AccountInfoPra();
@@ -950,7 +948,7 @@
}
UserCenterResourse.UserInfo = userInfo;
- UserCenterResourse.UserInfo.UserIconFile = System.IO.Path.Combine(UserCenterResourse.UserPictruePath, "Admin.png");
+ UserCenterResourse.UserInfo.UserIconFile = System.IO.Path.Combine(UserCenterResourse.Option.UserPictruePath, "Admin.png");
//鍒濆鍖栫鐞嗗憳鎺у埗涓讳汉鐨勮繛鎺ュ湴鍧�(鍥犱负杩欎釜杩炴帴Token鏄笉浼氭敼鍙樼殑,鎵�浠ュ彧闇�瑕佸垵濮嬪寲涓�娆�)
await InitAdminConnectMainInfo();
@@ -989,7 +987,7 @@
{
return;
}
- string nowFile = System.IO.Path.Combine(UserCenterResourse.UserPictruePath, "Admin.png");
+ string nowFile = System.IO.Path.Combine(UserCenterResourse.Option.UserPictruePath, "Admin.png");
if (System.IO.File.Exists(nowFile) == true)
{
return;
@@ -1155,9 +1153,9 @@
Global.CreateEmptyDirectory(directory);
//鐢ㄦ埛鍥剧墖鐩綍璺緞銆愭枃浠跺す銆�
- if (!System.IO.Directory.Exists(UserCenterResourse.UserPictruePath))
+ if (!System.IO.Directory.Exists(UserCenterResourse.Option.UserPictruePath))
{
- System.IO.Directory.CreateDirectory(UserCenterResourse.UserPictruePath);
+ System.IO.Directory.CreateDirectory(UserCenterResourse.Option.UserPictruePath);
}
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs
index fd3af7f..8fc9f88 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Resourse/UserCenterResourse.cs
@@ -14,15 +14,7 @@
/// 鐢婚潰鎵撳紑鏃讹紝浼氳嚜鍔ㄨ拷鍑伙紝鐢婚潰鍏抽棴鏃讹紝鑷姩绉婚櫎銆�
/// Key:鐢婚潰鐨処D锛屽垪濡傦細UserMainForm
/// </summary>
- public static Dictionary<string, CommonFormBase> DicActionForm = new Dictionary<string, CommonFormBase>();
- /// <summary>
- /// 鐢ㄦ埛鐧诲綍鐨勪俊鎭紦瀛橈紝鍒囨崲鍒颁釜浜轰腑蹇冧富鐣岄潰鏃讹紝灏变細鍒锋柊
- /// </summary>
- public static UserInformation UserInfo = new UserInformation();
- /// <summary>
- /// 璐﹀彿鐨勮缃俊鎭�
- /// </summary>
- public static AccountOption Option = new AccountOption();
+ public static Dictionary<string, CommonFormBase> DicActionForm = new Dictionary<string, CommonFormBase>();
/// <summary>
/// 鎴愬憳鍒楄〃鐨勪俊鎭�
/// </summary>
@@ -42,42 +34,14 @@
/// <summary>
/// 鎺ュ彈璁惧灞炴�у彉鏇存帹閫佺殑鐣岄潰
/// </summary>
- public static List<CommonFormBase> listDeviceAttributePushForm = new List<CommonFormBase>();
+ public static List<CommonFormBase> listDeviceAttributePushForm = new List<CommonFormBase>();
/// <summary>
- /// 鍓嶄竴娆$殑浣忓畢ID锛岃繖涓笢瑗挎槸缁橴serCenterLogic.InitUserCenterMenmoryAndThread()鐢ㄧ殑
+ /// 鐢ㄦ埛鐧诲綍鐨勪俊鎭紦瀛橈紝鍒囨崲鍒颁釜浜轰腑蹇冧富鐣岄潰鏃讹紝灏变細鍒锋柊
/// </summary>
- public static string oldHomeStringId = string.Empty;
+ public static UserInformation UserInfo = new UserInformation();
/// <summary>
- /// 鍓嶄竴娆$殑鐧诲綍璐﹀彿锛岃繖涓笢瑗挎槸缁橴serCenterLogic.InitUserCenterMenmoryAndThread()鐢ㄧ殑
- /// </summary>
- public static string oldAccountId = string.Empty;
- /// <summary>
- /// 妫�娴婣PP鏄惁鑳藉閫�鍑�
- /// </summary>
- public static bool AppCanSignout = false;
- /// <summary>
- /// 鏈湴鏍圭洰褰曡矾寰�
- /// </summary>
- public static string LocalRootPath = string.Empty;
- /// <summary>
- /// 鐢ㄦ埛鍥剧墖鐩綍璺緞
- /// </summary>
- public static string UserPictruePath = string.Empty;
- /// <summary>
- /// 瀹夐槻鎶ヨ淇℃伅璁板綍涓�澶╁唴鏈�澶х殑鎶ヨ鏁�
- /// </summary>
- public static int SafetyOnedayMaxAlarmMsgCount = 50;
- /// <summary>
- /// 瀹夐槻鎶ヨ淇℃伅璁板綍鏈�澶уぉ鏁�
- /// </summary>
- public static int SafetyMaxAlarmMsgDay = 5;
- /// <summary>
- /// 闂ㄩ攣鎶ヨ淇℃伅璁板綍涓�澶╁唴鏈�澶х殑鎶ヨ鏁�
- /// </summary>
- public static int DoorLockOnedayMaxAlarmMsgCount = 200;
- /// <summary>
- /// 闂ㄩ攣鎶ヨ淇℃伅璁板綍鏈�澶уぉ鏁�
- /// </summary>
- public static int DoorLockMaxAlarmMsgDay = 5;
+ /// 璐﹀彿鐨勮缃俊鎭�
+ /// </summary>
+ public static AccountOption Option = new AccountOption();
}
}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs
index fa6d90c..2c0eff2 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/HdlBackup/HdlManualBackUpForm.cs
@@ -411,7 +411,7 @@
{
List<string> listAllFile = Global.FileListByHomeId();
- string strroot = UserCenterResourse.LocalRootPath;
+ string strroot = Common.Config.Instance.FullPath;
string autoPath = System.IO.Path.Combine(strroot, DirNameResourse.LocalMemoryDirectory, DirNameResourse.AutoBackupDirectory);
foreach (string file in listAllFile)
{
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
index a0d45c7..8925b3c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberByIdForm.cs
@@ -84,12 +84,20 @@
var pra = new AccountInfoPra();
pra.Account = accountId;
- string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra);
+ string result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountInfo", false, pra, new System.Collections.Generic.List<string>() { "AccountNoExists" });
//鍏抽棴杩涘害鏉�
this.CloseProgressBar();
if (result == null)
{
+ //寮傚父
+ return;
+ }
+ if (result == string.Empty)
+ {
+ //鎴愬憳涓嶅瓨鍦�
+ 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
index 949b8f1..2e1e226 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberInfoForm.cs
@@ -156,7 +156,7 @@
//鎴愬憳娣诲姞鎴愬姛
var form = new AddMemberSuccessForm();
- form.AddForm(memberResult, memberInfoRes);
+ form.AddForm(memberInfoRes);
form.FormCloseEvent += (() =>
{
this.CloseForm();
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs
index c72883a..77d544c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/AddMemberSuccessForm.cs
@@ -16,13 +16,13 @@
/// </summary>
public Action FormCloseEvent = null;
/// <summary>
- /// 鎴愬憳璐﹀彿淇℃伅
- /// </summary>
- private AccountInfoResult memberAccountResult = null;
- /// <summary>
/// 鎴愬憳淇℃伅
/// </summary>
private MemberInfoRes memberResult = null;
+ /// <summary>
+ /// 娓呯┖浜嬩欢
+ /// </summary>
+ private bool clearEvent = true;
#endregion
@@ -30,12 +30,10 @@
/// <summary>
/// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
- /// </summary>
- /// <param name="i_accountInfoResult">鎴愬憳璐﹀彿淇℃伅</param>
+ /// </summary>
/// <param name="i_memberResult">鎴愬憳淇℃伅</param>
- public void ShowForm(AccountInfoResult i_accountInfoResult, MemberInfoRes i_memberResult)
+ public void ShowForm(MemberInfoRes i_memberResult)
{
- this.memberAccountResult = i_accountInfoResult;
this.memberResult = i_memberResult;
//鍒濆鍖栦腑閮ㄦ帶浠�
@@ -94,37 +92,6 @@
btnSuccess.TextSize = 20;
frame.AddChidren(btnSuccess);
- //鎴块棿閲岄潰鏈夎澶囨墠浼氭樉绀哄叡浜澶囪彍鍗�
- if (this.CheckIsCanShard() == true)
- {
- //閰嶇疆鍏变韩鍐呭
- var btnmsg = new NormalViewControl(frame.Width, Application.GetRealHeight(50), false);
- btnmsg.Y = Application.GetRealHeight(783);
- btnmsg.TextSize = 12;
- btnmsg.TextAlignment = TextAlignment.Center;
- btnmsg.TextColor = UserCenterColor.Current.TextOrangeColor;
- btnmsg.Text = Language.StringByID(R.MyInternationalizationString.uConfigureSharedContent);
- btnmsg.ButtonClickEvent += (sender, e) =>
- {
- //鍏堟竻绌哄叡浜枃浠跺す
- HdlShardLogic.Current.ClearShardDirectory();
-
- var memberInfo = new MemberShardInfoData();
- var form = new SharedContent.ConfigureNewSharedListRoomForm();
- this.AddFromAndRemoveNowForm(form, memberResult, memberInfo);
- };
- frame.AddChidren(btnmsg);
-
- //搴曠嚎
- int lineWidth = btnmsg.GetRealWidthByText(12);
- var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
- btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
- btnLine.Gravity = Gravity.CenterHorizontal;
- btnLine.Y = btnmsg.Bottom - Application.GetRealHeight(10);
- frame.AddChidren(btnLine);
-
- }
-
//瀹屾垚
var btnFinish = new BottomClickButton(688);
btnFinish.Y = Application.GetRealHeight(867);
@@ -132,28 +99,28 @@
frame.AddChidren(btnFinish);
btnFinish.ButtonClickEvent += (sender, e) =>
{
+ this.clearEvent = false;
+
this.CloseForm();
+ FormCloseEvent?.Invoke();
+ FormCloseEvent = null;
};
}
#endregion
- #region 鈻� 涓�鑸柟娉昣__________________________
+ #region 鈻� 鐣岄潰鍏抽棴___________________________
/// <summary>
- /// 妫�娴嬭兘鍚﹀垎浜�
+ /// 鐣岄潰鍏抽棴
/// </summary>
- /// <returns></returns>
- private bool CheckIsCanShard()
+ public override void CloseForm()
{
- //foreach (var room in Shared.Common.Room.Lists)
- //{
- // if (room.DeviceUIList.Count > 0)
- // {
- // return true;
- // }
- //}
- return false;
+ if (clearEvent == true)
+ {
+ FormCloseEvent = null;
+ }
+ base.CloseForm();
}
#endregion
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
index 38c4032..c013c61 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberListForm.cs
@@ -34,17 +34,17 @@
titleIcon.InitControl();
titleIcon.ButtonClickEvent += (sender, e) =>
{
- var menuContr = new TopRightMenuControl(this, 2);
+ var menuContr = new TopRightMenuControl(this, 2, 449);
//鎵弿浜岀淮鐮�
string msg1 = Language.StringByID(R.MyInternationalizationString.uScanQRcode);
- menuContr.AddRowMenu(msg1,"","", () =>
+ menuContr.AddRowMenu(msg1, "Item/ScanQRcodeIcon.png", "Item/ScanQRcodeIconSelected.png", () =>
{
var form = new AddMemberByIdForm();
form.AddForm();
});
//杈撳叆璐﹀彿
string msg2 = Language.StringByID(R.MyInternationalizationString.uInputAccount);
- menuContr.AddRowMenu(msg2,"","", () =>
+ menuContr.AddRowMenu(msg2, "Item/InputAccountIcon.png", "Item/InputAccountIconSelected.png", () =>
{
var form = new AddMemberByIdForm();
form.AddForm();
@@ -69,9 +69,6 @@
//鍒濆鍖栧垪琛ㄦ帶浠�
this.InitMemberListControl();
-
- //鎬讳箣鍏堟竻绌哄叡浜枃浠跺す鍑嗘病閿�
- HdlShardLogic.Current.ClearShardDirectory();
}
#endregion
@@ -145,8 +142,13 @@
listView.Y = frameBack.Bottom;
bodyFrameLayout.AddChidren(listView);
- //鍒濆鍖栨垚鍛樺垪琛�
- this.InitMemberList();
+ HdlThreadLogic.Current.RunMainInThread(() =>
+ {
+ //鎬讳箣鍏堟竻绌哄叡浜枃浠跺す鍑嗘病閿�
+ HdlShardLogic.Current.ClearShardDirectory();
+ //鍒濆鍖栨垚鍛樺垪琛�
+ this.InitMemberList();
+ });
}
/// <summary>
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
index da175eb..0934bee 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberManagementForm.cs
@@ -57,11 +57,11 @@
btnTopIcon = new MostRightIconControl(69, 69);
if (memberInfo.AccountType == 1)
{
- btnTopIcon.UnSelectedImagePath = "Account/HadAuthority.png";
+ btnTopIcon.UnSelectedImagePath = "Item/HadAuthority.png";
}
else
{
- btnTopIcon.UnSelectedImagePath = "Account/NotAuthority.png";
+ btnTopIcon.UnSelectedImagePath = "Item/NotAuthority.png";
}
topFrameLayout.AddChidren(btnTopIcon);
btnTopIcon.InitControl();
@@ -71,10 +71,17 @@
if (memberInfo.AccountType != 1)
{
msg = Language.StringByID(R.MyInternationalizationString.uUpSubAccountLevel);
+ if (msg.Contains("{0}") == true)
+ {
+ msg = string.Format(msg, string.IsNullOrEmpty(memberInfo.UserName) == true ? memberInfo.Account : memberInfo.UserName);
+ }
}
this.ShowMassage(ShowMsgType.Confirm, msg, () =>
{
- this.UpOrDownSubAccountLevel();
+ //浜屾瀹夊叏楠岃瘉,濡傛灉娌℃湁璁剧疆鏈�,鐩存帴璺宠繃楠岃瘉
+ HdlCheckLogic.Current.CheckSecondarySecurity(
+ () => { this.UpOrDownSubAccountLevel(); },
+ () => { this.UpOrDownSubAccountLevel(); });
});
};
}
@@ -296,11 +303,11 @@
//鍙樻洿鏉冮檺鍥炬爣
if (memberInfo.AccountType == 1)
{
- btnTopIcon.UnSelectedImagePath = "Account/HadAuthority.png";
+ btnTopIcon.UnSelectedImagePath = "Item/HadAuthority.png";
}
else
{
- btnTopIcon.UnSelectedImagePath = "Account/NotAuthority.png";
+ btnTopIcon.UnSelectedImagePath = "Item/NotAuthority.png";
}
//鍙樻洿鏉冮檺鏂囧瓧
btnAuthority.TextID = memberInfo.AccountType == 1 ? R.MyInternationalizationString.uMemberHadActionAuthority : R.MyInternationalizationString.uMember;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberNotEsixtForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberNotEsixtForm.cs
new file mode 100755
index 0000000..8108950
--- /dev/null
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Member/MemberNotEsixtForm.cs
@@ -0,0 +1,69 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Shared.Phone.UserCenter.Member
+{
+ /// <summary>
+ /// 鎴愬憳涓嶅瓨鍦ㄧ殑鏄剧ず鐣岄潰
+ /// </summary>
+ public class MemberNotEsixtForm : EditorCommonForm
+ {
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
+ /// <summary>
+ /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
+ /// </summary>
+ public void ShowForm()
+ {
+ //璁剧疆澶撮儴淇℃伅
+ base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uMemberInformation));
+
+ //鍒濆鍖栦腑閮ㄤ俊鎭�
+ this.InitMiddleFrame();
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+ /// </summary>
+ private void InitMiddleFrame()
+ {
+ //娓呯┖bodyFrame
+ this.ClearBodyFrame();
+
+ var btnPic = new PicViewControl(383, 311);
+ btnPic.UnSelectedImagePath = "Item/MemberNotEsixtPic.png";
+ btnPic.Gravity = Gravity.CenterHorizontal;
+ btnPic.Y = Application.GetRealHeight(392);
+ bodyFrameLayout.AddChidren(btnPic);
+
+ //涓嶅瓨鍦ㄨ璐︽埛锛岃閲嶆柊杈撳叆
+ var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(49), false);
+ btnMsg.TextAlignment = TextAlignment.Center;
+ btnMsg.TextColor = UserCenterColor.Current.TextGrayColor1;
+ btnMsg.TextSize = 12;
+ btnMsg.TextID = R.MyInternationalizationString.uMemberIsNotEsixtAndInputAgain;
+ btnMsg.Y = Application.GetRealHeight(870);
+ bodyFrameLayout.AddChidren(btnMsg);
+
+ //杩斿洖
+ var btnBack = new BottomClickButton(688);
+ btnBack.TextID = R.MyInternationalizationString.uGoBack;
+ bodyFrameLayout.AddChidren(btnBack);
+ btnBack.ButtonClickEvent += (sender, e) =>
+ {
+ this.CloseForm();
+ };
+ }
+
+ #endregion
+
+ #region 鈻� 涓�鑸柟娉昣__________________________
+
+ #endregion
+ }
+}
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs
index 2e74734..4486590 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Password/EditorSecondaryPasswordForm.cs
@@ -81,6 +81,7 @@
//鍒濆鍖栭獙璇佺爜鎺т欢
var btnCodeControl = new VerificationCodeControl(4);
+ btnCodeControl.SecureTextEntry = true;
btnCodeControl.Y = Application.GetRealHeight(464);
bodyFrameLayout.AddChidren(btnCodeControl);
btnCodeControl.InitControl();;
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
index df60c3a..7d95668 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/AddNewRoomForm.cs
@@ -401,11 +401,24 @@
this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName));
return false;
}
- if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.newRoom.Name) != null)
+ if (string.IsNullOrEmpty(this.floorKeys) == true)
{
- this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
- return false;
+ if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.newRoom.Name && obj.Id != this.newRoom.Id) != null)
+ {
+ this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
+ return false;
+ }
}
+ else
+ {
+ var listRoom = Common.Room.CurrentRoom.GetFloorSortRoom(this.floorKeys);
+ if (listRoom.Find((obj) => obj.Name == this.newRoom.Name && obj.Id != this.newRoom.Id) != null)
+ {
+ this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
+ return false;
+ }
+ }
+
if (newRoom.BackgroundImageType == 1 || newRoom.BackgroundImageType == 2)
{
this.newRoom.MoveBackGroundIamageFileToDirectory(newRoom.BackgroundImage, newRoom.BackgroundImage);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
index d4b328f..1b22eb0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
@@ -400,11 +400,24 @@
this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseInputRoomName));
return false;
}
- if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.cloneRoom.Name && obj.Id != this.cloneRoom.Id) != null)
+ if (string.IsNullOrEmpty(this.cloneRoom.FloorId) == true)
{
- this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
- return false;
+ if (Shared.Common.Room.Lists.Find((obj) => obj.Name == this.cloneRoom.Name && obj.Id != this.cloneRoom.Id) != null)
+ {
+ this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
+ return false;
+ }
}
+ else
+ {
+ var listRoom = Common.Room.CurrentRoom.GetFloorSortRoom(this.cloneRoom.FloorId);
+ if (listRoom.Find((obj) => obj.Name == this.cloneRoom.Name && obj.Id != this.cloneRoom.Id) != null)
+ {
+ this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.HadSameRoom));
+ return false;
+ }
+ }
+
if (cloneRoom.BackgroundImageType == 1 || cloneRoom.BackgroundImageType == 2)
{
this.cloneRoom.MoveBackGroundIamageFileToDirectory(cloneRoom.BackgroundImage, cloneRoom.BackgroundImage);
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs
index ed9afe6..fba4234 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/SharedContent/SearchConfigureSharedListRoomForm.cs
@@ -16,7 +16,7 @@
/// <summary>
/// 鍒楄〃鎺т欢
/// </summary>
- private VerticalScrolViewLayout listView = null;
+ private VerticalFrameControl listView = null;
/// <summary>
/// 鎴愬憳淇℃伅
/// </summary>
@@ -42,7 +42,7 @@
this.memberShardInfo.SubAccountDistributedMark = this.memberResult.SubAccountDistributedMark;
//璁剧疆澶撮儴淇℃伅
- base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uHadSharedContent));
+ base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uShared2));
//娣诲姞鍥炬爣
var btnAdd = new MostRightIconControl(69, 69);
@@ -56,387 +56,462 @@
btnAdd.InitControl();
//鍒濆鍖栦腑閮ㄤ俊鎭�
- //this.InitMiddleFrame();
+ this.InitMiddleFrame();
}
- ///// <summary>
- ///// 鍒濆鍖栦腑閮ㄤ俊鎭�
- ///// </summary>
- //private void InitMiddleFrame()
- //{
- // //娓呯┖bodyFrame
- // this.ClearBodyFrame();
+ /// <summary>
+ /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+ /// </summary>
+ private void InitMiddleFrame()
+ {
+ //娓呯┖bodyFrame
+ this.ClearBodyFrame();
- // //鍖哄煙鍒楄〃
- // var btnTitle = new NormalViewControl(1000, true);
- // btnTitle.X = ControlCommonResourse.XXLeft;
- // btnTitle.TextID = R.MyInternationalizationString.uAreaList;
- // btnTitle.Y = Application.GetRealHeight(30);
- // bodyFrameLayout.AddChidren(btnTitle);
+ HdlThreadLogic.Current.RunThread(async () =>
+ {
+ //鑾峰彇鎴愬憳鐨勫叡浜垪琛�
+ var result = await this.GetMemberShardContentListAndSetToLocation();
+ if (result == false)
+ {
+ return;
+ }
+ //浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃
+ this.GetMemberShardContentListFromLocal();
+ //鍒濆鍖栧尯鍩熷垪琛�
+ this.InitAreaListRow();
- // this.listView = new VerticalScrolViewLayout();
- // listView.Y = btnTitle.Bottom + Application.GetRealHeight(30);
- // listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(30) - btnTitle.Bottom;
- // bodyFrameLayout.AddChidren(listView);
-
- // HdlThreadLogic.Current.Run(async () =>
- // {
- // //鑾峰彇鎴愬憳鐨勫叡浜垪琛�(杩斿洖鏂囦欢鐨勫悕瀛楀拰涓婚敭)
- // var result = await this.GetMemberShardContentListAndSetToLocation();
- // if (result == false)
- // {
- // return;
- // }
- // //浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃
- // this.GetMemberShardContentListFromLocal();
- // //鍒濆鍖栧尯鍩熷垪琛�
- // this.InitAreaListRow();
-
- // });
- //}
+ });
+ }
#endregion
- //#region 鈻� 鍖哄煙鍒楄〃___________________________
+ #region 鈻� 鍖哄煙鍒楄〃___________________________
- ///// <summary>
- ///// 鍒濆鍖栧尯鍩熷垪琛�
- ///// </summary>
- //private void InitAreaListRow()
- //{
- // if (memberShardInfo.dicShardRoom.Count == 0)
- // {
- // Application.RunOnMainThread(() =>
- // {
- // if (bodyFrameLayout != null)
- // {
- // bodyFrameLayout.RemoveAll();
- // //璇烽厤缃叡浜澶�
- // var btnMsg = new MsgViewControl(bodyFrameLayout.Width, false);
- // btnMsg.Gravity = Gravity.CenterVertical;
- // btnMsg.TextID = R.MyInternationalizationString.uPleaseConfigureShardDeviceMsg;
- // bodyFrameLayout.AddChidren(btnMsg);
- // }
- // });
- // return;
- // }
- // foreach (var room in memberShardInfo.dicShardRoom.Values)
- // {
- // Application.RunOnMainThread(() =>
- // {
- // if (bodyFrameLayout != null)
- // {
- // this.AddRoomRow(room);
- // }
- // });
- // }
- //}
+ /// <summary>
+ /// 鍒濆鍖栧尯鍩熷垪琛�
+ /// </summary>
+ private void InitAreaListRow()
+ {
+ if (memberShardInfo.dicShardRoom.Count == 0)
+ {
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //鏄剧ず娌℃湁鍒嗕韩鏁版嵁妯″紡
+ this.ShowNotShardMode();
+ });
+ }
+ else
+ {
+ //鍚堝苟鍚屼竴妤煎眰鐨勬埧闂�
+ var dicGroup = new Dictionary<string, List<Common.Room>>();
+ foreach (var room in memberShardInfo.dicShardRoom.Values)
+ {
+ if (dicGroup.ContainsKey(room.FloorId) == false)
+ {
+ dicGroup[room.FloorId] = new List<Common.Room>();
+ }
+ dicGroup[room.FloorId].Add(room);
+ }
- ///// <summary>
- ///// 娣诲姞鎴块棿琛�
- ///// </summary>
- ///// <param name="room"></param>
- //private void AddRoomRow(Common.Room room)
- //{
- // var row = new StatuRowLayout(listView);
- // //鎴块棿鍚�
- // var btnName = new RowCenterView(false);
- // btnName.Text = room.Name;
- // row.AddChidren(btnName);
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ bodyFrameLayout.RemoveAll();
- // var btnDelete = new RowDeleteButton();
- // row.AddRightView(btnDelete);
- // btnDelete.MouseUpEventHandler += (sender, e) =>
- // {
- // //纭畾绉婚櫎璇ュ叡浜尯鍩燂紵
- // string msg = Language.StringByID(R.MyInternationalizationString.uDeleteShardAreaMsg);
- // this.ShowConfirmMsg(msg, "DoDeleteShardContentByRoom", room);
- // };
+ this.listView = new VerticalFrameControl(29);
+ listView.Height = bodyFrameLayout.Height;
+ bodyFrameLayout.AddChidren(listView);
- // row.AddRightArrow();
+ //娣诲姞鍚勮嚜妤煎眰鐨勬埧闂村垪琛�
+ foreach (var floorId in dicGroup.Keys)
+ {
+ this.AddRoomListRow(floorId, dicGroup[floorId]);
+ }
+ });
+ }
+ }
- // row.MouseUpEvent += (sender, e) =>
- // {
- // var form = new SearchConfigureSharedMainForm();
- // form.AddForm(room, memberResult, memberShardInfo);
- // };
- //}
- //#endregion
+ /// <summary>
+ /// 娣诲姞鎴块棿鍒楄〃琛�
+ /// </summary>
+ /// <param name="listRoom"></param>
+ private void AddRoomListRow(string floorId, List<Common.Room> listRoom)
+ {
+ var frameBack = new FrameListControl(29);
+ frameBack.BackgroundColor = UserCenterColor.Current.White;
+ frameBack.Height = 10;
+ this.listView.AddChidrenFrame(frameBack);
- //#region 鈻� 鍒犻櫎鍏变韩鍖哄煙_______________________
+ //妤煎眰
+ if (string.IsNullOrEmpty(floorId) == false)
+ {
+ var btnFloor = new NormalViewControl(800, 60, true);
+ btnFloor.X = ControlCommonResourse.XXLeft;
+ btnFloor.Y = Application.GetRealHeight(52);
+ btnFloor.TextColor = UserCenterColor.Current.TextColor2;
+ btnFloor.TextSize = 15;
+ frameBack.AddChidren(btnFloor);
+ if (memberShardInfo.dicShardFloor.ContainsKey(floorId) == true)
+ {
+ btnFloor.Text = memberShardInfo.dicShardFloor[floorId];
+ }
+ else
+ {
+ btnFloor.Text = "UnKnown";
+ }
+ }
- ///// <summary>
- ///// 鍒犻櫎鍏变韩鍖哄煙
- ///// </summary>
- ///// <param name="room">鎸囧畾瑕佸垹闄ょ殑鍏变韩鍖哄煙</param>
- //public void DoDeleteShardContentByRoom(Common.Room room)
- //{
- // //鑾峰彇鍏ㄩ儴璁惧
- // var listDevice = new List<CommonDevice>();
- // foreach (var deviceUi in room.DeviceUIList)
- // {
- // var device = deviceUi.CommonDevice;
- // if (device == null)
- // {
- // var byteData = HdlShardLogic.Current.GetShardFileContent(deviceUi.DeviceFileName);
- // if (byteData == null)
- // {
- // continue;
- // }
- // device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
- // }
- // listDevice.Add(device);
- // }
- // //鑾峰彇鍏ㄩ儴鍦烘櫙
- // var listScene = new List<Common.SceneUI>();
- // foreach (var sceneUi in room.SceneUIList)
- // {
- // listScene.Add(sceneUi);
- // }
+ for (int i = 0; i < listRoom.Count; i++)
+ {
+ var room = listRoom[i];
+ var frameRow = new RowLayoutControl(frameBack.rowSpace / 2);
+ frameBack.AddChidren(frameRow);
+ //鍥炬爣
+ var btnIcon = frameRow.frameTable.AddLeftIcon(81);
+ btnIcon.UnSelectedImagePath = "Item/RoomIcon.png";
+ //鍚嶇О
+ var btnName = frameRow.frameTable.AddLeftCaption(room.Name, 600);
+ btnName.TextSize = 15;
+ //鍙崇澶�
+ frameRow.frameTable.AddRightArrow();
+ if (i != listRoom.Count - 1)
+ {
+ //搴曠嚎
+ frameRow.frameTable.AddBottomLine();
+ }
+ frameRow.frameTable.ButtonClickEvent += (sender, e) =>
+ {
+ };
- // HdlThreadLogic.Current.Run(async () =>
- // {
- // //鎵ц鍒犻櫎
- // var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene);
- // if (result == true)
- // {
- // Application.RunOnMainThread(() =>
- // {
- // //閲嶆柊鍒锋柊鐣岄潰
- // this.InitMiddleFrame();
- // });
- // }
- // });
- //}
+ //鍒犻櫎
+ var btnDelete = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false);
+ btnDelete.BackgroundColor = 0xfff75858;
+ btnDelete.TextSize = 12;
+ btnDelete.TextColor = UserCenterColor.Current.White;
+ btnDelete.TextAlignment = TextAlignment.Center;
+ btnDelete.TextID = R.MyInternationalizationString.uDelete;
+ frameRow.AddRightView(btnDelete);
+ btnDelete.ButtonClickEvent += (sender, e) =>
+ {
+ //纭鍒犻櫎鍏变韩鎴块棿锛�
+ string msg = Language.StringByID(R.MyInternationalizationString.uDeleteShardRoomMsg);
+ this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+ {
+ //鍒犻櫎鍏变韩鍖哄煙
+ this.DoDeleteShardContentByRoom(room);
+ });
+ };
+ }
+ //璋冩暣瀛愭帶浠禙rame楂樺害
+ this.listView.AdjustChidrenFrameHeight(frameBack, Application.GetRealHeight(29));
+ }
+ #endregion
- //#endregion
+ #region 鈻� 鍒犻櫎鍏变韩鍖哄煙_______________________
- //#region 鈻� 鑾峰彇鎴愬憳鍏变韩鍒楄〃___________________
+ /// <summary>
+ /// 鍒犻櫎鍏变韩鍖哄煙
+ /// </summary>
+ /// <param name="room">鎸囧畾瑕佸垹闄ょ殑鍏变韩鍖哄煙</param>
+ public void DoDeleteShardContentByRoom(Common.Room room)
+ {
+ //鑾峰彇鍏ㄩ儴璁惧
+ var listDevice = new List<CommonDevice>();
+ foreach (var deviceUi in room.DeviceUIList)
+ {
+ var device = deviceUi.CommonDevice;
+ if (device == null)
+ {
+ string deviceFile = deviceUi.FileName.Replace("DeviceUI_", string.Empty);
+ var byteData = HdlShardLogic.Current.GetShardFileContent(deviceFile);
+ if (byteData == null)
+ {
+ continue;
+ }
+ device = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice>(System.Text.Encoding.UTF8.GetString(byteData));
+ }
+ listDevice.Add(device);
+ }
+ //鑾峰彇鍏ㄩ儴鍦烘櫙
+ var listScene = new List<Common.SceneUI>();
+ foreach (var sceneUi in room.SceneUIList)
+ {
+ listScene.Add(sceneUi);
+ }
- ///// <summary>
- ///// 鑾峰彇鎴愬憳鍏变韩鍒楄〃鐒跺悗淇濆瓨鍒版湰鍦�
- ///// </summary>
- ///// <returns></returns>
- //private async Task<bool> GetMemberShardContentListAndSetToLocation()
- //{
- // if (this.memberShardInfo.Refresh == false)
- // {
- // return true;
- // }
- // this.memberShardInfo.Refresh = false;
+ HdlThreadLogic.Current.RunThread(async () =>
+ {
+ //鎵ц鍒犻櫎
+ var result = await HdlShardLogic.Current.DoDeleteSharedContent(memberShardInfo, room, listDevice, listScene);
+ if (result == true)
+ {
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ //閲嶆柊鍒锋柊鐣岄潰
+ this.InitMiddleFrame();
+ });
+ }
+ });
+ }
- // //寮�鍚繘搴︽潯
- // this.ShowProgressBar();
+ #endregion
- // var infoPra = new
- // {
- // DistributedMark = memberResult.SubAccountDistributedMark,
- // HouseDistributedMark = Shared.Common.Config.Instance.HomeId,
- // IsOtherAccountControl = Common.Config.Instance.isAdministrator
- // };
- // var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
- // if (result == null)
- // {
- // //鍏抽棴杩涘害鏉�
- // this.CloseProgressBar(ShowReLoadMode.YES);
- // return false;
- // }
- // var listData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ReceiveShardInfoResult>>(result);
- // //鍏堟竻绌哄叡浜枃浠跺す
- // HdlShardLogic.Current.ClearShardDirectory();
+ #region 鈻� 鑾峰彇鎴愬憳鍏变韩鍒楄〃___________________
- // var listMark = new List<string>();
- // foreach (var data in listData)
- // {
- // //鎬ц兘浼樺寲锛氬鏋滄湰鍦版嫢鏈夎繖涓枃浠剁殑璇�,鐩存帴浣跨敤閭d釜鏂囦欢
- // string fileName = data.ShareName;
- // //璁板綍璧峰畠鐨勪富閿�
- // memberShardInfo.dicAllShardKeys[fileName] = data.DistributedMark;
+ /// <summary>
+ /// 鑾峰彇鎴愬憳鍏变韩鍒楄〃鐒跺悗淇濆瓨鍒版湰鍦�
+ /// </summary>
+ /// <returns></returns>
+ private async Task<bool> GetMemberShardContentListAndSetToLocation()
+ {
+ if (this.memberShardInfo.Refresh == false)
+ {
+ return true;
+ }
+ this.memberShardInfo.Refresh = false;
- // if (fileName.StartsWith("Room_") == true || fileName.StartsWith("Scene_") == true)
- // {
- // //鎴块棿鏂囦欢鍜屽満鏅枃浠堕渶瑕侀噸鏂板弽搴忓垪鍖�
- // listMark.Add(data.DistributedMark);
- // continue;
- // }
- // if (Shared.Common.Global.IsExistsByHomeId(fileName) == true)
- // {
- // //鍏朵粬鏂囦欢鐨勮瘽锛屽鏋滄湰鍦板瓨鍦紝鍒欎互鏈湴鏂囦欢涓哄噯
- // HdlShardLogic.Current.AddShardFile(fileName);
- // continue;
- // }
- // listMark.Add(data.DistributedMark);
- // }
+ //寮�鍚繘搴︽潯
+ this.ShowProgressBar();
- // //灏嗗垎浜殑鏁版嵁瀛樺叆鏈湴,杩斿洖鐨勬槸鏂囦欢鍚嶅瓧(寮傚父鏃惰繑鍥瀗ull)
- // var listFile = await HdlShardLogic.Current.SetShardFileToLocation(listMark);
- // if (listFile == null)
- // {
- // //鍏抽棴杩涘害鏉�
- // this.CloseProgressBar(ShowReLoadMode.YES);
- // return false;
- // }
- // //鍏抽棴杩涘害鏉�
- // this.CloseProgressBar();
+ var infoPra = new
+ {
+ DistributedMark = memberResult.SubAccountDistributedMark,
+ HouseDistributedMark = Shared.Common.Config.Instance.HomeId,
+ IsOtherAccountControl = Common.Config.Instance.isAdministrator
+ };
+ var result = await UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeDataShare/GetShareDataBySubAccount", false, infoPra);
+ if (result == null)
+ {
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar(ShowReLoadMode.YES);
+ return false;
+ }
+ var listData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ReceiveShardInfoResult>>(result);
+ //鍏堟竻绌哄叡浜枃浠跺す
+ HdlShardLogic.Current.ClearShardDirectory();
- // return true;
- //}
+ var listMark = new List<string>();
+ foreach (var data in listData)
+ {
+ //鎬ц兘浼樺寲锛氬鏋滄湰鍦版嫢鏈夎繖涓枃浠剁殑璇�,鐩存帴浣跨敤閭d釜鏂囦欢
+ string fileName = data.ShareName;
+ //璁板綍璧峰畠鐨勪富閿�
+ memberShardInfo.dicAllShardKeys[fileName] = data.DistributedMark;
- ///// <summary>
- ///// 浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃
- ///// </summary>
- //private void GetMemberShardContentListFromLocal()
- //{
- // memberShardInfo.dicShardRoom = new Dictionary<string, Common.Room>();
+ if (fileName.StartsWith("Room_") == true || fileName.StartsWith("Scene_") == true)
+ {
+ //鎴块棿鏂囦欢鍜屽満鏅枃浠堕渶瑕侀噸鏂板弽搴忓垪鍖�
+ listMark.Add(data.DistributedMark);
+ continue;
+ }
+ if (Shared.Common.Global.IsExistsByHomeId(fileName) == true)
+ {
+ //鍏朵粬鏂囦欢鐨勮瘽锛屽鏋滄湰鍦板瓨鍦紝鍒欎互鏈湴鏂囦欢涓哄噯
+ HdlShardLogic.Current.AddShardFile(fileName);
+ continue;
+ }
+ listMark.Add(data.DistributedMark);
+ }
- // var listFile = HdlShardLogic.Current.GetLocalAllShardFile();
- // foreach (string fileName in listFile)
- // {
- // if (fileName.StartsWith("Room_") == true)
- // {
- // var byteData = HdlShardLogic.Current.GetShardFileContent(fileName);
- // if (byteData == null)
- // {
- // continue;
- // }
- // string valueData = System.Text.Encoding.UTF8.GetString(byteData);
- // var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Room>(valueData);
- // memberShardInfo.dicShardRoom[fileName] = roomTemp;
+ //灏嗗垎浜殑鏁版嵁瀛樺叆鏈湴,杩斿洖鐨勬槸鏂囦欢鍚嶅瓧(寮傚父鏃惰繑鍥瀗ull)
+ var listFile = await HdlShardLogic.Current.SetShardFileToLocation(listMark);
+ if (listFile == null)
+ {
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar(ShowReLoadMode.YES);
+ return false;
+ }
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar();
- // if (memberShardInfo.dicAllMemberShard.ContainsKey(fileName) == false)
- // {
- // //鍏堝垵濮嬪寲鎴块棿
- // memberShardInfo.dicAllMemberShard[fileName] = new HashSet<string>();
- // }
- // }
- // }
- // //璁剧疆鎴块棿閲岄潰璁惧鐨刄I瀵硅薄(鍥犱负杩欎釜涓滆タ鏄弽搴忓垪鍖栧嚭鏉ョ殑,璁惧UI瀵硅薄鏄笉搴忓垪鍖栧璞�)
- // this.InitRoomAttributeData();
- //}
+ return true;
+ }
- ///// <summary>
- ///// 鍒濆鍖栨埧闂寸殑灞炴�у璞″叏閮ㄧ殑鏈湴鏂囦欢
- ///// </summary>
- //private void InitRoomAttributeData()
- //{
- // //璁剧疆鎴块棿閲岄潰璁惧鐨刄I瀵硅薄(鍥犱负杩欎釜涓滆タ鏄弽搴忓垪鍖栧嚭鏉ョ殑,璁惧UI瀵硅薄鏄笉搴忓垪鍖栧璞�)
- // foreach (var tempRoom in memberShardInfo.dicShardRoom.Values)
- // {
- // var listShard = memberShardInfo.dicAllMemberShard[tempRoom.FileName];
- // listShard.Clear();
- // //娣诲姞鎴块棿
- // listShard.Add(tempRoom.FileName);
+ /// <summary>
+ /// 浠庢湰鍦拌幏鍙栨垚鍛樼殑鍒嗕韩鍒楄〃
+ /// </summary>
+ private void GetMemberShardContentListFromLocal()
+ {
+ memberShardInfo.dicShardRoom = new Dictionary<string, Common.Room>();
- // //杩樺師UI璁惧瀵硅薄
- // tempRoom.DeviceUIList.Clear();
- // foreach (string uiPath in tempRoom.DeviceUIFilePathList)
- // {
- // var byteData = HdlShardLogic.Current.GetShardFileContent(uiPath);
- // if (byteData == null)
- // {
- // continue;
- // }
- // string valueData = System.Text.Encoding.UTF8.GetString(byteData);
- // var tempUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.DeviceUI>(valueData);
- // tempRoom.DeviceUIList.Add(tempUi);
+ var listFile = HdlShardLogic.Current.GetLocalAllShardFile();
+ //璁惧鏂囦欢(鍒嗕韩鐨�,鑰屼笉鏄湰鍦扮殑)
+ var dicDeviceFile = new Dictionary<string, string>();
+ //鍏堝垵濮嬪寲鎴块棿
+ foreach (string fileName in listFile)
+ {
+ if (fileName.StartsWith("Room_") == true)
+ {
+ var byteData = HdlShardLogic.Current.GetShardFileContent(fileName);
+ if (byteData == null)
+ {
+ continue;
+ }
+ string valueData = System.Text.Encoding.UTF8.GetString(byteData);
+ var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Room>(valueData);
+ memberShardInfo.dicShardRoom[fileName] = roomTemp;
- // //璁惧UI
- // listShard.Add(tempUi.FileName);
- // //璁惧
- // listShard.Add(tempUi.DeviceFileName);
- // }
- // //杩樺師鍦烘櫙瀵硅薄
- // tempRoom.SceneUIList.Clear();
- // foreach (string uiPath in tempRoom.SceneUIFilePathList)
- // {
- // var byteData = HdlShardLogic.Current.GetShardFileContent(uiPath);
- // if (byteData == null)
- // {
- // continue;
- // }
- // string valueData = System.Text.Encoding.UTF8.GetString(byteData);
- // var tempUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(valueData);
- // tempRoom.SceneUIList.Add(tempUi);
+ if (memberShardInfo.dicAllMemberShard.ContainsKey(fileName) == false)
+ {
+ memberShardInfo.dicAllMemberShard[fileName] = new HashSet<string>();
+ }
+ }
+ else if (fileName.StartsWith("Device_") == true)
+ {
+ //璁惧鏂囦欢
+ string[] MyArry = fileName.Split(new string[] { "_" }, StringSplitOptions.RemoveEmptyEntries);
+ if (MyArry.Length == 4)
+ {
+ string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(MyArry[2], Convert.ToInt32(MyArry[3]));
+ dicDeviceFile[mainKeys] = fileName;
+ }
+ }
+ }
- // //鍦烘櫙鐨勪富閿�
- // listShard.Add(tempUi.FileName);
- // //浠庡満鏅璞¢噷闈㈣幏鍙栧叏閮ㄧ殑缁戝畾鐩爣鐨勬枃浠跺悕瀛�
- // this.GetSceneBindFileName(tempUi, ref listShard);
- // }
- // }
- //}
+ //璁剧疆鎴块棿閲岄潰璁惧鐨刄I瀵硅薄(鍥犱负杩欎釜涓滆タ鏄弽搴忓垪鍖栧嚭鏉ョ殑,璁惧UI瀵硅薄鏄笉搴忓垪鍖栧璞�)
+ foreach (var tempRoom in memberShardInfo.dicShardRoom.Values)
+ {
+ var listShard = memberShardInfo.dicAllMemberShard[tempRoom.FileName];
+ listShard.Clear();
+ //娣诲姞鎴块棿
+ listShard.Add(tempRoom.FileName);
- //#endregion
+ //杩樺師璁惧瀵硅薄
+ tempRoom.DeviceUIList.Clear();
+ foreach (string uiPath in tempRoom.DeviceUIFilePathList)
+ {
+ string deviceFile = uiPath.Replace("DeviceUI_", string.Empty);
+ if (HdlShardLogic.Current.IsFileExists(deviceFile) == false)
+ {
+ continue;
+ }
+ tempRoom.DeviceUIList.Add(Common.LocalDevice.Current.GetDeviceUI(uiPath));
+ //璁惧
+ listShard.Add(deviceFile);
+ }
+ //杩樺師鍦烘櫙瀵硅薄
+ tempRoom.SceneUIList.Clear();
+ foreach (string uiPath in tempRoom.SceneUIFilePathList)
+ {
+ var byteData = HdlShardLogic.Current.GetShardFileContent(uiPath);
+ if (byteData == null)
+ {
+ continue;
+ }
+ string valueData = System.Text.Encoding.UTF8.GetString(byteData);
+ var tempUi = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.SceneUI>(valueData);
+ tempRoom.SceneUIList.Add(tempUi);
- //#region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________
+ //鍦烘櫙鐨勪富閿�
+ listShard.Add(tempUi.FileName);
+ //浠庡満鏅璞¢噷闈㈣幏鍙栧叏閮ㄧ殑缁戝畾鐩爣鐨勬枃浠跺悕瀛�
+ this.GetSceneBindFileName(tempUi, dicDeviceFile, ref listShard);
+ }
+ }
+ }
- ///// <summary>
- ///// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
- ///// </summary>
- //public override void FormActionAgainEvent()
- //{
- // //涓嶈鍒犻櫎杩欎釜鍑芥暟
- // base.FormActionAgainEvent();
- // //閲嶆柊鍒锋柊鐣岄潰
- // this.InitMiddleFrame();
- //}
+ /// <summary>
+ /// 浠庡満鏅璞¢噷闈㈣幏鍙栧叏閮ㄧ殑缁戝畾鐩爣鐨勬枃浠跺悕瀛�
+ /// </summary>
+ /// <param name="scene">鍦烘櫙</param>
+ /// <param name="dicDeviceFile">鍒嗕韩鐨勮澶囨枃浠�</param>
+ /// <param name="listFile">鏂囦欢鍒楄〃(閲岄潰瀛樼殑鏄澶嘦I鏂囦欢鍜岃澶囨枃浠跺拰鍦烘櫙鏂囦欢)</param>
+ private void GetSceneBindFileName(Common.SceneUI scene, Dictionary<string, string> dicDeviceFile, ref HashSet<string> listFile)
+ {
+ foreach (var data in scene.AddSceneMemberDataList)
+ {
+ //璁惧
+ if (data.Type == 0)
+ {
+ var mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(data.DeviceAddr, data.Epoint);
+ if (dicDeviceFile.ContainsKey(mainKeys) == true && listFile.Contains(dicDeviceFile[mainKeys]) == false)
+ {
+ listFile.Add(dicDeviceFile[mainKeys]);
+ }
+ }
+ if (data.Type == 1)
+ {
+ var sceneTemp = new Common.SceneUI();
+ sceneTemp.Id = data.ElseScenesId;
+ if (listFile.Contains(sceneTemp.FileName))
+ {
+ listFile.Add(sceneTemp.FileName);
+ }
+ }
+ }
+ }
- //#endregion
+ #endregion
- //#region 鈻� 涓�鑸柟娉昣__________________________
+ #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________
- ///// <summary>
- ///// 浠庡満鏅璞¢噷闈㈣幏鍙栧叏閮ㄧ殑缁戝畾鐩爣鐨勬枃浠跺悕瀛�
- ///// </summary>
- ///// <param name="scene">鍦烘櫙</param>
- ///// <param name="listFile">鏂囦欢鍒楄〃(閲岄潰瀛樼殑鏄澶嘦I鏂囦欢鍜岃澶囨枃浠跺拰鍦烘櫙鏂囦欢)</param>
- //private void GetSceneBindFileName(Common.SceneUI scene, ref HashSet<string> listFile)
- //{
- // foreach (var data in scene.AddSceneMemberDataList)
- // {
- // //璁惧
- // if (data.Type == 0)
- // {
- // var device = Common.LocalDevice.Current.GetDevice(data.DeviceAddr, data.Epoint);
- // if (device != null)
- // {
- // string uiName = "DeviceUI_" + device.FilePath;
- // if (listFile.Contains(uiName) == false)
- // {
- // listFile.Add(uiName);
- // listFile.Add(device.FilePath);
- // }
- // }
- // }
- // if (data.Type == 1)
- // {
- // var sceneTemp = Common.Room.CurrentRoom.GetSceneUIBySceneId(data.ElseScenesId);
- // if (sceneTemp != null && listFile.Contains(sceneTemp.FileName))
- // {
- // listFile.Add(sceneTemp.FileName);
- // }
- // }
- // }
- //}
- //#endregion
+ /// <summary>
+ /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
+ /// </summary>
+ public override int FormActionAgainEvent()
+ {
+ //閲嶆柊鍒锋柊鐣岄潰
+ this.InitMiddleFrame();
+ return 1;
+ }
- //#region 鈻� 缁撴瀯浣揰____________________________
+ #endregion
- ///// <summary>
- ///// 鎺ユ敹鍒嗕韩鏁版嵁
- ///// </summary>
- //private class ReceiveShardInfoResult
- //{
- // /// <summary>
- // /// 鏂囦欢鍚嶅瓧
- // /// </summary>
- // public string ShareName = string.Empty;
- // /// <summary>
- // /// 涓婚敭
- // /// </summary>
- // public string DistributedMark = string.Empty;
- //}
+ #region 鈻� 涓�鑸柟娉昣__________________________
- //#endregion
+ /// <summary>
+ /// 鏄剧ず娌℃湁鍒嗕韩鏁版嵁妯″紡
+ /// </summary>
+ private void ShowNotShardMode()
+ {
+ bodyFrameLayout.RemoveAll();
+ //鍥剧墖
+ var btnPic = new PicViewControl(383, 279);
+ btnPic.Gravity = Gravity.CenterHorizontal;
+ btnPic.Y = Application.GetRealHeight(498);
+ btnPic.UnSelectedImagePath = "Item/NotShardPic.png";
+ bodyFrameLayout.AddChidren(btnPic);
+
+ //杩樻病鏈夊叡浜尯鍩熺粰鎴愬憳{0}鍙偣鍑诲彸涓婅鈥�+鈥濇坊鍔�
+ string msg = Language.StringByID(R.MyInternationalizationString.uNotShardComtentMsg);
+ string[] Arry = msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
+ var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
+ btnMsg1.Y = Application.GetRealHeight(962);
+ btnMsg1.TextAlignment = TextAlignment.Center;
+ btnMsg1.TextSize = 12;
+ btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor1;
+ btnMsg1.Text = Arry[0];
+ bodyFrameLayout.AddChidren(btnMsg1);
+ if (Arry.Length > 1)
+ {
+ var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
+ btnMsg2.Y = btnMsg1.Bottom;
+ btnMsg2.TextAlignment = TextAlignment.Center;
+ btnMsg2.TextSize = 12;
+ btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1;
+ btnMsg2.Text = Arry[1];
+ bodyFrameLayout.AddChidren(btnMsg2);
+ }
+ }
+
+ #endregion
+
+ #region 鈻� 缁撴瀯浣揰____________________________
+
+ /// <summary>
+ /// 鎺ユ敹鍒嗕韩鏁版嵁
+ /// </summary>
+ private class ReceiveShardInfoResult
+ {
+ /// <summary>
+ /// 鏂囦欢鍚嶅瓧
+ /// </summary>
+ public string ShareName = string.Empty;
+ /// <summary>
+ /// 涓婚敭
+ /// </summary>
+ public string DistributedMark = string.Empty;
+ }
+
+ #endregion
}
}
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
index 8c5ef3f..d67367f 100755
--- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -128,10 +128,10 @@
{
case DeviceType.OnOffOutput:
//寮�鍏冲姛鑳�
- if ((common as ZigBee.Device.ToggleLight).DeviceStatusReport.CluterID == 6)
+ if (common.DeviceStatusReport.CluterID == 6)
{
var onOffOutputLight = deviceUI.CommonDevice as ZigBee.Device.ToggleLight;
- onOffOutputLight.DeviceStatusReport = (common as ZigBee.Device.ToggleLight).DeviceStatusReport;
+ onOffOutputLight.DeviceStatusReport = common.DeviceStatusReport;
//璁板綍銆佹洿鏂扮姸鎬�
if (onOffOutputLight.DeviceStatusReport.AttriBute == null || onOffOutputLight.DeviceStatusReport.AttriBute.Count == 0)
@@ -149,10 +149,10 @@
case DeviceType.AirSwitch:
//寮�鍏冲姛鑳�
- if ((common as ZigBee.Device.AirSwitch).DeviceStatusReport.CluterID == 6)
+ if (common.DeviceStatusReport.CluterID == 6)
{
var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch;
- airSwitch.DeviceStatusReport = (common as ZigBee.Device.AirSwitch).DeviceStatusReport;
+ airSwitch.DeviceStatusReport = common.DeviceStatusReport;
for (int j = 0; j < frameLayout.ChildrenCount; j++)
{
var tempView = frameLayout.GetChildren(j);
@@ -175,7 +175,7 @@
}
}
//褰揅luterID=3,灏辫瘉鏄庤璁惧鍦ㄧ嚎锛岀洿鎺ユ爣璁�
- if ((common as ZigBee.Device.AirSwitch).DeviceStatusReport.CluterID == 3)
+ if (common.DeviceStatusReport.CluterID == 3)
{
var airSwitch = deviceUI.CommonDevice as AirSwitch;
airSwitch.IsOnline = 1;
@@ -197,18 +197,18 @@
break;
case DeviceType.WindowCoveringDevice:
- if ((common as Rollershade).DeviceStatusReport.CluterID == 258)
+ if (common.DeviceStatusReport.CluterID == 258)
{
- if ((common as Rollershade).DeviceStatusReport.AttriBute[0].AttributeId == 0)
+ if (common.DeviceStatusReport.AttriBute[0].AttributeId == 0)
{
//绐楀笜绫诲瀷
var rollerShade = deviceUI.CommonDevice as Rollershade;
- rollerShade.DeviceStatusReport = (common as Rollershade).DeviceStatusReport;
- rollerShade.WcdType = (common as Rollershade).DeviceStatusReport.AttriBute[0].AttriButeData;
+ rollerShade.DeviceStatusReport = common.DeviceStatusReport;
+ rollerShade.WcdType = common.DeviceStatusReport.AttriBute[0].AttriButeData;
rollerShade.LastDateTime = DateTime.Now;
}
}
- if ((common as ZigBee.Device.Rollershade).DeviceStatusReport.CluterID == 3)
+ if (common.DeviceStatusReport.CluterID == 3)
{
var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade;
rollershade.IsOnline = 1;
@@ -231,10 +231,10 @@
case DeviceType.Thermostat:
//AC鍔熻兘
- if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 513)
+ if (common.DeviceStatusReport.CluterID == 513)
{
var ac = deviceUI.CommonDevice as ZigBee.Device.AC;
- ac.DeviceStatusReport = (common as ZigBee.Device.AC).DeviceStatusReport;
+ ac.DeviceStatusReport = common.DeviceStatusReport;
var attriButeList = ac.DeviceStatusReport.AttriBute;
if (attriButeList == null || attriButeList.Count == 0)
{
@@ -297,7 +297,7 @@
}
//褰揅luterID=3,灏辫瘉鏄庤璁惧鍦ㄧ嚎锛岀洿鎺ユ爣璁�
- if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 3)
+ if (common.DeviceStatusReport.CluterID == 3)
{
var ac = deviceUI.CommonDevice as AC;
ac.IsOnline = 1;
@@ -322,10 +322,10 @@
case DeviceType.DimmableLight:
//璋冨厜鐏姛鑳�
//寮�鍏冲姛鑳�
- if ((common as DimmableLight).DeviceStatusReport.CluterID == 6)
+ if (common.DeviceStatusReport.CluterID == 6)
{
var dimmableLight = deviceUI.CommonDevice as DimmableLight;
- dimmableLight.DeviceStatusReport = (common as DimmableLight).DeviceStatusReport;
+ dimmableLight.DeviceStatusReport = common.DeviceStatusReport;
//璁板綍銆佹洿鏂扮姸鎬�
if (dimmableLight.DeviceStatusReport.AttriBute == null || dimmableLight.DeviceStatusReport.AttriBute.Count == 0)
{
@@ -339,10 +339,10 @@
}
//浜害
- if ((common as ZigBee.Device.DimmableLight).DeviceStatusReport.CluterID == 8)
+ if (common.DeviceStatusReport.CluterID == 8)
{
var dimmableLight = deviceUI.CommonDevice as ZigBee.Device.DimmableLight;
- dimmableLight.DeviceStatusReport = (common as ZigBee.Device.DimmableLight).DeviceStatusReport;
+ dimmableLight.DeviceStatusReport = common.DeviceStatusReport;
var attriButeList = dimmableLight.DeviceStatusReport.AttriBute;
if (attriButeList == null || attriButeList.Count == 0)
{
@@ -460,7 +460,7 @@
Gravity = Gravity.CenterVertical,
TextAlignment =TextAlignment.CenterLeft,
TextColor=ZigbeeColor.Current.GXCTextColor,
- Text=Config.Instance.Home.GetCurrentFloorName()
+ Text=Config.Instance.Home.GetCurrentFloorName
};
topFrameLayout.AddChidren(floorBtn);
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
index aaa7ee1..2dacd74 100755
--- a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -89,10 +89,10 @@
{
case DeviceType.OnOffOutput:
//寮�鍏冲姛鑳�
- if ((common as ZigBee.Device.ToggleLight).DeviceStatusReport.CluterID == 6)
+ if (common.DeviceStatusReport.CluterID == 6)
{
var onOffOutputLight = deviceUI.CommonDevice as ZigBee.Device.ToggleLight;
- onOffOutputLight.DeviceStatusReport = (common as ZigBee.Device.ToggleLight).DeviceStatusReport;
+ onOffOutputLight.DeviceStatusReport = common.DeviceStatusReport;
//璁板綍銆佹洿鏂扮姸鎬�
if (onOffOutputLight.DeviceStatusReport.AttriBute == null || onOffOutputLight.DeviceStatusReport.AttriBute.Count == 0)
{
@@ -103,7 +103,7 @@
onOffOutputLight.LastDateTime = DateTime.Now;
}
//褰揅luterID=3,灏辫瘉鏄庤璁惧鍦ㄧ嚎锛岀洿鎺ユ爣璁�
- if ((common as ZigBee.Device.ToggleLight).DeviceStatusReport.CluterID == 3)
+ if (common.DeviceStatusReport.CluterID == 3)
{
var onOffOutputLight = deviceUI.CommonDevice as ToggleLight;
onOffOutputLight.IsOnline = 1;
@@ -114,10 +114,10 @@
case DeviceType.AirSwitch:
//寮�鍏冲姛鑳�
- if ((common as ZigBee.Device.AirSwitch).DeviceStatusReport.CluterID == 6)
+ if (common.DeviceStatusReport.CluterID == 6)
{
var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch;
- airSwitch.DeviceStatusReport = (common as ZigBee.Device.AirSwitch).DeviceStatusReport;
+ airSwitch.DeviceStatusReport = common.DeviceStatusReport;
//璁板綍銆佹洿鏂扮姸鎬�
if (airSwitch.DeviceStatusReport.AttriBute == null || airSwitch.DeviceStatusReport.AttriBute.Count == 0)
{
@@ -129,7 +129,7 @@
}
//褰揅luterID=3,灏辫瘉鏄庤璁惧鍦ㄧ嚎锛岀洿鎺ユ爣璁�
- if ((common as ZigBee.Device.AirSwitch).DeviceStatusReport.CluterID == 3)
+ if (common.DeviceStatusReport.CluterID == 3)
{
var airSwitch = deviceUI.CommonDevice as AirSwitch;
airSwitch.IsOnline = 1;
@@ -139,10 +139,10 @@
break;
case DeviceType.WindowCoveringDevice:
- if ((common as ZigBee.Device.Rollershade).DeviceStatusReport.CluterID == 258)
+ if (common.DeviceStatusReport.CluterID == 258)
{
var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade;
- rollershade.DeviceStatusReport = (common as ZigBee.Device.Rollershade).DeviceStatusReport;
+ rollershade.DeviceStatusReport = common.DeviceStatusReport;
var attriButeList = rollershade.DeviceStatusReport.AttriBute;
if (attriButeList == null || attriButeList.Count == 0)
{
@@ -156,7 +156,7 @@
break;
}
}
- if ((common as ZigBee.Device.Rollershade).DeviceStatusReport.CluterID == 3)
+ if (common.DeviceStatusReport.CluterID == 3)
{
var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade;
rollershade.IsOnline = 1;
@@ -167,10 +167,10 @@
case DeviceType.Thermostat:
//AC鍔熻兘
- if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 513)
+ if (common.DeviceStatusReport.CluterID == 513)
{
var ac = deviceUI.CommonDevice as ZigBee.Device.AC;
- ac.DeviceStatusReport = (common as ZigBee.Device.AC).DeviceStatusReport;
+ ac.DeviceStatusReport = common.DeviceStatusReport;
var attriButeList = ac.DeviceStatusReport.AttriBute;
if (attriButeList == null || attriButeList.Count == 0)
{
@@ -213,7 +213,7 @@
}
//褰揅luterID=3,灏辫瘉鏄庤璁惧鍦ㄧ嚎锛岀洿鎺ユ爣璁�
- if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 3)
+ if (common.DeviceStatusReport.CluterID == 3)
{
var ac = deviceUI.CommonDevice as AC;
ac.IsOnline = 1;
@@ -226,10 +226,10 @@
case DeviceType.DimmableLight:
//璋冨厜鐏姛鑳�
//寮�鍏冲姛鑳�
- if ((common as ZigBee.Device.DimmableLight).DeviceStatusReport.CluterID == 6)
+ if (common.DeviceStatusReport.CluterID == 6)
{
var dimmableLight = deviceUI.CommonDevice as ZigBee.Device.DimmableLight;
- dimmableLight.DeviceStatusReport = (common as ZigBee.Device.DimmableLight).DeviceStatusReport;
+ dimmableLight.DeviceStatusReport = common.DeviceStatusReport;
//璁板綍銆佹洿鏂扮姸鎬�
if (dimmableLight.DeviceStatusReport.AttriBute == null || dimmableLight.DeviceStatusReport.AttriBute.Count == 0)
{
@@ -240,10 +240,10 @@
dimmableLight.LastDateTime = DateTime.Now;
}
//浜害
- if ((common as ZigBee.Device.DimmableLight).DeviceStatusReport.CluterID == 8)
+ if (common.DeviceStatusReport.CluterID == 8)
{
var dimmableLight = deviceUI.CommonDevice as ZigBee.Device.DimmableLight;
- dimmableLight.DeviceStatusReport = (common as ZigBee.Device.DimmableLight).DeviceStatusReport;
+ dimmableLight.DeviceStatusReport = common.DeviceStatusReport;
var attriButeList = dimmableLight.DeviceStatusReport.AttriBute;
if (attriButeList == null || attriButeList.Count == 0)
{
@@ -259,7 +259,7 @@
}
}
//褰揅luterID=3,灏辫瘉鏄庤璁惧鍦ㄧ嚎锛岀洿鎺ユ爣璁�
- if ((common as ZigBee.Device.DimmableLight).DeviceStatusReport.CluterID == 3)
+ if (common.DeviceStatusReport.CluterID == 3)
{
var dimmableLight = deviceUI.CommonDevice as DimmableLight;
dimmableLight.IsOnline = 1;
@@ -297,31 +297,31 @@
{
case DeviceType.OnOffOutput:
var onOffOutputLight = deviceUI.CommonDevice as ToggleLight;
- onOffOutputLight.IsOnline = (common as ToggleLight).IsOnline;
+ onOffOutputLight.IsOnline = common.IsOnline;
//璁板綍鍥炲鏃堕棿
onOffOutputLight.LastDateTime = DateTime.Now;
break;
case DeviceType.AirSwitch:
var airSwitch = deviceUI.CommonDevice as AirSwitch;
- airSwitch.IsOnline = (common as AirSwitch).IsOnline;
+ airSwitch.IsOnline = common.IsOnline;
//璁板綍鍥炲鏃堕棿
airSwitch.LastDateTime = DateTime.Now;
break;
case DeviceType.WindowCoveringDevice:
var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade;
- rollershade.IsOnline = (common as Rollershade).IsOnline;
+ rollershade.IsOnline = common.IsOnline;
//璁板綍鍥炲鏃堕棿
rollershade.LastDateTime = DateTime.Now;
break;
case DeviceType.Thermostat:
var ac = deviceUI.CommonDevice as ZigBee.Device.AC;
- ac.IsOnline = (common as ZigBee.Device.AC).IsOnline;
+ ac.IsOnline = common.IsOnline;
//璁板綍鍥炲鏃堕棿
ac.LastDateTime = DateTime.Now;
break;
case DeviceType.DimmableLight:
var dimmableLight = deviceUI.CommonDevice as ZigBee.Device.DimmableLight;
- dimmableLight.IsOnline = (common as ZigBee.Device.DimmableLight).IsOnline;
+ dimmableLight.IsOnline = common.IsOnline;
//璁板綍鍥炲鏃堕棿
dimmableLight.LastDateTime = DateTime.Now;
break;
diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
index 49cb86e..469fd6f 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs
@@ -3317,7 +3317,10 @@
DefaultCommunicationTimeout = new TimeSpan(0, 0, 100),//璁剧疆瓒呮椂鏃堕棿
};
//杩滅▼閫氳杩炴帴锛岃繛鎺ヤ簯绔湇鍔″櫒
- await RemoteMqttClient.ConnectAsync(connectCloudMqttClientOptions);
+ if (RemoteMqttClient != null)
+ {
+ await RemoteMqttClient.ConnectAsync(connectCloudMqttClientOptions);
+ }
}
catch (Exception ex)
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
index d39f734..1997e16 100755
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -501,6 +501,32 @@
public readonly static int button3 = 5302;
public readonly static int button4 = 5303;
public readonly static int doyouwanttodelete = 5304;
+ public readonly static int onoff = 5305;
+ public readonly static int unattendedtime = 5306;
+ public readonly static int unattendedtime1 = 5307;
+ public readonly static int closetimeout = 5308;
+ public readonly static int closetime = 5309;
+ public readonly static int weekly = 5340;
+ public readonly static int selectweek = 5341;
+ public readonly static int doorLock = 5342;
+ public readonly static int userlist = 5343;
+ public readonly static int lockpassword = 5344;
+ public readonly static int fingerprint = 5345;
+ public readonly static int ic = 5346;
+ public readonly static int Airswitch = 5347;
+ public readonly static int createtimetext = 5348;
+ public readonly static int adddelay = 5349;
+ public readonly static int logiccool = 5350;
+ public readonly static int logicheat = 5351;
+ public readonly static int logicauto = 5352;
+ public readonly static int logicdry = 5353;
+ public readonly static int logicfanonly = 5354;
+ public readonly static int logiclow = 5355;
+ public readonly static int logicmedium = 5356;
+ public readonly static int logichigh = 5357;
+ public readonly static int logictemplate = 5358;
+ public readonly static int onlight = 5359;
+ public readonly static int offlight = 5360;
@@ -802,16 +828,27 @@
/// <summary>
/// 绉�
/// </summary>
- public static readonly int Second = 13114;
+ public const int Second = 13114;
/// <summary>
/// 鍒嗛挓
/// </summary>
- public static readonly int Minute = 13115;
+ public const int Minute = 13115;
/// <summary>
/// 灏忔椂
/// </summary>
- public static readonly int Hour = 13116;
-
+ public const int Hour = 13116;
+ /// <summary>
+ /// 鏈垎閰�
+ /// </summary>
+ public const int Unallocated = 13117;
+ /// <summary>
+ /// 鍏ㄩ��
+ /// </summary>
+ public const int AllSelect = 13118;
+ /// <summary>
+ /// 娣诲姞鍒�
+ /// </summary>
+ public const int AddTo = 13119;
#endregion
@@ -1950,7 +1987,7 @@
/// </summary>
public const int uGarrison = 15191;
/// <summary>
- /// 纭畾瑕佹巿鏉冭璐﹀彿涓轰富璐﹀彿?
+ /// 纭畾鎺堟潈銆寋0}銆嶆垚涓虹鐞嗗憳?
/// </summary>
public const int uUpSubAccountLevel = 15192;
/// <summary>
@@ -4017,6 +4054,22 @@
/// 瀛樺湪闈炴硶瀛楃銆寋0}銆�
/// </summary>
public const int uErrorFieldIsEsixt = 15773;
+ /// <summary>
+ /// 涓嶅瓨鍦ㄨ璐︽埛锛岃閲嶆柊杈撳叆
+ /// </summary>
+ public const int uMemberIsNotEsixtAndInputAgain = 15774;
+ /// <summary>
+ /// 杩斿洖
+ /// </summary>
+ public const int uGoBack = 15775;
+ /// <summary>
+ /// 杩樻病鏈夊叡浜尯鍩熺粰鎴愬憳{0}鍙偣鍑诲彸涓婅鈥�+鈥濇坊鍔�
+ /// </summary>
+ public const int uNotShardComtentMsg = 15776;
+ /// <summary>
+ /// 纭鍒犻櫎鍏变韩鎴块棿锛�
+ /// </summary>
+ public const int uDeleteShardRoomMsg = 15777;
//鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽�
/// <summary>
diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems
index 8c3c7fe..fcfb7be 100755
--- a/ZigbeeApp/Shared/Shared.projitems
+++ b/ZigbeeApp/Shared/Shared.projitems
@@ -58,11 +58,14 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\LeftIconButtonRow.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\Line.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\RoomMainView.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\RoomNoNameMainView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\RowLayoutDeleteButton.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\RowLayoutEditButton.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SceneMainView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectedStatuButton.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectFunctionView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectTime.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\SelectZone.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\CommonForm\TopFrameLayout.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Light\DimmableLightControl.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\AddLogicPage.cs" />
@@ -75,18 +78,23 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\DeviceTarget.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\EverymonthPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\EveryyearPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\IgnoreTime.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicCommunalPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicDevicePage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicIfon.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicListAutomation.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\LogicListPage.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\MemberList.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SecurityMode.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SelectedButton.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SelectedLogic.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SelectedLogicState.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SelectedLogicStatus.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\Send.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SetDeviceState.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SuperGateway.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TemplateDeviceAction.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TemplateDeviceCondition.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TemplatePage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TimePage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\TimePoint.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\WeekPage.cs" />
@@ -95,7 +103,9 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Room\RoomHumiditySetting.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Room\RoomShareSetting.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Room\RoomTemperatureSetting.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Room\UnallocatedRoom.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Abount\AbountForm.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Common\AccountOption.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\BelongAreaControl.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\InformationEditorControl.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\CompoundControls\VerificationCodeControl.cs" />
@@ -131,6 +141,7 @@
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UnLockMethod.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UserDoorLockPage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UserManagement.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Member\MemberNotEsixtForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\CheckNewPhoneForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\CheckOldPhoneForm.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Password\EditorSecondaryPasswordForm.cs" />
--
Gitblit v1.8.0