From ffdeae1a43e1539f9533f93d64089994db6c742b Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期三, 09 六月 2021 17:23:01 +0800 Subject: [PATCH] Merge branch 'tzy2' into wxr6 --- HDL-ON_Android/Assets/Language.ini | 157 + HDL_ON/HDL_ON.projitems | 21 HDL-ON_Android/Assets/Phone/PirIcon/projector.png | 0 HDL-ON_Android/Resources/drawable/unlock_def.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/adddevice.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/3.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Mute.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Screen.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/search.png | 0 HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDateSelectControl.cs | 275 + HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockAlwaysOnManagerPage.cs | 535 +++ HDL-ON_Android/Assets/Phone/VideoIcon/answer.png | 0 HDL_ON/UI/UI0-Stan/Form/AppNumPasswordSecurityForm.cs | 233 + HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/History.png | 0 HDL_ON/UI/UI0-Stan/Controls/NormalControls/NormalViewControl.cs | 12 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/More.png | 0 HDL_ON/UI/UI0-Stan/Logic/HdlCheckLogic.cs | 246 + HDL-ON_iOS/Resources/Phone/PirIcon/failed.png | 0 HDL-ON_Android/Resources/drawable/unlock_sel.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/next.png | 0 HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs | 64 HDL-ON_iOS/Resources/Phone/PirIcon/icon2.png | 0 HDL-ON_Android/Assets/Phone/Public/BatteryNot.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Redistribution.png | 0 HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs | 52 HDL-ON_Android/Assets/Phone/PirIcon/addlbuton.png | 0 HDL-ON_iOS/Resources/Phone/VideoIcon/keshiduijiang.png | 0 HDL-ON_Android/Resources/drawable/hangup.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnConnect.png | 0 HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs | 2 HDL-ON_iOS/Resources/Phone/Public/BatteryEnough.png | 0 HDL-ON_iOS/Resources/Language.ini | 158 + HDL-ON_iOS/Resources/Phone/PirIcon/right.png | 0 HDL_ON/UI/UI0-Stan/Controls/TextInputControls/TextInputDialog.cs | 238 + HDL-ON_iOS/Resources/Phone/VideoIcon/answer.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/3.png | 0 HDL-ON_iOS/Resources/Phone/VideoIcon/weiqiangji.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Delete.png | 0 HDL_ON/UI/UI0-Stan/Common/CommonClass.cs | 128 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon2.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/add.png | 0 HDL_ON/UI/UI0-Stan/Resourse/HdlControlResourse.cs | 2 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/DoorLock.png | 0 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs | 1065 ++++++ HDL-ON_Android/Resources/drawable/video_background.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Mute.png | 0 HDL-ON_Android/Assets/Phone/VideoIcon/phone.png | 0 HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs | 6 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferConfirmPage.cs | 188 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/CrearPswBackgroud.png | 0 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockHistoryInfoPage.cs | 174 + HDL-ON_iOS/Resources/Phone/PirIcon/2.png | 0 HDL-ON_iOS/Resources/Phone/Public/BatteryNot.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue1.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/left.png | 0 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection4Page.cs | 4 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/More.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/icon1.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/LockPictrue1.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/projector.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/icon1.png | 0 DLL/EZvizMonitor/Square.OkHttp3.dll | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon1.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/addlbuton.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/DoorLock.png | 0 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs | 231 + HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameRowControl.cs | 26 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue3.png | 0 HDL_ON/UI/UI0-Stan/Form/HideOptionSearchAllFile.cs | 4 HDL-ON_Android/Assets/Phone/PirIcon/del.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Shard.png | 0 HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs | 52 HDL_ON/UI/UI0-Stan/Controls/BaseControl/TextInputBase.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs | 96 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs | 68 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/LockPictrue1.png | 0 HDL-ON_iOS/Resources/Phone/VideoIcon/danyuanji.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/tv.png | 0 HDL-ON_Android/Assets/Phone/VideoIcon/menjin.png | 0 HDL-ON_Android/Resources/drawable/mic.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockManager.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Delete.png | 0 HDL_ON/UI/UI0-Stan/Controls/TextInputControls/TextInputControl.cs | 4 HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs | 68 HDL-ON_Android/Assets/Phone/PirIcon/fan.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/STB.png | 0 HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs | 25 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs | 120 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/History.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon3.png | 0 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection1Page.cs | 4 HDL-ON_Android/Assets/Phone/PirIcon/4.png | 0 HDL-ON_Android/Assets/Phone/Public/BatteryEnough.png | 0 HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs | 42 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/BindScene.png | 0 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferInputPage.cs | 265 HDL-ON_iOS/Resources/Phone/PirIcon/dvd.png | 0 HDL_ON/DAL/Server/NewAPI.cs | 32 HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs | 72 HDL-ON_Android/Assets/Phone/PirIcon/adddevice.png | 0 HDL_ON/Common/R.cs | 290 + HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Redistribution.png | 0 HDL-ON_Android/Resources/drawable/back_icon.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Shard.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/succeed.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/air.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/delbuton.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/1.png | 0 HDL-ON_iOS/HDL-ON_iOS.csproj | 27 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Screen.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/add.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue2.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/search.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/failed.png | 0 HDL-ON_Android/Resources/Resource.designer.cs | 9 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferingResidencePage.cs | 295 + HDL-ON_iOS/Resources/Phone/VideoIcon/hangup.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/left.png | 0 HDL-ON_Android/Assets/Phone/VideoIcon/keshiduijiang.png | 0 HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomMenuSelectControl.cs | 150 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs | 229 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon2.png | 0 HDL_ON/UI/UI0-Stan/Form/AppGestureSecurityForm.cs | 172 + HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue2.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/LockPictrue2.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/icon2.png | 0 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockAlwaysOnListPage.cs | 398 ++ HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs | 94 HDL-ON_iOS/Resources/Phone/PirIcon/1.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/offline.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/dropdown.png | 0 HDL-ON_Android/Resources/drawable/dialog_background.xml | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockManager.png | 0 HDL-ON_iOS/Resources/Phone/VideoIcon/phone.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/online.png | 0 HDL_ON/UI/UI2/UserPage.cs | 2 HDL-ON_iOS/Resources/Phone/PirIcon/custom.png | 0 HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemSelectControl.cs | 6 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/LockPictrue2.png | 0 HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs | 2 HDL-ON_Android/Assets/Phone/PirIcon/right.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnConnect.png | 0 HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemEditorControl.cs | 35 HDL-ON_iOS/Resources/Phone/PirIcon/stb.png | 0 HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs | 2 HDL_ON/DAL/Server/HttpServerRequest.cs | 100 HDL-ON_Android/Resources/drawable/sure_background_sel.xml | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue3.png | 0 HDL-ON_Android/Assets/Phone/VideoIcon/hangup.png | 0 HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs | 2 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockHistoryTypeScreenPage.cs | 531 +++ HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon3.png | 0 HDL-ON_Android/HDL-ON_Android.csproj | 212 + HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Connect.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/2.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue1.png | 0 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection3Page.cs | 4 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockExpireTimeSettionPage.cs | 188 + HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon1.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Voice.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/priequipment.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/del.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Connect.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/next.png | 0 HDL_ON/UI/UI0-Stan/Enum/CommonEnum.cs | 69 HDL-ON_Android/Assets/Phone/PirIcon/succeed.png | 0 HDL-ON_Android/Assets/Phone/VideoIcon/danyuanji.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/CrearPswBackgroud.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/dropdown.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/delbuton.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Editor.png | 0 HDL-ON_Android/Assets/Phone/VideoIcon/weiqiangji.png | 0 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockMethordManagerPage.cs | 713 ++++ HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Editor.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/custom.png | 0 HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomSomeDaySelectControl.cs | 176 + HDL-ON_Android/Resources/drawable/screenshot_sel.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/tv.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/online.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Hide.png | 0 HDL-ON_Android/Resources/drawable/sure_background_def.xml | 0 HDL-ON_iOS/Resources/Phone/VideoIcon/menjin.png | 0 HDL-ON_Android/Resources/drawable/screenshot_def.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/Infraredtreasure.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/Infraredtreasure.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/offline.png | 0 HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs | 5 HDL-ON_Android/Application.cs | 1 HDL-ON_Android/Assets/Phone/PirIcon/dvd.png | 0 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs | 138 HDL-ON_Android/Resources/drawable/answer.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/air.png | 0 HDL-ON_Android/Resources/drawable/tip_background.xml | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/BindScene.png | 0 HDL_ON/UI/UI0-Stan/Logic/HdlCommonLogic.cs | 433 ++ HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Voice.png | 0 HDL-ON_Android/Assets/Phone/Public/MsgIcon/TipSuccessIcon.png | 0 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferResidenceResultPage.cs | 108 HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Hide.png | 0 HDL-ON_iOS/Resources/Phone/PirIcon/4.png | 0 DLL/EZvizMonitor/Square.OkIO.dll | 0 HDL-ON_iOS/Resources/Phone/PirIcon/fan.png | 0 HDL-ON_Android/Assets/Phone/PirIcon/priequipment.png | 0 HDL_ON/UI/UI0-Stan/Controls/MessageControls/ShowMsgControl.cs | 174 HDL_ON/Common/Utlis/FloorRoomSelectPopupView.cs | 3 205 files changed, 8,474 insertions(+), 765 deletions(-) diff --git a/DLL/EZvizMonitor/Square.OkHttp3.dll b/DLL/EZvizMonitor/Square.OkHttp3.dll old mode 100755 new mode 100644 Binary files differ diff --git a/DLL/EZvizMonitor/Square.OkIO.dll b/DLL/EZvizMonitor/Square.OkIO.dll old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs index f1dd0ad..d9d098f 100644 --- a/HDL-ON_Android/Application.cs +++ b/HDL-ON_Android/Application.cs @@ -104,7 +104,6 @@ { Language.CurrentLanguage = "English"; } - //鑾峰彇鏋佸厜鎺ㄩ�両D GetJPushRegistrationID(activity); diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 1eda206..a0ef7c8 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -73,11 +73,11 @@ 72=Address 73=Floor Management 74=Room Management -75=Administrator migration +75=Admin Migration 76=Privilege Migration 77=Debugging privilege 78=The administrator is migrated to other user. -79=All of the data for the residence is migrated to new user. +79=All residence data are migrated to new user. 80=Allow the staff to visit your home remotely 81=Floor 82=Add floor @@ -546,6 +546,79 @@ 1084=1st Gear 1085=2nd Gear 1086=3rd Gear +1087=Unlock +1088=Temp. Password +1089=Connected +1090=Disconnected +1091=Generate +1092=Effective time +1093=Expire time +1094=Select time +1095=Select Date +1096=Generate +1097=Temporary password has been copied +1098=Clear Password? +1099=The expire time must be later than the effective time +1100=Unlock Method +1101=It'll synchronize with actual lock, confirm to delete? +1102=Delete +1103=Remark +1104=The remark can not be blank. +1105=Assign to +1106=Target Scene Not Exist +1107=Select Scene +1108=Unlock +1109=Always On +1110=Setting +1111=Automation +1112=Turn on "Always On" Mode +1113=Turn off "Always On" Mode +1114=Edit +1115=Always On will be off at {0} +1116=Condition +1117=Motion +1118=Always On +1119=Lock +1120=User +1121=Unlock Method +1122=Fingerprint +1123=Card +1124=Key +1125=Information +1126=Unlock +1127=Alarm +1128=Offline +1129=For first user, Please bind lock password +1130=Please enter admin password +1131=Bind Successfully +1132=Skip to personal password for unlock +1133=Skip +1134=Please draw your pattern +1135=Lock will be always on after setting, confirm to proceed +1136=Confirm +1137=Expire +1138=Always On will expire after {0} hours +1139=Please enter expire time +1140=Expire time should not be more than 72 hours +1141=Expire time should not be less than 1 hour +1142=Fail to set, please try again +1143=Fail to verify administrator ID, please log in again account +1144=Your residence is being migrated to other HDL +1145=Note: +1146=1. All of your residence data will be migrate to new user.{0}2. After migration, original member will be{0}automatically unbound from this residence.{0}3. The new account is a valid HDL one.{0}4. The account from receiver cannot be the same{0}as that from migration side. +1147=Confirm +1148=Input receiver's account +1149=Profile +1150=Confirm admin migration from {0} to {1} +1151=The account does not exist. +1152=Fail to Transfer Ownership to Yourself +1153=Terminate +1154=Transferring to User, Please Wait鈥� +1155={0} has become a residential administrator +1156=The residence data will be deleted from your account +1157=Fail to transfer +1158=Please try again + @@ -1524,6 +1597,86 @@ 1084=椋庨��1妗� 1085=椋庨��2妗� 1086=椋庨��3妗� +1087=涓�閿紑閿� +1087=Unlock +1088=涓存椂瀵嗙爜寮�閿� +1088=Temp. Password +1089=宸茶繛鎺� +1089=Connected +1090=鏈繛鎺� +1090=Disconnected +1091=鐢熸垚涓存椂瀵嗙爜 +1091=Generate +1092=鐢熸晥鏃堕棿 +1092=Effective time +1093=澶辨晥鏃堕棿 +1093= +1094=閫夋嫨鏃堕棿 +1095=閫夋嫨鏃ユ湡 +1096=Generate +1097=涓存椂瀵嗙爜宸茬粡澶嶅埗 +1098=娓呴櫎褰撳墠涓存椂瀵嗙爜锛� +1099=鐢熸晥鏃堕棿蹇呴』澶т簬澶辨晥鏃堕棿 +1100=寮�閿佹柟寮忕鐞� +1101=鍒犻櫎鎿嶄綔灏嗚鍚屾浜庡疄浣撻攣涓妠0}鏄惁杩橀渶瑕佸垹闄わ紵 +1102=纭鍒犻櫎 +1103=淇敼澶囨敞鍚嶇О +1104=澶囨敞鍚嶇О涓嶈兘涓虹┖ +1105=鍒嗛厤鑷� +1106=妫�娴嬩笉鍒板彲渚涢�夋嫨鐨勫満鏅� +1107=閫夋嫨鍦烘櫙 +1108=閿佸凡鎵撳紑 +1109=甯稿紑 +1110=鏃舵晥鎬у父寮�璁剧疆 +1111=甯稿紑鑷姩鍖� +1112=鎵撳紑甯稿紑妯″紡 +1113=鍏抽棴甯稿紑妯″紡 +1114=缂栬緫 +1115=甯稿紑妯″紡灏嗕簬{0}鍏抽棴 +1116=鏉′欢 +1117=鍔ㄤ綔 +1118=甯稿紑妯″紡 +1119=閿� +1120=鐢ㄦ埛 +1121=寮�閿佹柟寮� +1122=鎸囩汗 +1123=鍗� +1124=閽ュ寵 +1125=淇℃伅绫诲瀷 +1126=寮�閿佷俊鎭� +1127=鎶ヨ绫讳俊鎭� +1128=璁惧涓嶅湪绾� +1129=绗竴娆′娇鐢紝璇峰厛缁戝畾闂ㄩ攣瀵嗙爜 +1130=璇疯緭鍏ラ棬閿佺鐞嗗憳瀵嗙爜 +1131=闂ㄩ攣缁戝畾鎴愬姛 +1132=涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿� +1133=璺宠浆 +1134=璇风粯鍒跺浘妗� +1135=璁剧疆甯稿紑妯″紡鍚巤0}鎮ㄧ殑闂ㄩ攣灏嗗浜庢墦寮�鐘舵�亄0}鏄惁缁х画寮�鍚� +1136=纭寮�鍚� +1137=澶辨晥璁剧疆 +1138=甯稿紑妯″紡灏嗕簬{0}灏忔椂鍚庡け鏁� +1139=璇疯緭鍏ュけ鏁堟椂闂� +1140=澶辨晥鏃堕棿涓嶈兘澶т簬72灏忔椂 +1141=澶辨晥鏃堕棿涓嶈兘灏忎簬1灏忔椂 +1142=甯稿紑妯″紡鍏抽棴璁剧疆澶辨晥锛岃閲嶈瘯 +1143=绠$悊鍛樿韩浠介獙璇佸け璐�,璇烽噸鏂扮櫥褰� +1144=鎮ㄧ殑浣忓畢灏嗚繃鎴风粰鍏朵粬HDL璐﹀彿 +1145=璇锋敞鎰忥細 +1146=1.璇ヤ綇瀹呮偍鐨勬暟鎹紙浜戠鏁版嵁锛夊皢鍏ㄩ儴杞Щ缁欐柊鐨勬埛涓粄0}2.杩囨埛鍚庯紝鍘熸湁鐨勬垚鍛樺皢鑷姩瑙g粦璇ヤ綇瀹厈0}3.鏂版埛涓昏处鍙蜂负鏈夋晥鐨凥DL璐﹀彿{0}4.鎺ユ敹鏂硅处鍙蜂笌杞Щ鏂硅处鍙蜂笉鍙负鍚屼竴涓处鍙� +1147=纭杩囨埛 +1148=璇疯緭鍏ユ帴鏀舵柟璐﹀彿 +1149=涓汉璧勬枡 +1150=纭杩囨埛{0}鐨勭鐞嗗憳璐﹀彿缁欒处鍙穥1} +1151=鐩爣璐﹀彿骞朵笉瀛樺湪 +1152=涓嶈兘鑷繁杩囨埛缁欒嚜宸� +1153=缁堟 +1154=姝e湪杩囨埛缁欑敤鎴�,璇风◢鍚�... +1155=鐢ㄦ埛{0}宸茬粡鎴愪负浣忓畢琛岀鐞嗗憳 +1156=璇ヤ綇瀹呯殑淇℃伅灏嗗湪鎮ㄧ殑璐﹀彿涓垹闄� +1157=杩囨埛澶辫触 +1158=璇烽噸鏂板皾璇� + 4000=鍙瀵硅 diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/BindScene.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/BindScene.png new file mode 100644 index 0000000..73984f3 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/BindScene.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Connect.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Connect.png new file mode 100644 index 0000000..c997b80 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Connect.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/CrearPswBackgroud.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/CrearPswBackgroud.png new file mode 100644 index 0000000..89acd31 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/CrearPswBackgroud.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Delete.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Delete.png new file mode 100644 index 0000000..54feadf --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Delete.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/DoorLock.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/DoorLock.png new file mode 100644 index 0000000..fb3ce93 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/DoorLock.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Editor.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Editor.png new file mode 100644 index 0000000..40b7bf2 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Editor.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Hide.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Hide.png new file mode 100644 index 0000000..da7c1ff --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Hide.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/History.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/History.png new file mode 100644 index 0000000..7609540 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/History.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/LockPictrue1.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/LockPictrue1.png new file mode 100644 index 0000000..432dd20 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/LockPictrue1.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/LockPictrue2.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/LockPictrue2.png new file mode 100644 index 0000000..1318d0a --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/LockPictrue2.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/More.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/More.png new file mode 100644 index 0000000..f594679 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/More.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Mute.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Mute.png new file mode 100644 index 0000000..99b6161 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Mute.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon1.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon1.png new file mode 100644 index 0000000..1a57f38 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon1.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon2.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon2.png new file mode 100644 index 0000000..cc2772b --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon2.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon3.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon3.png new file mode 100644 index 0000000..468f743 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/NormallyOpenIcon3.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Redistribution.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Redistribution.png new file mode 100644 index 0000000..8d41a7f --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Redistribution.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Screen.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Screen.png new file mode 100644 index 0000000..8f157cd --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Screen.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Shard.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Shard.png new file mode 100644 index 0000000..acf5640 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Shard.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnConnect.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnConnect.png new file mode 100644 index 0000000..15fbdd4 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnConnect.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockManager.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockManager.png new file mode 100644 index 0000000..ccdfed2 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockManager.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue1.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue1.png new file mode 100644 index 0000000..31166b8 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue1.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue2.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue2.png new file mode 100644 index 0000000..4aa4888 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue2.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue3.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue3.png new file mode 100644 index 0000000..34d16f9 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/UnLockPictrue3.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Voice.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Voice.png new file mode 100644 index 0000000..b7f4449 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/DoorLock/Voice.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/1.png b/HDL-ON_Android/Assets/Phone/PirIcon/1.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/2.png b/HDL-ON_Android/Assets/Phone/PirIcon/2.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/3.png b/HDL-ON_Android/Assets/Phone/PirIcon/3.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/4.png b/HDL-ON_Android/Assets/Phone/PirIcon/4.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/Infraredtreasure.png b/HDL-ON_Android/Assets/Phone/PirIcon/Infraredtreasure.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/STB.png b/HDL-ON_Android/Assets/Phone/PirIcon/STB.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/add.png b/HDL-ON_Android/Assets/Phone/PirIcon/add.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/adddevice.png b/HDL-ON_Android/Assets/Phone/PirIcon/adddevice.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/addlbuton.png b/HDL-ON_Android/Assets/Phone/PirIcon/addlbuton.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/air.png b/HDL-ON_Android/Assets/Phone/PirIcon/air.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/custom.png b/HDL-ON_Android/Assets/Phone/PirIcon/custom.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/del.png b/HDL-ON_Android/Assets/Phone/PirIcon/del.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/delbuton.png b/HDL-ON_Android/Assets/Phone/PirIcon/delbuton.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/dropdown.png b/HDL-ON_Android/Assets/Phone/PirIcon/dropdown.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/dvd.png b/HDL-ON_Android/Assets/Phone/PirIcon/dvd.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/failed.png b/HDL-ON_Android/Assets/Phone/PirIcon/failed.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/fan.png b/HDL-ON_Android/Assets/Phone/PirIcon/fan.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/icon1.png b/HDL-ON_Android/Assets/Phone/PirIcon/icon1.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/icon2.png b/HDL-ON_Android/Assets/Phone/PirIcon/icon2.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/left.png b/HDL-ON_Android/Assets/Phone/PirIcon/left.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/next.png b/HDL-ON_Android/Assets/Phone/PirIcon/next.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/offline.png b/HDL-ON_Android/Assets/Phone/PirIcon/offline.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/online.png b/HDL-ON_Android/Assets/Phone/PirIcon/online.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/priequipment.png b/HDL-ON_Android/Assets/Phone/PirIcon/priequipment.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/projector.png b/HDL-ON_Android/Assets/Phone/PirIcon/projector.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/right.png b/HDL-ON_Android/Assets/Phone/PirIcon/right.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/search.png b/HDL-ON_Android/Assets/Phone/PirIcon/search.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/succeed.png b/HDL-ON_Android/Assets/Phone/PirIcon/succeed.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/PirIcon/tv.png b/HDL-ON_Android/Assets/Phone/PirIcon/tv.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/WeepRobot/Battery.png b/HDL-ON_Android/Assets/Phone/Public/BatteryEnough.png similarity index 100% rename from HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/WeepRobot/Battery.png rename to HDL-ON_Android/Assets/Phone/Public/BatteryEnough.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/Public/BatteryNot.png b/HDL-ON_Android/Assets/Phone/Public/BatteryNot.png new file mode 100644 index 0000000..65a7b71 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/Public/BatteryNot.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/Public/MsgIcon/TipSuccessIcon.png b/HDL-ON_Android/Assets/Phone/Public/MsgIcon/TipSuccessIcon.png new file mode 100644 index 0000000..07377e9 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/Public/MsgIcon/TipSuccessIcon.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/VideoIcon/answer.png b/HDL-ON_Android/Assets/Phone/VideoIcon/answer.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/VideoIcon/danyuanji.png b/HDL-ON_Android/Assets/Phone/VideoIcon/danyuanji.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/VideoIcon/hangup.png b/HDL-ON_Android/Assets/Phone/VideoIcon/hangup.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/VideoIcon/keshiduijiang.png b/HDL-ON_Android/Assets/Phone/VideoIcon/keshiduijiang.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/VideoIcon/menjin.png b/HDL-ON_Android/Assets/Phone/VideoIcon/menjin.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/VideoIcon/phone.png b/HDL-ON_Android/Assets/Phone/VideoIcon/phone.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/VideoIcon/weiqiangji.png b/HDL-ON_Android/Assets/Phone/VideoIcon/weiqiangji.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index 5c14bfb..783fb5d 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -255,84 +255,124 @@ </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\answer.png"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\back_icon.png"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\dialog_background.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\hangup.png"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\mic.png"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\screenshot_def.png"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\screenshot_sel.png"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\screenshot.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\sure_background_def.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\sure_background_sel.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\tip_background.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\unlock_def.png"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\unlock_sel.png"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\unlock.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\video_background.png"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\layout\activity_video_phone.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\layout\dialog_tip.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\layout\fragment_call.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\layout\fragment_monitor.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\values-zh\strings.xml"> - <SubType></SubType> - <Generator></Generator> + <SubType> + </SubType> + <Generator> + </Generator> </AndroidResource> <AndroidResource Include="Resources\drawable\launchImage.xml"> <SubType></SubType> @@ -360,19 +400,11 @@ </AndroidResource> </ItemGroup> <ItemGroup> - <Folder Include="Resources\drawable\" /> - <Folder Include="Resources\layout\" /> - <Folder Include="Assets\Phone\Intelligence\" /> - <Folder Include="Assets\Phone\DeviceIcon\" /> - <Folder Include="Other\" /> - <Folder Include="Other\JPush\" /> - <Folder Include="Assets\Phone\FunctionIcon\Electrical\WaterValve\" /> - <Folder Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\" /> - <Folder Include="Assets\Phone\PirIcon\" /> - <Folder Include="Assets\Phone\VideoIcon\" /> - <Folder Include="Assets\Phone\FunctionIcon\Energy\" /> + <AndroidAsset Include="Assets\Phone\Public\MsgIcon\TipSuccessIcon.png" /> </ItemGroup> - <ItemGroup /> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\BindScene.png" /> + </ItemGroup> <ItemGroup> <PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" /> <PackageReference Include="Xamarin.Android.Support.Core.Utils" Version="28.0.0.3" /> @@ -861,7 +893,6 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\AirCleanerThiinIcon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\WeepRobotThinIcon.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\WeepRobot\MuteSelect.png" /> - <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\WeepRobot\Battery.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\WeepRobot\ControlRight.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\WeepRobot\AreaMode.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\Electrical\WeepRobot\AutoMode.png" /> @@ -1182,6 +1213,81 @@ <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" /> <AndroidNativeLibrary Include="libs\armeabi-v7a\libjcore127.so" /> </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Connect.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Delete.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Editor.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Hide.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\More.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Mute.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\NormallyOpenIcon1.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\NormallyOpenIcon2.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Redistribution.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Screen.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Shard.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UnConnect.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UnLockManager.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\Voice.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Public\BatteryEnough.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\Public\BatteryNot.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\LockPictrue1.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\LockPictrue2.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UnLockPictrue1.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UnLockPictrue2.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\UnLockPictrue3.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\CrearPswBackgroud.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\NormallyOpenIcon3.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\History.png" /> + </ItemGroup> + <ItemGroup> + <AndroidAsset Include="Assets\Phone\FunctionIcon\DoorLock\DoorLock.png" /> + </ItemGroup> <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs index c504701..afa9ad1 100644 --- a/HDL-ON_Android/Resources/Resource.designer.cs +++ b/HDL-ON_Android/Resources/Resource.designer.cs @@ -1,10 +1,11 @@ #pragma warning disable 1591 //------------------------------------------------------------------------------ // <auto-generated> -// This code was generated by a tool. +// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� +// 杩愯鏃剁増鏈�:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋� +// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便�� // </auto-generated> //------------------------------------------------------------------------------ @@ -14,7 +15,7 @@ { - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")] public partial class Resource { diff --git a/HDL-ON_Android/Resources/drawable/answer.png b/HDL-ON_Android/Resources/drawable/answer.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Resources/drawable/back_icon.png b/HDL-ON_Android/Resources/drawable/back_icon.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Resources/drawable/dialog_background.xml b/HDL-ON_Android/Resources/drawable/dialog_background.xml old mode 100755 new mode 100644 diff --git a/HDL-ON_Android/Resources/drawable/hangup.png b/HDL-ON_Android/Resources/drawable/hangup.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Resources/drawable/mic.png b/HDL-ON_Android/Resources/drawable/mic.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Resources/drawable/screenshot_def.png b/HDL-ON_Android/Resources/drawable/screenshot_def.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Resources/drawable/screenshot_sel.png b/HDL-ON_Android/Resources/drawable/screenshot_sel.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Resources/drawable/sure_background_def.xml b/HDL-ON_Android/Resources/drawable/sure_background_def.xml old mode 100755 new mode 100644 diff --git a/HDL-ON_Android/Resources/drawable/sure_background_sel.xml b/HDL-ON_Android/Resources/drawable/sure_background_sel.xml old mode 100755 new mode 100644 diff --git a/HDL-ON_Android/Resources/drawable/tip_background.xml b/HDL-ON_Android/Resources/drawable/tip_background.xml old mode 100755 new mode 100644 diff --git a/HDL-ON_Android/Resources/drawable/unlock_def.png b/HDL-ON_Android/Resources/drawable/unlock_def.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Resources/drawable/unlock_sel.png b/HDL-ON_Android/Resources/drawable/unlock_sel.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_Android/Resources/drawable/video_background.png b/HDL-ON_Android/Resources/drawable/video_background.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index fc3a4d3..a639039 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -933,7 +933,6 @@ <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\Fan\ComfortableModeSelect.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\Fan\DialogTitleMenuGroud4.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\WeepRobot\MuteSelect.png" /> - <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\WeepRobot\Battery.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\WeepRobot\ControlRight.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\WeepRobot\AreaMode.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Electrical\WeepRobot\AutoMode.png" /> @@ -1238,6 +1237,32 @@ <BundleResource Include="Resources\Phone\FunctionIcon\Curtain\CurtainUpIcon.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Curtain\CurtainUpIconOn.png" /> <BundleResource Include="Resources\Phone\PersonalCenter\SmartSpeaker.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\Redistribution.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\DoorLock.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\LockPictrue2.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UnLockManager.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\LockPictrue1.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\NormallyOpenIcon2.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\CrearPswBackgroud.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\NormallyOpenIcon3.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\Editor.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\NormallyOpenIcon1.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\Connect.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\History.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\Screen.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\BindScene.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\Shard.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\Delete.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UnConnect.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\More.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\Mute.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\Voice.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UnLockPictrue1.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\Hide.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UnLockPictrue2.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\DoorLock\UnLockPictrue3.png" /> + <BundleResource Include="Resources\Phone\Public\BatteryEnough.png" /> + <BundleResource Include="Resources\Phone\Public\BatteryNot.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irpjt_blue.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irpjt_white.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\irstb_blue.png" /> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 1eda206..a253aa0 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -73,11 +73,11 @@ 72=Address 73=Floor Management 74=Room Management -75=Administrator migration +75=Admin Migration 76=Privilege Migration 77=Debugging privilege 78=The administrator is migrated to other user. -79=All of the data for the residence is migrated to new user. +79=All residence data are migrated to new user. 80=Allow the staff to visit your home remotely 81=Floor 82=Add floor @@ -439,6 +439,7 @@ 453=Alarm mute 454=Deployment information 455=The name can not be blank. + 456=Canvas 457=Energy consumption 458=Date @@ -546,6 +547,79 @@ 1084=1st Gear 1085=2nd Gear 1086=3rd Gear +1087=Unlock +1088=Temp. Password +1089=Connected +1090=Disconnected +1091=Generate +1092=Effective time +1093=Expire time +1094=Select time +1095=Select Date +1096=Generate +1097=Temporary password has been copied +1098=Clear Password? +1099=The expire time must be later than the effective time +1100=Unlock Method +1101=It'll synchronize with actual lock, confirm to delete? +1102=Delete +1103=Remark +1104=The remark can not be blank. +1105=Assign to +1106=Target Scene Not Exist +1107=Select Scene +1108=Unlock +1109=Always On +1110=Setting +1111=Automation +1112=Turn on "Always On" Mode +1113=Turn off "Always On" Mode +1114=Edit +1115=Always On will be off at {0} +1116=Condition +1117=Motion +1118=Always On +1119=Lock +1120=User +1121=Unlock Method +1122=Fingerprint +1123=Card +1124=Key +1125=Information +1126=Unlock +1127=Alarm +1128=Offline +1129=For first user, Please bind lock password +1130=Please enter admin password +1131=Bind Successfully +1132=Skip to personal password for unlock +1133=Skip +1134=Please draw your pattern +1135=Lock will be always on after setting, confirm to proceed +1136=Confirm +1137=Expire +1138=Always On will expire after {0} hours +1139=Please enter expire time +1140=Expire time should not be more than 72 hours +1141=Expire time should not be less than 1 hour +1142=Fail to set, please try again +1143=Fail to verify administrator ID, please log in again account +1144=Your residence is being migrated to other HDL +1145=Note: +1146=1. All of your residence data will be migrate to new user.{0}2. After migration, original member will be{0}automatically unbound from this residence.{0}3. The new account is a valid HDL one.{0}4. The account from receiver cannot be the same{0}as that from migration side. +1147=Confirm +1148=Input receiver's account +1149=Profile +1150=Confirm admin migration from {0} to {1} +1151=The account does not exist. +1152=Fail to Transfer Ownership to Yourself +1153=Terminate +1154=Transferring to User, Please Wait鈥� +1155={0} has become a residential administrator +1156=The residence data will be deleted from your account +1157=Fail to transfer +1158=Please try again + @@ -1524,6 +1598,86 @@ 1084=椋庨��1妗� 1085=椋庨��2妗� 1086=椋庨��3妗� +1087=涓�閿紑閿� +1087=Unlock +1088=涓存椂瀵嗙爜寮�閿� +1088=Temp. Password +1089=宸茶繛鎺� +1089=Connected +1090=鏈繛鎺� +1090=Disconnected +1091=鐢熸垚涓存椂瀵嗙爜 +1091=Generate +1092=鐢熸晥鏃堕棿 +1092=Effective time +1093=澶辨晥鏃堕棿 +1093= +1094=閫夋嫨鏃堕棿 +1095=閫夋嫨鏃ユ湡 +1096=Generate +1097=涓存椂瀵嗙爜宸茬粡澶嶅埗 +1098=娓呴櫎褰撳墠涓存椂瀵嗙爜锛� +1099=鐢熸晥鏃堕棿蹇呴』澶т簬澶辨晥鏃堕棿 +1100=寮�閿佹柟寮忕鐞� +1101=鍒犻櫎鎿嶄綔灏嗚鍚屾浜庡疄浣撻攣涓妠0}鏄惁杩橀渶瑕佸垹闄わ紵 +1102=纭鍒犻櫎 +1103=淇敼澶囨敞鍚嶇О +1104=澶囨敞鍚嶇О涓嶈兘涓虹┖ +1105=鍒嗛厤鑷� +1106=妫�娴嬩笉鍒板彲渚涢�夋嫨鐨勫満鏅� +1107=閫夋嫨鍦烘櫙 +1108=閿佸凡鎵撳紑 +1109=甯稿紑 +1110=鏃舵晥鎬у父寮�璁剧疆 +1111=甯稿紑鑷姩鍖� +1112=鎵撳紑甯稿紑妯″紡 +1113=鍏抽棴甯稿紑妯″紡 +1114=缂栬緫 +1115=甯稿紑妯″紡灏嗕簬{0}鍏抽棴 +1116=鏉′欢 +1117=鍔ㄤ綔 +1118=甯稿紑妯″紡 +1119=閿� +1120=鐢ㄦ埛 +1121=寮�閿佹柟寮� +1122=鎸囩汗 +1123=鍗� +1124=閽ュ寵 +1125=淇℃伅绫诲瀷 +1126=寮�閿佷俊鎭� +1127=鎶ヨ绫讳俊鎭� +1128=璁惧涓嶅湪绾� +1129=绗竴娆′娇鐢紝璇峰厛缁戝畾闂ㄩ攣瀵嗙爜 +1130=璇疯緭鍏ラ棬閿佺鐞嗗憳瀵嗙爜 +1131=闂ㄩ攣缁戝畾鎴愬姛 +1132=涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿� +1133=璺宠浆 +1134=璇风粯鍒跺浘妗� +1135=璁剧疆甯稿紑妯″紡鍚巤0}鎮ㄧ殑闂ㄩ攣灏嗗浜庢墦寮�鐘舵�亄0}鏄惁缁х画寮�鍚� +1136=纭寮�鍚� +1137=澶辨晥璁剧疆 +1138=甯稿紑妯″紡灏嗕簬{0}灏忔椂鍚庡け鏁� +1139=璇疯緭鍏ュけ鏁堟椂闂� +1140=澶辨晥鏃堕棿涓嶈兘澶т簬72灏忔椂 +1141=澶辨晥鏃堕棿涓嶈兘灏忎簬1灏忔椂 +1142=甯稿紑妯″紡鍏抽棴璁剧疆澶辨晥锛岃閲嶈瘯 +1143=绠$悊鍛樿韩浠介獙璇佸け璐�,璇烽噸鏂扮櫥褰� +1144=鎮ㄧ殑浣忓畢灏嗚繃鎴风粰鍏朵粬HDL璐﹀彿 +1145=璇锋敞鎰忥細 +1146=1.璇ヤ綇瀹呮偍鐨勬暟鎹紙浜戠鏁版嵁锛夊皢鍏ㄩ儴杞Щ缁欐柊鐨勬埛涓粄0}2.杩囨埛鍚庯紝鍘熸湁鐨勬垚鍛樺皢鑷姩瑙g粦璇ヤ綇瀹厈0}3.鏂版埛涓昏处鍙蜂负鏈夋晥鐨凥DL璐﹀彿{0}4.鎺ユ敹鏂硅处鍙蜂笌杞Щ鏂硅处鍙蜂笉鍙负鍚屼竴涓处鍙� +1147=纭杩囨埛 +1148=璇疯緭鍏ユ帴鏀舵柟璐﹀彿 +1149=涓汉璧勬枡 +1150=纭杩囨埛{0}鐨勭鐞嗗憳璐﹀彿缁欒处鍙穥1} +1151=鐩爣璐﹀彿骞朵笉瀛樺湪 +1152=涓嶈兘鑷繁杩囨埛缁欒嚜宸� +1153=缁堟 +1154=姝e湪杩囨埛缁欑敤鎴�,璇风◢鍚�... +1155=鐢ㄦ埛{0}宸茬粡鎴愪负浣忓畢琛岀鐞嗗憳 +1156=璇ヤ綇瀹呯殑淇℃伅灏嗗湪鎮ㄧ殑璐﹀彿涓垹闄� +1157=杩囨埛澶辫触 +1158=璇烽噸鏂板皾璇� + 4000=鍙瀵硅 diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/BindScene.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/BindScene.png new file mode 100644 index 0000000..73984f3 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/BindScene.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Connect.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Connect.png new file mode 100644 index 0000000..c997b80 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Connect.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/CrearPswBackgroud.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/CrearPswBackgroud.png new file mode 100644 index 0000000..89acd31 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/CrearPswBackgroud.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Delete.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Delete.png new file mode 100644 index 0000000..54feadf --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Delete.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/DoorLock.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/DoorLock.png new file mode 100644 index 0000000..fb3ce93 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/DoorLock.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Editor.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Editor.png new file mode 100644 index 0000000..40b7bf2 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Editor.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Hide.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Hide.png new file mode 100644 index 0000000..da7c1ff --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Hide.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/History.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/History.png new file mode 100644 index 0000000..7609540 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/History.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/LockPictrue1.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/LockPictrue1.png new file mode 100644 index 0000000..432dd20 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/LockPictrue1.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/LockPictrue2.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/LockPictrue2.png new file mode 100644 index 0000000..1318d0a --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/LockPictrue2.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/More.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/More.png new file mode 100644 index 0000000..f594679 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/More.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Mute.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Mute.png new file mode 100644 index 0000000..99b6161 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Mute.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon1.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon1.png new file mode 100644 index 0000000..1a57f38 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon1.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon2.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon2.png new file mode 100644 index 0000000..cc2772b --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon2.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon3.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon3.png new file mode 100644 index 0000000..468f743 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/NormallyOpenIcon3.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Redistribution.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Redistribution.png new file mode 100644 index 0000000..8d41a7f --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Redistribution.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Screen.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Screen.png new file mode 100644 index 0000000..8f157cd --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Screen.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Shard.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Shard.png new file mode 100644 index 0000000..acf5640 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Shard.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnConnect.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnConnect.png new file mode 100644 index 0000000..15fbdd4 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnConnect.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockManager.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockManager.png new file mode 100644 index 0000000..ccdfed2 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockManager.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue1.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue1.png new file mode 100644 index 0000000..31166b8 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue1.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue2.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue2.png new file mode 100644 index 0000000..4aa4888 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue2.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue3.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue3.png new file mode 100644 index 0000000..34d16f9 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/UnLockPictrue3.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Voice.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Voice.png new file mode 100644 index 0000000..b7f4449 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/DoorLock/Voice.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/1.png b/HDL-ON_iOS/Resources/Phone/PirIcon/1.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/2.png b/HDL-ON_iOS/Resources/Phone/PirIcon/2.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/3.png b/HDL-ON_iOS/Resources/Phone/PirIcon/3.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/4.png b/HDL-ON_iOS/Resources/Phone/PirIcon/4.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/Infraredtreasure.png b/HDL-ON_iOS/Resources/Phone/PirIcon/Infraredtreasure.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/add.png b/HDL-ON_iOS/Resources/Phone/PirIcon/add.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/adddevice.png b/HDL-ON_iOS/Resources/Phone/PirIcon/adddevice.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/addlbuton.png b/HDL-ON_iOS/Resources/Phone/PirIcon/addlbuton.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/air.png b/HDL-ON_iOS/Resources/Phone/PirIcon/air.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/custom.png b/HDL-ON_iOS/Resources/Phone/PirIcon/custom.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/del.png b/HDL-ON_iOS/Resources/Phone/PirIcon/del.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/delbuton.png b/HDL-ON_iOS/Resources/Phone/PirIcon/delbuton.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/dropdown.png b/HDL-ON_iOS/Resources/Phone/PirIcon/dropdown.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/dvd.png b/HDL-ON_iOS/Resources/Phone/PirIcon/dvd.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/failed.png b/HDL-ON_iOS/Resources/Phone/PirIcon/failed.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/fan.png b/HDL-ON_iOS/Resources/Phone/PirIcon/fan.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/icon1.png b/HDL-ON_iOS/Resources/Phone/PirIcon/icon1.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/icon2.png b/HDL-ON_iOS/Resources/Phone/PirIcon/icon2.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/left.png b/HDL-ON_iOS/Resources/Phone/PirIcon/left.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/next.png b/HDL-ON_iOS/Resources/Phone/PirIcon/next.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/offline.png b/HDL-ON_iOS/Resources/Phone/PirIcon/offline.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/online.png b/HDL-ON_iOS/Resources/Phone/PirIcon/online.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/priequipment.png b/HDL-ON_iOS/Resources/Phone/PirIcon/priequipment.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/projector.png b/HDL-ON_iOS/Resources/Phone/PirIcon/projector.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/right.png b/HDL-ON_iOS/Resources/Phone/PirIcon/right.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/search.png b/HDL-ON_iOS/Resources/Phone/PirIcon/search.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/stb.png b/HDL-ON_iOS/Resources/Phone/PirIcon/stb.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/succeed.png b/HDL-ON_iOS/Resources/Phone/PirIcon/succeed.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/PirIcon/tv.png b/HDL-ON_iOS/Resources/Phone/PirIcon/tv.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/WeepRobot/Battery.png b/HDL-ON_iOS/Resources/Phone/Public/BatteryEnough.png similarity index 100% rename from HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/WeepRobot/Battery.png rename to HDL-ON_iOS/Resources/Phone/Public/BatteryEnough.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/Public/BatteryNot.png b/HDL-ON_iOS/Resources/Phone/Public/BatteryNot.png new file mode 100644 index 0000000..65a7b71 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/Public/BatteryNot.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/VideoIcon/answer.png b/HDL-ON_iOS/Resources/Phone/VideoIcon/answer.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/VideoIcon/danyuanji.png b/HDL-ON_iOS/Resources/Phone/VideoIcon/danyuanji.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/VideoIcon/hangup.png b/HDL-ON_iOS/Resources/Phone/VideoIcon/hangup.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/VideoIcon/keshiduijiang.png b/HDL-ON_iOS/Resources/Phone/VideoIcon/keshiduijiang.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/VideoIcon/menjin.png b/HDL-ON_iOS/Resources/Phone/VideoIcon/menjin.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/VideoIcon/phone.png b/HDL-ON_iOS/Resources/Phone/VideoIcon/phone.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/VideoIcon/weiqiangji.png b/HDL-ON_iOS/Resources/Phone/VideoIcon/weiqiangji.png old mode 100755 new mode 100644 Binary files differ diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index 2d8e7ce..be0041a 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -881,7 +881,295 @@ /// <summary> /// 椋庨��3妗� /// </summary> - public const int FanThreeGear = 1086; + public const int FanThreeGear = 1086; + /// <summary> + /// 涓�閿紑閿� + /// </summary> + public const int OneKeyUnlocking = 1087; + /// <summary> + /// 涓存椂瀵嗙爜寮�閿� + /// </summary> + public const int TemporaryPasswordUnlocking = 1088; + /// <summary> + /// 宸茶繛鎺� + /// </summary> + public const int Connected = 1089; + /// <summary> + /// 鏈繛鎺� + /// </summary> + public const int UnConnected = 1090; + /// <summary> + /// 鐢熸垚涓存椂瀵嗙爜 + /// </summary> + public const int CreatTemporaryPassword = 1091; + /// <summary> + /// 鐢熸晥鏃堕棿 + /// </summary> + public const int EffectiveTime = 1092; + /// <summary> + /// 澶辨晥鏃堕棿 + /// </summary> + public const int FailureTime = 1093; + /// <summary> + /// 閫夋嫨鏃堕棿 + /// </summary> + public const int SelectTime = 1094; + /// <summary> + /// 閫夋嫨鏃ユ湡 + /// </summary> + public const int SelectDate = 1095; + /// <summary> + /// 鐢熸垚 + /// </summary> + public const int Generate = 1096; + /// <summary> + /// 涓存椂瀵嗙爜宸茬粡澶嶅埗 + /// </summary> + public const int TempPsswordHasBeenCopy = 1097; + /// <summary> + /// 娓呴櫎褰撳墠涓存椂瀵嗙爜锛� + /// </summary> + public const int ClearTempPsswordMsg = 1098; + /// <summary> + /// 鐢熸晥鏃堕棿蹇呴』澶т簬澶辨晥鏃堕棿 + /// </summary> + public const int EffectiveTimeMustBeOverFailureTime = 1099; + /// <summary> + /// 寮�閿佹柟寮忕鐞� + /// </summary> + public const int UnlockingManagement = 1100; + /// <summary> + /// 鍒犻櫎鎿嶄綔灏嗚鍚屾浜庡疄浣撻攣涓婃槸鍚﹁繕闇�瑕佸垹闄わ紵 + /// </summary> + public const int DeleteUnlockingMethordMsg = 1101; + /// <summary> + /// 纭鍒犻櫎 + /// </summary> + public const int ConfirmDeletion = 1102; + /// <summary> + /// 淇敼澶囨敞鍚嶇О + /// </summary> + public const int EditorRemarkName = 1103; + /// <summary> + /// 澶囨敞鍚嶇О涓嶈兘涓虹┖ + /// </summary> + public const int RemarkNameCanNotEmpty = 1104; + /// <summary> + /// 鍒嗛厤鑷� + /// </summary> + public const int AssignTo = 1105; + /// <summary> + /// 妫�娴嬩笉鍒板彲渚涢�夋嫨鐨勫満鏅� + /// </summary> + public const int NotHadCanSelectScene = 1106; + /// <summary> + /// 閫夋嫨鍦烘櫙 + /// </summary> + public const int SelectScene = 1107; + /// <summary> + /// 閿佸凡鎵撳紑 + /// </summary> + public const int LockIsOpened = 1108; + /// <summary> + /// 甯稿紑 + /// </summary> + public const int AlwaysOn = 1109; + /// <summary> + /// 鏃舵晥鎬у父寮�璁剧疆 + /// </summary> + public const int TimelyAlwaysOnSetting = 1110; + /// <summary> + /// 甯稿紑鑷姩鍖� + /// </summary> + public const int AutomationAlwaysOn = 1111; + /// <summary> + /// 鎵撳紑甯稿紑妯″紡 + /// </summary> + public const int OpenAlwaysOnModel = 1112; + /// <summary> + /// 鍏抽棴甯稿紑妯″紡 + /// </summary> + public const int CloseAlwaysOnModel = 1113; + /// <summary> + /// 缂栬緫 + /// </summary> + public const int Edit = 1114; + /// <summary> + /// 甯稿紑妯″紡灏嗕簬{0}鍏抽棴 + /// </summary> + public const int AlwaysOnWillCloseOnTime = 1115; + /// <summary> + /// 鏉′欢 + /// </summary> + public const int Condtion = 1116; + /// <summary> + /// 鍔ㄤ綔 + /// </summary> + public const int Action = 1117; + /// <summary> + /// 甯稿紑妯″紡 + /// </summary> + public const int AlwaysOnModel = 1118; + /// <summary> + /// 閿� + /// </summary> + public const int Lock = 1119; + /// <summary> + /// 鐢ㄦ埛 + /// </summary> + public const int User = 1120; + /// <summary> + /// 寮�閿佹柟寮� + /// </summary> + public const int UnlockingMode = 1121; + /// <summary> + /// 鎸囩汗 + /// </summary> + public const int Fingerprints = 1122; + /// <summary> + /// 鍗� + /// </summary> + public const int Card = 1123; + /// <summary> + /// 閽ュ寵 + /// </summary> + public const int Key = 1124; + /// <summary> + /// 淇℃伅绫诲瀷 + /// </summary> + public const int MessageType = 1125; + /// <summary> + /// 寮�閿佷俊鎭� + /// </summary> + public const int UnlockingMessage = 1126; + /// <summary> + /// 鎶ヨ绫讳俊鎭� + /// </summary> + public const int AlarmMessage = 1127; + /// <summary> + /// 璁惧涓嶅湪绾� + /// </summary> + public const int DeviceNotOnline = 1128; + /// <summary> + /// 绗竴娆′娇鐢紝璇峰厛缁戝畾闂ㄩ攣瀵嗙爜 + /// </summary> + public const int PleaseBindTheDoorPswFirst = 1129; + /// <summary> + /// 璇疯緭鍏ラ棬閿佺鐞嗗憳瀵嗙爜 + /// </summary> + public const int PleaseInputDoorAdminPassword = 1130; + /// <summary> + /// 闂ㄩ攣缁戝畾鎴愬姛 + /// </summary> + public const int BindDoorLockSuccess = 1131; + /// <summary> + /// 涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿� + /// </summary> + public const int JumpToPersonalCentetToSetPasswordMsg = 1132; + /// <summary> + /// 璺宠浆 + /// </summary> + public const int Jump = 1133; + /// <summary> + /// 璇风粯鍒跺浘妗� + /// </summary> + public const int PleaseDrawPattern = 1134; + /// <summary> + /// 璁剧疆甯稿紑妯″紡鍚巤0}鎮ㄧ殑闂ㄩ攣灏嗗浜庢墦寮�鐘舵�亄0}鏄惁缁х画寮�鍚� + /// </summary> + public const int OpenAlwayOnConfirmMsg = 1135; + /// <summary> + /// 纭寮�鍚� + /// </summary> + public const int ConfirmOpen = 1136; + /// <summary> + /// 澶辨晥璁剧疆 + /// </summary> + public const int FailTimeSeetion = 1137; + /// <summary> + /// 甯稿紑妯″紡灏嗕簬{0}灏忔椂鍚庡け鏁� + /// </summary> + public const int AlwayOnWillCloseAtTimeMsg = 1138; + /// <summary> + /// 璇疯緭鍏ュけ鏁堟椂闂� + /// </summary> + public const int PleaseInputFailTime = 1139; + /// <summary> + /// 澶辨晥鏃堕棿涓嶈兘澶т簬72灏忔椂 + /// </summary> + public const int InvalidTimeMoreThan72 = 1140; + /// <summary> + /// 澶辨晥鏃堕棿涓嶈兘灏忎簬1灏忔椂 + /// </summary> + public const int InvalidTimeLessThan1 = 1141; + /// <summary> + /// 甯稿紑妯″紡鍏抽棴璁剧疆澶辨晥锛岃閲嶈瘯 + /// </summary> + public const int AlwayOnFailTimeSettionFailMsg = 1142; + /// <summary> + /// 绠$悊鍛樿韩浠介獙璇佸け璐�,璇烽噸鏂扮櫥褰� + /// </summary> + public const int CheckAdminFailAndLoginAgain = 1143; + /// <summary> + /// 鎮ㄧ殑浣忓畢灏嗚繃鎴风粰鍏朵粬HDL璐﹀彿 + /// </summary> + public const int YourHomeWillBeTransferredToOtherAccounts = 1144; + /// <summary> + /// 璇锋敞鎰忥細 + /// </summary> + public const int Attention = 1145; + /// <summary> + /// 1.璇ヤ綇瀹呮偍鐨勬暟鎹紙浜戠鏁版嵁锛夊皢鍏ㄩ儴杞Щ缁欐柊鐨勬埛涓粄0}2.杩囨埛鍚庯紝鍘熸湁鐨勬垚鍛樺皢鑷姩瑙g粦璇ヤ綇瀹厈0}3.鏂版埛涓昏处鍙蜂负鏈夋晥鐨凥DL璐﹀彿{0}4.鎺ユ敹鏂硅处鍙蜂笌杞Щ鏂硅处鍙蜂笉鍙负鍚屼竴涓处鍙� + /// </summary> + public const int TransferreConfirmMsg1 = 1146; + /// <summary> + /// 纭杩囨埛 + /// </summary> + public const int ConfirmTransferre = 1147; + /// <summary> + /// 璇疯緭鍏ユ帴鏀舵柟璐﹀彿 + /// </summary> + public const int PleaseInputReceiverAccount = 1148; + /// <summary> + /// 涓汉璧勬枡 + /// </summary> + public const int Profile = 1149; + /// <summary> + /// 纭杩囨埛{0}鐨勭鐞嗗憳璐﹀彿缁欒处鍙穥1} + /// </summary> + public const int TransferreConfirmMsg2 = 1150; + /// <summary> + /// 鐩爣璐﹀彿骞朵笉瀛樺湪 + /// </summary> + public const int TargetAcountDoesNotExist = 1151; + /// <summary> + /// 涓嶈兘鑷繁杩囨埛缁欒嚜宸� + /// </summary> + public const int YouCannotTransferOwnershipToYourself = 1152; + /// <summary> + /// 缁堟 + /// </summary> + public const int Terminate = 1153; + /// <summary> + /// 姝e湪杩囨埛缁欑敤鎴�,璇风◢鍚�... + /// </summary> + public const int IsTransferingPleaseWaitting = 1154; + /// <summary> + /// 鐢ㄦ埛{0}宸茬粡鎴愪负浣忓畢琛岀鐞嗗憳 + /// </summary> + public const int CongratulationsXXBecomingNNAdministrator = 1155; + /// <summary> + /// 璇ヤ綇瀹呯殑淇℃伅灏嗗湪鎮ㄧ殑璐﹀彿涓垹闄� + /// </summary> + public const int ResidenceDataWillBeDeletedFromYourAccount = 1156; + /// <summary> + /// 杩囨埛澶辫触 + /// </summary> + public const int TransferFail = 1157; + /// <summary> + /// 璇烽噸鏂板皾璇� + /// </summary> + public const int PleaseTryAgain = 1158; public const int keshiduijiang = 4000; diff --git a/HDL_ON/Common/Utlis/FloorRoomSelectPopupView.cs b/HDL_ON/Common/Utlis/FloorRoomSelectPopupView.cs index e0f3720..db8e6c3 100644 --- a/HDL_ON/Common/Utlis/FloorRoomSelectPopupView.cs +++ b/HDL_ON/Common/Utlis/FloorRoomSelectPopupView.cs @@ -241,6 +241,7 @@ { //鍏ㄩ儴 btnFloorName.Text = Language.StringByID(StringId.All); + btnFloorName.Width = btnFloorName.GetTextWidth(); } //鎴块棿 else if (selectType == 3) @@ -250,6 +251,7 @@ if (roomInfo.uid == this.nowShowSelectId) { btnFloorName.Text = roomInfo.floorName + roomInfo.roomName; + btnFloorName.Width = btnFloorName.GetTextWidth(); return; } } @@ -262,6 +264,7 @@ if (floorInfo.uid == this.nowShowSelectId) { btnFloorName.Text = floorInfo.roomName; + btnFloorName.Width = btnFloorName.GetTextWidth(); } } } diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index 2e45be6..b059398 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -464,6 +464,18 @@ return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_UnbindWithAccount, requestJson).Code; } + /// <summary> + /// 鏍规嵁璐﹀彿,鑾峰彇璐﹀彿淇℃伅 + /// </summary> + /// <param name="i_account">鎸囧畾璐﹀彿</param> + /// <returns></returns> + public ResponsePackNew GetMemberInfoByAccount(string i_account) + { + var pra = new { account = i_account }; + var requestJson = HttpUtil.GetSignRequestJson(pra); + return HttpUtil.RequestHttpsPost(NewAPI.API_POST_Member_GetMemberInfoByAccount, requestJson); + } + #endregion #region 浣忓畢閮ㄥ垎 @@ -706,6 +718,24 @@ isAllowCreateScene = isAllow, }); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_Update, requestJson); + } + + /// <summary> + /// 杩囨埛 + /// </summary> + /// <param name="i_account">瀵规柟璐﹀彿</param> + /// <returns></returns> + public bool TransferResidence(string i_account) + { + var pra2 = new + { + homeId = Entity.DB_ResidenceData.Instance.CurrentRegion.id, + account = i_account + }; + var requestJson = HttpUtil.GetSignRequestJson(pra2); + var result = HttpUtil.RequestHttpsPost(NewAPI.API_Post_TransferResidence, requestJson); + + return result != null && result.Code == StateCode.SUCCESS; } #region 鏂版暟鎹垎浜� @@ -2455,6 +2485,76 @@ } #endregion + #region 鈻� 闂ㄩ攣鐩稿叧____________________________ + + /// <summary> + /// 鑾峰彇闂ㄩ攣鍘嗗彶璁板綍(鎸夋棩鏈熼檷搴�) + /// </summary> + /// <param name="i_device">璁惧瀵硅薄</param> + /// <returns></returns> + public List<Stan.DoorHistoryLog> GetDoorHistoryLogs(Function i_device) + { + //var dicPra = new Dictionary<string, object>(); + //dicPra.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + //dicPra.Add("deviceId", i_device.deviceId); + //dicPra.Add("logType", "OPEN_DOOR"); + //dicPra.Add("pageSize", "200"); + //var requestJson = HttpUtil.GetSignRequestJson(dicPra); + //var packData = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_DoorHistory, requestJson); + //if (packData.Code != StateCode.SUCCESS) + //{ + // return null; + //} + + + //娴嬭瘯 + var listLog = new List<Stan.DoorHistoryLog>(); + for (int i = 1; i <= 3; i++) + { + var logInfo = new Stan.DoorHistoryLog { StrMsg = "鐢甸噺浣庯紝璇锋洿鎹㈢數姹�" }; + logInfo.Time = new DateTime(2000, 5, 6, 10, 45, 23).AddDays(i); + listLog.Add(logInfo); + } + for (int i = 1; i <= 3; i++) + { + var logInfo = new Stan.DoorHistoryLog { StrMsg = "鐢甸噺浣庯紝璇锋洿鎹㈢數姹�" }; + logInfo.Time = new DateTime(2001, 5, 6, 10, 45, 23).AddDays(i); + listLog.Add(logInfo); + } + for (int i = 1; i <= 3; i++) + { + var logInfo = new Stan.DoorHistoryLog { StrMsg = "鐢甸噺浣庯紝璇锋洿鎹㈢數姹�" }; + logInfo.Time = new DateTime(2002, 5, 6, 10, 45, 23).AddDays(i); + listLog.Add(logInfo); + } + + //鎸夋椂闂撮檷搴� + var listSortLog = new List<Stan.DoorHistoryLog>(); + foreach (var logInfo in listLog) + { + bool canAdd = true; + for (int i = 0; i < listSortLog.Count; i++) + { + if (logInfo.Time > listSortLog[i].Time) + { + //鏃堕棿姣斿綋鍓嶇殑绱㈠紩澶�,鍒欐彃鍏ュ埌瀹冪殑鍓嶉潰 + listSortLog.Insert(i, logInfo); + canAdd = false; + break; + } + } + if (canAdd == true) + { + //鏃ユ湡鏈�灏�,鍒欐坊鍔犲埌鏈熬 + listSortLog.Add(logInfo); + } + } + //鎻愮ず + //IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code); + return listSortLog; + } + + #endregion #region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________ /// <summary> /// 鑾峰彇宸叉巿鏉冪殑闊崇鍒楄〃 diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs index c3ce296..07179a1 100644 --- a/HDL_ON/DAL/Server/NewAPI.cs +++ b/HDL_ON/DAL/Server/NewAPI.cs @@ -53,6 +53,10 @@ /// 鏇存柊涓汉淇℃伅 /// </summary> public const string API_POST_Member_UpdateMemberInfo = "/smart-footstone/member/memberInfo/updateMemberInfo"; + /// <summary> + /// 鏍规嵁璐﹀彿鑾峰彇涓汉淇℃伅 + /// </summary> + public const string API_POST_Member_GetMemberInfoByAccount = "/smart-footstone/member/memberInfo/getMemberInfoByAccount"; ///// <summary> ///// 涓婁紶澶村儚 ///// </summary> @@ -107,6 +111,11 @@ /// 鏇存敼浣忓畢鏉冮檺 /// </summary> public const string API_Post_Home_UpdateDebugPerm = "/home-wisdom/app/home/updateDebugPerm"; + /// <summary> + /// 杩囨埛 + /// </summary> + public const string API_Post_TransferResidence = "/home-wisdom/app/home/transfer"; + #endregion #region 鈻� 瀛愯处鍙� -- 娣诲姞浣忓畢鎴愬憳___________________________ @@ -634,7 +643,30 @@ public const string API_POST_FL_QRcode = "http://112.74.164.111:180/api.php/Device/setdynamicpwd"; #endregion + #region 鈻� -- 闂ㄩ攣鐩稿叧鎺ュ彛_______________________________ + /// <summary> + /// 鍒ゆ柇闂ㄩ攣鏄惁绗竴浣跨敤 + /// </summary> + public const string API_POST_DoorisFirstUse = "/home-wisdom/app/device/door/isUserBind"; + /// <summary> + /// 闂ㄩ攣绗竴娆′娇鐢ㄦ椂,缁戝畾鐨勫瘑鐮� + /// </summary> + public const string API_POST_DoorBindFirstUsePsw = "/home-wisdom/app/device/door/userBind"; + /// <summary> + /// 鑾峰彇闂ㄩ攣鎵�鏈夌殑瀵嗙爜 + /// </summary> + public const string API_POST_GetDoorAllPsw = "/home-wisdom/app/device/door/getPwds"; + /// <summary> + /// 闂ㄩ攣鍒嗛厤瀵嗙爜缁欑敤鎴� + /// </summary> + public const string API_POST_DoorAssignPswToUser = "/home-wisdom/app/device/door/pwdAllot"; + /// <summary> + /// 闂ㄩ攣鐨勫巻鍙茶褰� + /// </summary> + public const string API_POST_DoorHistory = "/home-wisdom/app/device/door/logs"; + + #endregion } ///// <summary> diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems index 6145835..4649930 100644 --- a/HDL_ON/HDL_ON.projitems +++ b/HDL_ON/HDL_ON.projitems @@ -26,8 +26,28 @@ <Compile Include="$(MSBuildThisFileDirectory)Entity\Function\Function.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Public\PublicAssmebly.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\CSS\CSS.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Common\CommonClass.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Controls\BottomControls\BottomDateSelectControl.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Controls\BottomControls\BottomMenuSelectControl.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Controls\BottomControls\BottomSomeDaySelectControl.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Controls\TextInputControls\TextInputDialog.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Form\AppGestureSecurityForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Form\AppNumPasswordSecurityForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlBluetoothAndroidLogic.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlBluetoothIOSLogic.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlCheckLogic.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI0-Stan\Logic\HdlCommonLogic.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\TransferingResidencePage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\TransferResidenceResultPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockAlwaysOnManagerPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockAlwaysOnListPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockExpireTimeSettionPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockHistoryInfoPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockHistoryTypeScreenPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockListPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockSelectTimePage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\DoorLock\DoorLockUnlockMethordManagerPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\UserPageBLL.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\UserPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\2-Classification\ClassificationPage.cs" /> @@ -441,7 +461,6 @@ <Folder Include="$(MSBuildThisFileDirectory)DAL\DriverLayer\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AboutOn\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\GetSupport\" /> - <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\Transfer\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\RoomListManage\AddRoom\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\BindingResidence\" /> <Folder Include="$(MSBuildThisFileDirectory)Common\Utlis\" /> diff --git a/HDL_ON/UI/UI0-Stan/Common/CommonClass.cs b/HDL_ON/UI/UI0-Stan/Common/CommonClass.cs new file mode 100644 index 0000000..a6e263f --- /dev/null +++ b/HDL_ON/UI/UI0-Stan/Common/CommonClass.cs @@ -0,0 +1,128 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.Stan +{ + #region 鈻� 鎴愬憳淇℃伅绫籣_________________________ + + /// <summary> + /// 鑾峰彇璐﹀彿鐨勪俊鎭殑缁撴灉 + /// </summary> + public class AccountInfoResult + { + /// <summary> + /// 璐﹀彿(濡傛灉鏄暱搴︿负0鐨勫瓧绗︿覆,鍒欎唬琛ㄨ繖涓处鍙峰湪浜戠涓嶅瓨鍦�,闇�瑕佹墜鍔ㄨ祴鍊�) + /// </summary> + public string Account = string.Empty; + /// <summary> + /// 璐﹀彿鐨刬d(搴旇鏄富閿�) + /// </summary> + public string MemberId = string.Empty; + /// <summary> + /// 鐢ㄦ埛鏄电О + /// </summary> + public string MemberName = string.Empty; + /// <summary> + /// 鍦板尯鐮� + /// </summary> + public string MemberPhonePrefix = string.Empty; + /// <summary> + /// 閭 + /// </summary> + public string MemberEmail = string.Empty; + /// <summary> + /// 鎵嬫満鍙� + /// </summary> + public string MemberPhone = string.Empty; + /// <summary> + /// 澶村儚鍦板潃 + /// </summary> + public string MemberHeadIcon = string.Empty; + } + + #endregion + + #region 鈻� 甯稿紑鑷姩鍖栦俊鎭痏____________________ + + /// <summary> + /// 甯稿紑鑷姩鍖栦俊鎭� + /// </summary> + public class AlwayOnAutomationInfo + { + /// <summary> + /// 甯稿紑妯″紡寮�鍚殑 鏃� + /// </summary> + public int Hour = 9; + /// <summary> + /// 甯稿紑妯″紡寮�鍚殑 鍒� + /// </summary> + public int Minute = 0; + /// <summary> + /// 鏄惁鏄墦寮�甯稿紑妯″紡 + /// </summary> + public bool IsOpenAlwayOn = true; + /// <summary> + /// 寰幆鏂瑰紡 1:鎵ц涓�娆� 2:姣忓ぉ 3:姣忓懆 4:姣忔湀 + /// </summary> + public int LoopDiv = 1; + /// <summary> + /// 褰� LoopDiv = 3鏃�,瀹冪殑鍊兼槸 鏄熸湡1-7 LoopDiv = 4鏃�,瀹冪殑鍊兼槸 鏃ユ湡1-31 + /// </summary> + public List<int> ListLoopValue = new List<int>(); + /// <summary> + /// 鎺ㄩ�侀厤缃� + /// </summary> + public UI.UI2.Intelligence.Automation.PushConfigs PushSettion = new UI.UI2.Intelligence.Automation.PushConfigs(); + } + #endregion + + #region 鈻� 闂ㄩ攣甯稿紑妯″紡淇℃伅___________________ + + /// <summary> + /// 闂ㄩ攣甯稿紑妯″紡淇℃伅 + /// </summary> + public class DoorLockAlwayOnInfo + { + /// <summary> + /// 鏄惁鏄父寮� + /// </summary> + public bool IsAlwayOpen = false; + /// <summary> + /// 寮�濮嬫椂闂� + /// </summary> + public DateTime StartTime = DateTime.Now; + /// <summary> + /// 甯稿紑鐨勬椂闂�(灏忔椂) + /// </summary> + public int AlwayOpenHour = 4; + } + #endregion + + #region 鈻� 闂ㄩ攣鍘嗗彶璁板綍淇℃伅___________________ + + /// <summary> + /// 闂ㄩ攣鍘嗗彶璁板綍淇℃伅 + /// </summary> + public class DoorHistoryLog + { + /// <summary> + /// 璁惧涓婚敭 + /// </summary> + public string Sid = string.Empty; + /// <summary> + /// 鏁版嵁搴撲富閿� + /// </summary> + public string Id = string.Empty; + /// <summary> + /// 娑堟伅 + /// </summary> + public string StrMsg = string.Empty; + /// <summary> + /// 鏃堕棿 + /// </summary> + public DateTime Time; + } + + #endregion +} diff --git a/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs b/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs index fe412fb..0b0c63a 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs @@ -62,7 +62,7 @@ #region 鈻� 閲嶅啓褰摜鐨勫睘鎬____________________ /// <summary> - /// 閲嶅啓Text灞炴�� + /// 閲嶅啓Text灞炴��(鏂囨湰涓湁{0}鐨勮瘽,浼氳嚜鍔ㄥ叏閮ㄦ浛鎹负鎹㈣绗�) /// </summary> public new string Text { @@ -70,7 +70,7 @@ get { return base.Text == null ? string.Empty : base.Text; } set { - base.Text = value == null ? string.Empty : value; + base.Text = value == null ? string.Empty : value.Replace("{0}", "\r\n"); } } @@ -122,6 +122,38 @@ } } + /// <summary> + /// 鑳屾櫙鑹�(閲嶅啓搴曞眰灞炴��) + /// </summary> + public new uint BackgroundColor + { + get { return base.BackgroundColor; } + set + { + //鍙湁涓嶄竴鏍�,鎵嶅彉鏇� + if (base.BackgroundColor != value) + { + base.BackgroundColor = value; + } + } + } + + /// <summary> + /// 瀛椾綋棰滆壊(閲嶅啓搴曞眰灞炴��) + /// </summary> + public new uint TextColor + { + get { return base.TextColor; } + set + { + //鍙湁涓嶄竴鏍�,鎵嶅彉鏇� + if (base.TextColor != value) + { + base.TextColor = value; + } + } + } + #endregion #region 鈻� 鍒濆鍖朹____________________________ @@ -163,20 +195,6 @@ i_Height = Application.GetRealHeight(i_Height); } this.Height = i_Height; - this.Width = i_Width; - } - - /// <summary> - /// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�) - /// </summary> - /// <param name="i_Width">瀹藉害</param> - /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param> - public void InitSize(int i_Width, bool real = false) - { - if (real == true) - { - i_Width = Application.GetRealWidth(i_Width); - } this.Width = i_Width; } @@ -352,9 +370,19 @@ /// <returns></returns> public int GetRealWidthByText() { - if (string.IsNullOrEmpty(this.Text) == true) { return Application.GetRealWidth(25); } + if (string.IsNullOrEmpty(this.Text) == true) { return Application.GetRealWidth(4); } return base.GetTextWidth(); + } + + /// <summary> + /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害 + /// </summary> + /// <param name="i_size"></param> + /// <returns></returns> + public int GetPictrueRealSize(int i_size) + { + return Application.GetRealWidth(i_size); } /// <summary> @@ -376,16 +404,6 @@ row++; } return row; - } - - /// <summary> - /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害 - /// </summary> - /// <param name="i_size"></param> - /// <returns></returns> - public int GetPictrueRealSize(int i_size) - { - return Application.GetRealWidth(i_size); } #endregion diff --git a/HDL_ON/UI/UI0-Stan/Controls/BaseControl/TextInputBase.cs b/HDL_ON/UI/UI0-Stan/Controls/BaseControl/TextInputBase.cs index b377db9..c695c11 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/BaseControl/TextInputBase.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/BaseControl/TextInputBase.cs @@ -95,7 +95,7 @@ #region 鈻� 鍒濆鍖朹____________________________ /// <summary> - /// 杈撳叆妗嗘帶浠剁殑鏈�鍒濆師鍨�(涓嶅缓璁慨鏀瑰拰鐩存帴浣跨敤):鏍囧噯瀛椾綋棰滆壊锛屾枃瀛楀悜宸﹂潬榻�,14鍙峰瓧 + /// 杈撳叆妗嗘帶浠剁殑鏈�鍒濆師鍨�(涓嶅缓璁慨鏀瑰拰鐩存帴浣跨敤):鏍囧噯瀛椾綋棰滆壊(0xFF798394)锛屾枃瀛楀悜宸﹂潬榻�,14鍙峰瓧 /// </summary> public TextInputBase() { diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDateSelectControl.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDateSelectControl.cs new file mode 100644 index 0000000..64e45b2 --- /dev/null +++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDateSelectControl.cs @@ -0,0 +1,275 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.Stan +{ + /// <summary> + /// 搴曢儴鏃ユ湡閫夋嫨鎺т欢(骞存湀鏃�),涓嶉渶瑕佸姞鍒扮埗鎺т欢 + /// </summary> + public class BottomDateSelectControl : BottomDialogCommon + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 缁撴潫浜嬩欢(0:鐐瑰嚮浜嗗彇娑� 1:鐐瑰嚮浜嗙‘瀹�,绗簩,涓�,鍥涘弬鏁颁负骞存湀鏃�) + /// </summary> + public Action<int, int, int, int> FinishEvent = null; + /// <summary> + /// 骞寸殑闆嗗悎 + /// </summary> + private List<string> listYear = new List<string>(); + /// <summary> + /// 鏈堢殑闆嗗悎 + /// </summary> + private List<string> listMonth = new List<string>(); + /// <summary> + /// 鏃ョ殑闆嗗悎 + /// </summary> + private List<string> listDay = new List<string>(); + /// <summary> + /// 閫夋嫨鐨勫勾 + /// </summary> + private int selectYear = 0; + /// <summary> + /// 閫夋嫨鐨勬湀 + /// </summary> + private int selectMonth = 0; + /// <summary> + /// 閫夋嫨鐨勬棩 + /// </summary> + private int selectDay = 0; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 搴曢儴鏃堕棿閫夋嫨鎺т欢(骞存湀鏃�),涓嶉渶瑕佸姞鍒扮埗鎺т欢 + /// </summary> + /// <param name="i_title">鏍囬</param> + /// <param name="clickBackClose">鐐瑰嚮鑳屾櫙鏃�,鏄惁鍏抽棴寮圭獥</param> + public BottomDateSelectControl(string i_title = "", bool clickBackClose = true) + { + base.ClickBackClose = clickBackClose; + base.StrTitle = i_title; + base.RowCount = 5; + } + + /// <summary> + /// 鍒濆鍖栨帶浠�(鏈堟棩) + /// </summary> + /// <param name="i_month">榛樿閫夋嫨鏈�</param> + /// <param name="i_day">榛樿閫夋嫨鏃�</param> + public void InitControl(int i_month, int i_day) + { + //鍒濆鍖栨帶浠� + this.DoInitControl(0, i_month, i_day, -1, -1); + } + + /// <summary> + /// 鍒濆鍖栨帶浠�(骞存湀鏃�) + /// </summary> + /// <param name="i_year">榛樿閫夋嫨骞�</param> + /// <param name="i_month">榛樿閫夋嫨鏈�</param> + /// <param name="i_day">榛樿閫夋嫨鏃�</param> + /// <param name="i_yearFrom">骞寸殑鑼冨洿鎸囧畾,浠ュ綋鍓嶅勾涓哄熀鍑�,鍚戝墠鍑犲勾,璇疯緭鍏ユ鏁�</param> + /// <param name="i_yearTo">骞寸殑鑼冨洿鎸囧畾,浠ュ綋鍓嶅勾涓哄熀鍑�,鍚戝悗鍑犲勾,璇疯緭鍏ユ鏁�</param> + public void InitControl(int i_year, int i_month, int i_day, int i_yearFrom, int i_yearTo) + { + //鍒濆鍖栨帶浠� + this.DoInitControl(i_year, i_month, i_day, i_yearFrom, i_yearTo); + } + + /// <summary> + /// 鍒濆鍖栨帶浠� + /// </summary> + /// <param name="i_year">榛樿閫夋嫨骞�</param> + /// <param name="i_month">榛樿閫夋嫨鏈�</param> + /// <param name="i_day">榛樿閫夋嫨鏃�</param> + /// <param name="i_yearFrom">骞寸殑鑼冨洿鎸囧畾,浠ュ綋鍓嶅勾涓哄熀鍑�,鍚戝墠鍑犲勾,璇疯緭鍏ユ鏁�</param> + /// <param name="i_yearTo">骞寸殑鑼冨洿鎸囧畾,浠ュ綋鍓嶅勾涓哄熀鍑�,鍚戝悗鍑犲勾,璇疯緭鍏ユ鏁�</param> + private void DoInitControl(int i_year, int i_month, int i_day, int i_yearFrom, int i_yearTo) + { + //宸茬粡鍒濆鍖� + if (base.btnCancel != null) { return; } + + this.selectYear = i_year; + this.selectMonth = i_month; + this.selectDay = i_day; + + //鍒濆鍖栧勾鏈堟棩鍒楄〃 + this.InitYearMonthDayList(i_yearFrom, i_yearTo); + + //鍒濆鍖栧簳灞傛帶浠� + var frameWhiteBack = base.InitBaseControl(); + //鍙栨秷 + base.btnCancel.ButtonClickEvent += (sender, e) => + { + base.Close(); + this.FinishEvent?.Invoke(0, 0, 0, 0); + this.FinishEvent = null; + }; + //纭 + base.btnConfirm.ButtonClickEvent += (sender, e) => + { + //妫�娴嬮�夋嫨鐨勫勾鏈堟棩鏄惁姝g‘ + if (HdlCommonLogic.Current.CheckDateIsRight(selectYear, selectMonth, selectDay) == false) + { + return; + } + base.Close(); + this.FinishEvent?.Invoke(1, selectYear, selectMonth, selectDay); + this.FinishEvent = null; + }; + + //绾� + var btnLine = new NormalViewControl(frameWhiteBack.Width, HdlControlResourse.BottomLineHeight, false); + btnLine.BackgroundColor = CSS_Color.PromptingColor2; + btnLine.Y = btnCancel.Bottom; + frameWhiteBack.AddChidren(btnLine); + + //鏃堕棿鎺т欢 + var pickerView = new UIPickerView(); + pickerView.Height = frameWhiteBack.Height - btnLine.Bottom; + pickerView.Width = frameWhiteBack.Width - Application.GetRealWidth(8) * 2; + pickerView.Y = btnLine.Bottom; + pickerView.Gravity = Gravity.CenterHorizontal; + frameWhiteBack.AddChidren(pickerView); + + if (Language.CurrentLanguage == "Chinese") + { + //鍒濆鍖栨帶浠�(涓枃) + this.DoInitControlOnChineseLanguage(pickerView, i_year, i_month, i_day); + } + else + { + //鍒濆鍖栨帶浠�(鑻辨枃) + this.DoInitControlOnEnglishLanguage(pickerView, i_year, i_month, i_day); + } + } + + /// <summary> + /// 鍒濆鍖栨帶浠�(涓枃) + /// </summary> + /// <param name="pickerView">鏃堕棿鎺т欢</param> + /// <param name="i_year">榛樿閫夋嫨骞�</param> + /// <param name="i_month">榛樿閫夋嫨鏈�</param> + /// <param name="i_day">榛樿閫夋嫨鏃�</param> + private void DoInitControlOnChineseLanguage(UIPickerView pickerView, int i_year, int i_month, int i_day) + { + //榛樿绱㈠紩 + var index1 = listYear.IndexOf(i_year.ToString() + Language.StringByID(StringId.Years)); + if (index1 == -1) { index1 = 0; } + var index2 = listMonth.IndexOf(i_month.ToString() + Language.StringByID(StringId.month)); + if (index2 == -1) { index2 = 0; } + var index3 = listDay.IndexOf(i_day.ToString() + Language.StringByID(StringId.day)); + if (index3 == -1) { index2 = 0; } + + pickerView.setNPicker(listYear.Count == 0 ? null : listYear, listMonth, listDay); + //璁剧疆鍒濆閫夋嫨 + pickerView.setCurrentItems(index1, index2, index3); + + pickerView.OnSelectChangeEvent = (value1, value2, value3) => + { + //鏇存敼绱㈠紩 + selectYear = Convert.ToInt32(listYear[value1].Substring(0, 4)); + selectMonth = value2 + 1; + selectDay = value3 + 1; + }; + } + + /// <summary> + /// 鍒濆鍖栨帶浠�(鑻辨枃) + /// </summary> + /// <param name="pickerView">鏃堕棿鎺т欢</param> + /// <param name="i_year">榛樿閫夋嫨骞�</param> + /// <param name="i_month">榛樿閫夋嫨鏈�</param> + /// <param name="i_day">榛樿閫夋嫨鏃�</param> + private void DoInitControlOnEnglishLanguage(UIPickerView pickerView, int i_year, int i_month, int i_day) + { + //榛樿绱㈠紩 + var index1 = listYear.IndexOf(i_year.ToString()); + if (index1 == -1) { index1 = 0; } + var index2 = i_month - 1; + var index3 = i_day - 1; + + pickerView.setNPicker(listYear.Count == 0 ? null : listDay, listMonth, listYear); + //璁剧疆鍒濆閫夋嫨 + pickerView.setCurrentItems(index3, index2, index1); + + pickerView.OnSelectChangeEvent = (value1, value2, value3) => + { + //鏇存敼绱㈠紩 + selectYear = Convert.ToInt32(listYear[value3]); + selectMonth = value2 + 1; + selectDay = value1 + 1; + }; + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鍒濆鍖栧勾鏈堟棩鍒楄〃 + /// </summary> + /// <param name="i_yearFrom">骞寸殑鑼冨洿鎸囧畾,浠ュ綋鍓嶅勾涓哄熀鍑�,鍚戝墠鍑犲勾,璇疯緭鍏ユ鏁�</param> + /// <param name="i_yearTo">骞寸殑鑼冨洿鎸囧畾,浠ュ綋鍓嶅勾涓哄熀鍑�,鍚戝悗鍑犲勾,璇疯緭鍏ユ鏁�</param> + private void InitYearMonthDayList(int i_yearFrom, int i_yearTo) + { + //骞� + var strYear = Language.CurrentLanguage == "Chinese" ? Language.StringByID(StringId.Years) : string.Empty; + //鏈� + var strMonth = Language.StringByID(StringId.month); + //鏃� + var strDay = Language.CurrentLanguage == "Chinese" ? Language.StringByID(StringId.day) : string.Empty; + + //鑾峰彇骞寸殑鍒楄〃 + int nowYear = DateTime.Now.Year; + for (int i = i_yearFrom; i > 0; i--) + { + this.listYear.Add((nowYear - i) + strYear); + } + this.listYear.Add(nowYear + strYear); + for (int i = i_yearTo; i > 0; i--) + { + this.listYear.Add((nowYear + i) + strYear); + } + + //鑾峰彇鏈堢殑鍒楄〃 + for (int i = 1; i <= 12; i++) + { + if (Language.CurrentLanguage == "Chinese") + { + //涓枃 + this.listMonth.Add(i.ToString() + strMonth); + } + else + { + //鑻辨枃 + this.listMonth.Add(HdlCommonLogic.Current.GetMonthShortText(i)); + } + } + + //鑾峰彇鏃ョ殑鍒楄〃 + for (int i = 1; i <= 31; i++) + { + this.listDay.Add(i.ToString() + strDay); + } + } + + /// <summary> + /// 鍏抽棴鐣岄潰 + /// </summary> + public override void Close() + { + base.Close(); + this.FinishEvent = null; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs index 02c68a4..cebb462 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs @@ -38,6 +38,10 @@ /// </summary> public bool ClickBackClose = true; /// <summary> + /// 鐐瑰嚮纭鏃跺叧闂晫闈�(鏈変簺鐣岄潰鐗规畩,涓嶅叧闂�) + /// </summary> + public bool ClickConfirmClose = true; + /// <summary> /// 鏁翠釜寮圭獥瀵硅薄 /// </summary> private Dialog FrameDialog = null; @@ -49,7 +53,10 @@ /// <summary> /// 鍒濆鍖栧簳灞傛帶浠�(杩斿洖鐨勬槸鍥涘懆鏈夊渾瑙掔殑鐧借壊鍖哄煙鎺т欢),姝ゆ柟娉曠敱灏佽鎺т欢搴曞眰璋冪敤,璇峰嬁闅忎究璋冪敤 /// </summary> - public NormalFrameLayout InitBaseControl() + /// <param name="i_whiteWidth">鐧借壊鍖哄煙鐨勫搴�,鏈�濂戒笉瑕佹敼杩欎釜涓滆タ</param> + /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param> + /// <returns></returns> + public NormalFrameLayout InitBaseControl(int i_whiteWidth = 343, bool real = true) { //鏁翠釜鐏拌壊鐣岄潰 this.FrameDialog?.Close(); @@ -65,13 +72,17 @@ } }; - //鐧借壊鑳屾櫙 + //鏍囬楂樺害 + int titleHeight = Application.GetRealHeight(50); + + //鐧借壊鑳屾櫙(鏍峰瓙鎮诞浜庣晫闈�,鍥涗釜瑙掗兘鏄渾瑙�) var frameWhiteBack = new NormalFrameLayout(); - frameWhiteBack.Width = Application.GetRealWidth(343); - frameWhiteBack.Height = RowHeight * (RowCount + 1); + frameWhiteBack.Width = real == true ? Application.GetRealWidth(i_whiteWidth) : i_whiteWidth; + frameWhiteBack.Height = RowHeight * RowCount + titleHeight; frameWhiteBack.Radius = (uint)Application.GetRealWidth(12); frameWhiteBack.Gravity = Gravity.CenterHorizontal; - frameWhiteBack.Y = dialogBody.Height - RowHeight * (RowCount + 1) - Application.GetRealHeight(20); + //瀹冪殑搴曢儴鏈変釜20鐨勯棿璺� + frameWhiteBack.Y = dialogBody.Height - RowHeight * RowCount - titleHeight - Application.GetRealHeight(20); frameWhiteBack.BackgroundColor = CSS_Color.MainBackgroundColor; dialogBody.AddChidren(frameWhiteBack); @@ -82,6 +93,7 @@ btnCancel.TextColor = CSS_Color.PromptingColor1; btnCancel.TextID = StringId.Cancel; btnCancel.TextSize = CSS_FontSize.TextFontSize; + btnCancel.Width = btnCancel.GetRealWidthByText(); frameWhiteBack.AddChidren(btnCancel); //鏍囬 @@ -97,13 +109,14 @@ //纭 this.btnConfirm = new NormalViewControl(90, 48, true); - btnConfirm.X = frameWhiteBack.Width - Application.GetRealWidth(90) - btnCancel.X; btnConfirm.Y = btnCancel.Y; btnConfirm.TextAlignment = TextAlignment.CenterRight; btnConfirm.TextColor = CSS_Color.MainColor; btnConfirm.TextID = StringId.Confirm; btnConfirm.TextSize = CSS_FontSize.TextFontSize; + btnConfirm.Width = btnConfirm.GetRealWidthByText(); frameWhiteBack.AddChidren(btnConfirm); + btnConfirm.X = frameWhiteBack.Width - btnConfirm.Width - btnCancel.X; FrameDialog.Show(); diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemEditorControl.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemEditorControl.cs index fae40c6..6374aaf 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemEditorControl.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemEditorControl.cs @@ -7,7 +7,7 @@ namespace HDL_ON.Stan { /// <summary> - /// 搴曢儴椤圭洰缂栬緫鎺т欢 + /// 搴曢儴椤圭洰缂栬緫鎺т欢(涓嶉渶瑕佸姞鍏ョ埗鎺т欢,AddRowMenu娣诲姞鑿滃崟) /// </summary> public class BottomItemEditorControl : BottomDialogCommon { @@ -18,6 +18,10 @@ /// </summary> public Action<int> FinishEvent = null; /// <summary> + /// 鐐瑰嚮纭鏃�,鏄惁鍏抽棴鐣岄潰(褰撹缃负false鏃�,鍙兘鎵嬪姩鍏抽棴) + /// </summary> + public bool CloseByConfirm = true; + /// <summary> /// 鍒楄〃鎺т欢 /// </summary> private VerticalListControl listView = null; @@ -27,7 +31,7 @@ #region 鈻� 鍒濆鍖朹____________________________ /// <summary> - /// 鏈夋爣棰樼殑寮圭獥鍨嬭彍鍗曠紪杈戞帶浠� + /// 鏈夋爣棰樼殑寮圭獥鍨嬭彍鍗曠紪杈戞帶浠�(涓嶉渶瑕佸姞鍏ョ埗鎺т欢,AddRowMenu娣诲姞鑿滃崟) /// </summary> /// <param name="i_RowCount">鑿滃崟琛屾暟(涓嶅惈鏍囬)</param> /// <param name="i_title">鏍囬</param> @@ -53,17 +57,18 @@ //鍙栨秷 base.btnCancel.ButtonClickEvent += (sender, e) => { - base.Close(); this.FinishEvent?.Invoke(0); - this.FinishEvent = null; + this.Close(); }; //纭 base.btnConfirm.ButtonClickEvent += (sender, e) => { - base.Close(); this.FinishEvent?.Invoke(1); - this.FinishEvent = null; + if (this.CloseByConfirm == true) + { + this.Close(); + } }; //鍒楄〃鎺т欢 @@ -82,8 +87,9 @@ /// </summary> /// <param name="i_textView">宸﹁竟鏄剧ず鐨勬枃瀛�</param> /// <param name="i_textValue">鍙宠竟鏄剧ず鐨勫��(</param> - /// <param name="clickEvent">鍗曞嚮鑿滃崟鎵ц鐨勪簨浠�(鍙傛暟涓哄彸杈规樉绀哄�肩殑閭d釜鎺т欢)</param> - public void AddRowMenu(string i_textView, string i_textValue, Action<NormalViewControl> clickEvent) + /// <param name="clickEvent">鍗曞嚮鑿滃崟鎵ц鐨勪簨浠�(鍙傛暟1:宸﹁竟鏍囬鎺т欢,鍙傛暟2:鍙宠竟鏄剧ず鍊肩殑閭d釜鎺т欢)</param> + /// <param name="addRightArrow">鏄惁娣诲姞鍙崇澶�</param> + public void AddRowMenu(string i_textView, string i_textValue, Action<NormalViewControl, NormalViewControl> clickEvent, bool addRightArrow = true) { //鍏堝垵濮嬪寲鎺т欢 this.InitControl(); @@ -101,21 +107,24 @@ //琛� var rowContr = new FrameRowControl(); rowContr.LeftOffset = Application.GetRealWidth(20) - HdlControlResourse.XXLeft; - rowContr.RightOffset = - rowContr.LeftOffset; + rowContr.RightOffset = -rowContr.LeftOffset; rowContr.Width = this.listView.Width; rowContr.Height = this.RowHeight; this.listView.AddChidren(rowContr); //鏄剧ず鏂囨湰 - var btnView = rowContr.AddLeftCaption(i_textView, 150); + var btnView = rowContr.AddLeftCaption(i_textView, 300); btnView.Width = btnView.GetRealWidthByText(); btnView.TextColor = CSS_Color.FirstLevelTitleColor; //娣诲姞鍙崇澶� - rowContr.AddRightArrow(); + if (addRightArrow == true) + { + rowContr.AddRightArrow(); + } //娣诲姞鍙宠竟鐨勬枃鏈� - var btnValue = rowContr.AddMostRightView(i_textValue, 150); + var btnValue = rowContr.AddMostRightView(i_textValue, 200); rowContr.ButtonClickEvent += (sender, e) => { - clickEvent?.Invoke(btnValue); + clickEvent?.Invoke(btnView, btnValue); }; } diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemSelectControl.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemSelectControl.cs index ec3f199..79e0950 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemSelectControl.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomItemSelectControl.cs @@ -7,7 +7,7 @@ namespace HDL_ON.Stan { /// <summary> - /// 搴曢儴椤圭洰閫夋嫨鎺т欢 + /// 搴曢儴椤圭洰閫夋嫨鎺т欢(涓嶉渶瑕佸姞鍏ョ埗鎺т欢,AddRowMenu娣诲姞鑿滃崟) /// </summary> public class BottomItemSelectControl: BottomDialogCommon { @@ -39,7 +39,7 @@ #region 鈻� 鍒濆鍖朹____________________________ /// <summary> - /// 鏈夋爣棰樼殑寮圭獥鍨嬭彍鍗曢�夋嫨鎺т欢 + /// 鏈夋爣棰樼殑寮圭獥鍨嬭彍鍗曢�夋嫨鎺т欢(涓嶉渶瑕佸姞鍏ョ埗鎺т欢,AddRowMenu娣诲姞鑿滃崟) /// </summary> /// <param name="i_RowCount">鑿滃崟琛屾暟(涓嶅惈鏍囬)</param> /// <param name="i_title">鏍囬</param> @@ -147,7 +147,7 @@ rowContr.Height = this.RowHeight; this.listView.AddChidren(rowContr); //鏄剧ず鏂囨湰 - var btnView = rowContr.AddLeftCaption(i_text, 150); + var btnView = rowContr.AddLeftCaption(i_text, 300); btnView.TextColor = CSS_Color.FirstLevelTitleColor; //閫夋嫨鍥炬爣 var btnIcon = rowContr.AddMostRightEmptyIcon(28, 28); diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomMenuSelectControl.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomMenuSelectControl.cs new file mode 100644 index 0000000..a67a2a6 --- /dev/null +++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomMenuSelectControl.cs @@ -0,0 +1,150 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.Stan +{ + /// <summary> + /// 搴曢儴寮圭獥鐨勮彍鍗曢�夋嫨鎺т欢(涓嶉渶瑕佸姞鍏ョ埗鎺т欢,AddMenu娣诲姞鑿滃崟) + /// </summary> + public class BottomMenuSelectControl + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鑿滃崟楂樺害 + /// </summary> + private int menuHeight = Application.GetRealHeight(44); + /// <summary> + /// 鑿滃崟妗屽竷鎺т欢 + /// </summary> + private FrameLayout frameMenuTable = null; + /// <summary> + /// 鏁翠釜寮圭獥瀵硅薄 + /// </summary> + private Dialog FrameDialog = null; + /// <summary> + /// 鐐瑰嚮鑳屾櫙鏃�,鏄惁鍏抽棴寮圭獥 + /// </summary> + public bool ClickBackClose = true; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 搴曢儴寮圭獥鐨勮彍鍗曢�夋嫨鎺т欢(涓嶉渶瑕佸姞鍏ョ埗鎺т欢,AddMenu娣诲姞鑿滃崟) + /// </summary> + /// <param name="i_menuCount">鑿滃崟鎬绘暟(涓嶅惈鍙栨秷鑿滃崟)</param> + public BottomMenuSelectControl(int i_menuCount) + { + //鍒濆鍖栨帶浠� + this.InitControl(i_menuCount); + } + + /// <summary> + /// 鍒濆鍖栨帶浠� + /// </summary> + /// <param name="menuCount">鑿滃崟鎬绘暟(涓嶅惈鍙栨秷鑿滃崟)</param> + private void InitControl(int menuCount) + { + //鏁翠釜鐏拌壊鐣岄潰 + this.FrameDialog = new Dialog(); + FrameDialog.Show(); + + var dialogBody = new NormalFrameLayout(); + dialogBody.Height = FrameDialog.Height; + FrameDialog.AddChidren(dialogBody); + dialogBody.ButtonClickEvent += (sender, e) => + { + if (ClickBackClose == true) + { + FrameDialog.Close(); + } + }; + + //鍙栨秷鑿滃崟 + var frameCancel = new FrameLayout(); + frameCancel.Y = dialogBody.Height - this.menuHeight - Application.GetRealHeight(12); + frameCancel.Gravity = Gravity.CenterHorizontal; + frameCancel.Radius = (uint)Application.GetRealHeight(12); + frameCancel.Width = Application.GetRealWidth(343); + frameCancel.Height = this.menuHeight; + frameCancel.BackgroundColor = CSS_Color.MainBackgroundColor; + FrameDialog.AddChidren(frameCancel); + var btnCancel = new NormalViewControl(Application.GetRealWidth(150), this.menuHeight, false); + btnCancel.Gravity = Gravity.Center; + btnCancel.TextAlignment = TextAlignment.Center; + btnCancel.TextColor = CSS_Color.AuxiliaryColor2; + btnCancel.TextSize = CSS_FontSize.SubheadingFontSize; + btnCancel.TextID = StringId.Cancel; + frameCancel.AddChidren(btnCancel); + btnCancel.ButtonClickEvent += (sender, e) => + { + //鍏抽棴鐣岄潰 + FrameDialog.Close(); + }; + + //鑿滃崟鐨勬甯冩帶浠� + int framebackHeight = this.menuHeight * menuCount; + this.frameMenuTable = new FrameLayout(); + frameMenuTable.Y = frameCancel.Y - framebackHeight - Application.GetRealHeight(8); + frameMenuTable.Height = framebackHeight; + frameMenuTable.Width = Application.GetRealWidth(343); + frameMenuTable.Gravity = Gravity.CenterHorizontal; + frameMenuTable.BackgroundColor = CSS_Color.MainBackgroundColor; + frameMenuTable.Radius = (uint)Application.GetRealWidth(12); + FrameDialog.AddChidren(frameMenuTable); + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 娣诲姞鑿滃崟 + /// </summary> + /// <param name="strMenu">鑿滃崟鏂囨湰</param> + /// <param name="selectEvent">鑿滃崟閫夋嫨鐨勪簨浠�</param> + /// <param name="textColor">鏂囨湰棰滆壊(璁剧疆涓�0,鍒欎娇鐢ㄩ粯璁ょ殑钃濊壊瀛椾綋)</param> + /// <param name="clickClose">鑿滃崟鐐瑰嚮鏃�,鏄惁鏃犳潯浠跺叧闂晫闈�</param> + public void AddMenu(string strMenu, Action selectEvent, uint textColor = 0, bool clickClose = true) + { + //绾� + if (this.frameMenuTable.ChildrenCount > 0) + { + var btnLine = new NormalViewControl(frameMenuTable.Width, HdlControlResourse.BottomLineHeight, false); + btnLine.BackgroundColor = CSS_Color.DividingLineColor; + btnLine.Y = this.frameMenuTable.GetChildren(this.frameMenuTable.ChildrenCount - 1).Bottom; + this.frameMenuTable.AddChidren(btnLine); + } + + //鑿滃崟 + var btnMenu = new NormalViewControl(Application.GetRealWidth(300), this.menuHeight, false); + if (this.frameMenuTable.ChildrenCount > 0) + { + btnMenu.Y = this.frameMenuTable.GetChildren(this.frameMenuTable.ChildrenCount - 1).Bottom; + } + btnMenu.Gravity = Gravity.CenterHorizontal; + btnMenu.TextAlignment = TextAlignment.Center; + btnMenu.TextColor = textColor == 0 ? CSS_Color.MainColor : textColor; + btnMenu.TextSize = CSS_FontSize.SubheadingFontSize; + btnMenu.Text = strMenu; + this.frameMenuTable.AddChidren(btnMenu); + btnMenu.ButtonClickEvent += (sender, e) => + { + if (clickClose == true) + { + //鍏抽棴鐣岄潰 + FrameDialog.Close(); + } + selectEvent?.Invoke(); + selectEvent = null; + }; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomSomeDaySelectControl.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomSomeDaySelectControl.cs new file mode 100644 index 0000000..cfec92d --- /dev/null +++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomSomeDaySelectControl.cs @@ -0,0 +1,176 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.Stan +{ + /// <summary> + /// 搴曢儴閫夋嫨涓�涓湀鍐呯殑涓�浜涙棩鏈熺殑鎺т欢,涓嶉渶瑕佸姞鍒扮埗鎺т欢,InitControl鎵ц鍒濆鍖� + /// </summary> + public class BottomSomeDaySelectControl : BottomDialogCommon + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 缁撴潫浜嬩欢(0:鐐瑰嚮浜嗗彇娑� 1:鐐瑰嚮浜嗙‘瀹�,鍙傛暟鏄�夋嫨鐨勬棩) + /// </summary> + public Action<int, List<int>> FinishEvent = null; + /// <summary> + /// 鐩墠閫夋嫨鐨勬棩鏈� + /// </summary> + private List<int> listSelectDay = new List<int>(); + /// <summary> + /// 鐩爣鏈堜唤 + /// </summary> + private int targetMonth = 0; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 搴曢儴閫夋嫨涓�涓湀鍐呯殑涓�浜涙棩鏈熺殑鎺т欢,涓嶉渶瑕佸姞鍒扮埗鎺т欢,InitControl鎵ц鍒濆鍖� + /// </summary> + /// <param name="i_title">鏍囬</param> + /// <param name="clickBackClose">鐐瑰嚮鑳屾櫙鏃�,鏄惁鍏抽棴寮圭獥</param> + /// <param name="i_month">鏄剧ず鎵ц鏈堢殑鏃ユ湡,璁剧疆涓�0鏃�,榛樿鏄剧ず31澶�</param> + public BottomSomeDaySelectControl(string i_title = "", bool clickBackClose = true, int i_month = 0) + { + base.ClickBackClose = clickBackClose; + base.StrTitle = i_title; + base.RowCount = 5; + this.targetMonth = i_month; + } + + /// <summary> + /// 鍒濆鍖栨帶浠� + /// </summary> + /// <param name="listSelect">榛樿閫夋嫨(鏃�)</param> + public void InitControl(List<int> listSelect) + { + //宸茬粡鍒濆鍖� + if (base.btnCancel != null) { return; } + + this.listSelectDay.AddRange(listSelect); + //鍒濆鍖栧簳灞傛帶浠� + var frameWhiteBack = base.InitBaseControl(); + + //鍙栨秷 + base.btnCancel.ButtonClickEvent += (sender, e) => + { + base.Close(); + this.FinishEvent?.Invoke(0, null); + this.FinishEvent = null; + }; + //纭 + base.btnConfirm.ButtonClickEvent += (sender, e) => + { + //鏈夐�夋嫨浜嗘墠鑳界偣纭 + if (this.listSelectDay.Count>0) + { + base.Close(); + + //灏忕殑鍦ㄥ墠,澶х殑鍦ㄥ悗 + var listDay = new List<int>(); + for (int i = 1; i <= 31; i++) + { + if (listSelectDay.Contains(i) == false) { continue; } + listDay.Add(i); + } + this.FinishEvent?.Invoke(1, listDay); + this.FinishEvent = null; + } + }; + //鍒濆鍖栨棩鏈熷垪琛ㄦ帶浠� + this.InitDayListControl(frameWhiteBack); + } + + /// <summary> + /// 鍒濆鍖栨棩鏈熷垪琛ㄦ帶浠� + /// </summary> + private void InitDayListControl(NormalFrameLayout frameWhiteBack) + { + //鑾峰彇鏄剧ず鐨勫ぉ鏁� + var dayCount = this.GetDayCount(); + //鍒濆X杞�16 + int xxValue = Application.GetRealWidth(16); + //鍒濆Y杞�58 + int yyValue = Application.GetRealHeight(68); + for (int i = 1; i <= dayCount; i++) + { + int intDay = i; + var btnContr = new NormalViewControl(Application.GetRealWidth(30), Application.GetRealWidth(30), false); + btnContr.X = xxValue; + btnContr.Y = yyValue; + btnContr.Radius = (uint)Application.GetRealWidth(15); + btnContr.Text = intDay.ToString(); + btnContr.TextAlignment = TextAlignment.Center; + btnContr.TextColor = CSS_Color.FirstLevelTitleColor; + btnContr.SelectedTextColor = CSS_Color.MainBackgroundColor; + btnContr.SelectedBackgroundColor = CSS_Color.MainColor; + btnContr.BackgroundColor = CSS_Color.viewTranslucence; + frameWhiteBack.AddChidren(btnContr); + + //鎹㈠埌涓嬩竴琛�(姣�7涓竴琛�) + if (i % 7 == 0) + { + xxValue = Application.GetRealWidth(16); + //涓婁笅闂磋窛涓�10 + yyValue = btnContr.Bottom + Application.GetRealHeight(10); + } + else + { + //宸﹀彸闂磋窛涓�16 + xxValue = btnContr.Right + Application.GetRealWidth(16); + } + btnContr.ButtonClickEvent += (sender, e) => + { + btnContr.IsSelected = !btnContr.IsSelected; + if (btnContr.IsSelected == true) + { + //娣诲姞缂撳瓨 + this.listSelectDay.Add(intDay); + } + else + { + //绉婚櫎缂撳瓨 + this.listSelectDay.Remove(intDay); + } + }; + //鏄惁鍒濆閫夋嫨 + btnContr.IsSelected = this.listSelectDay.Contains(intDay); + } + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鑾峰彇澶╂暟 + /// </summary> + /// <returns></returns> + private int GetDayCount() + { + if (this.targetMonth < 1 || this.targetMonth > 12) { return 31; } + + int two = DateTime.IsLeapYear(DateTime.Now.Year) == true ? 29 : 28; + int[] arry = new int[] { 31, two, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + + return arry[this.targetMonth - 1]; + } + + /// <summary> + /// 鍏抽棴鐣岄潰 + /// </summary> + public override void Close() + { + base.Close(); + this.FinishEvent = null; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs b/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs index bf88dae..2ba65dc 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/BatteryPersentControl.cs @@ -7,7 +7,7 @@ namespace HDL_ON.Stan { /// <summary> - /// 鐢垫睜鐧惧垎姣旀帶浠� + /// 鐢垫睜鐧惧垎姣旀帶浠�(楂樹负25) /// </summary> public class BatteryPersentControl : NormalFrameLayout { @@ -21,13 +21,17 @@ /// 杩涘害鏉� /// </summary> private NormalViewControl btnProgress = null; + /// <summary> + /// 鍥炬爣鎺т欢 + /// </summary> + private IconViewControl btnIcon = null; #endregion #region 鈻� 鍒濆鍖朹____________________________ /// <summary> - /// 鐢垫睜鐧惧垎姣旀帶浠� + /// 鐢垫睜鐧惧垎姣旀帶浠�(楂樹负25) /// </summary> public BatteryPersentControl() { @@ -39,19 +43,23 @@ /// <summary> /// 鍒濆鍖栨帶浠� /// </summary> - public void InitControl() + /// <param name="showPersent">鏄惁鍦ㄥ彸杈规樉绀虹櫨鍒嗘瘮</param> + public void InitControl(bool showPersent = true) { - var btnIcon = new IconViewControl(24); - btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/WeepRobot/Battery.png"; + this.btnIcon = new IconViewControl(24); + btnIcon.UnSelectedImagePath = "Public/BatteryEnough.png"; this.AddChidren(btnIcon); //鐢垫睜鐧惧垎姣� - this.btnBatteryView = new NormalViewControl(30, 16, true); - btnBatteryView.X = btnIcon.Right + Application.GetRealWidth(4); - btnBatteryView.Y = btnIcon.Y + (btnIcon.Height - Application.GetRealHeight(16)) / 2; - btnBatteryView.TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel; - btnBatteryView.TextColor = CSS_Color.PromptingColor1; - this.AddChidren(btnBatteryView); + if (showPersent == true) + { + this.btnBatteryView = new NormalViewControl(30, 16, true); + btnBatteryView.X = btnIcon.Right + Application.GetRealWidth(4); + btnBatteryView.Y = btnIcon.Y + (btnIcon.Height - Application.GetRealHeight(16)) / 2; + btnBatteryView.TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel; + btnBatteryView.TextColor = CSS_Color.PromptingColor1; + this.AddChidren(btnBatteryView); + } //杩涘害鏉℃帶浠� this.btnProgress = new NormalViewControl(this.GetPictrueRealSize(15), this.GetPictrueRealSize(8), false); @@ -72,23 +80,23 @@ public void SetValue(decimal i_value) { int myWidth = (int)((i_value / 100) * this.GetPictrueRealSize(15)); - this.btnBatteryView.Text = i_value + "%"; + if (this.btnBatteryView != null) + { + this.btnBatteryView.Text = i_value + "%"; + } + this.btnProgress.Width = myWidth; if (i_value <= 20) { - if (this.btnProgress.BackgroundColor == CSS_Color.PromptingColor1) - { - //鍙樼孩鑹� - this.btnProgress.BackgroundColor = 0xfff62f48; - } + //鍙樼孩鑹� + this.btnProgress.BackgroundColor = 0xfff62f48; + this.btnIcon.UnSelectedImagePath = "Public/BatteryNot.png"; } else { - if (this.btnProgress.BackgroundColor == 0xfff62f48) - { - //鍙樼孩鑹� - this.btnProgress.BackgroundColor = CSS_Color.PromptingColor1; - } + //鍙樼伆鑹� + this.btnProgress.BackgroundColor = CSS_Color.PromptingColor1; + this.btnIcon.UnSelectedImagePath = "Public/BatteryEnough.png"; } } diff --git a/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs b/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs index 8c66d48..6579b0d 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/CompoundControls/SeekBarImageControl.cs @@ -7,7 +7,8 @@ namespace HDL_ON.Stan { /// <summary> - /// 宸﹀彸婊戝姩鐨勮繘搴︽潯鎺т欢 + /// <para>宸﹀彸婊戝姩鐨勮繘搴︽潯鎺т欢(楂樺害涓�54 宸﹀彸闂磋窛涓�20)</para> + /// <para>濡傛灉鏄姞鍦≒ageLayout閲岄潰鐨勮瘽,鍔犲叆鐖舵帶浠朵箣鍚�,璇疯皟鐢˙indPageLayout()</para> /// </summary> public class SeekBarImageControl : DiyImageSeekBar { @@ -112,20 +113,25 @@ /// 涓婃柟鏄剧ず鐨勬枃鏈� /// </summary> private Button btnTopView = null; + /// <summary> + /// 缁戝畾PageLayout锛屼簨浠跺啿绐�,闇�瑕佺壒娈婂鐞� + /// </summary> + private PageLayout pageLayoutBind = null; #endregion #region 鈻� 鍒濆鍖朹____________________________ /// <summary> - /// 宸﹀彸婊戝姩鐨勮繘搴︽潯鎺т欢(楂樺害涓�54 宸﹀彸闂磋窛涓�20) + /// <para>宸﹀彸婊戝姩鐨勮繘搴︽潯鎺т欢(楂樺害涓�54 宸﹀彸闂磋窛涓�20)</para> + /// <para>濡傛灉鏄姞鍦≒ageLayout閲岄潰鐨勮瘽,鍔犲叆鐖舵帶浠朵箣鍚�,璇疯皟鐢˙indPageLayout()</para> /// </summary> /// <param name="i_width">瀹藉害,闈炵湡瀹炲��,瀹為檯瀹藉害浼氬姞涓婂乏鍙抽棿璺�</param> public SeekBarImageControl(int i_width) { this.ProgressChangeDelayTime = 0; - this.Width = Application.GetRealWidth(i_width) + Application.GetRealWidth(20) * 2; + this.Width = Application.GetRealWidth(i_width) + m_SeekBarPadding * 2; this.Height = Application.GetRealHeight(54); //鍦嗙悆鐨勯珮搴� this.ThumbImageHeight = Application.GetRealHeight(54); @@ -178,8 +184,27 @@ this.OnStopTrackingTouchEvent -= this.MyStopTrackingTouchEvent; return; } + if (this.pageLayoutBind != null && this.pageLayoutBind.ScrollEnabled == false) + { + //浜嬩欢鍐茬獊,鐗规畩澶勭悊,璁﹑ageLayout杩樺師婊戝姩 + this.pageLayoutBind.ScrollEnabled = true; + } //寮硅捣浜嬩欢涓嶉渶瑕佸垽鏂椂闂� this.ProgressChangedEvent(1, value); + } + + /// <summary> + /// 鎵嬫寚寮�濮嬬偣鍑讳簨浠� + /// </summary> + /// <param name="sender"></param> + /// <param name="value"></param> + private void MyStartTrackingTouchEvent(object sender, bool value) + { + if (this.pageLayoutBind != null && this.pageLayoutBind.ScrollEnabled == true) + { + //浜嬩欢鍐茬獊,鐗规畩澶勭悊,璁﹑ageLayout涓嶈兘婊戝姩 + this.pageLayoutBind.ScrollEnabled = false; + } } #endregion @@ -237,11 +262,44 @@ #region 鈻� 涓�鑸柟娉昣__________________________ /// <summary> + /// 缁戝畾PageLayout + /// </summary> + public void BindPageLayout() + { + //鑾峰彇PageLayout + this.pageLayoutBind = this.GetParentPageLayout(); + if (this.pageLayoutBind == null) { return; } + + this.OnStartTrackingTouchEvent -= this.MyStartTrackingTouchEvent; + this.OnStartTrackingTouchEvent += this.MyStartTrackingTouchEvent; + } + + /// <summary> + /// 鑾峰彇鐖舵帶浠剁殑PageLayout + /// </summary> + /// <returns></returns> + private PageLayout GetParentPageLayout() + { + ViewGroup viewGroup = this.Parent; + while (true) + { + if (viewGroup == null) { return null; } + else if (viewGroup is PageLayout) + { + return (PageLayout)viewGroup; + } + viewGroup = viewGroup.Parent; + } + } + + /// <summary> /// 鎺т欢鎽ф瘉 /// </summary> public override void RemoveFromParent() { + this.pageLayoutBind = null; this.ProgressChangedEvent = null; + base.RemoveFromParent(); } diff --git a/HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs b/HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs index 73cbd27..e01c3bb 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs @@ -105,9 +105,9 @@ button.ButtonClickEvent -= ChildrenUpEvent; button.ButtonClickEvent += ChildrenUpEvent; } - else if (view is ImageView) + else if (view is ImageView || view is Button) { - //鑷韩涔熸坊鍔犱簨浠� + //涓哄瓙鎺т欢娣诲姞浜嬩欢 view.MouseUpEventHandler -= ChildrenUpEvent; view.MouseUpEventHandler += ChildrenUpEvent; } @@ -145,7 +145,7 @@ /// </summary> /// <param name="view">瀛愭帶浠�</param> /// <param name="chidrenBindMode">缁戝畾妯″紡</param> - public void AddChidren(View view, ChidrenBindMode chidrenBindMode = ChidrenBindMode.BindEvent) + public void AddChidren(View view, ChidrenBindMode chidrenBindMode) { base.AddChidren(view); diff --git a/HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameRowControl.cs b/HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameRowControl.cs index ad91a5a..3c79f52 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameRowControl.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/FrameLayoutControls/FrameRowControl.cs @@ -6,7 +6,7 @@ namespace HDL_ON.Stan { /// <summary> - /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout + /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout(搴曞眰鐨勯珮搴︿负44) /// </summary> public class FrameRowControl : FrameLayoutStatuControl { @@ -42,7 +42,7 @@ #region 鈻� 鍒濆鍖朹____________________________ /// <summary> - /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout + /// 鍋氭垚涓�涓猂owLayout鍨嬬殑FrameLayout(搴曞眰鐨勯珮搴︿负44) /// </summary> /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param> public FrameRowControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis) @@ -66,7 +66,7 @@ //宸茬粡娣诲姞浜嗗簳绾� return btnBottomLine; } - int lineWidth = this.Width - HdlControlResourse.XXLeft * 2 - LeftOffset - RightOffset; + int lineWidth = this.Width - HdlControlResourse.XXLeft * 2 - LeftOffset + RightOffset; int XX = HdlControlResourse.XXLeft + LeftOffset; if (leftIconSize > 0) { @@ -82,6 +82,26 @@ return btnBottomLine; } + /// <summary> + /// 鎵嬪姩绉婚櫎搴曠嚎(鏈変簺鏃跺�欓渶瑕佽繖绉嶇壒娈婃晥鏋�) + /// </summary> + public void RemoveBottomLine() + { + for (int i = 0; i < this.ChildrenCount; i++) + { + var myView = this.GetChildren(i); + //杩欓噷鏄簳绾跨殑楂樺害鍜孻杞� + if (myView == null || myView.Height != HdlControlResourse.BottomLineHeight + || myView.Y != this.Height - HdlControlResourse.BottomLineHeight) + { + continue; + } + //绉婚櫎搴曠嚎 + myView.RemoveFromParent(); + break; + } + } + #endregion #region 鈻� 娣诲姞宸﹁竟Caption____________________ diff --git a/HDL_ON/UI/UI0-Stan/Controls/MessageControls/ShowMsgControl.cs b/HDL_ON/UI/UI0-Stan/Controls/MessageControls/ShowMsgControl.cs index 3081f6f..b888536 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/MessageControls/ShowMsgControl.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/MessageControls/ShowMsgControl.cs @@ -63,7 +63,7 @@ this.buttonOkText = i_buttonOkText == null ? Language.StringByID(StringId.Confirm) : i_buttonOkText; this.buttonCancelText = i_buttonCancelText == null ? Language.StringByID(StringId.Cancel) : i_buttonCancelText; this.msgType = i_msgType; - this.msgText = i_msg; + this.msgText = i_msg.Replace("{0}", "\r\n"); this.WaitTime = i_waitTime; if (i_msgType == ShowMsgType.Tip) @@ -92,8 +92,21 @@ myTip = null; return; } - //鍒濆鍖栨帶浠� - this.InitMsgControl(); + if (this.msgType == ShowMsgType.TipRemind || this.msgType == ShowMsgType.TipSuccess) + { + //鍒濆鍖栨帶浠� + this.InitExTipControl(); + } + else if (this.msgType == ShowMsgType.ConfirmSuccess || this.msgType == ShowMsgType.ConfirmFail) + { + //鍒濆鍖栨帶浠� + this.InitConfirmSuccessTypeContorl(); + } + else + { + //鍒濆鍖栨帶浠� + this.InitMsgControl(); + } } catch { } } @@ -148,8 +161,9 @@ frameMain.AddChidren(frameCenter); //鏍囬 - var btnTitle = new NormalViewControl(frameCenter.Width, Application.GetRealHeight(22), false); + var btnTitle = new NormalViewControl(frameCenter.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(22), false); btnTitle.Y = Application.GetRealHeight(20); + btnTitle.Gravity = Gravity.CenterHorizontal; btnTitle.TextColor = CSS_Color.MainColor; btnTitle.TextSize = CSS_FontSize.SubheadingFontSize; btnTitle.TextAlignment = TextAlignment.Center; @@ -263,15 +277,143 @@ this.StartWaitTime(btnConfirm); } + /// <summary> + /// 鍒濆鍖栫壒娈婄殑tip鎺т欢,浠呮敮鎸� TipRemind 鍜� TipSuccess + /// </summary> + private void InitExTipControl() + { + //鑾峰彇褰撳墠鐨勭晫闈� + var nowActionForm = MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1) as ViewGroup; + if (nowActionForm == null) + { + return; + } + //涓绘帶浠� + var frameMain = new NormalFrameLayout(); + frameMain.Height = nowActionForm.Height; + frameMain.Width = nowActionForm.Width; + nowActionForm.AddChidren(frameMain); + frameMain.ButtonClickEvent += (sender, e) => + { + frameMain.RemoveFromParent(); + }; + + //璁$畻鐢� + var btnTemp = new ButtonCtrBase(); + btnTemp.Text = msgText.Replace("\r\n", string.Empty); + //鑾峰彇杩欎釜鏄剧ず鐨勫唴瀹圭殑楂樺害(钃濇箹鐨勯粦鑹茶儗鏅殑瀹藉害涓�198,鐒跺悗鍐嶅噺鍘讳綑鐧�) + int rowCount = btnTemp.GetRealRowCountByText(Application.GetRealWidth(198) - HdlControlResourse.XXLeft * 2); + //鍐嶇湅鐪嬪畠鍘熸潵鎸夋崲琛岀鍒嗗壊涓哄嚑琛� + var myArry = msgText.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); + //鐪嬬湅璋佺殑琛屾暟澶�,灏辩敤璋佺殑 + if (myArry.Length > rowCount) + { + rowCount = myArry.Length; + } + int contentHeight = rowCount * Application.GetRealHeight(20); + //钃濇箹榛戣壊鑳屾櫙鐨刌杞翠负302 + var frameBlack = new FrameLayout(); + //濡傛灉鏄琛屾椂,鍑忔帀涓�琛岀殑楂樺害,鍒欏緱鍑烘柊澧炲姞鐨勯珮搴�,鐒跺悗鍐嶉櫎浠�2,鍒欎负Y杞村師濮嬪崰姣� + frameBlack.Y = Application.GetRealHeight(302) - (contentHeight - Application.GetRealHeight(20)) / 2; + frameBlack.Width = Application.GetRealWidth(198); + //瀹為檯璁$畻鍑烘潵鐨勯珮搴︿负 62+鏂囨湰楂樺害+16 + frameBlack.Height = Application.GetRealHeight(62) + contentHeight + Application.GetRealHeight(16); + frameBlack.Radius = (uint)Application.GetRealWidth(12); + frameBlack.Gravity = Gravity.CenterHorizontal; + frameBlack.BackgroundColor = CSS_Color.DialogTransparentColor1; + frameMain.AddChidren(frameBlack); + + //鍥炬爣 + var btnIcon = new IconViewControl(42); + btnIcon.Y = Application.GetRealHeight(10); + btnIcon.Gravity = Gravity.CenterHorizontal; + btnIcon.UnSelectedImagePath = this.msgType == ShowMsgType.TipSuccess ? "Public/MsgIcon/TipSuccessIcon.png" : "Public/MsgIcon/TipIconWhite.png"; + frameBlack.AddChidren(btnIcon); + + //鏄剧ず鏂囨湰 + var btnText = new NormalViewControl(frameBlack.Width - HdlControlResourse.XXLeft * 2, contentHeight, false); + btnText.Y = btnIcon.Bottom + Application.GetRealHeight(10); + btnText.TextAlignment = TextAlignment.Center; + btnText.TextColor = CSS_Color.MainBackgroundColor; + btnText.Gravity = Gravity.CenterHorizontal; + btnText.IsMoreLines = true; + btnText.Text = this.msgText; + frameBlack.AddChidren(btnText); + + //寮�鍚叧闂椂闂� + this.StartCloseTime(frameMain); + } + + /// <summary> + /// 鍒濆鍖栫‘璁ゆ垚鍔熷瀷鎺т欢,浠呮敮鎸� ConfirmSuccess 鍜� ConfirmFail + /// </summary> + private void InitConfirmSuccessTypeContorl() + { + var dialogForm = new Dialog(); + dialogForm.BackgroundColor = CSS_Color.DialogTransparentColor1; + //涓绘帶浠� + var frameMain = new NormalFrameLayout(); + dialogForm.AddChidren(frameMain); + dialogForm.Show(); + + //鐧借壊鑳屾櫙 + var frameBack = new FrameLayout(); + frameBack.Y = Application.GetRealHeight(223); + frameBack.Gravity = Gravity.CenterHorizontal; + frameBack.Width = Application.GetRealWidth(288); + frameBack.Height = Application.GetRealHeight(245); + frameBack.BackgroundColor = CSS_Color.MainBackgroundColor; + frameBack.Radius = (uint)Application.GetRealWidth(12); + frameMain.AddChidren(frameBack); + + //澶у浘鏍�(钃濇箹涓�,瀹冮珮鍑虹櫧鑹插尯鍩�70鍍忕礌,鍥犱负楂樺鐨勬瘮鐜囨槸涓嶄竴鏍风殑,鎵�浠ラ渶瑕佽绠椾竴涓嬫瘮鐜�) + decimal decProportion = 70m / 160; + var btnIcon = new IconViewControl(160); + btnIcon.Y = frameBack.Y - (int)(decProportion * btnIcon.IconSize); + btnIcon.Gravity = Gravity.CenterHorizontal; + btnIcon.UnSelectedImagePath = this.msgType == ShowMsgType.ConfirmSuccess ? "Public/Dialog/DialogTipTitleIcon_1.png" : "Public/Dialog/DialogTipTitleIcon_2.png"; + frameMain.AddChidren(btnIcon); + + //娑堟伅 + var btnMsg = new NormalViewControl(frameMain.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(50), false); + //鍙栧ぇ鍥炬爣鐨勪笅閮ㄩ珮搴�,鐒跺悗鍐嶅姞闂磋窛10 + btnMsg.Y = btnIcon.Height - (frameBack.Y - btnIcon.Y) + Application.GetRealHeight(10); + btnMsg.Gravity = Gravity.CenterHorizontal; + btnMsg.TextAlignment = TextAlignment.TopCenter; + btnMsg.IsMoreLines = true; + btnMsg.TextSize = CSS_FontSize.SubheadingFontSize; + btnMsg.TextColor = CSS_Color.MainColor; + btnMsg.Text = this.msgText; + frameBack.AddChidren(btnMsg); + + //纭鎸夐挳 + var btnConfirm = new BottomClickButton(220); + btnConfirm.Text = this.buttonOkText; + btnConfirm.Y = Application.GetRealHeight(169); + frameBack.AddChidren(btnConfirm); + btnConfirm.ButtonClickEvent += (sender, e) => + { + //鍏抽棴鐣岄潰 + dialogForm.Close(); + //鍥炶皟鍑芥暟 + this.ConfirmClickEvent?.Invoke(); + this.ConfirmClickEvent = null; + this.CancelClickEvent = null; + }; + + //寮�鍚瓑寰呮椂闂� + this.StartWaitTime(btnConfirm); + } + #endregion #region 鈻� 寮�鍚瓑寰呮椂闂確______________________ /// <summary> - /// 寮�鍚瓑寰呮椂闂�(姝ゅ嚱鏁板彧鐢ㄤ簬瀹夊崜) + /// 寮�鍚瓑寰呮椂闂� /// </summary> /// <param name="btnConfirm">纭鎸夐挳</param> - private void StartWaitTime(NormalViewControl btnConfirm) + private void StartWaitTime(ButtonCtrBase btnConfirm) { if (this.WaitTime <= 0) { @@ -303,35 +445,25 @@ } /// <summary> - /// 寮�鍚瓑寰呮椂闂� + /// 寮�鍚叧闂椂闂� /// </summary> - /// <param name="btnConfirm">纭鎸夐挳</param> - private void StartWaitTime(ButtonCtrBase btnConfirm) + /// <param name="frameMain">涓荤晫闈�</param> + private void StartCloseTime(FrameLayout frameMain) { if (this.WaitTime <= 0) { return; } - //涓嶈兘鐐瑰嚮 - btnConfirm.CanClick = false; - HdlThreadLogic.Current.RunThread(() => { - //鏄剧ず鍓╀綑绛夊緟鏃堕棿 - while (btnConfirm.Parent != null && this.WaitTime >= 0) + while (frameMain.Parent != null && this.WaitTime >= 0) { - HdlThreadLogic.Current.RunMain(() => - { - btnConfirm.Text = this.buttonOkText + "(" + this.WaitTime + ")"; - }, ShowErrorMode.NO); System.Threading.Thread.Sleep(1000); this.WaitTime--; } HdlThreadLogic.Current.RunMain(() => { - //鍙互鐐瑰嚮 - btnConfirm.Text = this.buttonOkText; - btnConfirm.CanClick = true; + frameMain?.RemoveFromParent(); }, ShowErrorMode.NO); }); diff --git a/HDL_ON/UI/UI0-Stan/Controls/NormalControls/NormalViewControl.cs b/HDL_ON/UI/UI0-Stan/Controls/NormalControls/NormalViewControl.cs index b16a121..f1eb9b7 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/NormalControls/NormalViewControl.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/NormalControls/NormalViewControl.cs @@ -6,7 +6,7 @@ namespace HDL_ON.Stan { /// <summary> - /// 骞冲嚒鏅�氱殑鎺т欢,鍩烘湰鍙槸鐢ㄦ潵鏄剧ず鉁� + /// 骞冲嚒鏅�氱殑鎺т欢,鍩烘湰鍙槸鐢ㄦ潵鏄剧ず鉁�(姝e父鏂囨湰瀛椾綋棰滆壊(0xFF798394),鏂囧瓧鍚戝乏闈犻綈) /// </summary> public class NormalViewControl : ButtonCtrBase { @@ -19,16 +19,6 @@ public NormalViewControl(int i_Width, int i_Height, bool real) { this.InitSize(i_Width, i_Height, real); - } - - /// <summary> - /// 骞冲嚒鏅�氱殑鎺т欢,鍩烘湰鍙槸鐢ㄦ潵鏄剧ず(姝e父鏂囨湰瀛椾綋棰滆壊,鏂囧瓧鍚戝乏闈犻綈),楂樺害涓烘爣鍑嗛珮搴� - /// </summary> - /// <param name="i_Width">瀹藉害</param> - /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param> - public NormalViewControl(int i_Width, bool real) - { - this.InitSize(i_Width, real); } } } diff --git a/HDL_ON/UI/UI0-Stan/Controls/TextInputControls/TextInputControl.cs b/HDL_ON/UI/UI0-Stan/Controls/TextInputControls/TextInputControl.cs index ec3605d..dcf1f0a 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/TextInputControls/TextInputControl.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/TextInputControls/TextInputControl.cs @@ -6,7 +6,7 @@ namespace HDL_ON.Stan { /// <summary> - /// 鍋氭垚涓�涓緭鍏ユ鎺т欢 + /// 鍋氭垚涓�涓緭鍏ユ鎺т欢,鏍囧噯瀛椾綋棰滆壊(0xFF798394)锛屾枃瀛楀悜宸﹂潬榻�,14鍙峰瓧 /// </summary> public class TextInputControl : TextInputBase { @@ -17,7 +17,7 @@ #region 鈻� 鍒濆鍖朹____________________________ /// <summary> - /// 鍋氭垚涓�涓緭鍏ユ鎺т欢(姝e父鏂囨湰瀛椾綋棰滆壊) + /// 鍋氭垚涓�涓緭鍏ユ鎺т欢,鏍囧噯瀛椾綋棰滆壊(0xFF798394)锛屾枃瀛楀悜宸﹂潬榻�,14鍙峰瓧 /// </summary> /// <param name="i_Width">瀹藉害</param> /// <param name="i_Height">楂樺害</param> diff --git a/HDL_ON/UI/UI0-Stan/Controls/TextInputControls/TextInputDialog.cs b/HDL_ON/UI/UI0-Stan/Controls/TextInputControls/TextInputDialog.cs new file mode 100644 index 0000000..b7f0a28 --- /dev/null +++ b/HDL_ON/UI/UI0-Stan/Controls/TextInputControls/TextInputDialog.cs @@ -0,0 +1,238 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using System; +using System.Text; + +namespace HDL_ON.Stan +{ + /// <summary> + /// 鏂囨湰杈撳叆鐨勫脊绐楃晫闈�(涓嶇敤鍔犲叆鐖舵帶浠�) + /// </summary> + public class TextInputDialog + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鏍囬鏂囨湰 + /// </summary> + private string titleText = string.Empty; + /// <summary> + /// 鍒濆鍊� + /// </summary> + private string textValue = string.Empty; + /// <summary> + /// 褰撹緭鍏ユ涓虹┖鐧芥椂鐨勬彁绀烘枃鏈� + /// </summary> + private string emptyMsg = string.Empty; + /// <summary> + /// 纭鎸夐挳鐨勬枃鏈� + /// </summary> + private string buttonOkText = string.Empty; + /// <summary> + /// 鍙栨秷鎸夐挳鐨勬枃鏈� + /// </summary> + private string buttonCancelText = string.Empty; + /// <summary> + /// 鏄惁鏄瘑鐮佽緭鍏� + /// </summary> + private bool isPassword = false; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鏂囨湰杈撳叆鐨勫脊绐楃晫闈�(涓嶇敤鍔犲叆鐖舵帶浠�) + /// </summary> + /// <param name="i_title">鏍囬鏂囨湰</param> + /// <param name="i_text">鍒濆鍊�</param> + /// <param name="i_emptyMsg">褰撹緭鍏ユ涓虹┖鐧芥椂鐨勬彁绀烘枃鏈�</param> + /// <param name="i_buttonOkText">纭鎸夐挳鐨勬枃鏈�</param> + /// <param name="i_buttonCancelText">鍙栨秷鎸夐挳鐨勬枃鏈�</param> + /// <param name="i_isPassword">鏄惁鏄瘑鐮佽緭鍏�</param> + public TextInputDialog(string i_title, string i_text, string i_emptyMsg, string i_buttonOkText = null, string i_buttonCancelText = null, bool i_isPassword = false) + { + this.titleText = i_title; + this.textValue = i_text; + this.emptyMsg = i_emptyMsg; + + //纭鎸夐挳鏂囨湰 + this.buttonOkText = i_buttonOkText == null ? Language.StringByID(StringId.Confirm) : i_buttonOkText; + this.buttonCancelText = i_buttonCancelText == null ? Language.StringByID(StringId.Cancel) : i_buttonCancelText; + + this.isPassword = i_isPassword; + } + + #endregion + + #region 鈻� 寮圭獥鏄剧ず___________________________ + + /// <summary> + /// 寮圭獥鏄剧ず + /// </summary> + /// <param name="finishEvent">鍥炶皟鍑芥暟,鍙傛暟涓鸿緭鍏ユ鐨勫��</param> + public void Show(Action<string> finishEvent) + { + var dialogForm = new Dialog(); + dialogForm.BackgroundColor = CSS_Color.DialogTransparentColor1; + //涓绘帶浠� + var frameMain = new NormalFrameLayout(); + dialogForm.AddChidren(frameMain); + dialogForm.Show(); + + //涓棿鍖哄煙 + var frameCenter = new NormalFrameLayout(); + frameCenter.Gravity = Gravity.Center; + frameCenter.Width = Application.GetRealWidth(270); + frameCenter.Height = Application.GetRealHeight(50); + frameCenter.BackgroundColor = CSS_Color.MainBackgroundColor; + frameCenter.Radius = (uint)Application.GetMinRealAverage(10); + frameMain.AddChidren(frameCenter); + + //鏍囬 + var btnTitle = new NormalViewControl(frameCenter.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(24), false); + btnTitle.Y = Application.GetRealHeight(19); + btnTitle.Gravity = Gravity.CenterHorizontal; + btnTitle.TextColor = CSS_Color.MainColor; + btnTitle.TextSize = CSS_FontSize.SubheadingFontSize; + btnTitle.TextAlignment = TextAlignment.Center; + btnTitle.IsBold = true; + btnTitle.Text = this.titleText.Replace("{0}", "\r\n"); + btnTitle.Height = Application.GetRealHeight(24) * btnTitle.GetRealRowCountByText(); + btnTitle.IsMoreLines = true; + frameCenter.AddChidren(btnTitle); + + //杈撳叆妗嗙殑鑳屾櫙 + var frameInput = new FrameLayout(); + frameInput.Y = btnTitle.Bottom + Application.GetRealHeight(16); + frameInput.Width = Application.GetRealWidth(222); + frameInput.Height = Application.GetRealHeight(40); + frameInput.Gravity = Gravity.CenterHorizontal; + frameInput.Radius = (uint)Application.GetRealWidth(4); + frameInput.BackgroundColor = CSS_Color.BackgroundColor; + frameCenter.AddChidren(frameInput); + //杈撳叆妗� + var txtInput = new TextInputControl(174, 24, true); + txtInput.X = Application.GetRealWidth(12); + txtInput.Gravity = Gravity.CenterVertical; + txtInput.TextColor = CSS_Color.FirstLevelTitleColor; + txtInput.Text = this.textValue; + frameInput.AddChidren(txtInput); + + //瀵嗙爜鍨� + if (this.isPassword == true) + { + txtInput.IsNumberKeyboardType = true; + txtInput.SecureTextEntry = true; + //瀵嗙爜鍙鍥炬爣 + var btnIcon = new IconViewControl(24); + btnIcon.X = txtInput.Right + Application.GetRealWidth(8); + btnIcon.Gravity = Gravity.CenterVertical; + btnIcon.UnSelectedImagePath = "LoginIcon/HidePasswordIcon.png"; + btnIcon.SelectedImagePath = "LoginIcon/ShowPasswordIcon.png"; + frameInput.AddChidren(btnIcon); + btnIcon.ButtonClickEvent += (sender, e) => + { + btnIcon.IsSelected = !btnIcon.IsSelected; + txtInput.SecureTextEntry = !txtInput.SecureTextEntry; + }; + } + else + { + //鍙栨秷鍥炬爣 + var btnIcon = new IconViewControl(24); + btnIcon.X = txtInput.Right + Application.GetRealWidth(8); + btnIcon.Gravity = Gravity.CenterVertical; + btnIcon.UnSelectedImagePath = "LoginIcon/1.png"; + frameInput.AddChidren(btnIcon); + btnIcon.ButtonClickEvent += (sender, e) => + { + txtInput.Text = string.Empty; + }; + } + + //閿欒鏄剧ず娑堟伅 + var btnErrorMsg = new NormalViewControl(frameInput.Width, Application.GetRealHeight(21), false); + btnErrorMsg.Y = frameInput.Bottom; + btnErrorMsg.Gravity = Gravity.CenterHorizontal; + btnErrorMsg.TextColor = CSS_Color.WarningColor; + btnErrorMsg.Text = this.emptyMsg.Replace("{0}", "\r\n"); + btnErrorMsg.IsMoreLines = true; + btnErrorMsg.TextAlignment = TextAlignment.TopLeft; + btnErrorMsg.Height = Application.GetRealHeight(21) * btnErrorMsg.GetRealRowCountByText(); + btnErrorMsg.Visible = false; + frameCenter.AddChidren(btnErrorMsg); + + //搴曢儴鎸夐挳鐨勯珮搴� + int buttomButtonHeigth = Application.GetRealHeight(43); + //璋冩暣鐧借壊妗屽竷鐨勯珮搴﹀拰鍧愭爣 + frameCenter.Height = frameInput.Bottom + Application.GetRealHeight(31) + buttomButtonHeigth; + //鐧借壊鑳屾櫙鍦ㄨ摑婀栦笂鐨勫潗鏍囦负264,楂樺害涓�172 鐒跺悗璁╁畠鎸夎繖涓瘮渚嬬疆浜庢甯� + frameCenter.Y = Application.GetRealHeight(264) - (frameCenter.Height - Application.GetRealHeight(172)) / 2; + + //鍙栨秷 + var btnCancel = new NormalViewControl(frameCenter.Width / 2, buttomButtonHeigth, false); + btnCancel.Gravity = Gravity.BottomLeft; + btnCancel.TextAlignment = TextAlignment.Center; + btnCancel.TextSize = CSS_FontSize.SubheadingFontSize; + btnCancel.Text = this.buttonCancelText; + frameCenter.AddChidren(btnCancel); + btnCancel.ButtonClickEvent += (sender, e) => + { + //鍏抽棴鐣岄潰 + dialogForm.Close(); + finishEvent = null; + }; + //绾� + var btnLine = new NormalViewControl(frameCenter.Width / 2, HdlControlResourse.BottomLineHeight, false); + btnLine.Y = btnCancel.Y - HdlControlResourse.BottomLineHeight; + btnLine.BackgroundColor = CSS_Color.DividingLineColor; + frameCenter.AddChidren(btnLine); + + //纭 + var btnConfirm = new NormalViewControl(frameCenter.Width - btnCancel.Width, buttomButtonHeigth + HdlControlResourse.BottomLineHeight, false); + btnConfirm.X = btnCancel.Right; + btnConfirm.Y = btnLine.Y; + btnConfirm.TextAlignment = TextAlignment.Center; + btnConfirm.TextSize = CSS_FontSize.SubheadingFontSize; + btnConfirm.TextColor = CSS_Color.MainBackgroundColor; + btnConfirm.BackgroundColor = CSS_Color.MainColor; + btnConfirm.Text = this.buttonOkText; + frameCenter.AddChidren(btnConfirm); + btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), HDLUtils.RectCornerBottomRight); + btnConfirm.ButtonClickEvent += (sender, e) => + { + string inputValue = txtInput.Text.Trim(); + if (inputValue == string.Empty && string.IsNullOrEmpty(this.emptyMsg) != true) + { + //绌虹櫧鐨勬椂鍊�,鎻愮ず娑堟伅 + btnErrorMsg.Visible = true; + + //鐪嬬湅娑堟伅鏄剧ず鐨勬帶浠舵湁娌℃湁澶т簬31,澶т簬鐨勮瘽,鍒欑畻鍑哄畠澧炲姞鐨勫搴�(31鏄緭鍏ユ鍒板簳閮ㄦ寜閽甕杞寸殑绌虹櫧鍖哄煙) + int value = 0; + if (btnErrorMsg.Height > Application.GetRealHeight(31)) + { + //5鏄笌搴曢儴鎸夐挳Y杞寸殑闂磋窛 + value = btnErrorMsg.Height - Application.GetRealHeight(31) + Application.GetRealHeight(5); + } + //璋冩暣鐧借壊妗屽竷鐨勯珮搴﹀拰鍧愭爣 + frameCenter.Height = frameInput.Bottom + Application.GetRealHeight(31) + buttomButtonHeigth + value; + //鐧借壊鑳屾櫙鍦ㄨ摑婀栦笂鐨勫潗鏍囦负264,楂樺害涓�172 鐒跺悗璁╁畠鎸夎繖涓瘮渚嬬疆浜庢甯� + frameCenter.Y = Application.GetRealHeight(264) - (frameCenter.Height - Application.GetRealHeight(172)) / 2; + //涓や釜鎸夐挳缃簳 + btnCancel.Gravity = Gravity.BottomLeft; + btnLine.Y = btnCancel.Y - HdlControlResourse.BottomLineHeight; + btnConfirm.Y = btnLine.Y; + + return; + } + //鍏抽棴鐣岄潰 + dialogForm.Close(); + //鍥炶皟鍑芥暟 + finishEvent?.Invoke(txtInput.Text.Trim()); + }; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI0-Stan/Enum/CommonEnum.cs b/HDL_ON/UI/UI0-Stan/Enum/CommonEnum.cs index ed47b7e..0eff468 100644 --- a/HDL_ON/UI/UI0-Stan/Enum/CommonEnum.cs +++ b/HDL_ON/UI/UI0-Stan/Enum/CommonEnum.cs @@ -10,25 +10,82 @@ public enum ShowMsgType { /// <summary> - /// 鏅�氭彁绀虹被鍨� + /// <para>鏅�氭彁绀虹被鍨�(涓嬮潰杩欑鏍峰紡)</para> + /// <para>鈺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> + /// <para>鈹� 鎻愮ず 鈹�</para> + /// <para>鈹� 鏄剧ず鐨勬秷鎭� 鈹�</para> + /// <para>鈹溾攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�</para> + /// <para>鈹� 纭 鈹�</para> + /// <para>鈺扳攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> /// </summary> Normal = 1, /// <summary> - /// 纭绫诲瀷 + /// <para>纭绫诲瀷(涓嬮潰杩欑鏍峰紡)</para> + /// <para>鈺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> + /// <para>鈹� 鎻愮ず 鈹�</para> + /// <para>鈹� 鏄剧ず鐨勬秷鎭� 鈹�</para> + /// <para>鈹溾攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�</para> + /// <para>鈹� 鍙栨秷 鈹� 纭 鈹�</para> + /// <para>鈺扳攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> /// </summary> Confirm = 2, /// <summary> - /// 閿欒绫诲瀷 + /// <para>閿欒绫诲瀷(涓嬮潰杩欑鏍峰紡)</para> + /// <para>鈺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> + /// <para>鈹� 閿欒 鈹�</para> + /// <para>鈹� 鏄剧ず鐨勬秷鎭� 鈹�</para> + /// <para>鈹溾攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�</para> + /// <para>鈹� 纭 鈹�</para> + /// <para>鈺扳攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> /// </summary> Error = 3, /// <summary> - /// Tip绫诲瀷 + /// <para>Tip绫诲瀷(涓嬮潰杩欑鏍峰紡)</para> + /// <para>鈺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> + /// <para>鈹� 鏄剧ず鐨勬秷鎭� 鈹�</para> + /// <para>鈺扳攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> /// </summary> Tip = 4, /// <summary> - /// 鎻愰啋绫诲瀷 + /// <para>Tip鎻愰啋绫诲瀷1(涓嬮潰杩欑鏍峰紡)</para> + /// <para>鈺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> + /// <para>鈹� 涓夎褰㈡劅鍙瑰彿灏忓浘鏍� 鈹�</para> + /// <para>鈹� 鏄剧ず鐨勬秷鎭� 鈹�</para> + /// <para>鈺扳攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> /// </summary> - Remind = 5 + TipRemind = 5, + /// <summary> + /// <para>Tip鎻愰啋绫诲瀷2(涓嬮潰杩欑鏍峰紡)</para> + /// <para>鈺攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> + /// <para>鈹� 鍦嗗舰鎵撳嬀灏忓浘鏍� 鈹�</para> + /// <para>鈹� 鏄剧ず鐨勬秷鎭� 鈹�</para> + /// <para>鈺扳攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> + /// </summary> + TipSuccess = 6, + /// <summary> + /// <para>鎴愬姛纭绫诲瀷(涓嬮潰杩欑鏍峰紡)</para> + /// <para></para> + /// <para>鈺攢鈹�鍦嗗舰鎵撳嬀鐨勫ぇ鍥炬爣鈹�鈹�鈺�</para> + /// <para>鈹� 鈹�</para> + /// <para>鈹� 鏄剧ず鐨勬秷鎭� 鈹�</para> + /// <para>鈹� 鈺攢鈹�鈹�鈹�鈹�鈹�鈺� 鈹�</para> + /// <para>鈹� 鈹� 纭 鈹� 鈹�</para> + /// <para>鈹� 鈺扳攢鈹�鈹�鈹�鈹�鈹�鈺� 鈹� </para> + /// <para>鈺扳攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> + /// </summary> + ConfirmSuccess = 7, + /// <summary> + /// <para>澶辫触纭绫诲瀷(涓嬮潰杩欑鏍峰紡)</para> + /// <para></para> + /// <para>鈺攢鈹�鍦嗗舰鎵撳弶鐨勫ぇ鍥炬爣鈹�鈹�鈺�</para> + /// <para>鈹� 鈹�</para> + /// <para>鈹� 鏄剧ず鐨勬秷鎭� 鈹�</para> + /// <para>鈹� 鈺攢鈹�鈹�鈹�鈹�鈹�鈺� 鈹�</para> + /// <para>鈹� 鈹� 纭 鈹� 鈹�</para> + /// <para>鈹� 鈺扳攢鈹�鈹�鈹�鈹�鈹�鈺� 鈹� </para> + /// <para>鈺扳攢鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈺�</para> + /// </summary> + ConfirmFail = 8, } /// <summary> diff --git a/HDL_ON/UI/UI0-Stan/Form/AppGestureSecurityForm.cs b/HDL_ON/UI/UI0-Stan/Form/AppGestureSecurityForm.cs new file mode 100644 index 0000000..e765ba7 --- /dev/null +++ b/HDL_ON/UI/UI0-Stan/Form/AppGestureSecurityForm.cs @@ -0,0 +1,172 @@ +锘縰sing HDL_ON.UI.CSS; +using Shared; +using System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.Stan +{ + /// <summary> + /// App鎵嬪娍楠岃瘉鐣岄潰 + /// </summary> + public class AppGestureSecurityForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// <para>Action浜嬩欢</para> + /// <para>1:瀵嗙爜杈撳叆缁撴潫,杩欎釜鏃跺��,绗簩涓弬鏁颁负杈撳叆鐨勫瘑鐮�</para> + /// <para>2:鐐瑰嚮浜嗗簳閮ㄧ殑娑堟伅</para> + /// </summary> + public Action<int, string> ActionEvent = null; + /// <summary> + /// 鎵嬪娍鎺т欢 + /// </summary> + private GestureLockView gestureLockView = null; + /// <summary> + /// 娑堟伅鎺т欢 + /// </summary> + private NormalViewControl btnMsg = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="addTopFrame">鏄惁娣诲姞澶撮儴Frame</param> + /// <param name="i_title">鏍囬淇℃伅</param> + /// <param name="i_bottomMsg">搴曢儴鏄剧ず鐨勪俊鎭</param> + public void ShowForm(bool addTopFrame, string i_title, string i_bottomMsg) + { + //涓嶅厑璁稿乏婊� + this.ScrollLeftEnabled = false; + + if (addTopFrame == false) + { + //娓呯┖澶撮儴鍏ㄩ儴鎺т欢 + topFrameLayout.RemoveAll(); + //鐒跺悗璁╄儗鏅壊涓�浣撳寲 + topFrameLayout.BackgroundColor = bodyFrameLayout.BackgroundColor; + topMenuFrameLayout.BackgroundColor = bodyFrameLayout.BackgroundColor; + } + else + { + //楠岃瘉鎵嬪娍瀵嗙爜 + base.SetTitleText(Language.StringByID(StringId.VerifyGesturePassword)); + } + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(i_title, i_bottomMsg); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + /// <param name="i_title">鏍囬淇℃伅</param> + /// <param name="i_bottomMsg">搴曢儴鏄剧ず鐨勪俊鎭</param> + private void InitMiddleFrame(string i_title, string i_bottomMsg) + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鏍囬 + var btnTitle = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(36), false); + btnTitle.Y = Application.GetRealHeight(164) - topFrameLayout.Bottom; + btnTitle.Gravity = Gravity.CenterHorizontal; + btnTitle.TextAlignment = TextAlignment.Center; + btnTitle.IsBold = true; + btnTitle.TextColor = CSS_Color.FirstLevelTitleColor; + btnTitle.TextSize = CSS_FontSize.EmphasisFontSize_Secondary; + btnTitle.Text = i_title; + bodyFrameLayout.AddChidren(btnTitle); + + //璇风粯鍒跺浘妗� + this.btnMsg = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(72), false); + btnMsg.Y = btnTitle.Bottom; + btnMsg.Gravity = Gravity.CenterHorizontal; + btnMsg.TextAlignment = TextAlignment.TopCenter; + btnMsg.IsBold = true; + btnMsg.IsMoreLines = true; + btnMsg.SelectedTextColor = CSS_Color.WarningColor; + btnMsg.TextID = StringId.PleaseDrawPattern; + bodyFrameLayout.AddChidren(btnMsg); + + //鍘熷瀹冧笌btnDrawMsg鐨勯棿闅旀槸14 + this.gestureLockView = new GestureLockView(); + gestureLockView.Y = btnMsg.Bottom; + gestureLockView.Gravity = Gravity.CenterHorizontal; + gestureLockView.Width = Application.GetRealWidth(215); + gestureLockView.Height = Application.GetRealWidth(215); + gestureLockView.LockViewCorrectColor = CSS_Color.MainColor;//0xFF00FF00,//榛樿鍜屾纭� 鏃舵樉绀虹殑棰滆壊 + gestureLockView.LockViewErrorColor = 0xFFFF0000; //閿欒鏃� 鏄剧ず鐨勯鑹� + gestureLockView.BackgroundColor = CSS_Color.BackgroundColor; + bodyFrameLayout.AddChidren(gestureLockView); + gestureLockView.SetSolidType(true); + //婊戝姩缁撴潫 鍥炶皟瀵嗙爜缁撴灉鍜屽瘑鐮侀暱搴� + gestureLockView.OnLockVerifyEvent += (selectNumStr, selectCount) => + { + //鑷楠岃瘉瀵嗙爜锛屾彁绀烘纭垨鑰呴敊璇� false涓烘樉绀虹孩鑹查敊璇�, 鑷閫夋嫨璋冪敤鏃舵満 + this.gestureLockView.showCorrectStatus(false); + if (selectCount < 4) + { + //鑷冲皯杩炴帴4涓偣锛岃閲嶆柊缁樺埗 + btnMsg.Text = Language.StringByID(StringId.DrawingLengthError); + btnMsg.TextColor = CSS_Color.WarningColor; + return; + } + this.ActionEvent?.Invoke(1, selectNumStr); + }; + + //搴曢儴娑堟伅 + if (string.IsNullOrEmpty(i_bottomMsg) == false) + { + var btnBottomTip = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, 20, false); + btnBottomTip.Y = Application.GetRealHeight(517) - topFrameLayout.Bottom; + btnBottomTip.Gravity = Gravity.CenterHorizontal; + btnBottomTip.TextAlignment = TextAlignment.TopCenter; + btnBottomTip.TextColor = CSS_Color.MainColor; + btnBottomTip.Text = i_bottomMsg; + btnBottomTip.Height = btnBottomTip.GetRealRowCountByText() * Application.GetRealHeight(24); + btnBottomTip.IsMoreLines = true; + bodyFrameLayout.AddChidren(btnBottomTip); + btnBottomTip.ButtonClickEvent += (sender, e) => + { + this.ActionEvent?.Invoke(2, null); + }; + } + } + + #endregion + + #region 鈻� 鐣岄潰鍏抽棴___________________________ + + /// <summary> + /// 鐣岄潰鍏抽棴 + /// </summary> + public override void CloseFormBefore() + { + base.CloseFormBefore(); + + this.ActionEvent = null; + + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鏄剧ず閿欒娑堟伅 + /// </summary> + /// <param name="i_errorMsg">闇�瑕佹樉绀虹殑閿欒娑堟伅</param> + public void ShowErrorMsg(string i_errorMsg) + { + btnMsg.Text = i_errorMsg; + btnMsg.TextColor = CSS_Color.WarningColor; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI0-Stan/Form/AppNumPasswordSecurityForm.cs b/HDL_ON/UI/UI0-Stan/Form/AppNumPasswordSecurityForm.cs new file mode 100644 index 0000000..f2f5ec2 --- /dev/null +++ b/HDL_ON/UI/UI0-Stan/Form/AppNumPasswordSecurityForm.cs @@ -0,0 +1,233 @@ +锘縰sing HDL_ON.UI.CSS; +using Shared; +using System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.Stan +{ + /// <summary> + /// App鏁板瓧瀵嗙爜楠岃瘉鐣岄潰 + /// </summary> + public class AppNumPasswordSecurityForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// <para>Action浜嬩欢</para> + /// <para>1:瀵嗙爜杈撳叆缁撴潫,杩欎釜鏃跺��,绗簩涓弬鏁颁负杈撳叆鐨勫瘑鐮�</para> + /// <para>2:鐐瑰嚮浜嗗簳閮ㄧ殑娑堟伅</para> + /// </summary> + public Action<int, string> ActionEvent = null; + /// <summary> + /// 鍥炬爣鎺т欢闆嗗悎 + /// </summary> + private List<IconViewControl> listIconContr = new List<IconViewControl>(); + /// <summary> + /// 娑堟伅鎺т欢 + /// </summary> + private NormalViewControl btnErrorMsg = null; + /// <summary> + /// 涓�涓珮搴︿负0鐨勮緭鍏ユ + /// </summary> + private EditText txtPassword = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="addTopFrame">鏄惁娣诲姞澶撮儴Frame</param> + /// <param name="i_title">鏍囬淇℃伅</param> + /// <param name="i_bottomMsg">搴曢儴鏄剧ず鐨勪俊鎭</param> + public void ShowForm(bool addTopFrame, string i_title, string i_bottomMsg) + { + //涓嶅厑璁稿乏婊� + this.ScrollLeftEnabled = false; + + if (addTopFrame == false) + { + //娓呯┖澶撮儴鍏ㄩ儴鎺т欢 + topFrameLayout.RemoveAll(); + //鐒跺悗璁╄儗鏅壊涓�浣撳寲 + topFrameLayout.BackgroundColor = bodyFrameLayout.BackgroundColor; + topMenuFrameLayout.BackgroundColor = bodyFrameLayout.BackgroundColor; + } + else + { + //楠岃瘉鏁板瓧瀵嗙爜 + base.SetTitleText(Language.StringByID(StringId.VerifyDigitalPassword)); + } + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(i_title, i_bottomMsg); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + /// <param name="i_title">鏍囬淇℃伅</param> + /// <param name="i_bottomMsg">搴曢儴鏄剧ず鐨勪俊鎭</param> + private void InitMiddleFrame(string i_title, string i_bottomMsg) + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鏍囬 + var btnTitle = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(42), false); + btnTitle.Y = Application.GetRealHeight(228) - topFrameLayout.Bottom; + btnTitle.Gravity = Gravity.CenterHorizontal; + btnTitle.TextAlignment = TextAlignment.Center; + btnTitle.TextColor = CSS_Color.FirstLevelTitleColor; + btnTitle.TextSize = CSS_FontSize.SubheadingFontSize; + btnTitle.Text = i_title; + bodyFrameLayout.AddChidren(btnTitle); + + //绗竴涓渾鍦� + var btnIcon1 = this.InitIconControl(); + btnIcon1.X = Application.GetRealWidth(132); + btnIcon1.Y = btnTitle.Bottom + Application.GetRealWidth(10); + + //绗簩涓渾鍦� + var btnIcon2 = this.InitIconControl(); + btnIcon2.X = btnIcon1.Right + Application.GetRealWidth(16); + btnIcon2.Y = btnIcon1.Y; + + //绗笁涓渾鍦� + var btnIcon3 = this.InitIconControl(); + btnIcon3.X = btnIcon2.Right + Application.GetRealWidth(16); + btnIcon3.Y = btnIcon1.Y; + + //绗洓涓渾鍦� + var btnIcon4 = this.InitIconControl(); + btnIcon4.X = btnIcon3.Right + Application.GetRealWidth(16); + btnIcon4.Y = btnIcon1.Y; + + //閿欒娑堟伅 + this.btnErrorMsg = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(24), false); + btnErrorMsg.Y = btnIcon1.Bottom + Application.GetRealHeight(4); + btnErrorMsg.Gravity = Gravity.CenterHorizontal; + btnErrorMsg.TextColor = CSS_Color.WarningColor; + btnErrorMsg.TextAlignment = TextAlignment.Center; + btnErrorMsg.IsMoreLines = true; + bodyFrameLayout.AddChidren(btnErrorMsg); + + //搴曢儴娑堟伅 + if (string.IsNullOrEmpty(i_bottomMsg) == false) + { + var btnBottomTip = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, 20, false); + btnBottomTip.Y = Application.GetRealHeight(517) - topFrameLayout.Bottom; + btnBottomTip.Gravity = Gravity.CenterHorizontal; + btnBottomTip.TextAlignment = TextAlignment.TopCenter; + btnBottomTip.TextColor = CSS_Color.MainColor; + btnBottomTip.Text = i_bottomMsg; + btnBottomTip.Height = btnBottomTip.GetRealRowCountByText() * Application.GetRealHeight(24); + btnBottomTip.IsMoreLines = true; + bodyFrameLayout.AddChidren(btnBottomTip); + btnBottomTip.ButtonClickEvent += (sender, e) => + { + this.ActionEvent?.Invoke(2, null); + }; + } + + //瀵嗙爜杈撳叆妗� + this.txtPassword = new EditText(); + txtPassword.IsNumberKeyboardType = true; + txtPassword.Height = 1; + bodyFrameLayout.AddChidren(txtPassword); + txtPassword.Foucs = true; + txtPassword.TextChangeEventHandler = (sender, e) => + { + string passwrod = txtPassword.Text.Trim(); + btnErrorMsg.Text = string.Empty; + for (int i = 0; i < 4; i++) + { + if (i < passwrod.Length) + { + //瀹炲績鍥炬爣 + this.listIconContr[i].IsSelected = true; + } + else + { + //绌哄績鍥炬爣 + this.listIconContr[i].IsSelected = false; + } + } + if (passwrod.Length == 4) + { + //鍏抽棴杈撳叆娉� + Application.HideSoftInput(); + + this.ActionEvent?.Invoke(1, passwrod); + } + }; + + bodyFrameLayout.ButtonClickEvent += (sedner, e) => + { + txtPassword.Foucs = true; + }; + btnIcon1.ButtonClickEvent += (sender, e) => { bodyFrameLayout.ButtonClickEvent(null, null); }; + btnIcon2.ButtonClickEvent += (sender, e) => { bodyFrameLayout.ButtonClickEvent(null, null); }; + btnIcon3.ButtonClickEvent += (sender, e) => { bodyFrameLayout.ButtonClickEvent(null, null); }; + btnIcon4.ButtonClickEvent += (sender, e) => { bodyFrameLayout.ButtonClickEvent(null, null); }; + } + + /// <summary> + /// 鍒濆鍖栧浘鏍囨帶浠� + /// </summary> + /// <returns></returns> + private IconViewControl InitIconControl() + { + var btnIcon1 = new IconViewControl(16); + btnIcon1.BorderColor = CSS_Color.FirstLevelTitleColor; + btnIcon1.BorderWidth = (uint)Application.GetRealWidth(1); + btnIcon1.Radius = (uint)Application.GetRealWidth(8); + btnIcon1.BackgroundColor = CSS_Color.MainBackgroundColor; + btnIcon1.SelectedBackgroundColor = CSS_Color.FirstLevelTitleColor; + bodyFrameLayout.AddChidren(btnIcon1); + + //鍔犲叆缂撳瓨 + this.listIconContr.Add(btnIcon1); + + return btnIcon1; + } + + #endregion + + #region 鈻� 鐣岄潰鍏抽棴___________________________ + + /// <summary> + /// 鐣岄潰鍏抽棴 + /// </summary> + public override void CloseFormBefore() + { + base.CloseFormBefore(); + + this.ActionEvent = null; + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鏄剧ず閿欒娑堟伅 + /// </summary> + /// <param name="i_errorMsg">闇�瑕佹樉绀虹殑閿欒娑堟伅</param> + public void ShowErrorMsg(string i_errorMsg) + { + this.txtPassword.Text = string.Empty; + btnErrorMsg.Text = i_errorMsg; + btnErrorMsg.Height = btnErrorMsg.GetRealRowCountByText() * Application.GetRealHeight(24); + //鍏ㄩ儴寮勬垚绌哄績鍥炬爣 + for (int i = 0; i < this.listIconContr.Count; i++) + { + this.listIconContr[i].IsSelected = false; + } + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs b/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs index 06422ea..11911e0 100644 --- a/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs +++ b/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs @@ -16,7 +16,26 @@ /// <summary> /// 鐢婚潰鐨処D(鑷姩缂栧彿,鍞竴涓婚敭,鍜屽悇椤甸潰骞舵棤浠讳綍閫昏緫鍏崇郴,浣嗘槸瀹冪殑鐢ㄥ澶х潃鍛�) /// </summary> - public string FormID = string.Empty; + public string FormID = string.Empty; + /// <summary> + /// 宸︽粦浣胯兘 + /// </summary> + private bool m_ScrollLeftEnabled = true; + /// <summary> + /// 宸︽粦浣胯兘(鐣岄潰鍏抽棴鏃�,搴曞眰浼氳繕鍘�,鏃犻渶鍐嶅鐞�) + /// </summary> + public bool ScrollLeftEnabled + { + get { return m_ScrollLeftEnabled; } + set + { + if (MainPage.BasePageView.ScrollEnabled != value) + { + MainPage.BasePageView.ScrollEnabled = value; + this.m_ScrollLeftEnabled = value; + } + } + } #endregion @@ -182,19 +201,6 @@ #endregion #region 鈻� 涓�鑸殑鏂规硶_________________________ - - /// <summary> - /// 鏄剧ず淇℃伅妗� - /// </summary> - /// <param name="msgType">淇℃伅绫诲瀷</param> - /// <param name="msg">淇℃伅</param> - /// <param name="action">鍗曞嚮纭鍚庢墽琛岀殑鍥炶皟鍑芥暟</param> - /// <param name="buttonText">鎸夐挳鐨勬枃鏈�</param> - /// <param name="i_waitTime">绛夊緟鏃堕棿,鍗曚綅涓虹,璁剧疆纭鎸夐挳鍦ㄥ闀挎椂闂村悗鎵嶈兘澶熺偣鍑�</param> - public void ShowMassage(ShowMsgType msgType, string msg, Action action = null, string buttonText = null, int i_waitTime = -1) - { - HdlMessageLogic.Current.ShowMassage(msgType, msg, action, buttonText, i_waitTime); - } /// <summary> /// 鍒ゆ柇褰撳墠姝e湪娲诲姩鐨勭晫闈㈡槸鍚︽槸褰撳墠杩欎釜鐣岄潰 @@ -233,6 +239,24 @@ return value1; } + /// <summary> + /// 鑾峰彇鏂囨湰鐨勭湡瀹炲搴� + /// </summary> + /// <param name="i_text">闇�瑕佽绠楃殑鏂囨湰</param> + /// <param name="i_size">瀛椾綋澶у皬</param> + /// <param name="i_isBold">鏄惁鏄矖浣�</param> + /// <returns></returns> + public int GetTextRealWidth(string i_text, int i_size, bool i_isBold = false) + { + //瀹氫箟涓�涓复鏃剁殑鎺т欢 + var btnTemp = new ButtonCtrBase(); + btnTemp.TextSize = i_size; + btnTemp.IsBold = i_isBold; + btnTemp.Text = i_text; + + return btnTemp.GetRealWidthByText(); + } + #endregion #region 鈻� 鍙嶅皠鏂规硶___________________________ diff --git a/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs b/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs index a592744..85164ed 100644 --- a/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs +++ b/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs @@ -124,7 +124,35 @@ btnTilte.TextSize = UI.CSS.CSS_FontSize.HeadlineFontSize; btnTilte.TextColor = UI.CSS.CSS_Color.FirstLevelTitleColor; topFrameLayout.AddChidren(btnTilte); - topFrameLayout.AddTag("txtTitle", btnTilte); + topFrameLayout.AddTag("txtTitle", btnTilte); +#if DEBUG + btnTilte.MouseLongEventHandler += (sender, e) => + { + + var form = new BottomMenuSelectControl(3); + form.AddMenu("鍒囨崲涓轰腑鏂�", () => + { + Language.CurrentLanguage = "Chinese"; + //娓呴櫎鍏ㄩ儴鎺т欢 + this.ClearBodyFrame(); + //鎵цShowForm()鏂规硶瀹炵幇閲嶆柊鍔犺浇 + this.LoadShowFormMethod(this.m_parameter); + }); + form.AddMenu("鍒囨崲涓鸿嫳鏂�", () => + { + Language.CurrentLanguage = "English"; + //娓呴櫎鍏ㄩ儴鎺т欢 + this.ClearBodyFrame(); + //鎵цShowForm()鏂规硶瀹炵幇閲嶆柊鍔犺浇 + this.LoadShowFormMethod(this.m_parameter); + }); + form.AddMenu("鏌ョ湅鏈湴鏂囦欢", () => + { + var form2 = new HideOptionDirectoryListForm(); + form2.AddForm(); + }); + }; +#endif } #endregion @@ -290,7 +318,7 @@ #region 鈻� 娣诲姞鍒楄〃娑堟伅鏄剧ず鎺т欢_______________ /// <summary> - /// 娣诲姞鍒楄〃娑堟伅鏄剧ず鎺т欢,杩斿洖鐨勬槸鏈�鍚庝竴涓帶浠剁殑搴曢儴鍧愭爣(娌$湅鎳傝繖涓嚱鏁板墠,璇峰嬁浣跨敤) + /// 娣诲姞鍒楄〃娑堟伅鏄剧ず鎺т欢,杩斿洖鐢熸垚鐨勬帶浠�(娌$湅鎳傝繖涓嚱鏁板墠,璇峰嬁浣跨敤,瀹冧笉浼氬府璁$畻鎹㈣) /// </summary> /// <param name="frameTable">妗屽竷瀹瑰櫒鎺т欢</param> /// <param name="i_msg">鏄剧ず鐨勬秷鎭�(鎹㈣璇蜂娇鐢ㄣ�恵0}銆戣繘琛屽垎鍓�)</param> @@ -305,7 +333,7 @@ /// </param> /// <param name="i_width">鏂囨湰瀹藉害,鐪熷疄鍊�,褰撲负-1鏃�,鍐呴儴鑷姩璁$畻</param> /// <returns></returns> - public int AddListMsgControls(FrameLayout frameTable, string i_msg, int i_fontSize, uint i_fontColor, int i_height, + public List<NormalViewControl> AddListMsgControls(FrameLayout frameTable, string i_msg, int i_fontSize, uint i_fontColor, int i_height, int i_yy, TextAlignment alignment = TextAlignment.Center, bool special = false, int i_width = -1) { var listMsg = i_msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); @@ -354,7 +382,7 @@ } //鐗规畩澶勭悊 - if (special == true && alignment == TextAlignment.Center) + if (special == true) { //璁剧疆瀹冪殑鐪熷疄瀹藉害(瀵箂pecial鍙橀噺鏈夌敤) int realWidth = btnMsg.GetRealWidthByText(); @@ -372,7 +400,7 @@ i_yy = btnMsg.Bottom + Application.GetRealHeight(4); } //鐗规畩澶勭悊 - if (special == true && alignment == TextAlignment.Center) + if (special == true) { foreach (var contr in listContr) { @@ -381,7 +409,7 @@ } } - return i_yy - Application.GetRealHeight(4); + return listContr; } #endregion @@ -447,7 +475,7 @@ public void RemoveBackButton() { //绉婚櫎杩斿洖閿� - var back = (NormalViewControl)topFrameLayout.GetTagByKey("btnBack"); + var back = (PicViewControl)topFrameLayout.GetTagByKey("btnBack"); topFrameLayout.RemoveTag("btnBack"); back?.RemoveFromParent(); diff --git a/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs b/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs index 1250082..3608632 100644 --- a/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs +++ b/HDL_ON/UI/UI0-Stan/Form/DeviceFunctionCardCommonForm.cs @@ -23,6 +23,10 @@ /// </summary> public Action SettionFinishEvent = null; /// <summary> + /// 宸﹀彸缈婚〉鐨勬帶浠剁殑浜嬩欢 + /// </summary> + public Action<int> PageChangeEvent = null; + /// <summary> /// 宸﹀彸鏁翠釜缈婚〉鐨勬帶浠� /// </summary> private PageLayout pageLayout = null; @@ -51,14 +55,14 @@ /// </summary> public NormalFrameLayout FrameWhiteCentet2 = null; - /// <summary> - /// 鏄惁鏄剧ず鏀惰棌鎸夐挳 + /// <summary> + /// 鏄惁鏄剧ず鏀惰棌鎸夐挳 /// </summary> public bool ShowColltionButton = true; #endregion - + #region 鈻� 鍒濆鍖朹____________________________ - + /// <summary> /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) /// </summary> @@ -95,6 +99,7 @@ { //璁剧疆搴曢儴涓や釜鎸夐挳鐨勭姸鎬� this.SetBottomTwoButtonStatu(); + this.PageChangeEvent?.Invoke(index); }; //鍒濆鍖栫涓�涓储寮曠殑妗屽竷 @@ -212,6 +217,10 @@ this.pageLayout.PageIndex = 0; //璁剧疆搴曢儴涓や釜鎸夐挳鐨勭姸鎬� this.SetBottomTwoButtonStatu(); + if (this.FrameWhiteCentet2 != null && this.pageLayout.ScrollEnabled == false) + { + this.pageLayout.ScrollEnabled = true; + } }; this.btnBottomTwo = new NormalViewControl(14, 6, true); btnBottomTwo.X = btnBottomOne.Right + Application.GetRealWidth(8); @@ -224,6 +233,10 @@ this.pageLayout.PageIndex = 1; //璁剧疆搴曢儴涓や釜鎸夐挳鐨勭姸鎬� this.SetBottomTwoButtonStatu(); + if (this.FrameWhiteCentet2 != null && this.pageLayout.ScrollEnabled == false) + { + this.pageLayout.ScrollEnabled = true; + } }; } @@ -248,7 +261,40 @@ #endregion + #region 鈻� 鐣岄潰鍏抽棴___________________________ + + /// <summary> + /// 鐣岄潰鍏抽棴 + /// </summary> + public override void CloseFormBefore() + { + base.CloseFormBefore(); + + this.SettionFinishEvent = null; + this.PageChangeEvent = null; + } + + #endregion + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鑾峰彇澶撮儴鍙宠竟鐨勩�愯缃�戝浘鏍囨帶浠� + /// </summary> + /// <returns></returns> + public PicViewControl GetTopSettingIcon() + { + for (int i = 0; i < topFrameLayout.ChildrenCount; i++) + { + var myView = topFrameLayout.GetChildren(i); + if (myView == null || myView.Name != "btnSetting") + { + continue; + } + return myView as PicViewControl; + } + return null; + } /// <summary> /// 娣诲姞澶撮儴銆愯缃�戠殑鍥炬爣 @@ -257,18 +303,20 @@ /// <param name="btnHigherDeviceName">涓婁竴绾х晫闈㈢殑璁惧鍚嶅瓧鎺т欢(鍘熸潵on鐨勬鏋跺お鍧�)</param> private void AddTopSettingIcon(Button btnHigherDeviceName, Button btnHigherRoom) { - //濡傛灉鏄垚鍛樻病鏈夊姛鑳� - //if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true) - //{ - // return; - //} - //璁剧疆鍥炬爣 + //璁剧疆鍥炬爣(闂ㄩ攣鐣岄潰闇�瑕佸�熺敤杩欎釜鍥炬爣鐨刋杞村拰Y杞�,鎵�浠ュ姞杩涙潵) var btnSetting = new PicViewControl(28, 28); btnSetting.X = Application.GetRealWidth(337); btnSetting.Y = Application.GetRealHeight(9); btnSetting.UnSelectedImagePath = "Public/FuncInfoSetIcon.png"; + btnSetting.Name = "btnSetting"; topFrameLayout.AddChidren(btnSetting); + //濡傛灉鏄垚鍛樻病鏈夊姛鑳� + if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true) + { + btnSetting.Visible = false; + } + btnSetting.ButtonClickEvent += (sender, e) => { var infoView = new UI.FunctionBaseInfoSetPage(this.device, () => diff --git a/HDL_ON/UI/UI0-Stan/Form/HideOptionSearchAllFile.cs b/HDL_ON/UI/UI0-Stan/Form/HideOptionSearchAllFile.cs index 32fe362..583ea5e 100644 --- a/HDL_ON/UI/UI0-Stan/Form/HideOptionSearchAllFile.cs +++ b/HDL_ON/UI/UI0-Stan/Form/HideOptionSearchAllFile.cs @@ -115,7 +115,7 @@ bodyFrameLayout.AddChidren(btnButon); btnButon.ButtonClickEvent += (sender, e) => { - this.ShowMassage(ShowMsgType.Confirm, "鏄惁娓呴櫎璇ユ枃浠跺す", () => + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, "鏄惁娓呴櫎璇ユ枃浠跺す", () => { try { @@ -124,7 +124,7 @@ } catch (Exception ex) { - this.ShowMassage(ShowMsgType.Error, "娓呴櫎缂撳瓨鏂囦欢澶瑰紓甯�"); + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Error, "娓呴櫎缂撳瓨鏂囦欢澶瑰紓甯�"); } }); }; diff --git a/HDL_ON/UI/UI0-Stan/Logic/HdlCheckLogic.cs b/HDL_ON/UI/UI0-Stan/Logic/HdlCheckLogic.cs new file mode 100644 index 0000000..fcc986b --- /dev/null +++ b/HDL_ON/UI/UI0-Stan/Logic/HdlCheckLogic.cs @@ -0,0 +1,246 @@ +锘縰sing Shared; +using System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.Stan +{ + /// <summary> + /// 鍏遍�氭娴嬮�昏緫 + /// </summary> + public class HdlCheckLogic + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鍏遍�氭娴嬮�昏緫 + /// </summary> + private static HdlCheckLogic m_Current = null; + /// <summary> + /// 鍏遍�氭娴嬮�昏緫 + /// </summary> + public static HdlCheckLogic Current + { + get + { + if (m_Current == null) + { + m_Current = new HdlCheckLogic(); + } + return m_Current; + } + } + + /// <summary> + /// 楠岃瘉璁よ瘉鐨勬鏁� + /// </summary> + private int checkSecurityCount = 3; + + #endregion + + #region 鈻� 楠岃瘉瑙i攣璁よ瘉_______________________ + + /// <summary> + /// 楠岃瘉瑙i攣璁よ瘉 + /// </summary> + /// <param name="addTopFrame">楠岃瘉鐣岄潰鏄惁娣诲姞澶撮儴Frame(鍙鎵嬪娍瀵嗙爜鍜屾暟瀛楀瘑鐮佹湁鏁�)</param> + /// <param name="successEvent">楠岃瘉鎴愬姛涔嬪悗鐨勫洖璋冨嚱鏁�,澶辫触涓嶄細鍥炶皟(0:娌℃湁璁剧疆鏈夐獙璇� 1:楠岃瘉鎴愬姛锛�</param> + /// <param name="loadPageBeforEvent">鍔犺浇鎸囧畾瑙i攣璁よ瘉鐣岄潰涔嬪墠鐨勪簨浠�,0:鍙栨秷褰撳墠楠岃瘉骞跺垏鎹㈠埌鍏朵粬鏂瑰紡,1:鏁板瓧瀵嗙爜,2:鎵嬪娍瀵嗙爜,3:鎸囩汗瀵嗙爜,4:闈㈠ID</param> + public void CheckUnlockSecurity(bool addTopFrame, Action<int> successEvent, Action<string> loadPageBeforEvent = null) + { + //楠岃瘉鎸囩汗鍜岄潰瀹筰d閮戒娇鐢ㄦ寚绾归獙璇� + if (UserInfo.Current.appUnlockType.Contains("3") || UserInfo.Current.appUnlockType.Contains("4")) + { + //鍏堟妸杩欎釜涓滆タ缃┖ + TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = null; + + TouchIDUtils.TouchIDSupperType type = TouchIDUtils.getTouchIDSupperType(); + if (type == TouchIDUtils.TouchIDSupperType.TouchID) + { + //閫氱煡浣跨敤鎸囩汗楠岃瘉 + loadPageBeforEvent?.Invoke("3"); + + //Touch ID楠岃瘉 + TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent += (sender2, e2) => + { + if (e2 == TouchIDUtils.TouchIDState.Success) + { + //娆℃暟杩樺師 + this.checkSecurityCount = 3; + + //TouchID楠岃瘉鎴愬姛 + successEvent?.Invoke(1); + successEvent = null; + loadPageBeforEvent = null; + TouchIDUtils.Instance.OnHDLTouchIDStateBackEvent = null; + } + else if (e2 == TouchIDUtils.TouchIDState.InputPassword) + { + //閫氱煡鍙栨秷浜嗛獙璇�,鍒囨崲涓哄叾浠栭獙璇� + loadPageBeforEvent?.Invoke("0"); + + //浣跨敤瀵嗙爜鎴栬�呮墜鍔垮瘑鐮佽В閿佽璇� + this.CheckUnlockSecurityByPassword(addTopFrame, successEvent, loadPageBeforEvent); + } + }; + //鎻愮ず鏁板瓧瀵嗙爜楠岃瘉杩樻槸缁樺埗鎵嬪娍楠岃瘉 + string strTitle = this.GetVerificationTitleString(); + + TouchIDUtils.Instance.showTouchIDWithDescribe(strTitle, Language.StringByID(StringId.PleaseVerifyTheFingerprint)); + } + //浠栧叧闂簡鎵嬫満鐨勬寚绾归獙璇� + else + { + //浣跨敤瀵嗙爜鎴栬�呮墜鍔垮瘑鐮佽В閿佽璇� + this.CheckUnlockSecurityByPassword(addTopFrame, successEvent, loadPageBeforEvent); + } + } + else + { + //浣跨敤瀵嗙爜鎴栬�呮墜鍔垮瘑鐮佽В閿佽璇� + this.CheckUnlockSecurityByPassword(addTopFrame, successEvent, loadPageBeforEvent); + } + } + + /// <summary> + /// 浣跨敤瀵嗙爜鎴栬�呮墜鍔垮瘑鐮佽В閿佽璇� + /// </summary> + /// <param name="addTopFrame">楠岃瘉鐣岄潰鏄惁娣诲姞澶撮儴Frame(鍙鎵嬪娍瀵嗙爜鍜屾暟瀛楀瘑鐮佹湁鏁�)</param> + /// <param name="successEvent">楠岃瘉鎴愬姛涔嬪悗鐨勫洖璋冨嚱鏁�,澶辫触涓嶄細鍥炶皟(0:娌℃湁璁剧疆鏈夐獙璇� 1:楠岃瘉鎴愬姛锛�</param> + /// <param name="loadPageBeforEvent">鍔犺浇鎸囧畾瑙i攣璁よ瘉鐣岄潰涔嬪墠鐨勪簨浠�,1:鏁板瓧瀵嗙爜,2:鎵嬪娍瀵嗙爜,3:鎸囩汗瀵嗙爜,4:闈㈠ID</param> + private void CheckUnlockSecurityByPassword(bool addTopFrame, Action<int> successEvent, Action<string> loadPageBeforEvent = null) + { + if (UserInfo.Current.appUnlockType.Contains("1")) + { + //閫氱煡浣跨敤鏁板瓧瀵嗙爜楠岃瘉 + loadPageBeforEvent?.Invoke("1"); + + //鏄剧ず鏁板瓧瀵嗙爜瑙i攣璁よ瘉鐣岄潰 + this.ShowAppNumPasswordSecurityForm(addTopFrame, successEvent); + } + else if (UserInfo.Current.appUnlockType.Contains("2")) + { + //閫氱煡浣跨敤鎵嬪娍瀵嗙爜楠岃瘉 + loadPageBeforEvent?.Invoke("2"); + + //鏄剧ず鎵嬪娍瀵嗙爜瑙i攣璁よ瘉鐣岄潰 + this.ShowAppGestureSecurityForm(addTopFrame, successEvent); + } + else + { + //娌℃湁璁剧疆鏈夐獙璇� + successEvent?.Invoke(0); + successEvent = null; + } + } + + /// <summary> + /// 鏄剧ず鏁板瓧瀵嗙爜瑙i攣璁よ瘉鐣岄潰 + /// </summary> + /// <param name="addTopFrame">楠岃瘉鐣岄潰鏄惁娣诲姞澶撮儴Frame(鍙鎵嬪娍瀵嗙爜鍜屾暟瀛楀瘑鐮佹湁鏁�)</param> + /// <param name="successEvent">楠岃瘉鎴愬姛涔嬪悗鐨勫洖璋冨嚱鏁�,澶辫触涓嶄細鍥炶皟(0:娌℃湁璁剧疆鏈夐獙璇� 1:楠岃瘉鎴愬姛锛�</param> + private void ShowAppNumPasswordSecurityForm(bool addTopFrame, Action<int> successEvent) + { + var form = new AppNumPasswordSecurityForm(); + form.AddForm(addTopFrame, Language.StringByID(StringId.PlsEntryPassword), string.Empty); + form.ActionEvent += (div, password) => + { + //瀵嗙爜杈撳叆缁撴潫 + if (div == 1) + { + //瀵嗙爜姝g‘ + if (UserInfo.Current.appUnlockPasswrod == password) + { + //娆℃暟杩樺師 + this.checkSecurityCount = 3; + + form.CloseForm(); + //鍥炶皟 + successEvent?.Invoke(1); + successEvent = null; + } + else + { + this.checkSecurityCount--; + if (this.checkSecurityCount == 0) + { + //绠$悊鍛樿韩浠介獙璇佸け璐�,璇烽噸鏂扮櫥褰� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.CheckAdminFailAndLoginAgain)); + HDLCommon.Current.Logout(); + + this.checkSecurityCount = 3; + return; + } + //楠岃瘉澶辫触锛屽瘑鐮侀敊璇�. + form.ShowErrorMsg(Language.StringByID(StringId.AuthenticationFailedPasswordError)); + } + } + }; + } + + /// <summary> + /// 鏄剧ず鎵嬪娍瀵嗙爜瑙i攣璁よ瘉鐣岄潰 + /// </summary> + /// <param name="addTopFrame">楠岃瘉鐣岄潰鏄惁娣诲姞澶撮儴Frame(鍙鎵嬪娍瀵嗙爜鍜屾暟瀛楀瘑鐮佹湁鏁�)</param> + /// <param name="successEvent">楠岃瘉鎴愬姛涔嬪悗鐨勫洖璋冨嚱鏁�,澶辫触涓嶄細鍥炶皟(0:娌℃湁璁剧疆鏈夐獙璇� 1:楠岃瘉鎴愬姛锛�</param> + private void ShowAppGestureSecurityForm(bool addTopFrame, Action<int> successEvent) + { + var form = new AppGestureSecurityForm(); + form.AddForm(addTopFrame, Language.StringByID(StringId.VerifyGesturePassword), string.Empty); + form.SetTitleText(string.Empty); + form.ActionEvent += (div, password) => + { + //瀵嗙爜杈撳叆缁撴潫 + if (div == 1) + { + //瀵嗙爜姝g‘ + if (UserInfo.Current.appUnlockPasswrod == password) + { + //娆℃暟杩樺師 + this.checkSecurityCount = 3; + + form.CloseForm(); + //鍥炶皟 + successEvent?.Invoke(1); + successEvent = null; + } + else + { + this.checkSecurityCount--; + if (this.checkSecurityCount == 0) + { + //绠$悊鍛樿韩浠介獙璇佸け璐�,璇烽噸鏂扮櫥褰� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.CheckAdminFailAndLoginAgain)); + HDLCommon.Current.Logout(); + + this.checkSecurityCount = 3; + return; + } + + //楠岃瘉澶辫触锛屽瘑鐮侀敊璇�. + form.ShowErrorMsg(Language.StringByID(StringId.AuthenticationFailedPasswordError)); + } + } + }; + } + + /// <summary> + /// 鍒ゆ柇鏄惁鏁板瓧楠岃瘉銆佸惁鍒欑粯鍒舵墜鍔块獙璇� + /// </summary> + /// <returns></returns> + private string GetVerificationTitleString() + { + //浼樺厛浣跨敤瀵嗙爜楠岃瘉,瀵嗙爜楠岃瘉鍜屾墜鍔块獙璇佷笉鍏卞瓨 + if (UserInfo.Current.appUnlockType.Contains("1") == true) + { + return Language.StringByID(StringId.PasswordVerification); + } + else + { + return Language.StringByID(StringId.GestureVerification); + } + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI0-Stan/Logic/HdlCommonLogic.cs b/HDL_ON/UI/UI0-Stan/Logic/HdlCommonLogic.cs new file mode 100644 index 0000000..2f2f53a --- /dev/null +++ b/HDL_ON/UI/UI0-Stan/Logic/HdlCommonLogic.cs @@ -0,0 +1,433 @@ +锘縰sing Shared; +using System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.Stan +{ + /// <summary> + /// 涓�鑸殑鍏遍�氶�昏緫鏂规硶 + /// </summary> + public class HdlCommonLogic + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鐣岄潰鐩稿叧鐨勯�昏緫 + /// </summary> + private static HdlCommonLogic m_Current; + /// <summary> + /// 鐣岄潰鐩稿叧鐨勯�昏緫 + /// </summary> + public static HdlCommonLogic Current + { + get + { + if (m_Current == null) + { + m_Current = new HdlCommonLogic(); + } + return m_Current; + } + } + + #endregion + + #region 鈻� 16杩涘埗杞寲_________________________ + + /// <summary> + /// 灏�16杩涘埗鐨勬枃鏈炕璇戜负姝e父鏂囨湰 + /// </summary> + /// <param name="hexText">16杩涘埗鐨勬枃鏈�</param> + /// <param name="count">浠ュ灏戜釜瀛楄妭涓轰竴缁�</param> + /// <returns></returns> + public string TranslateHexadecimalIntoText(string hexText, int count = 2) + { + string textValue = string.Empty; + while (hexText.Length > 0) + { + string temp = hexText.Substring(0, count); + hexText = hexText.Substring(count); + int value = Convert.ToInt32(temp, 16); + textValue += ((char)value).ToString(); + } + return textValue; + } + + /// <summary> + /// 灏嗘枃鏈炕璇戜负16杩涘埗鐨勬枃鏈� + /// </summary> + /// <param name="text">鎸囧畾鏂囨湰</param> + /// <returns></returns> + public string TranslateTextIntoHexadecimal(string text) + { + string textValue = string.Empty; + foreach (char c in text) + { + int value = Convert.ToInt32(c); + textValue += Convert.ToString(value, 16); + } + return textValue; + } + + #endregion + + #region 鈻� 鍔犲瘑鍜岃В瀵哶________________________ + + /// <summary> + /// 鍔犲瘑瀵嗙爜 + /// </summary> + /// <param name="keys"></param> + /// <param name="strPsw"></param> + /// <returns></returns> + public string EncryptPassword(string keys, string strPsw) + { + try + { + if (string.IsNullOrEmpty(strPsw) == true) + { + return strPsw; + } + var des = new System.Security.Cryptography.DESCryptoServiceProvider(); + byte[] inputByteArray = Encoding.Default.GetBytes(strPsw); + des.Key = ASCIIEncoding.ASCII.GetBytes(keys); + des.IV = ASCIIEncoding.ASCII.GetBytes(keys); + var ms = new System.IO.MemoryStream(); + var cs = new System.Security.Cryptography.CryptoStream(ms, des.CreateEncryptor(), System.Security.Cryptography.CryptoStreamMode.Write); + cs.Write(inputByteArray, 0, inputByteArray.Length); + cs.FlushFinalBlock(); + StringBuilder ret = new StringBuilder(); + foreach (byte b in ms.ToArray()) + { + ret.AppendFormat("{0:X2}", b); + } + return ret.ToString().ToLower(); + } + catch { return strPsw; } + } + + /// <summary> + /// 瑙e瘑瀵嗙爜 + /// </summary> + /// <param name="strPsw"></param> + /// <returns></returns> + public string DecryptPassword(string keys, string strPsw) + { + try + { + if (strPsw == string.Empty) + { + return strPsw; + } + var des = new System.Security.Cryptography.DESCryptoServiceProvider(); + + byte[] inputByteArray = new byte[strPsw.Length / 2]; + for (int x = 0; x < strPsw.Length / 2; x++) + { + int i = (Convert.ToInt32(strPsw.Substring(x * 2, 2), 16)); + inputByteArray[x] = (byte)i; + } + + des.Key = ASCIIEncoding.ASCII.GetBytes(keys); + des.IV = ASCIIEncoding.ASCII.GetBytes(keys); + var ms = new System.IO.MemoryStream(); + var cs = new System.Security.Cryptography.CryptoStream(ms, des.CreateDecryptor(), System.Security.Cryptography.CryptoStreamMode.Write); + cs.Write(inputByteArray, 0, inputByteArray.Length); + cs.FlushFinalBlock(); + + StringBuilder ret = new StringBuilder(); + + return System.Text.Encoding.Default.GetString(ms.ToArray()); + } + catch { return strPsw; } + } + #endregion + + #region 鈻� 鏃堕棿杞崲___________________________ + + /// <summary> + /// 灏唘tc鏃堕棿绫诲瀷鐨勫瓧绗︿覆(杩欑鏍煎紡:2019-11-11T11:31:01),杞崲涓烘湰鍦版椂闂� + /// </summary> + /// <param name="utcTimeText">utc鏃堕棿,杩欑鏍煎紡:2019-11-11T11:31:01</param> + /// <returns></returns> + public DateTime ConvertUtcTimeToLocalTime(string utcTimeText) + { + var utcTime = Convert.ToDateTime(utcTimeText); + return TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local); + } + + /// <summary> + /// 灏唘tc鏃堕棿绫诲瀷鐨勫瓧绗︿覆(杩欑鏍煎紡:1597302318861,13浣嶆暟),杞崲涓烘湰鍦版椂闂� + /// </summary> + /// <param name="utcTimeText">utc鏃堕棿,杩欑鏍煎紡:1597302318861,13浣嶆暟</param> + /// <returns></returns> + public DateTime ConvertUtcTimeToLocalTime2(string utcTimeText) + { + DateTime dtStart = new DateTime(1970, 1, 1); + long lTime = long.Parse(utcTimeText + "0000"); + TimeSpan toNow = new TimeSpan(lTime); + DateTime utcTime = dtStart.Add(toNow); + + return TimeZoneInfo.ConvertTimeFromUtc(utcTime, TimeZoneInfo.Local); + } + + /// <summary> + /// 鍗曠函鐨勫皢鏃堕棿绫诲瀷鐨勫瓧绗︿覆(杩欑鏍煎紡:1597302318861,13浣嶆暟),杞崲鏃堕棿绫诲瀷 + /// </summary> + /// <param name="timeText"></param> + /// <returns></returns> + public DateTime ConvertTextToTime(string timeText) + { + DateTime dtStart = new DateTime(1970, 1, 1); + long lTime = long.Parse(timeText + "0000"); + TimeSpan toNow = new TimeSpan(lTime); + return dtStart.Add(toNow); + } + + /// <summary> + /// 杞崲涓烘棩鏈熸枃鏈�(鑰冭檻涓嫳鏂囷紝杩斿洖鏍煎紡:2021骞�9鏈�1鏃�(涓枃鎯呭喌) Sept 1,2021(鑻辨枃)) + /// </summary> + /// <param name="i_month">鏈�</param> + /// <param name="i_day">鏃�</param> + /// <param name="i_year">骞�(鍙互鐪佺暐)</param> + /// <returns></returns> + public string ConvertDayText(int i_month, int i_day, int i_year = -1) + { + //涓枃 + if (Language.CurrentLanguage == "Chinese") + { + string txt = i_month + Language.StringByID(StringId.month) + i_day + Language.StringByID(StringId.day); + if (i_year != -1) + { + txt = i_year + Language.StringByID(StringId.Years) + txt; + } + return txt; + } + //鑻辨枃 + string yearText = i_year == -1 ? string.Empty : "," + i_year.ToString(); + if (i_month == 1) { return "Jan " + i_day + yearText; } + if (i_month == 2) { return "Feb " + i_day + yearText; } + if (i_month == 3) { return "Mar " + i_day + yearText; } + if (i_month == 4) { return "Apr " + i_day + yearText; } + if (i_month == 5) { return "May " + i_day + yearText; } + if (i_month == 6) { return "Jun " + i_day + yearText; } + if (i_month == 7) { return "Jul " + i_day + yearText; } + if (i_month == 8) { return "Aug " + i_day + yearText; } + if (i_month == 9) { return "Sept " + i_day + yearText; } + if (i_month == 10) { return "Oct " + i_day + yearText; } + if (i_month == 11) { return "Nov " + i_day + yearText; } + if (i_month == 12) { return "Dec " + i_day + yearText; } + return string.Empty; + } + + /// <summary> + /// 鑾峰彇鏃堕棿鐨勭炕璇戞枃鏈� + /// </summary> + /// <param name="second"></param> + /// <param name="hourText">灏忔椂鐨勬枃鏈�</param> + /// <param name="minuText">鍒嗙殑鏂囨湰</param> + /// <param name="secondText">绉掔殑鏂囨湰</param> + /// <returns></returns> + public string GetTimeString(int second, string hourText, string minuText, string secondText) + { + if (second == 0) { return string.Empty; } + + string timeStr = string.Empty; + int hour = second / 3600; + int minu = second % 3600 / 60; + int sec = second % 60; + + //涓枃 + if (Language.CurrentLanguage == "Chinese") + { + if (hour > 0) { timeStr += hour + hourText; } + if (minu > 0) { timeStr += minu + minuText; } + if (sec > 0) { timeStr += sec + secondText; } + } + //鑻辨枃 + else + { + if (hour > 0) { timeStr += hour + "h"; } + if (minu > 0) { timeStr += minu + "min"; } + if (sec > 0) { timeStr += sec + "s"; } + } + return timeStr; + } + + /// <summary> + /// 鑾峰彇鏈堢殑绠�鍐欐枃鏈�(鑰冭檻涓嫳鏂囷紝杩斿洖鏍煎紡:鏈�(涓枃鎯呭喌) Sept.(鑻辨枃)) + /// </summary> + /// <param name="i_month">鏈�</param> + /// <returns></returns> + public string GetMonthShortText(int i_month) + { + //涓枃 + if (Language.CurrentLanguage == "Chinese") + { + return Language.StringByID(StringId.month); + } + //鑻辨枃 + if (i_month == 1) { return "Jan."; } + if (i_month == 2) { return "Feb."; } + if (i_month == 3) { return "Mar."; } + if (i_month == 4) { return "Apr."; } + if (i_month == 5) { return "May."; } + if (i_month == 6) { return "Jun."; } + if (i_month == 7) { return "Jul."; } + if (i_month == 8) { return "Aug."; } + if (i_month == 9) { return "Sept."; } + if (i_month == 10) { return "Oct."; } + if (i_month == 11) { return "Nov."; } + if (i_month == 12) { return "Dec."; } + return string.Empty; + } + + /// <summary> + /// 鑾峰彇灏忔椂鐨勬枃鏈�(涓嫳鏂�) + /// </summary> + /// <returns></returns> + public string GetHourText() + { + //涓枃 + if (Language.CurrentLanguage == "Chinese") + { + //灏忔椂 + return Language.StringByID(StringId.h); + } + //鑻辨枃 + return "h"; + } + + /// <summary> + /// 鑾峰彇鍒嗛挓鐨勬枃鏈�(涓嫳鏂�) + /// </summary> + /// <returns></returns> + public string GetMinuteText() + { + //涓枃 + if (Language.CurrentLanguage == "Chinese") + { + //鍒� + return Language.StringByID(StringId.m); + } + //鑻辨枃 + return "min"; + } + + /// <summary> + /// 鑾峰彇鍒嗛挓鐨勬枃鏈�(涓嫳鏂�) + /// </summary> + /// <returns></returns> + public string GetSecondText() + { + //涓枃 + if (Language.CurrentLanguage == "Chinese") + { + //绉� + return Language.StringByID(StringId.s); + } + //鑻辨枃 + return "s"; + } + + #endregion + + #region 鈻� 绯荤粺鍓垏鏉縚________________________ + + /// <summary> + /// 灏嗘枃鏈鍒跺埌绯荤粺鐨勫壀鍒囨澘 + /// </summary> + /// <param name="i_text">闇�瑕佸鍒惰繘鍘荤殑涓滆タ</param> + /// <param name="i_msg">澶嶅埗鎴愬姛涔嬪悗,鏄剧ず鐨勬枃鏈�,鍙互涓簄ull</param> + public void SetTextToShearPlate(string i_text, string i_msg) + { +#if __Android__ + var cm = (Android.Content.ClipboardManager)Application.Activity.GetSystemService(Android.Content.Context.ClipboardService); + // 灏嗘枃鏈唴瀹规斁鍒扮郴缁熷壀璐存澘閲屻�� + cm.Text = i_text; +#endif + //鏄剧ずtip娑堟伅 + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, i_msg); + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 妫�娴嬫棩鏈熸槸鍚﹀悎娉� + /// </summary> + /// <param name="i_year">骞�</param> + /// <param name="i_month">鏈�</param> + /// <param name="i_day">鏃�</param> + /// <returns></returns> + public bool CheckDateIsRight(int i_year, int i_month, int i_day) + { + if (i_year <= 0) { i_year = DateTime.Now.Year; } + + int two = DateTime.IsLeapYear(i_year) == true ? 29 : 28; + int[] arry = new int[] { 31, two, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; + + if (i_month < 1 || i_month > 12) { return false; } + + return i_day <= arry[i_month - 1]; + } + + /// <summary> + /// 妫�娴嬫槸鍚︽槸绾暟瀛� + /// </summary> + /// <param name="i_text"></param> + /// <returns></returns> + public bool CheckIsNumber(string i_text) + { + foreach (var c in i_text) + { + if (char.IsNumber(c) == false) + { + return false; + } + } + return true; + } + + /// <summary> + /// 浠庝竴鍫嗘枃瀛椾腑,鑾峰彇杩欎竴鍫嗘枃瀛楅噷闈㈡暟瀛楀瓧绗︿覆鐨勬渶闀块暱搴� + /// </summary> + /// <param name="listText"></param> + /// <returns></returns> + public int GetNumberMaxLength(List<string> listText) + { + int maxLength = 0; + foreach (var text in listText) + { + string value = string.Empty; + foreach (var c in text) + { + if (char.IsNumber(c) == true) + { + //鏁板瓧 + value += c.ToString(); + continue; + } + else if (value != string.Empty) + { + //鍒ゆ柇鏁板瓧闀垮害 + if (maxLength <= value.Length) + { + maxLength = value.Length; + } + value = string.Empty; + } + } + //鍒ゆ柇鏁板瓧闀垮害 + if (maxLength <= value.Length) + { + maxLength = value.Length; + } + } + return maxLength; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs b/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs index 8b74ab9..df687cc 100644 --- a/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs +++ b/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs @@ -115,6 +115,8 @@ try { var Myform = actionForm as EditorCommonForm; + //閲嶇疆宸︽粦浣胯兘 + Myform.ScrollLeftEnabled = Myform.ScrollLeftEnabled; //瑙﹀彂鐣岄潰鍐嶆婵�娲荤殑浜嬩欢 Myform.FormActionAgainEvent(); } diff --git a/HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs b/HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs index 4cbc8da..615bb1d 100644 --- a/HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs +++ b/HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs @@ -41,8 +41,9 @@ /// <param name="msg">淇℃伅</param> /// <param name="action">鍗曞嚮纭鍚庢墽琛岀殑鍥炶皟鍑芥暟</param> /// <param name="buttonText">鎸夐挳鐨勬枃鏈�</param> + /// <param name="buttonCacel">鍙栨秷鎸夐挳鐨勬枃鏈�</param> /// <param name="i_waitTime">绛夊緟鏃堕棿,鍗曚綅涓虹,璁剧疆纭鎸夐挳鍦ㄥ闀挎椂闂村悗鎵嶈兘澶熺偣鍑�</param> - public void ShowMassage(ShowMsgType msgType, string msg, Action action = null, string buttonText = null, int i_waitTime = -1) + public void ShowMassage(ShowMsgType msgType, string msg, Action action = null, string buttonText = null, string buttonCacel = null, int i_waitTime = -1) { //绌哄璞℃椂锛屼笉鏄剧ず if (string.IsNullOrEmpty(msg)) @@ -51,7 +52,7 @@ } HdlThreadLogic.Current.RunMain(() => { - var alert = new ShowMsgControl(msgType, msg, buttonText, null, i_waitTime); + var alert = new ShowMsgControl(msgType, msg, buttonText, buttonCacel, i_waitTime); if (action != null) { alert.ConfirmClickEvent += () => diff --git a/HDL_ON/UI/UI0-Stan/Resourse/HdlControlResourse.cs b/HDL_ON/UI/UI0-Stan/Resourse/HdlControlResourse.cs index 0efd68c..ceca9b1 100644 --- a/HDL_ON/UI/UI0-Stan/Resourse/HdlControlResourse.cs +++ b/HDL_ON/UI/UI0-Stan/Resourse/HdlControlResourse.cs @@ -30,7 +30,7 @@ /// </summary> public static int XXLeft = Application.GetRealWidth(16); /// <summary> - /// VerticalScrolViewLayout鎺т欢涓�琛岀殑楂樺害(鍙拡瀵规爣鍑嗗瀷鍒楄〃寮忕敾闈�) + /// VerticalScrolViewLayout鎺т欢涓�琛岀殑楂樺害(鍙拡瀵规爣鍑嗗瀷鍒楄〃寮忕敾闈�,,44楂樺害) /// </summary> public static int ListViewRowHeight = Application.GetRealHeight(44); /// <summary> diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection1Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection1Page.cs index f80aa7a..e0fe98b 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection1Page.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection1Page.cs @@ -50,13 +50,13 @@ //闀挎寜绾㈠閬ユ帶鍣ㄦ寜閽�10绉掞紝鎸囩ず鐏摑鑹插揩闂� var strMsg = Language.StringByID(StringId.AddInfraredRemoteControlMsg1); - var intYY = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, + var listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, CSS.CSS_Color.FirstLevelTitleColor, Application.GetRealHeight(20), Application.GetRealHeight(408)); //璇风‘淇濇偍鐨勮摑鐗欏凡寮�鍚苟澶勪簬鍙互琚悳绱㈢姸鎬� strMsg = Language.StringByID(StringId.AddInfraredRemoteControlMsg2); this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.PromptFontSize_FirstLevel, - CSS.CSS_Color.PromptingColor1, Application.GetRealHeight(18), intYY + Application.GetRealHeight(4)); + CSS.CSS_Color.PromptingColor1, Application.GetRealHeight(18), listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(4)); //涓嬩竴姝� var btnNext = this.AddBottomClickButton(Language.StringByID(StringId.Next)); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection3Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection3Page.cs index 3d08125..2332a70 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection3Page.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection3Page.cs @@ -78,12 +78,12 @@ //鐩墠鍙敮鎸�2.4G WiFi缃戠粶 //鏆備笉鏀寔甯︽湁涓枃瀛楃鐨刉iFi鍚嶇О var strMsg = Language.StringByID(StringId.AddInfraredRemoteControlMsg4); - int yy = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, CSS.CSS_Color.TextualColor, + var listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, CSS.CSS_Color.TextualColor, Application.GetRealHeight(20), btnWifi.Bottom + Application.GetRealHeight(16), TextAlignment.CenterLeft); //wifi琛� var rowWifi = new RowLayoutControl(); - rowWifi.Y = yy + Application.GetRealHeight(32); + rowWifi.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(32); bodyFrameLayout.AddChidren(rowWifi); //wifi鍚嶅瓧 var txtWifi = rowWifi.frameTable.AddLeftInput(wifiName, 200); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection4Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection4Page.cs index 2c7f627..70f04f8 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection4Page.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/MiniRemoteControl/AddMiniRemoteControlDirection4Page.cs @@ -203,12 +203,12 @@ //鍙互寮�濮嬩娇鐢ㄧ孩澶栭仴鎺у姛鑳斤紒 var strMsg = Language.StringByID(StringId.AddInfraredRemoteControlMsg7); - int yy = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, CSS.CSS_Color.TextualColor, + var listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, CSS.CSS_Color.TextualColor, Application.GetRealHeight(20), btnFail.Bottom + Application.GetRealHeight(8)); //寮�濮嬩娇鐢� var btnUse = new BottomClickButton(220); - btnUse.Y = yy + Application.GetRealHeight(60); + btnUse.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(60); btnUse.TextID = StringId.StartUse; bodyFrameLayout.AddChidren(btnUse); btnUse.ButtonClickEvent += (sender, e) => diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs index d285fbb..ee17871 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs @@ -57,33 +57,32 @@ /// </summary> Button btnCommissioningAuthoritySwitchIcon; - #region F3闃舵 #region 绠$悊鍛樻潈闄愯縼绉� - //FrameLayout administratorPermissionMigrationRow; - //Button btnAdministratorPermissionMigrationTitle; - //Button btnAdministratorPermissionMigrationExplan; - //Button btnAdministratorPermissionMigrationSkinIcon; + FrameLayout administratorPermissionMigrationRow; + Button btnAdministratorPermissionMigrationTitle; + Button btnAdministratorPermissionMigrationExplan; + Button btnAdministratorPermissionMigrationSkinIcon; #endregion #region 杩囨埛 - ///// <summary> - ///// - ///// </summary> - //FrameLayout transferRow; - ///// <summary> - ///// - ///// </summary> - //Button btnTransferTitle; - ///// <summary> - ///// - ///// </summary> - //Button btnTrasferExplan; - ///// <summary> - ///// - ///// </summary> - //Button btnTrasferSkinIcon; + /// <summary> + /// + /// </summary> + FrameLayout transferRow; + /// <summary> + /// + /// </summary> + Button btnTransferTitle; + /// <summary> + /// + /// </summary> + Button btnTrasferExplan; + /// <summary> + /// + /// </summary> + Button btnTrasferSkinIcon; #endregion - #endregion + #endregion /// <summary> /// 鏇存柊浣忓畢鍚嶇О鐨勫洖璋冨嚱鏁� @@ -276,112 +275,112 @@ roomManagementRow.AddChidren(btnRoomManagementSkinIcon); #endregion - - #region F3闃舵 #region 绠$悊鍛樻潈闄愯縼绉� - //contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); - //administratorPermissionMigrationRow = new FrameLayout() - //{ - // Height = Application.GetRealHeight(65), - // BackgroundColor = CSS_Color.MainBackgroundColor, - //}; + contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); + administratorPermissionMigrationRow = new FrameLayout() + { + Height = Application.GetRealHeight(65), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; //contentView.AddChidren(administratorPermissionMigrationRow); - //btnAdministratorPermissionMigrationTitle = new Button() - //{ - // X = Application.GetRealWidth(16), - // Y = Application.GetRealHeight(10), - // Width = Application.GetRealWidth(308), - // Height = Application.GetRealHeight(24), - // TextID = StringId.AdministratorPermissionMigration, - // TextAlignment = TextAlignment.CenterLeft, - // TextSize = CSS_FontSize.SubheadingFontSize, - // TextColor = CSS_Color.FirstLevelTitleColor, - //}; - //administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationTitle); + btnAdministratorPermissionMigrationTitle = new Button() + { + X = Application.GetRealWidth(16), + Y = Application.GetRealHeight(10), + Width = Application.GetRealWidth(308), + Height = Application.GetRealHeight(24), + TextID = StringId.AdministratorPermissionMigration, + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + }; + administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationTitle); - //btnAdministratorPermissionMigrationExplan = new Button() - //{ - // X = Application.GetRealWidth(16), - // Y = btnAdministratorPermissionMigrationTitle.Bottom, - // Width = Application.GetRealWidth(308), - // Height = Application.GetRealHeight(21), - // TextID = StringId.AdministratorPermissionMigrationExPlan, - // TextAlignment = TextAlignment.CenterLeft, - // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - // TextColor = CSS_Color.PromptingColor1, - //}; - //administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationExplan); + btnAdministratorPermissionMigrationExplan = new Button() + { + X = Application.GetRealWidth(16), + Y = btnAdministratorPermissionMigrationTitle.Bottom, + Width = Application.GetRealWidth(308), + Height = Application.GetRealHeight(21), + TextID = StringId.AdministratorPermissionMigrationExPlan, + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.PromptingColor1, + }; + administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationExplan); - //btnAdministratorPermissionMigrationSkinIcon = new Button() - //{ - // X = Application.GetRealWidth(343), - // Gravity = Gravity.CenterVertical, - // Width = Application.GetMinRealAverage(16), - // Height = Application.GetMinRealAverage(16), - // UnSelectedImagePath = "Public/RightIcon.png", - //}; - //administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationSkinIcon); + btnAdministratorPermissionMigrationSkinIcon = new Button() + { + X = Application.GetRealWidth(343), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/RightIcon.png", + }; + administratorPermissionMigrationRow.AddChidren(btnAdministratorPermissionMigrationSkinIcon); - //administratorPermissionMigrationRow.AddChidren( - // new Button() - // { - // Gravity = Gravity.CenterHorizontal, - // Y = Application.GetRealHeight(64), - // Height = Application.GetRealHeight(1), - // Width = Application.GetRealWidth(343), - // BackgroundColor = CSS_Color.DividingLineColor, - // }); - #endregion + administratorPermissionMigrationRow.AddChidren( + new Button() + { + Gravity = Gravity.CenterHorizontal, + Y = Application.GetRealHeight(64), + Height = Application.GetRealHeight(1), + Width = Application.GetRealWidth(343), + BackgroundColor = CSS_Color.DividingLineColor, + }); #endregion - #region F3闃舵 #region 杩囨埛 - //transferRow = new FrameLayout() - //{ - // Y = administratorPermissionMigrationRow.Bottom, - // Height = Application.GetRealHeight(65), - // BackgroundColor = CSS_Color.MainBackgroundColor, - //}; - //contentView.AddChidren(transferRow); + transferRow = new FrameLayout() + { + Y = administratorPermissionMigrationRow.Bottom, + Height = Application.GetRealHeight(65), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + //鏈夌綉鍏虫墠鑳借繃鎴� + if (DB_ResidenceData.Instance.HomeGateway != null && string.IsNullOrEmpty(DB_ResidenceData.Instance.HomeGateway.gatewayId) == false + && DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false) + { + contentView.AddChidren(transferRow); + } - //btnTransferTitle = new Button() - //{ - // X = Application.GetRealWidth(16), - // Y = Application.GetRealHeight(10), - // Width = Application.GetRealWidth(308), - // Height = Application.GetRealHeight(24), - // TextID = StringId.Transfer, - // TextAlignment = TextAlignment.CenterLeft, - // TextSize = CSS_FontSize.SubheadingFontSize, - // TextColor = CSS_Color.FirstLevelTitleColor, - //}; - //transferRow.AddChidren(btnTransferTitle); + btnTransferTitle = new Button() + { + X = Application.GetRealWidth(16), + Y = Application.GetRealHeight(10), + Width = Application.GetRealWidth(308), + Height = Application.GetRealHeight(24), + TextID = StringId.Transfer, + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + }; + transferRow.AddChidren(btnTransferTitle); - //btnTrasferExplan = new Button() - //{ - // X = Application.GetRealWidth(16), - // Y = btnTransferTitle.Bottom, - // Width = Application.GetRealWidth(308), - // Height = Application.GetRealHeight(21), - // TextID = StringId.TransferExPlan, - // TextAlignment = TextAlignment.CenterLeft, - // TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - // TextColor = CSS_Color.PromptingColor1, - //}; - //transferRow.AddChidren(btnTrasferExplan); + btnTrasferExplan = new Button() + { + X = Application.GetRealWidth(16), + Y = btnTransferTitle.Bottom, + Width = Application.GetRealWidth(308), + Height = Application.GetRealHeight(21), + TextID = StringId.TransferExPlan, + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + TextColor = CSS_Color.PromptingColor1, + }; + transferRow.AddChidren(btnTrasferExplan); - //btnTrasferSkinIcon = new Button() - //{ - // X = Application.GetRealWidth(343), - // Gravity = Gravity.CenterVertical, - // Width = Application.GetMinRealAverage(16), - // Height = Application.GetMinRealAverage(16), - // UnSelectedImagePath = "Public/RightIcon.png", - //}; - //transferRow.AddChidren(btnTrasferSkinIcon); - #endregion + btnTrasferSkinIcon = new Button() + { + X = Application.GetRealWidth(343), + Gravity = Gravity.CenterVertical, + Width = Application.GetMinRealAverage(16), + Height = Application.GetMinRealAverage(16), + UnSelectedImagePath = "Public/RightIcon.png", + }; + transferRow.AddChidren(btnTrasferSkinIcon); #endregion #region 璋冭瘯鏉冮檺 diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs index c874702..9faddfc 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePageBLL.cs @@ -14,8 +14,8 @@ LoadEvent_SkipRoomsPage(); LoadEvent_EditResidencName(); LoadEvent_EditResidencAddress(); - //LoadEvent_SkipAdminMigrationConfirmPage(); - //LoadEvent_SkipTransferConfirmPage(); + LoadEvent_SkipAdminMigrationConfirmPage(); + LoadEvent_SkipTransferConfirmPage(); } /// <summary> @@ -150,41 +150,41 @@ // }; //} - ///// <summary> - ///// 璺宠浆绠$悊鍛樻潈闄愯縼绉婚〉闈� - ///// </summary> - //void LoadEvent_SkipAdminMigrationConfirmPage() - //{ - // EventHandler<MouseEventArgs> eventHandler = (sender, e) => { - // var skipPage = new AdminMigrationConfirmPage(); - // MainPage.BasePageView.AddChidren(skipPage); - // skipPage.LoadPage(); - // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - // }; + /// <summary> + /// 璺宠浆绠$悊鍛樻潈闄愯縼绉婚〉闈� + /// </summary> + void LoadEvent_SkipAdminMigrationConfirmPage() + { + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + var skipPage = new AdminMigrationConfirmPage(); + MainPage.BasePageView.AddChidren(skipPage); + skipPage.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + }; - // administratorPermissionMigrationRow.MouseUpEventHandler = eventHandler; - // btnAdministratorPermissionMigrationTitle.MouseUpEventHandler = eventHandler; - // btnAdministratorPermissionMigrationExplan.MouseUpEventHandler = eventHandler; - // btnAdministratorPermissionMigrationSkinIcon.MouseUpEventHandler = eventHandler; - //} + administratorPermissionMigrationRow.MouseUpEventHandler = eventHandler; + btnAdministratorPermissionMigrationTitle.MouseUpEventHandler = eventHandler; + btnAdministratorPermissionMigrationExplan.MouseUpEventHandler = eventHandler; + btnAdministratorPermissionMigrationSkinIcon.MouseUpEventHandler = eventHandler; + } - ///// <summary> - ///// 璺宠浆杩囨埛椤甸潰 - ///// </summary> - //void LoadEvent_SkipTransferConfirmPage() - //{ - // EventHandler<MouseEventArgs> eventHandler = (sender, e) => { - // var skipPage = new TransferConfirmPage(); - // MainPage.BasePageView.AddChidren(skipPage); - // skipPage.LoadPage(); - // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - // }; + /// <summary> + /// 璺宠浆杩囨埛椤甸潰 + /// </summary> + void LoadEvent_SkipTransferConfirmPage() + { + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + var from = new TransferConfirmPage(); + from.AddForm(); + }; - // transferRow.MouseUpEventHandler = eventHandler; - // btnTrasferExplan.MouseUpEventHandler = eventHandler; - // btnTrasferSkinIcon.MouseUpEventHandler = eventHandler; - // btnTransferTitle.MouseUpEventHandler = eventHandler; - //} + transferRow.MouseUpEventHandler = eventHandler; + btnTrasferExplan.MouseUpEventHandler = eventHandler; + btnTrasferSkinIcon.MouseUpEventHandler = eventHandler; + btnTransferTitle.MouseUpEventHandler = eventHandler; + } #endregion } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferConfirmPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferConfirmPage.cs index 9013b14..f9d3f82 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferConfirmPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferConfirmPage.cs @@ -1,141 +1,97 @@ 锘縰sing System; using Shared; using HDL_ON.UI.CSS; +using HDL_ON.Stan; namespace HDL_ON.UI { /// <summary> /// 杩囨埛纭鎻愰啋鐣岄潰 /// </summary> - public class TransferConfirmPage : FrameLayout + public class TransferConfirmPage : EditorCommonForm { - /// <summary> - /// - /// </summary> - FrameLayout bodyView; + #region 鈻� 鍙橀噺澹版槑___________________________ - public TransferConfirmPage() + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() { - bodyView = this; + //杩囨埛 + base.SetTitleText(Language.StringByID(StringId.Transfer)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); } /// <summary> - /// + /// 鍒濆鍖栦腑閮ㄤ俊鎭� /// </summary> - public void LoadPage() + private void InitMiddleFrame() { - BackgroundColor = CSS_Color.MainBackgroundColor; + //娓呯┖bodyFrame + this.ClearBodyFrame(); - new TopViewDiv(bodyView, Language.StringByID(StringId.Transfer)).LoadTopView(); + //璐﹀彿鑷繁鐨勫ご鍍� + var btnHeadImage = new ImageView(); + btnHeadImage.X = Application.GetRealWidth(48); + btnHeadImage.Y = Application.GetRealHeight(32); + btnHeadImage.Width = Application.GetRealWidth(84); + btnHeadImage.Height = Application.GetRealWidth(84); + btnHeadImage.Radius = (uint)Application.GetRealWidth(42); + btnHeadImage.ImagePath = UserInfo.Current.headImagePagePath; + bodyFrameLayout.AddChidren(btnHeadImage); - #region 澶村儚 - FrameLayout headView = new FrameLayout() + //绠ご + var btnArrow = new PicViewControl(84, 32); + btnArrow.X = btnHeadImage.Right + Application.GetRealWidth(12); + btnArrow.Y = Application.GetRealHeight(58); + btnArrow.UnSelectedImagePath = "PersonalCenter/Transfer.png"; + bodyFrameLayout.AddChidren(btnArrow); + + //涓�涓粯璁ゅご鍍� + var btnHead2 = new IconViewControl(102); + btnHead2.X = btnArrow.Right + Application.GetRealWidth(3); + btnHead2.Y = Application.GetRealHeight(26); + btnHead2.UnSelectedImagePath = "PersonalCenter/Head.png"; + bodyFrameLayout.AddChidren(btnHead2); + + //鎮ㄧ殑浣忓畢灏嗚繃鎴风粰鍏朵粬HDL璐﹀彿 + this.AddListMsgControls(bodyFrameLayout, Language.StringByID(StringId.YourHomeWillBeTransferredToOtherAccounts), CSS_FontSize.SubheadingFontSize, + CSS_Color.FirstLevelTitleColor, Application.GetRealHeight(23), btnHead2.Bottom + Application.GetRealHeight(12)); + + //璇锋敞鎰�: + var btnAttention = new NormalViewControl(200, 18, true); + btnAttention.X = HdlControlResourse.XXLeft; + btnAttention.Y = btnHeadImage.Bottom + Application.GetRealHeight(84); + btnAttention.TextID = StringId.Attention; + btnAttention.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnAttention.TextColor = CSS_Color.FirstLevelTitleColor; + bodyFrameLayout.AddChidren(btnAttention); + + //1.璇ヤ綇瀹呯殑鏁版嵁锛堜簯绔暟鎹級灏嗗叏閮ㄨ浆绉荤粰鏂扮殑鎴蜂富 + //2.杩囨埛鍚庯紝鍘熸湁鐨勬垚鍛樺皢鑷姩瑙g粦璇ヤ綇瀹� + //3.鏂版埛涓昏处鍙蜂负鏈夋晥鐨凥DL璐﹀彿 + //4.鎺ユ敹鏂硅处鍙蜂笌杞Щ鏂硅处鍙蜂笉鍙负鍚屼竴涓处鍙� + var listContr = this.AddListMsgControls(bodyFrameLayout, Language.StringByID(StringId.TransferreConfirmMsg1), CSS_FontSize.PromptFontSize_FirstLevel, + CSS_Color.TextualColor, Application.GetRealHeight(18), btnAttention.Bottom + Application.GetRealHeight(8), TextAlignment.CenterLeft); + + //纭 + var btnConfirm = new BottomClickButton(220); + btnConfirm.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(75); + btnConfirm.TextID = StringId.ConfirmTransferre; + bodyFrameLayout.AddChidren(btnConfirm); + btnConfirm.ButtonClickEvent += (sender, e) => { - Y = Application.GetRealHeight(72), - Height = Application.GetRealHeight(132), + var form = new TransferInputPage(); + form.AddForm(); }; - bodyView.AddChidren(headView); - - - ImageView myHeadImage = new ImageView() - { - X = Application.GetRealWidth(48), - Y = Application.GetRealHeight(96), - Width = Application.GetRealWidth(84), - Height = Application.GetRealWidth(84), - Radius = (uint)Application.GetRealWidth(42), - ImagePath = UserInfo.Current.headImagePagePath, - Gravity = Gravity.CenterVertical, - }; - headView.AddChidren(myHeadImage); - - ImageView transferImage = new ImageView() - { - X = Application.GetRealWidth(144), - Y = Application.GetRealHeight(96), - Width = Application.GetRealWidth(84), - Height = Application.GetRealWidth(32), - ImagePath = "PersonalCenter/Transfer.png", - Gravity = Gravity.Center, - }; - headView.AddChidren(transferImage); - - ImageView otherHeadImage = new ImageView() - { - X = Application.GetRealWidth(231), - Y = Application.GetRealHeight(96), - Width = Application.GetRealWidth(101), - Height = Application.GetRealWidth(101), - ImagePath = "PersonalCenter/Head.png", - Gravity = Gravity.CenterVertical, - }; - headView.AddChidren(otherHeadImage); - - #endregion - - var btnTip = new Button() - { - Y = headView.Bottom, - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(343), - Height = Application.GetRealHeight(22), - TextAlignment = TextAlignment.Center, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.SubheadingFontSize, - Text = "鎮ㄧ殑浣忓畢灏嗚繃鎴风粰鍏朵粬HDL璐﹀彿", - }; - bodyView.AddChidren(btnTip); - - - //璇锋敞鎰� - var btnPleaseNote = new Button() - { - Y = btnTip.Bottom + Application.GetRealHeight(38), - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(343), - Height = Application.GetRealHeight(17), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = "璇锋敞鎰忥細", - }; - bodyView.AddChidren(btnPleaseNote); - - //璇锋敞鎰忕殑鍐呭 - var btnPleaseNoteStr = new Button() - { - Y = btnPleaseNote.Bottom + Application.GetRealHeight(8), - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(343), - Height = Application.GetRealHeight(170), - TextAlignment = TextAlignment.TopLeft, - TextColor = CSS_Color.TextualColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - IsMoreLines = true, - Text = "1.璇ヤ綇瀹呮偍鐨勬暟鎹紙浜戠鏁版嵁锛夊皢鍏ㄩ儴杞Щ缁欐柊鐨勬埛涓� \n\n2.杩囨埛鍚庯紝鍘熸湁鐨勬垚鍛樺皢鑷姩瑙g粦璇ヤ綇瀹� \n\n3.鏂版埛涓昏处鍙蜂负鏈夋晥鐨凥DL璐﹀彿 \n\n4.鎺ユ敹鏂硅处鍙蜂笌杞Щ鏂硅处鍙蜂笉鍙负鍚屼竴涓处鍙� (缁戝畾鐨勫叾浠栫櫥褰�)", - }; - bodyView.AddChidren(btnPleaseNoteStr); - - // - var btnConfirm = new ConfirmButton() - { - Y = Application.GetRealHeight(456), - Text = "纭杩囨埛", - }; - bodyView.AddChidren(btnConfirm); - - btnConfirm.MouseUpEventHandler = (sender, e) => { - //Utlis.ShowTip("鏆備笉鏀寔"); - - var skipPage = new TransferInputPage(); - MainPage.BasePageView.AddChidren(skipPage); - skipPage.LoadPage(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - - }; - } + #endregion } - } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferInputPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferInputPage.cs index 6ad0dcc..286f85a 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferInputPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferInputPage.cs @@ -1,159 +1,160 @@ 锘縰sing System; using Shared; using HDL_ON.UI.CSS; +using HDL_ON.Stan; namespace HDL_ON.UI { /// <summary> /// 杩囨埛杈撳叆璐﹀彿鐣岄潰 /// </summary> - public class TransferInputPage : FrameLayout + public class TransferInputPage : EditorCommonForm { - /// <summary> - /// - /// </summary> - FrameLayout bodyView; + #region 鈻� 鍙橀噺澹版槑___________________________ - public TransferInputPage() + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() { - bodyView = this; + //杩囨埛 + base.SetTitleText(Language.StringByID(StringId.Transfer)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); } /// <summary> - /// + /// 鍒濆鍖栦腑閮ㄤ俊鎭� /// </summary> - public void LoadPage() + private void InitMiddleFrame() { - BackgroundColor = CSS_Color.BackgroundColor; + //娓呯┖bodyFrame + this.ClearBodyFrame(); - new TopViewDiv(bodyView, Language.StringByID(StringId.Transfer)).LoadTopView(); + //鐧借壊鑳屾櫙 + var frameBack = new FrameLayout(); + frameBack.Y = Application.GetRealHeight(8); + frameBack.BackgroundColor = CSS_Color.MainBackgroundColor; + bodyFrameLayout.AddChidren(frameBack); - #region 璐﹀彿濉啓 - var accountView = new FrameLayout() + //璇疯緭鍏ユ帴鏀舵柟璐﹀彿 + var rowInput = new FrameRowControl(); + rowInput.Height = Application.GetRealHeight(50); + frameBack.AddChidren(rowInput); + //鍥炬爣 + rowInput.AddLeftIcon(24, "LoginIcon/AccountIcon.png"); + //杈撳叆妗� + var txtInput = rowInput.AddLeftInput(string.Empty, 300); + txtInput.PlaceholderText = Language.StringByID(StringId.PleaseInputReceiverAccount); + //搴曠嚎 + rowInput.AddBottomLine(); + //鍙樻洿瀹瑰櫒楂樺害 + frameBack.Height = rowInput.Bottom + Application.GetRealHeight(10); + + //杩囨埛 + var btnMigrate = new BottomClickButton(220); + btnMigrate.TextID = StringId.Transfer; + btnMigrate.Y = frameBack.Bottom + Application.GetRealHeight(79); + bodyFrameLayout.AddChidren(btnMigrate); + btnMigrate.ButtonClickEvent += (sender, e) => { - Y = Application.GetRealHeight(72), - Height = Application.GetRealHeight(50), - BackgroundColor = CSS_Color.MainBackgroundColor - }; - bodyView.AddChidren(accountView); + string account = txtInput.Text.Trim(); + if (account == string.Empty) + { + return; + } + if (account == UserInfo.Current.userEmailInfo || account == UserInfo.Current.userMobileInfo) + { + //涓嶈兘鑷繁杩囨埛缁欒嚜宸� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.YouCannotTransferOwnershipToYourself)); + return; + } + //鎼滅储璐﹀彿淇℃伅 + var accountInfo = this.SearchAccountInfoByAccount(account); + if (accountInfo == null) + { + return; + } - var btnAccountIcon = new Button() + this.CloseForm(); + + var form = new TransferUserConfirmPage(); + form.AddForm(accountInfo); + }; + + //鎵弿浜岀淮鐮� + var btnQrcode = new NormalViewControl(220, 32, true); + btnQrcode.Y = btnMigrate.Bottom + Application.GetRealWidth(6); + btnQrcode.TextColor = CSS_Color.MainColor; + btnQrcode.Gravity = Gravity.CenterHorizontal; + btnQrcode.TextAlignment = TextAlignment.Center; + btnQrcode.TextID = StringId.ScanQRCoden; + bodyFrameLayout.AddChidren(btnQrcode); + btnQrcode.ButtonClickEvent += (sender, e) => { - X = Application.GetRealWidth(16), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(24), - Height = Application.GetMinRealAverage(24), - UnSelectedImagePath = "LoginIcon/AccountIcon.png", + Scan.OpenScan((scanString) => + { + if (string.IsNullOrEmpty(scanString) == true) + { + return; + } + if (scanString == UserInfo.Current.userEmailInfo || scanString == UserInfo.Current.userMobileInfo) + { + //涓嶈兘鑷繁杩囨埛缁欒嚜宸� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.YouCannotTransferOwnershipToYourself)); + return; + } + //鎼滅储璐﹀彿淇℃伅 + var accountInfo = this.SearchAccountInfoByAccount(scanString); + if (accountInfo == null) + { + return; + } + this.CloseForm(); + + var form = new TransferUserConfirmPage(); + form.AddForm(accountInfo); + }); }; - accountView.AddChidren(btnAccountIcon); - - var etAccount = new EditText() - { - X = Application.GetRealWidth(52), - Width = Application.GetRealWidth(307), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - PlaceholderTextColor = CSS_Color.PromptingColor1, - PlaceholderText = "璇疯緭鍏ユ帴鏀舵柟璐﹀彿", - }; - accountView.AddChidren(etAccount); - - var btnLine = new Button() - { - BackgroundColor = CSS_Color.DividingLineColor, - Height = Application.GetRealHeight(1), - Y = accountView.Height - Application.GetRealHeight(1), - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(343), - }; - accountView.AddChidren(btnLine); - #endregion - - #region 璐﹀彿濉啓 - var accountConfirmView = new FrameLayout() - { - Y = accountView.Bottom, - Height = Application.GetRealHeight(50), - BackgroundColor = CSS_Color.MainBackgroundColor - }; - bodyView.AddChidren(accountConfirmView); - - var btnAccountConfirmIcon = new Button() - { - X = Application.GetRealWidth(16), - Gravity = Gravity.CenterVertical, - Width = Application.GetMinRealAverage(24), - Height = Application.GetMinRealAverage(24), - UnSelectedImagePath = "LoginIcon/AccountIcon.png", - }; - accountConfirmView.AddChidren(btnAccountConfirmIcon); - - var etAccountConfirm = new EditText() - { - X = Application.GetRealWidth(52), - Width = Application.GetRealWidth(307), - TextAlignment = TextAlignment.CenterLeft, - TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.TextFontSize, - PlaceholderTextColor = CSS_Color.PromptingColor1, - PlaceholderText = "璇峰啀娆¤緭鍏ユ帴鏀舵柟璐﹀彿", - }; - accountConfirmView.AddChidren(etAccountConfirm); - - //var btnLine2 = new Button() - //{ - // BackgroundColor = CSS_Color.DividingLineColor, - // Height = Application.GetRealHeight(1), - // Y = accountConfirmView.Height - Application.GetRealHeight(1), - //}; - //accountConfirmView.AddChidren(btnLine2); - #endregion - - var btnTip = new Button() - { - Y = accountConfirmView.Bottom + Application.GetRealHeight(12), - X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(343), - TextAlignment = TextAlignment.TopLeft, - TextColor = CSS_Color.AuxiliaryColor2, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = "*璇风‘璁よ处鍙锋棤璇紝鍦ㄦ暟鎹浆绉昏繃绋嬩腑涓嶅彲鍙栨秷鎿嶄綔", - IsMoreLines = true - - }; - bodyView.AddChidren(btnTip); - - var btnConfirm = new ConfirmButton() - { - Y = Application.GetRealHeight(251), - Text = "杩囨埛", - }; - bodyView.AddChidren(btnConfirm); - - btnConfirm.MouseUpEventHandler = (sender, e) => { - var skipPage = new TransferUserConfirmPage(); - MainPage.BasePageView.AddChidren(skipPage); - skipPage.LoadPage(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - }; - - Button btnEmailOption = new Button() - { - Y = btnConfirm.Bottom + Application.GetRealWidth(6), - Width = Application.GetRealWidth(220), - Height = Application.GetRealWidth(32), - TextSize = CSS_FontSize.TextFontSize, - TextColor = CSS_Color.MainColor, - Gravity = Gravity.CenterHorizontal, - TextAlignment = TextAlignment.Center, - Text = "鎵弿浜岀淮鐮佽繃鎴�" - }; - bodyView.AddChidren(btnEmailOption); - - } + #endregion + + #region 鈻� 鎼滅储璐﹀彿___________________________ + + /// <summary> + /// 鎼滅储璐﹀彿淇℃伅 + /// </summary> + /// <param name="i_account">鎼滅储鐨勮处鍙�</param> + /// <returns></returns> + private AccountInfoResult SearchAccountInfoByAccount(string i_account) + { + var result = new DAL.Server.HttpServerRequest().GetMemberInfoByAccount(i_account); + if (result.Code == DAL.Server.StateCode.ACCOUNT_NOT_EXIST) + { + //鐩爣璐﹀彿骞朵笉瀛樺湪 + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.TargetAcountDoesNotExist)); + return null; + } + if (result.Code != DAL.Server.StateCode.SUCCESS) + { + DAL.Server.IMessageCommon.Current.ShowErrorInfoAlter(result.Code); + return null; + } + var accountInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<AccountInfoResult>(result.Data.ToString()); + accountInfo.Account = i_account; + if (accountInfo.MemberName == string.Empty) + { + accountInfo.MemberName = accountInfo.Account; + } + return accountInfo; + } + + #endregion } - } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferResidenceResultPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferResidenceResultPage.cs new file mode 100644 index 0000000..f9b1297 --- /dev/null +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferResidenceResultPage.cs @@ -0,0 +1,108 @@ +锘縰sing System; +using Shared; +using HDL_ON.UI.CSS; +using HDL_ON.Stan; +using System.Collections.Generic; + +namespace HDL_ON.UI +{ + /// <summary> + /// 杩囨埛缁撴灉鐣岄潰 + /// </summary> + public class TransferResidenceResultPage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 缁撴潫浜嬩欢 + /// </summary> + public Action FinishEvent = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_accountInfo">鐢ㄦ埛瀵硅薄淇℃伅</param> + /// <param name="i_success">鏄惁鎴愬姛</param> + public void ShowForm(AccountInfoResult i_accountInfo, bool i_success) + { + this.ScrollLeftEnabled = false; + //杩囨埛 + base.SetTitleText(Language.StringByID(StringId.Transfer)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(i_accountInfo, i_success); + + //绉婚櫎杩斿洖閿� + base.RemoveBackButton(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + /// <param name="i_accountInfo">鐢ㄦ埛瀵硅薄淇℃伅</param> + /// <param name="i_success">鏄惁鎴愬姛</param> + private void InitMiddleFrame(AccountInfoResult i_accountInfo, bool i_success) + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍥剧墖 + var btnPictrue = new PicViewControl(180, 180); + btnPictrue.Y = Application.GetRealHeight(32); + btnPictrue.Gravity = Gravity.CenterHorizontal; + btnPictrue.UnSelectedImagePath = i_success == true ? "Public/TipIcon_Successfully.png" : "Public/TipIcon_Failed.png"; + bodyFrameLayout.AddChidren(btnPictrue); + + List<NormalViewControl> listContr = null; + if (i_success == true) + { + //鐢ㄦ埛{0}宸茬粡鎴愪负浣忓畢琛岀鐞嗗憳 + string strMsg = Language.StringByID(StringId.CongratulationsXXBecomingNNAdministrator).Replace("{0}", i_accountInfo.MemberName); + listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS_FontSize.SubheadingFontSize, CSS_Color.MainColor, Application.GetRealHeight(24), + btnPictrue.Bottom + Application.GetRealHeight(16)); + //璇ヤ綇瀹呯殑淇℃伅灏嗗湪鎮ㄧ殑璐﹀彿涓垹闄� + var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(18), false); + btnMsg2.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(8); + btnMsg2.TextAlignment = TextAlignment.Center; + btnMsg2.Gravity = Gravity.CenterHorizontal; + btnMsg2.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnMsg2.TextID = StringId.ResidenceDataWillBeDeletedFromYourAccount; + bodyFrameLayout.AddChidren(btnMsg2); + } + else + { + //杩囨埛澶辫触 + string strMsg = Language.StringByID(StringId.TransferFail); + listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS_FontSize.SubheadingFontSize, CSS_Color.AuxiliaryColor2, Application.GetRealHeight(24), + btnPictrue.Bottom + Application.GetRealHeight(16)); + //璇烽噸鏂板皾璇� + var btnMsg2 = new NormalViewControl(bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(18), false); + btnMsg2.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(8); + btnMsg2.TextAlignment = TextAlignment.Center; + btnMsg2.Gravity = Gravity.CenterHorizontal; + btnMsg2.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnMsg2.TextID = StringId.PleaseTryAgain; + bodyFrameLayout.AddChidren(btnMsg2); + } + + //瀹屾垚 + var btnConfirm = new BottomClickButton(220); + btnConfirm.Y = Application.GetRealHeight(337); + btnConfirm.TextID = i_success == true ? StringId.Complete : StringId.Retry; + bodyFrameLayout.AddChidren(btnConfirm); + btnConfirm.ButtonClickEvent += (sender, e) => + { + this.CloseForm(); + //鍥炶皟鍑芥暟 + this.FinishEvent?.Invoke(); + this.FinishEvent = null; + }; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs index e29f3fd..4a5c393 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferUserConfirmPage.cs @@ -1,68 +1,124 @@ 锘縰sing System; using Shared; using HDL_ON.UI.CSS; +using HDL_ON.Stan; namespace HDL_ON.UI { /// <summary> - /// 杩囨埛璐﹀彿纭鐣岄潰 - /// 涓汉璧勬枡 + /// 杩囨埛璐﹀彿涓汉璧勬枡纭鐣岄潰 /// </summary> - public class TransferUserConfirmPage : FrameLayout + public class TransferUserConfirmPage : EditorCommonForm { - /// <summary> - /// - /// </summary> - FrameLayout bodyView; + #region 鈻� 鍙橀噺澹版槑___________________________ - public TransferUserConfirmPage() + /// <summary> + /// 璐﹀彿淇℃伅 + /// </summary> + private AccountInfoResult accountInfo = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_accountInfo"></param> + public void ShowForm(AccountInfoResult i_accountInfo) { - bodyView = this; + this.accountInfo = i_accountInfo; + + //涓汉璧勬枡 + base.SetTitleText(Language.StringByID(StringId.Profile)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); } /// <summary> - /// + /// 鍒濆鍖栦腑閮ㄤ俊鎭� /// </summary> - public void LoadPage() + private void InitMiddleFrame() { - BackgroundColor = CSS_Color.BackgroundColor; + //娓呯┖bodyFrame + this.ClearBodyFrame(); - new TopViewDiv(bodyView, "涓汉璧勬枡").LoadTopView(); + //涓婇儴鐨勭櫧鑹茶儗鏅� + var frameBack1 = new FrameLayout(); + frameBack1.BackgroundColor = CSS_Color.MainBackgroundColor; + frameBack1.Height = Application.GetRealHeight(204); + bodyFrameLayout.AddChidren(frameBack1); - var headView = new FrameLayout() + //澶村儚 + var btnHeadImage = new ImageView(); + btnHeadImage.Y = Application.GetRealHeight(32); + btnHeadImage.Gravity = Gravity.CenterHorizontal; + btnHeadImage.Width = Application.GetRealWidth(84); + btnHeadImage.Height = Application.GetRealWidth(84); + btnHeadImage.Radius = (uint)Application.GetRealWidth(42); + btnHeadImage.ImagePath = "LoginIcon/2.png"; + frameBack1.AddChidren(btnHeadImage); + + //鏄电О + var btnName = new NormalViewControl(frameBack1.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(24), false); + btnName.Y = btnHeadImage.Bottom + Application.GetRealHeight(11); + btnName.Gravity = Gravity.CenterHorizontal; + btnName.IsBold = true; + btnName.TextSize = CSS_FontSize.SubheadingFontSize; + btnName.TextColor = CSS_Color.FirstLevelTitleColor; + btnName.Text = accountInfo.MemberName; + btnName.TextAlignment = TextAlignment.Center; + frameBack1.AddChidren(btnName); + + //璐﹀彿 + var btnAccount = new NormalViewControl(frameBack1.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(16), false); + btnAccount.Y = btnName.Bottom + Application.GetRealHeight(7); + btnAccount.Gravity = Gravity.CenterHorizontal; + btnAccount.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnAccount.TextAlignment = TextAlignment.Center; + btnAccount.Text = accountInfo.Account; + frameBack1.AddChidren(btnAccount); + + //纭鐨勭櫧鑹茶儗鏅� + var frameBack2 = new FrameLayout(); + frameBack2.Y = frameBack1.Bottom + Application.GetRealHeight(8); + frameBack2.Height = Application.GetRealHeight(50); + frameBack2.BackgroundColor = CSS_Color.MainBackgroundColor; + bodyFrameLayout.AddChidren(frameBack2); + //纭杩囨埛 + var btnConform = new NormalViewControl(200, 24, true); + btnConform.Gravity = Gravity.Center; + btnConform.TextSize = CSS_FontSize.SubheadingFontSize; + btnConform.TextAlignment = TextAlignment.Center; + btnConform.TextColor = CSS_Color.MainColor; + btnConform.TextID = StringId.ConfirmTransferre; + frameBack2.AddChidren(btnConform); + btnConform.ButtonClickEvent += (sender, e) => { - Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(204), - BackgroundColor = CSS_Color.MainBackgroundColor, + //濡傛灉璁剧疆鏈夊畨鍏ㄩ獙璇�,鍒欓渶瑕侀獙璇� + HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) => + { + var form = new TransferingResidenceForm(); + form.AddForm(this.accountInfo); + }); }; - bodyView.AddChidren(headView); - ImageView myHeadImage = new ImageView() + HdlThreadLogic.Current.RunThread(() => { - Y = Application.GetRealHeight(32), - Width = Application.GetRealWidth(84), - Height = Application.GetRealWidth(84), - Radius = (uint)Application.GetRealWidth(42), - ImagePath = UserInfo.Current.headImagePagePath, - Gravity = Gravity.CenterHorizontal, - }; - headView.AddChidren(myHeadImage); - - var btnConfirm = new Button() - { - Y = headView.Bottom + Application.GetRealHeight(8), - Height = Application.GetRealHeight(50), - TextAlignment = TextAlignment.Center, - TextColor = CSS_Color.MainColor, - TextSize = CSS_FontSize.SubheadingFontSize, - BackgroundColor = CSS_Color.MainBackgroundColor, - Text = "纭杩囨埛" - - }; - bodyView.AddChidren(btnConfirm); - + //鐢ㄧ嚎绋嬪幓涓嬭浇澶村儚 + var headImageBytes = ImageUtlis.Current.DownHeadImageByImageKey(this.accountInfo.MemberHeadIcon, true); + if (headImageBytes != null && headImageBytes.Length > 0) + { + HdlThreadLogic.Current.RunMain(() => + { + btnHeadImage.ImageBytes = headImageBytes; + }, ShowErrorMode.NO); + } + }); } + #endregion } } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferingResidencePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferingResidencePage.cs new file mode 100644 index 0000000..20484cb --- /dev/null +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/Transfer/TransferingResidencePage.cs @@ -0,0 +1,295 @@ +锘縰sing System; +using Shared; +using HDL_ON.UI.CSS; +using HDL_ON.Stan; +using System.Collections.Generic; + +namespace HDL_ON.UI +{ + /// <summary> + /// 鎵ц杩囨埛鎿嶄綔鐨勭晫闈� + /// </summary> + public class TransferingResidenceForm : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鎴愬憳淇℃伅 + /// </summary> + private AccountInfoResult accountResult = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_accountResult">璐﹀彿淇℃伅</param> + public void ShowForm(AccountInfoResult i_accountResult) + { + this.ScrollLeftEnabled = false; + + this.accountResult = i_accountResult; + + //杩囨埛 + base.SetTitleText(Language.StringByID(StringId.Transfer)); + + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //涓讳汉鐨勫浘鏍� + var btnAdminIcon = new ImageView(); + btnAdminIcon.Y = Application.GetRealHeight(112); + btnAdminIcon.X = Application.GetRealWidth(48); + btnAdminIcon.Height = this.GetPictrueRealSize(70); + btnAdminIcon.Width = this.GetPictrueRealSize(70); + btnAdminIcon.Radius = (uint)this.GetPictrueRealSize(70) / 2; + btnAdminIcon.ImagePath = UserInfo.Current.headImagePagePath; + bodyFrameLayout.AddChidren(btnAdminIcon); + //涓讳汉鍚嶅瓧 (浠ヤ腑闂翠负鍩哄噯,宸﹀彸闂磋窛16) + var btnAdminName = new NormalViewControl((btnAdminIcon.Right + btnAdminIcon.X) - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(48), false); + btnAdminName.X = HdlControlResourse.XXLeft; + btnAdminName.Y = btnAdminIcon.Bottom + Application.GetRealHeight(10); + btnAdminName.IsBold = true; + btnAdminName.IsMoreLines = true; + btnAdminName.TextAlignment = TextAlignment.TopCenter; + btnAdminName.TextSize = CSS_FontSize.SubheadingFontSize; + btnAdminName.Text = string.IsNullOrEmpty(UserInfo.Current.userName) == true ? UserInfo.Current.AccountString : UserInfo.Current.userName; + bodyFrameLayout.AddChidren(btnAdminName); + + //澶村儚 + var imageByte = ImageUtlis.Current.ReadFile(this.accountResult.MemberHeadIcon); + var btnUserIcon = new ImageView(); + btnUserIcon.Y = btnAdminIcon.Y; + btnUserIcon.X = bodyFrameLayout.Width - Application.GetRealWidth(48) - this.GetPictrueRealSize(70); + btnUserIcon.Height = this.GetPictrueRealSize(70); + btnUserIcon.Width = this.GetPictrueRealSize(70); + btnUserIcon.Radius = (uint)this.GetPictrueRealSize(70) / 2; + if (imageByte != null && imageByte.Length > 0) + { + btnUserIcon.ImageBytes = imageByte; + } + else + { + btnUserIcon.ImagePath = "LoginIcon/2.png"; + } + bodyFrameLayout.AddChidren(btnUserIcon); + + //鏄电О (浠ヤ腑闂翠负鍩哄噯,宸﹀彸闂磋窛50) + var btnName = new NormalViewControl(btnAdminName.Width, btnAdminName.Height, false); + btnName.X = bodyFrameLayout.Width - btnAdminName.X - btnAdminName.Width; + btnName.Y = btnAdminName.Y; + btnName.IsBold = true; + btnName.IsMoreLines = true; + btnName.TextAlignment = TextAlignment.TopCenter; + btnName.TextSize = CSS_FontSize.SubheadingFontSize; + btnName.Text = accountResult.MemberName; + bodyFrameLayout.AddChidren(btnName); + + //寮�鍚繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉绾跨▼ + this.StartConcetionAnimeteThread(btnAdminIcon.Right + Application.GetRealWidth(16)); + + //缁堟 + var btnCancel = new BottomClickButton(); + btnCancel.Y = Application.GetRealHeight(519); + btnCancel.TextID = StringId.Terminate; + bodyFrameLayout.AddChidren(btnCancel); + btnCancel.ButtonClickEvent += (sender, e) => + { + this.CloseForm(); + }; + + //鍒濆鍖栨秷鎭帶浠� + this.InitMsgControl(); + } + + #endregion + + #region 鈻� 鍋囨兂鍔ㄧ敾___________________________ + + /// <summary> + /// 寮�鍚繛鎺ョ殑鍋囨兂鍔ㄧ敾鏁堟灉绾跨▼ + /// </summary> + private void StartConcetionAnimeteThread(int XX) + { + //鐢熸垚鐐瑰彿鍥炬牱 + int pointXX = XX; + int pointWidth = Application.GetRealWidth(4); + int pointSpace = Application.GetRealWidth(9); + for (int i = 0; i < 9; i++) + { + var btnPoint = new NormalViewControl(pointWidth, pointWidth, false); + btnPoint.Radius = (uint)pointWidth / 2; + btnPoint.BackgroundColor = CSS_Color.PromptingColor1; + btnPoint.Y = Application.GetRealHeight(144); + btnPoint.X = pointXX; + bodyFrameLayout.AddChidren(btnPoint); + pointXX = btnPoint.Right + pointSpace; + } + + var listPoint = new List<int>(); + //璺冲姩鐨勯棿璺� + int jumpSpace = pointWidth + pointSpace; + for (int i = 0; i < 9; i++) + { + //X杞�+Index*(鍥炬爣澶у皬+闂磋窛) + listPoint.Add(XX + i * jumpSpace); + } + + var btnRound = new IconViewControl(8); + btnRound.Radius = (uint)btnRound.IconSize / 2; + btnRound.BackgroundColor = CSS_Color.MainColor; + btnRound.X = listPoint[0] - (btnRound.IconSize - pointWidth) / 2; + btnRound.Y = Application.GetRealHeight(142); + bodyFrameLayout.AddChidren(btnRound); + + HdlThreadLogic.Current.RunThread(() => + { + int index = 1; + while (this.Parent != null) + { + System.Threading.Thread.Sleep(500); + HdlThreadLogic.Current.RunMain(() => + { + if (btnRound != null) + { + btnRound.X = listPoint[index]; + index++; + if (index == listPoint.Count) + { + index = 0; + } + } + }); + } + }); + } + + #endregion + + #region 鈻� 鎵ц杩囨埛___________________________ + + /// <summary> + /// 鎵ц杩囨埛 + /// </summary> + private void DoTransferResidence() + { + this.ShowProgressBar(); + System.Threading.Thread.Sleep(1500); + //杩囨埛 + bool success = new DAL.Server.HttpServerRequest().TransferResidence(this.accountResult.Account); + + this.CloseProgressBar(); + HdlThreadLogic.Current.RunMain(() => + { + var form = new TransferResidenceResultPage(); + form.AddForm(this.accountResult, success); + form.FinishEvent += () => + { + if (success == false) + { + //閲嶈瘯 + HdlThreadLogic.Current.RunThread(() => + { + //鎵ц杩囨埛 + this.DoTransferResidence(); + }); + } + else + { + for (int i = 0; i < UserInfo.Current.regionList.Count; i++) + { + //绉婚櫎褰撳墠浣忓畢Id + if (UserInfo.Current.regionList[i].id == Entity.DB_ResidenceData.Instance.CurrentRegion.id) + { + UserInfo.Current.regionList.RemoveAt(i); + UserInfo.Current.SaveUserInfo(); + break; + } + } + //鍏抽棴鎵�鏈夌晫闈� + HdlFormLogic.Current.CloseAllOpenForm(); + + if (UserInfo.Current.regionList.Count == 0) + { + //娌℃湁浣忓畢浜�,杩斿洖鐧婚檰鐣岄潰 + HDLCommon.Current.Logout(); + } + else + { + Entity.DB_ResidenceData.Instance.CurrentRegion = UserInfo.Current.regionList[0]; + Entity.DB_ResidenceData.Instance.SaveResidenceData(); + //鍒锋柊浣忓畢鏁版嵁 + Common.ApiUtlis.Ins.DownloadData(); + + //鑾峰彇涓婚〉鐨勯偅涓鍣� + var userPage = MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1) as UserPage; + if (userPage != null) + { + //鍒锋柊涓汉涓績鐣岄潰 + MainPage.CurPageIndex = 1; + userPage.ChoosePersonalCenter(); + } + } + } + }; + }); + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鍒濆鍖栨秷鎭帶浠� + /// </summary> + private void InitMsgControl() + { + string msg = Language.StringByID(StringId.IsTransferingPleaseWaitting); + + //姝e湪杩囨埛缁欑敤鎴�,璇风◢鍚�... + var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(20), false); + btnMsg.Y = Application.GetRealHeight(288); + btnMsg.TextAlignment = TextAlignment.Center; + btnMsg.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnMsg.Text = msg; + bodyFrameLayout.AddChidren(btnMsg); + + HdlThreadLogic.Current.RunThread(() => + { + int timeOut = 15; + while (timeOut >= 0 && this.Parent != null) + { + HdlThreadLogic.Current.RunMain(() => + { + btnMsg.Text = msg + timeOut + "s"; + if (timeOut == 0) + { + btnMsg.Text = msg; + } + }, ShowErrorMode.NO); + System.Threading.Thread.Sleep(1000); + timeOut--; + } + if (timeOut <= 0) + { + //鎵ц杩囨埛鎿嶄綔 + this.DoTransferResidence(); + } + }); + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs index 706facf..ccb481a 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockPasswordPage.cs @@ -147,7 +147,7 @@ etPassword = new EditText() { Y = Application.GetRealWidth(100), - Height = Application.GetRealWidth(0), + Height = 1, Foucs = true, //Visible = false, IsNumberKeyboardType = true, diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs index 72283d9..6eb3d6b 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPage.cs @@ -61,18 +61,18 @@ //Button btnSecurityBg; - ///// <summary> - ///// 璁剧疆闂ㄩ攣閫夐」鎻愮ず - ///// </summary> - //Button btnDoorlockSelectionTip; - ///// <summary> - ///// 璁剧疆闂ㄩ攣閫夐」閫変腑鍥炬爣 - ///// </summary> - //Button btnDoorlockSelectionIcon; - ///// <summary> - ///// 璁剧疆闂ㄩ攣閫夐」鑳屾櫙 - ///// </summary> - //Button btnDoorlockBg; + /// <summary> + /// 璁剧疆闂ㄩ攣閫夐」鎻愮ず + /// </summary> + Button btnDoorlockSelectionTip; + /// <summary> + /// 璁剧疆闂ㄩ攣閫夐」閫変腑鍥炬爣 + /// </summary> + Button btnDoorlockSelectionIcon; + /// <summary> + /// 璁剧疆闂ㄩ攣閫夐」鑳屾櫙 + /// </summary> + Button btnDoorlockBg; #endregion /// <summary> @@ -369,46 +369,46 @@ #region Doorlock - //optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); + optionView.AddChidren(new Button() { Width = Application.GetRealWidth(16) }); - //FrameLayout doorlockDiv = new FrameLayout() - //{ - // Width = Application.GetRealWidth(94), - //}; - //optionView.AddChidren(doorlockDiv); + FrameLayout doorlockDiv = new FrameLayout() + { + Width = Application.GetRealWidth(94), + }; + optionView.AddChidren(doorlockDiv); - //btnDoorlockBg = new Button() - //{ - // Height = Application.GetRealWidth(174), - // UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/4.png", - // SelectedImagePath = "PersonalCenter/AppUnlockSetting/4On.png" - //}; - //doorlockDiv.AddChidren(btnDoorlockBg); + btnDoorlockBg = new Button() + { + Height = Application.GetRealWidth(174), + UnSelectedImagePath = "PersonalCenter/AppUnlockSetting/4.png", + SelectedImagePath = "PersonalCenter/AppUnlockSetting/4On.png" + }; + doorlockDiv.AddChidren(btnDoorlockBg); - //btnDoorlockSelectionIcon = new Button() - //{ - // X = Application.GetRealWidth(5), - // Y = Application.GetRealWidth(174), - // Width = Application.GetRealWidth(30), - // Height = Application.GetRealWidth(30), - // UnSelectedImagePath = "Public/ChooseIcon.png", - // SelectedImagePath = "Public/ChooseOnIcon.png", - //}; - //doorlockDiv.AddChidren(btnDoorlockSelectionIcon); + btnDoorlockSelectionIcon = new Button() + { + X = Application.GetRealWidth(5), + Y = Application.GetRealWidth(174), + Width = Application.GetRealWidth(30), + Height = Application.GetRealWidth(30), + UnSelectedImagePath = "Public/ChooseIcon.png", + SelectedImagePath = "Public/ChooseOnIcon.png", + }; + doorlockDiv.AddChidren(btnDoorlockSelectionIcon); - //btnDoorlockSelectionTip = new Button() - //{ - // X = Application.GetRealWidth(30), - // Y = Application.GetRealWidth(174), - // Width = Application.GetRealWidth(74), - // Height = Application.GetRealWidth(30), - // TextID = StringId.RemoteUnlocking, - // TextAlignment = TextAlignment.CenterLeft, - // TextColor = CSS_Color.FirstLevelTitleColor, - // SelectedTextColor = CSS_Color.MainColor, - // TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel - //}; - //doorlockDiv.AddChidren(btnDoorlockSelectionTip); + btnDoorlockSelectionTip = new Button() + { + X = Application.GetRealWidth(30), + Y = Application.GetRealWidth(174), + Width = Application.GetRealWidth(74), + Height = Application.GetRealWidth(30), + TextID = StringId.RemoteUnlocking, + TextAlignment = TextAlignment.CenterLeft, + TextColor = CSS_Color.FirstLevelTitleColor, + SelectedTextColor = CSS_Color.MainColor, + TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel + }; + doorlockDiv.AddChidren(btnDoorlockSelectionTip); #endregion #endregion diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs index d045730..43e9dc3 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/UnlockSetting/AppUnlockSettingsPageBLL.cs @@ -34,7 +34,7 @@ btnStartupBg.IsSelected = btnStartupSelectionIcon.IsSelected = btnStartupSelectionTip.IsSelected = false; #region F3闃舵 //btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = false; - //btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = false; + btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = false; #endregion btnTipMsg.TextID = StringId.UnprotectedTipMsg; @@ -176,49 +176,49 @@ //btnSecuritySelectionIcon.MouseUpEventHandler = eventHandler3; //btnSecuritySelectionTip.MouseUpEventHandler = eventHandler3; - //EventHandler<MouseEventArgs> eventHandler4 = (sender, e) => - //{ - // bool result = !btnDoorlockBg.IsSelected; - // if (!result) - // { - // //濡傛灉鍙墿杩滅▼寮�閿佷笉鑳藉彇娑堣繙绋嬪紑閿� - // if (!CheckIfCanDeselect("3")) return; - // } + EventHandler<MouseEventArgs> eventHandler4 = (sender, e) => + { + bool result = !btnDoorlockBg.IsSelected; + if (!result) + { + //濡傛灉鍙墿杩滅▼寮�閿佷笉鑳藉彇娑堣繙绋嬪紑閿� + if (!CheckIfCanDeselect("3")) return; + } - // btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = result; + btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = result; - // btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); - // if (result) - // { - // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; - // if (!UserInfo.Current.appUnlockPage.Contains("3")) - // { - // UserInfo.Current.appUnlockPage.Add("3"); - // if (UserInfo.Current.appUnlockPasswrod != "") - // UserInfo.Current.SaveUserInfo(); - // } - // unlockOptionView.Visible = true; - // } - // else - // { - // if (UserInfo.Current.appUnlockPage.Contains("3")) - // { - // UserInfo.Current.appUnlockPage.Remove("3"); - // } - // if (UserInfo.Current.appUnlockPage.Count == 0) - // { - // btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; - // btnTipMsg.TextID = StringId.UnprotectedTipMsg; - // UserInfo.Current.appUnlockPasswrod = ""; - // unlockOptionView.Visible = false; - // refreshAction(); - // } - // UserInfo.Current.SaveUserInfo(); - // } - //}; - //btnDoorlockBg.MouseUpEventHandler = eventHandler4; - //btnDoorlockSelectionIcon.MouseUpEventHandler = eventHandler4; - //btnDoorlockSelectionTip.MouseUpEventHandler = eventHandler4; + btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); + if (result) + { + btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = false; + if (!UserInfo.Current.appUnlockPage.Contains("3")) + { + UserInfo.Current.appUnlockPage.Add("3"); + if (UserInfo.Current.appUnlockPasswrod != "") + UserInfo.Current.SaveUserInfo(); + } + unlockOptionView.Visible = true; + } + else + { + if (UserInfo.Current.appUnlockPage.Contains("3")) + { + UserInfo.Current.appUnlockPage.Remove("3"); + } + if (UserInfo.Current.appUnlockPage.Count == 0) + { + btnUnprotectedBg.IsSelected = btnUnprotectedSelectionIcon.IsSelected = btnUnprotectedSelectionTip.IsSelected = true; + btnTipMsg.TextID = StringId.UnprotectedTipMsg; + UserInfo.Current.appUnlockPasswrod = ""; + unlockOptionView.Visible = false; + refreshAction(); + } + UserInfo.Current.SaveUserInfo(); + } + }; + btnDoorlockBg.MouseUpEventHandler = eventHandler4; + btnDoorlockSelectionIcon.MouseUpEventHandler = eventHandler4; + btnDoorlockSelectionTip.MouseUpEventHandler = eventHandler4; #endregion } @@ -244,11 +244,11 @@ // btnSecurityBg.IsSelected = btnSecuritySelectionIcon.IsSelected = btnSecuritySelectionTip.IsSelected = true; // btnTipMsg.Text = Language.StringByID(StringId.DefenseAndUndefenseTipMsg); //} - //if (UserInfo.Current.appUnlockPage.Contains("3")) - //{ - // btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = true; - // btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); - //} + if (UserInfo.Current.appUnlockPage.Contains("3")) + { + btnDoorlockBg.IsSelected = btnDoorlockSelectionIcon.IsSelected = btnDoorlockSelectionTip.IsSelected = true; + btnTipMsg.Text = Language.StringByID(StringId.RemoteUnlockingTipMsg); + } #endregion } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockAlwaysOnListPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockAlwaysOnListPage.cs new file mode 100644 index 0000000..6b12d60 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockAlwaysOnListPage.cs @@ -0,0 +1,398 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; +using HDL_ON.Entity; + +namespace HDL_ON.UI +{ + /// <summary> + /// 闂ㄩ攣甯稿紑鑷姩鍖栧垪琛ㄧ晫闈� + /// </summary> + public class DoorLockAlwaysOnListPage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 涓婇儴Frame鐨勫鍣ㄦ帶浠� + /// </summary> + private FrameLayout frameTopBack = null; + /// <summary> + /// 涓嬮儴Frame鐨勫鍣ㄦ帶浠� + /// </summary> + private FrameLayout frameBottomBack = null; + /// <summary> + /// 鑷姩鍖栧垪琛ㄦ帶浠� + /// </summary> + private VerticalListControl listView = null; + /// <summary> + /// 闂ㄩ攣淇℃伅 + /// </summary> + private DoorLockAlwayOnInfo doorLockInfo = new DoorLockAlwayOnInfo(); + /// <summary> + /// 闂ㄩ攣瀵硅薄 + /// </summary> + private Function doorDevice = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_doorDevice">闂ㄩ攣瀵硅薄</param> + public void ShowForm(Function i_doorDevice) + { + this.doorDevice = i_doorDevice; + + //甯稿紑 + base.SetTitleText(Language.StringByID(StringId.AlwaysOn)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍒濆鍖栦笂閮ㄦ帶浠� + this.InitTopTopBackControl(); + + //鍒濆鍖栦笅閮ㄦ帶浠� + this.InitBottomBackControl(); + } + + #endregion + + #region 鈻� 鍒濆鍖栦笂閮ㄦ帶浠禵____________________ + + /// <summary> + /// 鍒濆鍖栦笂閮ㄦ帶浠� + /// </summary> + private void InitTopTopBackControl() + { + if (this.frameTopBack == null || this.frameTopBack.Parent == null) + { + this.frameTopBack = new FrameLayout(); + frameTopBack.BackgroundColor = CSS_Color.MainBackgroundColor; + bodyFrameLayout.AddChidren(frameTopBack); + } + else + { + this.frameTopBack.RemoveAll(); + } + + //濡傛灉涓嶅浜庡父寮�妯″紡 + if (this.doorLockInfo.IsAlwayOpen == false) + { + //閿佺殑鍥剧墖 + var btnPic = new PicViewControl(102, 102); + btnPic.Y = Application.GetRealHeight(28); + btnPic.Gravity = Gravity.CenterHorizontal; + btnPic.UnSelectedImagePath = "FunctionIcon/DoorLock/UnLockPictrue2.png"; + this.frameTopBack.AddChidren(btnPic); + btnPic.ButtonClickEvent += (sender, e) => + { + this.doorLockInfo.IsAlwayOpen = true; + //閲嶆柊鍒濆鍖栦笂閮ㄦ帶浠� + this.InitTopTopBackControl(); + }; + + //鏃舵晥鎬у父寮�璁剧疆 + var rowSettion = new FrameRowControl(); + rowSettion.Y = btnPic.Bottom + Application.GetRealHeight(32); + this.frameTopBack.AddChidren(rowSettion); + rowSettion.AddLeftCaption(Language.StringByID(StringId.TimelyAlwaysOnSetting), 350); + rowSettion.AddRightArrow(); + rowSettion.AddBottomLine(); + rowSettion.ButtonClickEvent += (sender, e) => + { + //璁剧疆甯稿紑妯″紡鍚巤0}鎮ㄧ殑闂ㄩ攣灏嗗浜庢墦寮�鐘舵�亄0}鏄惁缁х画寮�鍚� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.OpenAlwayOnConfirmMsg), () => + { + var form = new DoorLockExpireTimeSettionPage(); + form.ShowForm(); + form.FinishEvent += (hour) => + { + //宸插紑鍚� + //HdlMessageLogic.Current.ShowMassage(ShowMsgType.ConfirmSuccess, Language.StringByID(StringId.AlreadyOpened), () => + //{ + + //}); + //甯稿紑妯″紡鍏抽棴璁剧疆澶辨晥锛岃閲嶈瘯 + HdlMessageLogic.Current.ShowMassage(ShowMsgType.ConfirmFail, Language.StringByID(StringId.AlwayOnFailTimeSettionFailMsg), () => + { + }); + }; + + }, Language.StringByID(StringId.ConfirmOpen)); + }; + + //鍙樻洿瀹瑰櫒楂樺害 + this.frameTopBack.Height = rowSettion.Bottom + Application.GetRealHeight(12); + } + //濡傛灉澶勪簬甯稿紑妯″紡 + else + { + //閿佺殑鍥剧墖 + var btnPic = new PicViewControl(102, 102); + btnPic.Y = Application.GetRealHeight(28); + btnPic.Gravity = Gravity.CenterHorizontal; + btnPic.UnSelectedImagePath = "FunctionIcon/DoorLock/UnLockPictrue1.png"; + this.frameTopBack.AddChidren(btnPic); + + //鍏抽棴鎸夐挳 + var btnClose = new BottomClickButton(220); + btnClose.Y = btnPic.Bottom + Application.GetRealHeight(28); + btnClose.TextID = StringId.Close; + this.frameTopBack.AddChidren(btnClose); + btnClose.ButtonClickEvent += (sender, e) => + { + this.doorLockInfo.IsAlwayOpen = false; + //閲嶆柊鍒濆鍖栦笂閮ㄦ帶浠� + this.InitTopTopBackControl(); + }; + + //甯稿紑妯″紡灏嗕簬{12.31 14:59}鍏抽棴 + var listMsg = Language.StringByID(StringId.AlwaysOnWillCloseOnTime).Split(new string[] { "{0}" }, StringSplitOptions.None); + int widthCount = 0; + //甯稿紑妯″紡灏嗕簬 + var btnMsg1 = new NormalViewControl(100, 20, true); + btnMsg1.Y = btnClose.Bottom + Application.GetRealHeight(32); + btnMsg1.TextColor = CSS_Color.FirstLevelTitleColor; + btnMsg1.Text = listMsg[0]; + btnMsg1.Width = btnMsg1.GetRealWidthByText(); + this.frameTopBack.AddChidren(btnMsg1); + widthCount += btnMsg1.Width; + //鏃堕棿(12.31 14:59) + var startTime = this.doorLockInfo.StartTime.AddHours(this.doorLockInfo.AlwayOpenHour); + var btnMsgTime = new NormalViewControl(100, 20, true); + btnMsgTime.Y = btnMsg1.Y; + btnMsgTime.TextColor = CSS_Color.AuxiliaryColor2; + btnMsgTime.Text = HdlCommonLogic.Current.ConvertDayText(startTime.Month, startTime.Day, startTime.Year) + " " + startTime.ToString("HH:mm"); + btnMsgTime.Width = btnMsgTime.GetRealWidthByText(); + this.frameTopBack.AddChidren(btnMsgTime); + widthCount += btnMsgTime.Width; + + NormalViewControl btnMsg2 = null; + if (listMsg.Length > 1) + { + //鍏抽棴 + btnMsg2 = new NormalViewControl(100, 20, true); + btnMsg2.Y = btnMsg1.Y; + btnMsg2.TextColor = CSS_Color.FirstLevelTitleColor; + btnMsg2.Text = listMsg[1]; + btnMsg2.Width = btnMsg2.GetRealWidthByText(); + this.frameTopBack.AddChidren(btnMsg2); + widthCount += btnMsg2.Width; + } + //璁╄繖涓変釜涓滆タ灞呬腑 + int defultXX = (this.frameTopBack.Width - widthCount) / 2; + btnMsg1.X = defultXX; + btnMsgTime.X = btnMsg1.Right; + if (btnMsg2 != null) + { + btnMsg2.X = btnMsgTime.Right; + } + + //鍙樻洿瀹瑰櫒楂樺害 + this.frameTopBack.Height = btnMsgTime.Bottom + Application.GetRealHeight(16); + } + //鍒锋柊涓嬮儴Frame鎺т欢鐨勫潗鏍囧拰楂樺害 + this.RefreshBottomFrameHeightAndLocation(); + } + + #endregion + + #region 鈻� 鍒濆鍖栦笅閮ㄦ帶浠禵____________________ + + /// <summary> + /// 鍒濆鍖栦笅閮ㄦ帶浠� + /// </summary> + private void InitBottomBackControl() + { + if (this.frameBottomBack == null || this.frameBottomBack.Parent == null) + { + this.frameBottomBack = new FrameLayout(); + frameBottomBack.BackgroundColor = CSS_Color.MainBackgroundColor; + bodyFrameLayout.AddChidren(frameBottomBack); + //甯稿紑鑷姩鍖� + var rowSettion = new FrameRowControl(); + rowSettion.Y = Application.GetRealHeight(6); + frameBottomBack.AddChidren(rowSettion); + var btnCation = rowSettion.AddLeftCaption(Language.StringByID(StringId.AutomationAlwaysOn), 300); + btnCation.TextSize = CSS_FontSize.SubheadingFontSize; + btnCation.TextColor = CSS_Color.FirstLevelTitleColor; + btnCation.IsBold = true; + //娣诲姞鍥炬爣 + var btnAddIcon = rowSettion.AddMostRightEmptyIcon(38, 38); + btnAddIcon.UnSelectedImagePath = "Public/AddIcon.png"; + btnAddIcon.ButtonClickEvent += (sender, e) => + { + var form = new DoorLockAlwaysOnManagerPage(); + form.AddForm(new object[] { null }); + }; + + //鍒楄〃鎺т欢 + this.listView = new VerticalListControl(); + frameBottomBack.AddChidren(listView); + } + else + { + this.frameBottomBack.RemoveAll(); + this.listView.RemoveAll(); + } + //鍒锋柊涓嬮儴Frame鎺т欢鐨勫潗鏍囧拰楂樺害 + this.RefreshBottomFrameHeightAndLocation(); + + //娴嬭瘯 + for (int i = 0; i < 2; i++) + { + //娣诲姞鑷姩鍖栨潯浠舵帶浠� + this.AddAutomationControl(new AlwayOnAutomationInfo()); + } + } + + #endregion + + #region 鈻� 娣诲姞鑷姩鍖栨潯浠舵帶浠禵________________ + + /// <summary> + /// 娣诲姞鑷姩鍖栨潯浠舵帶浠� + /// </summary> + /// <param name="i_info">鑷姩鍖栦俊鎭�</param> + private void AddAutomationControl(AlwayOnAutomationInfo i_info) + { + //瀹瑰櫒鎺т欢 + var rowBack = new RowLayout(); + rowBack.LineColor = CSS_Color.viewTranslucence; + rowBack.SubViewWidth = Application.GetRealWidth(80); + rowBack.Height = Application.GetRealHeight(100); + this.listView.AddChidren(rowBack); + + //娑堟伅 + var btnMsg = new NormalViewControl(rowBack.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(20), false); + btnMsg.X = HdlControlResourse.XXLeft; + btnMsg.Y = Application.GetRealHeight(10); + btnMsg.TextColor = CSS_Color.FirstLevelTitleColor; + if (i_info.IsOpenAlwayOn == true) + { + //9:00 - 鎵撳紑甯稿紑妯″紡 + btnMsg.Text = i_info.Hour + ":" + i_info.Minute.ToString().PadLeft(2, '0') + " - " + Language.StringByID(StringId.OpenAlwaysOnModel); + } + else + { + //9:00 - 鍏抽棴甯稿紑妯″紡 + btnMsg.Text = i_info.Hour + ":" + i_info.Minute.ToString().PadLeft(2, '0') + " - " + Language.StringByID(StringId.CloseAlwaysOnModel); + } + rowBack.AddChidren(btnMsg); + + //鍛ㄦ湡 + var btnTimeLoop = new NormalViewControl(rowBack.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(18), false); + btnTimeLoop.X = btnMsg.X; + btnTimeLoop.Y = btnMsg.Bottom + Application.GetRealHeight(4); + btnTimeLoop.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnTimeLoop.TextColor = CSS_Color.PromptingColor1; + btnTimeLoop.Text = "鍛ㄤ竴 - 鍛ㄤ簲"; + rowBack.AddChidren(btnTimeLoop); + + //鍥炬爣琛屾帶浠� + var rowIcon = new FrameRowControl(); + rowIcon.Gravity = Gravity.BottomCenter; + rowBack.AddChidren(rowIcon); + + //鍏堢敾搴曠嚎 + rowIcon.AddBottomLine(); + + //鍥哄畾鐨勪笁涓浘鏍� + var btnIcon1 = rowIcon.AddLeftIcon(28, "Phone/LogicIcon/selectTheTime.png"); + var btnIcon2 = rowIcon.AddLeftIcon(20, "Phone/LogicIcon/link.png"); + btnIcon2.X = btnIcon1.Right + Application.GetRealWidth(8); + var btnIcon3 = rowIcon.AddLeftIcon(28, "FunctionIcon/DoorLock/NormallyOpenIcon3.png"); + btnIcon3.X = btnIcon2.Right + Application.GetRealWidth(8); + + //寮�鍏� + var btnSwitch = rowIcon.AddMostRightSwitchIcon(); + btnSwitch.ButtonClickEvent += (sender, e) => + { + btnSwitch.IsSelected = !btnSwitch.IsSelected; + }; + + //缂栬緫 + var btnEditor = new NormalViewControl(rowBack.SubViewWidth, rowBack.Height, false); + btnEditor.TextAlignment = TextAlignment.Center; + btnEditor.TextSize = CSS_FontSize.SubheadingFontSize; + btnEditor.TextColor = CSS_Color.MainBackgroundColor; + btnEditor.BackgroundColor = CSS_Color.AuxiliaryColor1; + btnEditor.TextID = StringId.Edit; + rowBack.AddRightView(btnEditor); + btnEditor.ButtonClickEvent += (sender, e) => + { + //杩樺師 + rowBack.HideRightMenu(); + var form = new DoorLockAlwaysOnManagerPage(); + form.AddForm(new object[] { i_info }); + }; + //鍒犻櫎 + var btnDelete = new NormalViewControl(rowBack.SubViewWidth, rowBack.Height, false); + btnDelete.TextAlignment = TextAlignment.Center; + btnDelete.TextSize = CSS_FontSize.SubheadingFontSize; + btnDelete.TextColor = CSS_Color.MainBackgroundColor; + btnDelete.BackgroundColor = CSS_Color.AuxiliaryColor2; + btnDelete.TextID = StringId.Del; + rowBack.AddRightView(btnDelete); + btnDelete.ButtonClickEvent += (sender, e) => + { + //鏄惁瑕佸垹闄よ嚜鍔ㄥ寲? + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.delAutomation), () => + { + rowBack.RemoveFromParent(); + }); + }; + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鍒锋柊涓嬮儴Frame鎺т欢鐨勫潗鏍囧拰楂樺害 + /// </summary> + private void RefreshBottomFrameHeightAndLocation() + { + if (this.frameBottomBack != null) + { + this.frameBottomBack.Y = this.frameTopBack.Bottom + Application.GetRealHeight(8); + this.frameBottomBack.Height = bodyFrameLayout.Height - this.frameBottomBack.Y; + } + if (this.listView != null) + { + //杩欎釜Y杞村浐瀹� + this.listView.Y = Application.GetRealHeight(58); + this.listView.Height = this.frameBottomBack.Height - this.listView.Y; + } + } + + #endregion + + #region 鈻� 鐣岄潰鍏抽棴___________________________ + + /// <summary> + /// 鐣岄潰鍏抽棴 + /// </summary> + public override void CloseFormBefore() + { + base.CloseFormBefore(); + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockAlwaysOnManagerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockAlwaysOnManagerPage.cs new file mode 100644 index 0000000..3db55fd --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockAlwaysOnManagerPage.cs @@ -0,0 +1,535 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; +using HDL_ON.Entity; + +namespace HDL_ON.UI +{ + /// <summary> + /// 闂ㄩ攣甯稿紑鑷姩鍖栫紪杈戠晫闈� + /// </summary> + public class DoorLockAlwaysOnManagerPage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 甯稿紑鑷姩鍖栦俊鎭� + /// </summary> + private AlwayOnAutomationInfo automationInfo = null; + /// <summary> + /// 涓�浜涙枃鏈� + /// </summary> + private Dictionary<string, string> dicText = new Dictionary<string, string>(); + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm(AlwayOnAutomationInfo info) + { + this.automationInfo = info; + if (info == null) + { + this.automationInfo = new AlwayOnAutomationInfo(); + //鏂板缓鑷姩鍖� + base.SetTitleText(Language.StringByID(StringId.newAutomation)); + } + else + { + //缂栬緫鑷姩鍖� + base.SetTitleText(Language.StringByID(StringId.editAutomation)); + } + + this.dicText["鍛�1"] = Language.StringByID(StringId.monday); + this.dicText["鍛�2"] = Language.StringByID(StringId.tuesday); + this.dicText["鍛�3"] = Language.StringByID(StringId.wednesday); + this.dicText["鍛�4"] = Language.StringByID(StringId.thursday); + this.dicText["鍛�5"] = Language.StringByID(StringId.friday); + this.dicText["鍛�6"] = Language.StringByID(StringId.saturday); + this.dicText["鍛�7"] = Language.StringByID(StringId.sunday); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍒濆鍖栨潯浠舵帶浠� + this.InitConditionControl(); + //鍒濆鍖栫洰鏍囨帶浠� + this.InitTargetControl(); + //鍒濆鍖栧惊鐜柟寮忔帶浠� + this.InitLoopControl(); + + //纭鎸夐挳 + var btnSave = this.AddBottomClickButton(Language.StringByID(StringId.Confirm)); + btnSave.ButtonClickEvent += (sender, e) => + { + }; + } + + #endregion + + #region 鈻� 鍒濆鍖栨潯浠舵帶浠禵____________________ + + /// <summary> + /// 鍒濆鍖栨潯浠舵帶浠� + /// </summary> + private void InitConditionControl() + { + //濡傛灉 + var btnIf = new NormalViewControl(300, 22, true); + btnIf.X = HdlControlResourse.XXLeft; + btnIf.Y = Application.GetRealHeight(12); + btnIf.TextID = StringId.ifCondition; + btnIf.TextSize = CSS_FontSize.SubheadingFontSize; + btnIf.TextColor = CSS_Color.FirstLevelTitleColor; + btnIf.IsBold = true; + bodyFrameLayout.AddChidren(btnIf); + + //鐧借壊鑳屾櫙瀹瑰櫒 + var frameBack = new FrameLayout(); + frameBack.Y = btnIf.Bottom + Application.GetRealHeight(12); + frameBack.Width = Application.GetRealWidth(343); + frameBack.Height = Application.GetRealHeight(88); + frameBack.Gravity = Gravity.CenterHorizontal; + frameBack.BackgroundColor = CSS_Color.MainBackgroundColor; + frameBack.Radius = (uint)Application.GetRealWidth(12); + bodyFrameLayout.AddChidren(frameBack); + + //鏉′欢 + var rowConditon = new FrameRowControl(); + rowConditon.LeftOffset = Application.GetRealWidth(12) - HdlControlResourse.XXLeft; + rowConditon.Width = frameBack.Width; + frameBack.AddChidren(rowConditon); + var btnConditon = rowConditon.AddLeftCaption(Language.StringByID(StringId.Condtion), 300); + btnConditon.TextColor = CSS_Color.FirstLevelTitleColor; + //搴曠嚎 + rowConditon.AddBottomLine(); + + //鏃跺埢 + var rowTime = new FrameRowControl(); + rowTime.Y = rowConditon.Bottom; + rowTime.LeftOffset = Application.GetRealWidth(12) - HdlControlResourse.XXLeft; + rowTime.Width = frameBack.Width; + frameBack.AddChidren(rowTime); + rowTime.AddLeftIcon(28, "LogicIcon/time.png"); + var btnTime = rowTime.AddLeftCaption(Language.StringByID(StringId.hour), 300); + btnTime.TextColor = CSS_Color.FirstLevelTitleColor; + rowTime.AddRightArrow(); + var btnValue = rowTime.AddMostRightView(this.automationInfo.Hour + ":" + this.automationInfo.Minute.ToString().PadLeft(2, '0'), 80); + rowTime.ButtonClickEvent += (sender, e) => + { + //鏃堕棿閫夋嫨寮圭獥 + var form = new BottomTimeSelectControl(); + form.InitControl(this.automationInfo.Hour, this.automationInfo.Minute); + form.FinishEvent += (div, selectHour, selectMin) => + { + if (div != 1) { return; } + this.automationInfo.Hour = selectHour; + this.automationInfo.Minute = selectMin; + btnValue.Text = this.automationInfo.Hour + ":" + this.automationInfo.Minute.ToString().PadLeft(2, '0'); + }; + }; + } + + #endregion + + #region 鈻� 鍒濆鍖栫洰鏍囨帶浠禵____________________ + + /// <summary> + /// 鍒濆鍖栫洰鏍囨帶浠� + /// </summary> + private void InitTargetControl() + { + //灏辨墽琛� + var btnExecuted = new NormalViewControl(300, 22, true); + btnExecuted.X = HdlControlResourse.XXLeft; + btnExecuted.Y = Application.GetRealHeight(154); + btnExecuted.TextID = StringId.isExecuted; + btnExecuted.TextSize = CSS_FontSize.SubheadingFontSize; + btnExecuted.TextColor = CSS_Color.FirstLevelTitleColor; + btnExecuted.IsBold = true; + bodyFrameLayout.AddChidren(btnExecuted); + + //鐧借壊鑳屾櫙瀹瑰櫒 + var frameBack = new FrameLayout(); + frameBack.Y = btnExecuted.Bottom + Application.GetRealHeight(12); + frameBack.Width = Application.GetRealWidth(343); + frameBack.Height = Application.GetRealHeight(88); + frameBack.Gravity = Gravity.CenterHorizontal; + frameBack.BackgroundColor = CSS_Color.MainBackgroundColor; + frameBack.Radius = (uint)Application.GetRealWidth(12); + bodyFrameLayout.AddChidren(frameBack); + + //鍔ㄤ綔琛屾帶浠� + var rowAction = new FrameRowControl(); + rowAction.LeftOffset = Application.GetRealWidth(12) - HdlControlResourse.XXLeft; + rowAction.Width = frameBack.Width; + frameBack.AddChidren(rowAction); + //鍔ㄤ綔 + var btnAction = rowAction.AddLeftCaption(Language.StringByID(StringId.Action), 300); + btnAction.TextColor = CSS_Color.FirstLevelTitleColor; + //搴曠嚎 + rowAction.AddBottomLine(); + + //甯稿紑妯″紡琛屾帶浠� + var rowModel = new FrameRowControl(); + rowModel.Y = rowAction.Bottom; + rowModel.LeftOffset = Application.GetRealWidth(12) - HdlControlResourse.XXLeft; + rowModel.Width = frameBack.Width; + frameBack.AddChidren(rowModel); + //鍥炬爣 + rowModel.AddLeftIcon(28, "FunctionIcon/DoorLock/NormallyOpenIcon2.png"); + //甯稿紑妯″紡 + var btnAlwayOn = rowModel.AddLeftCaption(Language.StringByID(StringId.AlwaysOnModel), 300); + btnAlwayOn.TextColor = CSS_Color.FirstLevelTitleColor; + //鍙崇澶� + rowModel.AddRightArrow(); + //鍊� + var btnValue = rowModel.AddMostRightView(this.automationInfo.IsOpenAlwayOn == true ? + Language.StringByID(StringId.kaiqi) : Language.StringByID(StringId.Close), 80); + + rowModel.ButtonClickEvent += (sender, e) => + { + //閫夋嫨寮圭獥 + var form = new BottomMenuSelectControl(2); + //寮�鍚� + form.AddMenu(Language.StringByID(StringId.kaiqi), () => + { + this.automationInfo.IsOpenAlwayOn = true; + btnValue.Text = Language.StringByID(StringId.kaiqi); + }); + //鍏抽棴 + form.AddMenu(Language.StringByID(StringId.Close), () => + { + this.automationInfo.IsOpenAlwayOn = false; + btnValue.Text = Language.StringByID(StringId.Close); + },CSS_Color.PromptingColor1); + }; + } + + #endregion + + #region 鈻� 鍒濆鍖栧惊鐜柟寮忔帶浠禵________________ + + /// <summary> + /// 鍒濆鍖栧惊鐜柟寮忔帶浠� + /// </summary> + private void InitLoopControl() + { + //寰幆鏂瑰紡 + var btnloop = new NormalViewControl(300, 22, true); + btnloop.X = HdlControlResourse.XXLeft; + btnloop.Y = Application.GetRealHeight(296); + btnloop.TextID = StringId.cyclic; + btnloop.TextSize = CSS_FontSize.SubheadingFontSize; + btnloop.TextColor = CSS_Color.FirstLevelTitleColor; + btnloop.IsBold = true; + bodyFrameLayout.AddChidren(btnloop); + + //鍛ㄦ湡鐨勭櫧鑹茶儗鏅鍣� + var frameDayBack = new FrameLayout(); + frameDayBack.Y = btnloop.Bottom + Application.GetRealHeight(12); + frameDayBack.Width = Application.GetRealWidth(343); + frameDayBack.Height = Application.GetRealHeight(50); + frameDayBack.Gravity = Gravity.CenterHorizontal; + frameDayBack.BackgroundColor = CSS_Color.MainBackgroundColor; + frameDayBack.Radius = (uint)Application.GetRealWidth(12); + bodyFrameLayout.AddChidren(frameDayBack); + + //鍛ㄦ湡琛屾帶浠� + var rowLoop = new FrameRowControl(); + rowLoop.LeftOffset = Application.GetRealWidth(12) - HdlControlResourse.XXLeft; + rowLoop.Width = frameDayBack.Width; + rowLoop.Height = Application.GetRealHeight(50); + frameDayBack.AddChidren(rowLoop); + //鍛ㄦ湡 + var cycleText = this.GetLoopCondtionText(); + var btnCycle = rowLoop.AddLeftCaption(cycleText, 270); + btnCycle.TextColor = CSS_Color.FirstLevelTitleColor; + btnCycle.IsMoreLines = false;//璁╁畠涓嶆崲琛屼簡,涓嶇劧鏈夌偣闅剧湅 + //鍙崇澶� + rowLoop.AddRightArrow(); + rowLoop.ButtonClickEvent += (sender, e) => + { + //鏄剧ず鍛ㄦ湡寰幆閰嶇疆绐楀彛 + this.ShowLoopMethordSettionDialog(btnCycle); + }; + + //鎺ㄩ�佺殑鐧借壊鑳屾櫙瀹瑰櫒 + var framePushBack = new FrameLayout(); + framePushBack.Y = frameDayBack.Bottom + Application.GetRealHeight(8); + framePushBack.Width = Application.GetRealWidth(343); + framePushBack.Height = Application.GetRealHeight(100); + framePushBack.Gravity = Gravity.CenterHorizontal; + framePushBack.BackgroundColor = CSS_Color.MainBackgroundColor; + framePushBack.Radius = (uint)Application.GetRealWidth(12); + bodyFrameLayout.AddChidren(framePushBack); + + //鎺ㄩ�佽鎺т欢 + var rowPush = new FrameRowControl(); + rowPush.Width = framePushBack.Width; + rowPush.Height = Application.GetRealHeight(50); + rowPush.LeftOffset = Application.GetRealWidth(12) - HdlControlResourse.XXLeft; + framePushBack.AddChidren(rowPush); + //鎵ц鎺ㄩ�� + var btnPush = rowPush.AddLeftCaption(Language.StringByID(StringId.push), 300); + btnPush.TextColor = CSS_Color.FirstLevelTitleColor; + //搴曠嚎 + rowPush.AddBottomLine(); + //鎺ㄩ�佺殑寮�鍏虫寜閽� + var btnPushSwitch = rowPush.AddMostRightSwitchIcon(); + btnPushSwitch.ButtonClickEvent += (sender, e) => + { + btnPushSwitch.IsSelected = !btnPushSwitch.IsSelected; + }; + + //鍙戦�侀�氱煡琛屾帶浠� + var rowNotice = new FrameRowControl(); + rowNotice.Y = rowPush.Bottom; + rowNotice.Width = framePushBack.Width; + rowNotice.Height = Application.GetRealHeight(50); + rowNotice.LeftOffset = Application.GetRealWidth(12) - HdlControlResourse.XXLeft; + framePushBack.AddChidren(rowNotice); + //鍙戦�侀�氱煡 + var btnNotice = rowNotice.AddLeftCaption(Language.StringByID(StringId.notification), 300); + btnNotice.TextColor = CSS_Color.FirstLevelTitleColor; + //鍙崇澶� + rowNotice.AddRightArrow(); + rowNotice.ButtonClickEvent += (sender, e) => + { + var form = new UI2.Intelligence.Automation.InputPushText(); + MainPage.BasePageView.AddChidren(form); + //form.Show(this.automationInfo.PushSettion); + form.Show(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + //form.action += (pushInfo) => + //{ + // //璧嬪�� + // this.automationInfo.PushSettion = pushInfo; + //}; + }; + } + + #endregion + + #region 鈻� 鏄剧ず鍛ㄦ湡寰幆閰嶇疆绐楀彛_______________ + + /// <summary> + /// 鏄剧ず鍛ㄦ湡寰幆閰嶇疆绐楀彛 + /// </summary> + private void ShowLoopMethordSettionDialog(NormalViewControl btnCycle) + { + //涔嬪墠閫夋嫨鐨勬帶浠� + NormalViewControl btnOldView = null; + + var form = new BottomItemEditorControl(4, Language.StringByID(StringId.cyclic)); + form.ClickConfirmClose = false; + //鎵ц涓�娆� + form.AddRowMenu(Language.StringByID(StringId.performA), string.Empty, (btnView, btnValue) => + { + this.automationInfo.LoopDiv = 1; + if (btnOldView != null) + { + //杩樺師棰滆壊 + btnOldView.TextColor = CSS_Color.FirstLevelTitleColor; + } + //鍙樻洿棰滆壊 + btnView.TextColor = CSS_Color.textConfirmColor; + btnOldView = btnView; + //鍙樻洿鏄剧ず鏂囨湰 + btnCycle.Text = this.GetLoopCondtionText(); + + }, false); + + //姣忓ぉ + form.AddRowMenu(Language.StringByID(StringId.days), string.Empty, (btnView, btnValue) => + { + this.automationInfo.LoopDiv = 2; + if (btnOldView != null) + { + //杩樺師棰滆壊 + btnOldView.TextColor = CSS_Color.FirstLevelTitleColor; + } + //鍙樻洿棰滆壊 + btnView.TextColor = CSS_Color.textConfirmColor; + btnOldView = btnView; + //鍙樻洿鏄剧ず鏂囨湰 + btnCycle.Text = this.GetLoopCondtionText(); + + }, false); + + //姣忓懆 + form.AddRowMenu(Language.StringByID(StringId.weekly), string.Empty, (btnView, btnValue) => + { + //鍏抽棴寮圭獥,鏄剧ず鍛ㄦ湡寰幆(鏄熸湡)鐨勯厤缃獥鍙� + form.Close(); + this.ShowLoopMethordWeekDialog(btnCycle); + }); + + //姣忔湀 + form.AddRowMenu(Language.StringByID(StringId.monthly), string.Empty, (btnView, btnValue) => + { + //鍏抽棴寮圭獥,鏄剧ず鍛ㄦ湡寰幆(鏈堜唤)鐨勯厤缃獥鍙� + form.Close(); + this.ShowLoopMethordMonthDialog(btnCycle); + }); + + form.FinishEvent += (div) => + { + //褰撶偣鍑讳簡纭鏃�,濡傛灉杩樻病閫夋嫨锛屽垯鏃犲弽搴� + if (div != 1 || btnOldView == null) { return; } + + form.Close(); + }; + } + + /// <summary> + /// 鏄剧ず鍛ㄦ湡寰幆(鏄熸湡)鐨勯厤缃獥鍙� + /// </summary> + private void ShowLoopMethordWeekDialog(NormalViewControl btnCycle) + { + //鏄熸湡涓�鍒版槦鏈熸棩 + var listText = new List<string>(); + listText.Add(this.dicText["鍛�1"]); + listText.Add(this.dicText["鍛�2"]); + listText.Add(this.dicText["鍛�3"]); + listText.Add(this.dicText["鍛�4"]); + listText.Add(this.dicText["鍛�5"]); + listText.Add(this.dicText["鍛�6"]); + listText.Add(this.dicText["鍛�7"]); + + var listSelect = new List<int>(); + if (this.automationInfo.LoopDiv == 3) + { + //涔嬪墠閫夋嫨鐨勬槸杩欎釜鍖哄垎鎵嶈兘鏈夐粯璁ら�夋嫨 + foreach (var value in this.automationInfo.ListLoopValue) + { + //榛樿閫夋嫨 + listSelect.Add(value - 1); + } + } + + var form = new BottomItemSelectControl(7, Language.StringByID(StringId.cyclic)); + form.AddRowMenu(listText, listSelect); + form.FinishEvent += (div, listIndex) => + { + if (div == 0) + { + //濡傛灉鐐瑰嚮浜嗗彇娑�,鍒欒皟璧� 鍛ㄦ湡寰幆閰嶇疆绐楀彛 + this.ShowLoopMethordSettionDialog(btnCycle); + return; + } + //鏇存敼缂撳瓨 + this.automationInfo.LoopDiv = 3; + this.automationInfo.ListLoopValue = new List<int>(); + + foreach (var index in listIndex) + { + this.automationInfo.ListLoopValue.Add(index + 1); + } + //鍙樻洿鏄剧ず鏂囨湰 + btnCycle.Text = this.GetLoopCondtionText(); + }; + } + + /// <summary> + /// 鏄剧ず鍛ㄦ湡寰幆(鏈堜唤)鐨勯厤缃獥鍙� + /// </summary> + private void ShowLoopMethordMonthDialog(NormalViewControl btnCycle) + { + var listSelect = new List<int>(); + if (this.automationInfo.LoopDiv == 4) + { + //涔嬪墠閫夋嫨鐨勬槸杩欎釜鍖哄垎鎵嶈兘鏈夐粯璁ら�夋嫨 + foreach (var value in this.automationInfo.ListLoopValue) + { + //榛樿閫夋嫨 + listSelect.Add(value); + } + } + + var form = new BottomSomeDaySelectControl(Language.StringByID(StringId.monthly)); + form.InitControl(listSelect); + form.FinishEvent += (div, listIndex) => + { + if (div == 0) + { + //濡傛灉鐐瑰嚮浜嗗彇娑�,鍒欒皟璧� 鍛ㄦ湡寰幆閰嶇疆绐楀彛 + this.ShowLoopMethordSettionDialog(btnCycle); + return; + } + //鏇存敼缂撳瓨 + this.automationInfo.LoopDiv = 4; + this.automationInfo.ListLoopValue = new List<int>(); + + foreach (var day in listIndex) + { + this.automationInfo.ListLoopValue.Add(day); + } + //鍙樻洿鏄剧ず鏂囨湰 + btnCycle.Text = this.GetLoopCondtionText(); + }; + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鑾峰彇寰幆鏉′欢鐨勭炕璇戞枃鏈� + /// </summary> + /// <returns></returns> + private string GetLoopCondtionText() + { + //鎵ц涓�娆� + if (this.automationInfo.LoopDiv == 1) + { + return Language.StringByID(StringId.performA); + } + //姣忓ぉ + else if (this.automationInfo.LoopDiv == 2) + { + return Language.StringByID(StringId.days); + } + //姣忓懆 + else if (this.automationInfo.LoopDiv == 3) + { + var textValue = string.Empty; + foreach (var weekValue in this.automationInfo.ListLoopValue) + { + textValue += this.dicText["鍛�" + weekValue] + ","; + } + //鍘绘帀鏈�鍚庣殑閫楀彿 + return textValue.Substring(0, textValue.Length - 1); + } + //姣忔湀 + else if (this.automationInfo.LoopDiv == 4) + { + var textValue = Language.StringByID(StringId.monthly) + " "; + foreach (var day in this.automationInfo.ListLoopValue) + { + textValue += day.ToString() + ","; + } + //鍘绘帀鏈�鍚庣殑閫楀彿 + return textValue.Substring(0, textValue.Length - 1); + } + return string.Empty; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockExpireTimeSettionPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockExpireTimeSettionPage.cs new file mode 100644 index 0000000..47931d2 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockExpireTimeSettionPage.cs @@ -0,0 +1,188 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.UI +{ + /// <summary> + /// 闂ㄩ攣甯稿紑妯″紡澶辨晥鏃堕棿璁剧疆鐣岄潰(涓嶉渶瑕佹坊鍔犲埌鐖舵帶浠�) + /// </summary> + public class DoorLockExpireTimeSettionPage + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 缁撴潫浜嬩欢(鍙傛暟涓�,杈撳叆鐨勫皬鏃�) + /// </summary> + public Action<int> FinishEvent = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐣岄潰鏄剧ず + /// </summary> + public void ShowForm() + { + var dialogForm = new Dialog(); + dialogForm.BackgroundColor = CSS_Color.DialogTransparentColor1; + //涓绘帶浠� + var frameMain = new NormalFrameLayout(); + dialogForm.AddChidren(frameMain); + dialogForm.Show(); + frameMain.ButtonClickEvent += (sender, e) => + { + dialogForm.Close(); + this.FinishEvent = null; + }; + + //涓棿鍖哄煙 + var frameCenter = new NormalFrameLayout(); + frameCenter.Y = Application.GetRealHeight(239); + frameCenter.Gravity = Gravity.CenterHorizontal; + frameCenter.Width = Application.GetRealWidth(270); + frameCenter.Height = Application.GetRealHeight(172); + frameCenter.BackgroundColor = CSS_Color.MainBackgroundColor; + frameCenter.BorderColor = 0x00000000; + frameCenter.BorderWidth = 0; + frameCenter.Radius = (uint)Application.GetMinRealAverage(10); + frameMain.AddChidren(frameCenter); + + //澶辨晥璁剧疆 + var btnTitle = new NormalViewControl(frameCenter.Width - HdlControlResourse.XXLeft * 2, Application.GetRealHeight(22), false); + btnTitle.Y = Application.GetRealHeight(20); + btnTitle.Gravity = Gravity.CenterHorizontal; + btnTitle.TextColor = CSS_Color.MainColor; + btnTitle.TextSize = CSS_FontSize.SubheadingFontSize; + btnTitle.TextAlignment = TextAlignment.Center; + btnTitle.IsBold = true; + btnTitle.Text = Language.StringByID(StringId.FailTimeSeetion); + frameCenter.AddChidren(btnTitle); + + //甯稿紑妯″紡灏嗕簬{0}灏忔椂鍚庡け鏁� + string[] strArryMsg = Language.StringByID(StringId.AlwayOnWillCloseAtTimeMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + + //甯稿紑妯″紡灏嗕簬 + var btnMsg1 = new NormalViewControl(Application.GetRealWidth(76), Application.GetRealHeight(32), false); + btnMsg1.X = Application.GetRealWidth(20); + btnMsg1.Y = btnTitle.Bottom + Application.GetRealHeight(20); + btnMsg1.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnMsg1.IsMoreLines = true; + btnMsg1.Text = strArryMsg[0].Trim(); + frameCenter.AddChidren(btnMsg1); + + //澶辨晥鏃堕棿鐨勮儗鏅鍣� + var frameTime = new FrameLayout(); + frameTime.X = btnMsg1.Right + Application.GetRealWidth(12); + frameTime.Y = btnMsg1.Y; + frameTime.Width = Application.GetRealWidth(62); + frameTime.Height = Application.GetRealHeight(32); + frameTime.Radius = (uint)Application.GetRealWidth(4); + frameTime.BackgroundColor = CSS_Color.BackgroundColor; + frameCenter.AddChidren(frameTime); + //澶辨晥鏃堕棿杈撳叆鎺т欢 + var txtInput = new TextInputControl(frameTime.Width - Application.GetRealWidth(10 * 2), frameTime.Height, false); + txtInput.TextColor = CSS_Color.FirstLevelTitleColor; + txtInput.Gravity = Gravity.CenterHorizontal; + txtInput.TextAlignment = TextAlignment.Center; + txtInput.Text = "12"; + txtInput.MaxByte = 2; + txtInput.IsNumberKeyboardType = true; + frameTime.AddChidren(txtInput); + + //灏忔椂鍚庡け鏁� + var btnMsg2 = new NormalViewControl(btnMsg1.Width, btnMsg1.Height, false); + btnMsg2.X = frameTime.Right + Application.GetRealWidth(12); + btnMsg2.Y = btnMsg1.Y; + btnMsg2.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnMsg2.IsMoreLines = true; + btnMsg2.Text = strArryMsg.Length > 1 ? strArryMsg[1].Trim() : string.Empty; + frameCenter.AddChidren(btnMsg2); + + //閿欒鏄剧ず娑堟伅 + var btnErrorMsg = new NormalViewControl(frameCenter.Width - Application.GetRealWidth(20) * 2, Application.GetRealHeight(21), false); + btnErrorMsg.Y = btnMsg1.Bottom; + btnErrorMsg.Gravity = Gravity.CenterHorizontal; + btnErrorMsg.TextColor = CSS_Color.WarningColor; + btnErrorMsg.IsMoreLines = true; + btnErrorMsg.TextAlignment = TextAlignment.TopLeft; + //btnErrorMsg.Height = Application.GetRealHeight(21) * btnErrorMsg.GetRealRowCountByText(); + btnErrorMsg.Visible = false; + frameCenter.AddChidren(btnErrorMsg); + + //纭 + var btnConfirm = new NormalViewControl(frameCenter.Width, Application.GetRealHeight(45), false); + btnConfirm.Gravity = Gravity.BottomCenter; + btnConfirm.TextAlignment = TextAlignment.Center; + btnConfirm.TextSize = CSS_FontSize.SubheadingFontSize; + btnConfirm.TextColor = CSS_Color.MainBackgroundColor; + btnConfirm.BackgroundColor = CSS_Color.MainColor; + btnConfirm.Text = Language.StringByID(StringId.Confirm); + frameCenter.AddChidren(btnConfirm); + btnConfirm.SetCornerWithSameRadius((uint)Application.GetMinRealAverage(10), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight); + btnConfirm.ButtonClickEvent += (sender, e) => + { + //妫�娴嬭緭鍏ョ殑鏃堕棿鏄惁姝g‘ + var errorMsg = this.CheckInputTime(txtInput.Text.Trim()); + if (errorMsg != string.Empty) + { + //鐪嬬湅娑堟伅鏄剧ず鐨勬帶浠舵湁娌℃湁澶т簬34,澶т簬鐨勮瘽,鍒欑畻鍑哄畠澧炲姞鐨勫搴�(34鏄緭鍏ユ鍒板簳閮ㄦ寜閽甕杞寸殑绌虹櫧鍖哄煙) + int value = 0; + if (btnErrorMsg.Height > Application.GetRealHeight(34)) + { + //5鏄笌搴曢儴鎸夐挳Y杞寸殑闂磋窛 + value = btnErrorMsg.Height - Application.GetRealHeight(34) + Application.GetRealHeight(5); + } + //璋冩暣鐧借壊妗屽竷鐨勯珮搴﹀拰鍧愭爣 + frameCenter.Height = frameTime.Bottom + Application.GetRealHeight(34) + btnConfirm.Height + value; + //鐧借壊鑳屾櫙鍦ㄨ摑婀栦笂鐨勫潗鏍囦负239,楂樺害涓�172 鐒跺悗璁╁畠鎸夎繖涓瘮渚嬬疆浜庢甯� + frameCenter.Y = Application.GetRealHeight(239) - (frameCenter.Height - Application.GetRealHeight(172)) / 2; + btnConfirm.Gravity = Gravity.BottomCenter; + //鎸夐挳缃簳 + return; + } + //鍏抽棴鐣岄潰 + dialogForm.Close(); + //鍥炶皟鍑芥暟 + FinishEvent?.Invoke(Convert.ToInt32(txtInput.Text.Trim())); + FinishEvent = null; + }; + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 妫�娴嬭緭鍏ョ殑鏃堕棿鏄惁姝g‘ + /// </summary> + /// <param name="i_value">杈撳叆鐨勬椂闂�</param> + /// <returns></returns> + private string CheckInputTime(string i_value) + { + if (i_value == string.Empty) + { + //璇疯緭鍏ュけ鏁堟椂闂� + return Language.StringByID(StringId.PleaseInputFailTime); + } + int value = Convert.ToInt32(i_value); + if (value < 1) + { + //澶辨晥鏃堕棿涓嶈兘灏忎簬1灏忔椂 + return Language.StringByID(StringId.InvalidTimeLessThan1); + } + if (value > 72) + { + //澶辨晥鏃堕棿涓嶈兘澶т簬72灏忔椂 + return Language.StringByID(StringId.InvalidTimeMoreThan72); + } + return string.Empty; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockHistoryInfoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockHistoryInfoPage.cs new file mode 100644 index 0000000..0deeb41 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockHistoryInfoPage.cs @@ -0,0 +1,174 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; +using HDL_ON.Entity; + +namespace HDL_ON.UI +{ + /// <summary> + /// 闂ㄩ攣鍘嗗彶璁板綍鐨勭晫闈�(澶氶棬閿佹椂,鎵嶈兘杩涙潵) + /// </summary> + public class DoorLockHistoryInfoPage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 闂ㄩ攣璁惧鍒楄〃 + /// </summary> + private List<Function> listDevice = new List<Function>(); + /// <summary> + /// 鎴愬憳鍒楄〃 + /// </summary> + private List<ResidenceMemberInfo> listMember = null; + /// <summary> + /// 榛樿閫夋嫨鐨勭敤鎴� + /// </summary> + private List<string> listSelectUser = new List<string> { "all" }; + /// <summary> + /// 榛樿閫夋嫨鐨勫紑閿佹柟寮� + /// </summary> + private List<string> listUnlock = new List<string> { "all" }; + /// <summary> + /// 榛樿閫夋嫨鐨勪俊鎭被鍨� + /// </summary> + private List<string> listMsgType = new List<string> { "all" }; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_listDevice">闂ㄩ攣璁惧鍒楄〃</param> + public void ShowForm(List<Function> i_listDevice) + { + this.listDevice.AddRange(i_listDevice); + + //鍘嗗彶璁板綍 + base.SetTitleText(Language.StringByID(StringId.HistoryLog)); + + //鍒濆鍖栧ご閮ㄧ瓫閫夋帶浠� + this.InitTopScreenControl(); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + } + + #endregion + + #region 鈻� 鍒濆鍖栫瓫閫夋帶浠禵____________________ + + /// <summary> + /// 鍒濆鍖栧ご閮ㄧ瓫閫夋帶浠� + /// </summary> + private void InitTopScreenControl() + { + //鍙充笂瑙掔殑绛涢�夋帶浠� + var btnScreenContr = new PicViewControl(28, 28); + btnScreenContr.X = Application.GetRealWidth(337); + btnScreenContr.Y = Application.GetRealHeight(9); + btnScreenContr.UnSelectedImagePath = "FunctionIcon/DoorLock/Screen.png"; + topFrameLayout.AddChidren(btnScreenContr);; + btnScreenContr.ButtonClickEvent += (sender, e) => + { + //鍒濆鍖栨垚鍛樺垪琛ㄤ俊鎭� + if (this.InitMemberListInfo() == false) + { + return; + } + + var form = new DoorLockHistoryTypeScreenPage(null, this.listMember); + form.InitControl(null, this.listSelectUser, this.listUnlock, this.listMsgType); + form.FinishEvent += (list1, list2, list3, list4) => + { + //鏇存敼缂撳瓨 + this.listSelectUser.Clear(); + this.listSelectUser.AddRange(list2); + + this.listUnlock.Clear(); + this.listUnlock.AddRange(list3); + + this.listMsgType.Clear(); + this.listMsgType.AddRange(list4); + }; + }; + } + + #endregion + + #region 鈻� 鍒濆鍖栨垚鍛樺垪琛ㄤ俊鎭痏________________ + + /// <summary> + /// 鍒濆鍖栨垚鍛樺垪琛ㄤ俊鎭� + /// </summary> + /// <returns></returns> + private bool InitMemberListInfo() + { + //宸茬粡鍒濆鍖� + if (this.listMember != null) { return true; } + + //涓昏处鍙烽渶瑕佸幓鑾峰彇鎴愬憳鍒楄〃,鑰屽瓙璐﹀彿鍙兘浠栬嚜宸� + if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false) + { + //鑾峰彇鎴愬憳鍒楄〃 + var responePack = new DAL.Server.HttpServerRequest().GetResidenceMemberAccount(); + if (responePack.Code == DAL.Server.StateCode.SUCCESS) + { + this.listMember = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString()); + } + //澶辫触 + else + { + //鎻愮ず + DAL.Server.IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code); + return false; + } + } + else + { + //鍏堝垵濮嬪寲 + this.listMember = new List<ResidenceMemberInfo>(); + } + + //鑷韩鍔犺繘鍘�,鑷繁浣嶄簬棣栦綅 + var info = new ResidenceMemberInfo(); + info.childAccountId = OnAppConfig.Instance.LastLoginUserId; + info.childAccountType = DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false ? "ADMIN" : "ORDINARY"; + info.nickName = UserInfo.Current.userName; + this.listMember.Insert(0, info); + if (string.IsNullOrEmpty(info.nickName)) + { + info.nickName = UserInfo.Current.AccountString; + } + + foreach (var info2 in this.listMember) + { + //璁剧疆鐢ㄦ埛鏄电О + if (string.IsNullOrEmpty(info2.nickName)) + { + info2.nickName = info2.memberName; + } + } + + return true; + } + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockHistoryTypeScreenPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockHistoryTypeScreenPage.cs new file mode 100644 index 0000000..e6736a1 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockHistoryTypeScreenPage.cs @@ -0,0 +1,531 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; +using HDL_ON.Entity; + +namespace HDL_ON.UI +{ + /// <summary> + /// 闂ㄩ攣鍘嗗彶璁板綍鐨勭瓫閫夌晫闈�(涓嶉渶瑕佸姞鍏ョ埗鎺т欢) + /// </summary> + public class DoorLockHistoryTypeScreenPage : BottomDialogCommon + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// <para>[1]銆侀�夋嫨鐨勯棬閿佸搧鐗� all:鍏ㄩ儴</para> + /// <para>[2]銆侀�夋嫨鐨勭敤鎴� all:鍏ㄩ儴</para> + /// <para>[3]銆侀�夋嫨鐨勫紑閿佹柟寮� all:鍏ㄩ儴</para> + /// <para>[4]銆侀�夋嫨鐨勪俊鎭被鍨� all:鍏ㄩ儴 1锛氬紑閿佷俊鎭� 2:鎶ヨ绫讳俊鎭�</para> + /// </summary> + public Action<List<string>, List<string>, List<string>, List<string>> FinishEvent = null; + /// <summary> + /// 闂ㄩ攣璁惧,褰撲笉涓簄ull鏃�,灏嗕細鍑虹幇銆愰攣鐨勫瀷鍙枫�戠殑绛涢�夐�夐」 + /// </summary> + private List<Function> listDevice = null; + /// <summary> + /// 鎴愬憳鍒楄〃 + /// </summary> + private List<ResidenceMemberInfo> listMember = null; + /// <summary> + /// 榛樿閫夋嫨鐨勯棬閿佸搧鐗� + /// </summary> + private List<string> listSelectSpk = null; + /// <summary> + /// 榛樿閫夋嫨鐨勭敤鎴� + /// </summary> + private List<string> listSelectUser = null; + /// <summary> + /// 榛樿閫夋嫨鐨勫紑閿佹柟寮� + /// </summary> + private List<string> listUnlock = null; + /// <summary> + /// 榛樿閫夋嫨鐨勪俊鎭被鍨� + /// </summary> + private List<string> listMsgType = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 闂ㄩ攣鍘嗗彶璁板綍鐨勭瓫閫夌晫闈�(涓嶉渶瑕佸姞鍏ョ埗鎺т欢) + /// </summary> + /// <param name="i_listDevice">闂ㄩ攣璁惧,褰撲笉涓簄ull鏃�,灏嗕細鍑虹幇銆愰攣鐨勫瀷鍙枫�戠殑绛涢�夐�夐」</param> + /// <param name="i_listMember">鎴愬憳鍒楄〃</param> + public DoorLockHistoryTypeScreenPage(List<Function> i_listDevice, List<ResidenceMemberInfo> i_listMember) + { + //涔嬪悗浼氳嚜鍔ㄨ皟鏁寸殑 + base.RowCount = 7; + //绛涢�� + base.StrTitle = Language.StringByID(StringId.Screen); + + this.listDevice = i_listDevice; + this.listMember = i_listMember; + } + + /// <summary> + /// 鍒濆鍖栨帶浠� + /// </summary> + /// <param name="i_listSelectSpk">榛樿閫夋嫨鐨勯棬閿佸搧鐗�</param> + /// <param name="i_listSelectUser">榛樿閫夋嫨鐨勭敤鎴�</param> + /// <param name="i_listUnlock">榛樿閫夋嫨鐨勫紑閿佹柟寮�</param> + /// <param name="i_listMsgType">榛樿閫夋嫨鐨勪俊鎭被鍨�</param> + public void InitControl(List<string> i_listSelectSpk, List<string> i_listSelectUser, List<string> i_listUnlock, List<string> i_listMsgType) + { + //宸茬粡鍒濆鍖� + if (base.btnCancel != null) { return; } + + //鍚堝苟List闆嗗悎 + this.MergeList(ref this.listSelectSpk, i_listSelectSpk); + this.MergeList(ref this.listSelectUser, i_listSelectUser); + this.MergeList(ref this.listUnlock, i_listUnlock); + this.MergeList(ref this.listMsgType, i_listMsgType); + + //鍒濆鍖栧簳灞傛帶浠� + var frameWhiteBack = base.InitBaseControl(Application.CurrentWidth, false); + //鍙栨秷 + base.btnCancel.ButtonClickEvent += (sender, e) => + { + this.Close(); + }; + + //纭 + base.btnConfirm.ButtonClickEvent += (sender, e) => + { + this.FinishEvent?.Invoke(listSelectSpk, listSelectUser, listUnlock, listMsgType); + this.Close(); + }; + //鍒楄〃鎺т欢 + var listView = new VerticalFrameControl(); + listView.Y = btnConfirm.Bottom; + listView.Height = this.RowCount * this.RowHeight; + frameWhiteBack.AddChidren(listView); + + //鍒濆鍖栧垪琛ㄦ帶浠� + this.InitListControl(frameWhiteBack, listView); + } + + /// <summary> + /// 鍒濆鍖栧垪琛ㄦ帶浠� + /// </summary> + /// <param name="listView"></param> + private void InitListControl(NormalFrameLayout frameWhiteBack, VerticalFrameControl listView) + { + //鍒濆Y杞翠负18 + int yy = Application.GetRealHeight(18); + + //鍒濆鍖栭攣鎸夐挳 + yy = this.InitLockButton(listView, yy); + if (this.listDevice != null && this.listDevice.Count > 0) + { + //濡傛灉listDevice涓嶄负null鐨勮瘽,闇�瑕� + 20 + yy += Application.GetRealHeight(20); + } + + //鍒濆鍖栫敤鎴锋寜閽�(杩斿洖鏈�搴曢儴鐨勫潗鏍�) + yy = this.InitUserButton(listView, yy); + + //鍒濆鍖栧紑閿佹柟寮忔寜閽�(杩斿洖鏈�搴曢儴鐨勫潗鏍�) + yy = this.InitUnLockButton(listView, yy + Application.GetRealHeight(20)); + + //鍒濆鍖栦俊鎭被鍨嬫寜閽�(杩斿洖鏈�搴曢儴鐨勫潗鏍�) + yy = this.InitMessageTypeButton(listView, yy + Application.GetRealHeight(20)); + + //鍐嶅姞涓婁竴涓簳閮ㄩ棿璺� + var frameSpace = new FrameLayout(); + frameSpace.Height = Application.GetRealHeight(16); + frameSpace.Y = yy; + listView.frameTable.AddChidren(frameSpace); + + //璋冩暣涓�涓嬮珮搴� + int realHeight = Application.GetRealHeight(500); + listView.AdjustTableHeight(); + if (listView.frameTable.Height < realHeight) + { + //500涓烘渶澶ч珮搴�,濡傛灉姣�500灏�,鍒欑敤褰撳墠鐨勭湡瀹為珮搴� + realHeight = listView.frameTable.Height; + } + listView.Height = realHeight; + frameWhiteBack.Height = base.btnConfirm.Bottom + listView.Height; + //璋冩暣涓�涓嬪潗鏍� + frameWhiteBack.Gravity = Gravity.BottomCenter; + } + + #endregion + + #region 鈻� 鍏ㄩ儴鐐瑰嚮鎸夐挳_______________________ + + /// <summary> + /// 鍒濆鍖栭攣鎸夐挳(杩斿洖鏈�搴曢儴鐨勫潗鏍�) + /// </summary> + /// <param name="listView">鍒楄〃鎺т欢</param> + /// <param name="yy">鍒濆Y杞村潗鏍�</param> + /// <returns></returns> + private int InitLockButton(VerticalFrameControl listView, int yy) + { + //鑾峰彇鎵�鏈夐棬閿佺殑鍝佺墝 + var dicLockBrand = this.GetAllLockBrand(); + if (dicLockBrand.Count > 0) + { + //鎺т欢闆嗗悎 + var listLockContr = new List<NormalViewControl>(); + //閿� + var btnLock = new NormalViewControl(150, 20, true); + btnLock.X = Application.GetRealHeight(24); + btnLock.Y = yy; + btnLock.TextID = StringId.Lock; + listView.frameTable.AddChidren(btnLock); + //鍏ㄩ儴 + var btnContr1 = this.InitSelectButton(Language.StringByID(StringId.All), listLockContr, this.listSelectSpk, this.listSelectSpk.Contains("all")); + btnContr1.MainKey = "all"; + listLockContr.Add(btnContr1); + foreach (var strSpk in dicLockBrand.Keys) + { + //鍒濆鍖栨寜閽� + var btnContr2 = this.InitSelectButton(dicLockBrand[strSpk], listLockContr, this.listSelectSpk, this.listSelectSpk.Contains(strSpk)); + btnContr2.MainKey = strSpk; + listLockContr.Add(btnContr2); + } + //鏀剧疆鎵�鏈夌殑鎸夐挳鍒板鍣�,杩斿洖鏈�搴曢儴鎺т欢鐨勫簳閮ㄥ潗鏍� + yy = this.SetAllButtonToFrame(listView.frameTable, listLockContr, btnLock.Bottom + Application.GetRealHeight(8)); + } + return yy; + } + + /// <summary> + /// 鍒濆鍖栫敤鎴锋寜閽�(杩斿洖鏈�搴曢儴鐨勫潗鏍�) + /// </summary> + /// <param name="listView">鍒楄〃鎺т欢</param> + /// <param name="yy">鍒濆Y杞村潗鏍�</param> + /// <returns></returns> + private int InitUserButton(VerticalFrameControl listView, int yy) + { + //鎺т欢闆嗗悎 + var listContr = new List<NormalViewControl>(); + //鐢ㄦ埛 + var btnLock = new NormalViewControl(150, 20, true); + btnLock.X = Application.GetRealHeight(24); + btnLock.Y = yy; + btnLock.TextID = StringId.User; + listView.frameTable.AddChidren(btnLock); + //鍏ㄩ儴 + var btnContr1 = this.InitSelectButton(Language.StringByID(StringId.All), listContr, this.listSelectUser, this.listSelectUser.Contains("all")); + btnContr1.MainKey = "all"; + listContr.Add(btnContr1); + foreach (var info in this.listMember) + { + //鍒濆鍖栨寜閽� + var btnContr2 = this.InitSelectButton(info.nickName, listContr, this.listSelectUser, this.listSelectUser.Contains(info.childAccountId)); + btnContr2.MainKey = info.childAccountId; + listContr.Add(btnContr2); + } + //鏀剧疆鎵�鏈夌殑鎸夐挳鍒板鍣�,杩斿洖鏈�搴曢儴鎺т欢鐨勫簳閮ㄥ潗鏍� + yy = this.SetAllButtonToFrame(listView.frameTable, listContr, btnLock.Bottom + Application.GetRealHeight(8)); + return yy; + } + + /// <summary> + /// 鍒濆鍖栧紑閿佹柟寮忔寜閽�(杩斿洖鏈�搴曢儴鐨勫潗鏍�) + /// </summary> + /// <param name="listView">鍒楄〃鎺т欢</param> + /// <param name="yy">鍒濆Y杞村潗鏍�</param> + /// <returns></returns> + private int InitUnLockButton(VerticalFrameControl listView, int yy) + { + //鎺т欢闆嗗悎 + var listContr = new List<NormalViewControl>(); + //寮�閿佹柟寮� + var btnLock = new NormalViewControl(150, 20, true); + btnLock.X = Application.GetRealHeight(24); + btnLock.Y = yy; + btnLock.TextID = StringId.UnlockingMode; + listView.frameTable.AddChidren(btnLock); + //鍏ㄩ儴 + var btnContr1 = this.InitSelectButton(Language.StringByID(StringId.All), listContr, this.listUnlock, this.listUnlock.Contains("all")); + btnContr1.MainKey = "all"; + listContr.Add(btnContr1); + //鎸囩汗 + btnContr1 = this.InitSelectButton(Language.StringByID(StringId.Fingerprints), listContr, this.listUnlock, this.listUnlock.Contains("15")); + btnContr1.MainKey = "15"; + listContr.Add(btnContr1); + //瀵嗙爜 + btnContr1 = this.InitSelectButton(Language.StringByID(StringId.Password), listContr, this.listUnlock, this.listUnlock.Contains("0")); + btnContr1.MainKey = "0"; + listContr.Add(btnContr1); + //鍗� + btnContr1 = this.InitSelectButton(Language.StringByID(StringId.Card), listContr, this.listUnlock, this.listUnlock.Contains("3")); + btnContr1.MainKey = "3"; + listContr.Add(btnContr1); + //閽ュ寵 + btnContr1 = this.InitSelectButton(Language.StringByID(StringId.Key), listContr, this.listUnlock, this.listUnlock.Contains("key")); + btnContr1.MainKey = "key"; + listContr.Add(btnContr1); + //甯稿紑 + btnContr1 = this.InitSelectButton(Language.StringByID(StringId.AlwaysOn), listContr, this.listUnlock, this.listUnlock.Contains("9000")); + btnContr1.MainKey = "9000"; + listContr.Add(btnContr1); + //涓存椂瀵嗙爜寮�閿� + btnContr1 = this.InitSelectButton(Language.StringByID(StringId.TemporaryPasswordUnlocking), listContr, this.listUnlock, this.listUnlock.Contains("temp")); + btnContr1.MainKey = "temp"; + listContr.Add(btnContr1); + + //鏀剧疆鎵�鏈夌殑鎸夐挳鍒板鍣�,杩斿洖鏈�搴曢儴鎺т欢鐨勫簳閮ㄥ潗鏍� + yy = this.SetAllButtonToFrame(listView.frameTable, listContr, btnLock.Bottom + Application.GetRealHeight(8)); + return yy; + } + + /// <summary> + /// 鍒濆鍖栦俊鎭被鍨嬫寜閽�(杩斿洖鏈�搴曢儴鐨勫潗鏍�) + /// </summary> + /// <param name="listView">鍒楄〃鎺т欢</param> + /// <param name="yy">鍒濆Y杞村潗鏍�</param> + /// <returns></returns> + private int InitMessageTypeButton(VerticalFrameControl listView, int yy) + { + //鎺т欢闆嗗悎 + var listContr = new List<NormalViewControl>(); + //淇℃伅绫诲瀷 + var btnTitle = new NormalViewControl(150, 20, true); + btnTitle.X = Application.GetRealHeight(24); + btnTitle.Y = yy; + btnTitle.TextID = StringId.UnlockingMode; + listView.frameTable.AddChidren(btnTitle); + //鍏ㄩ儴 + var btnContr1 = this.InitSelectButton(Language.StringByID(StringId.All), listContr, this.listMsgType, this.listMsgType.Contains("all")); + btnContr1.MainKey = "all"; + listContr.Add(btnContr1); + //寮�閿佷俊鎭� + btnContr1 = this.InitSelectButton(Language.StringByID(StringId.UnlockingMessage), listContr, this.listMsgType, this.listMsgType.Contains("1")); + btnContr1.MainKey = "1"; + listContr.Add(btnContr1); + //鎶ヨ绫讳俊鎭� + btnContr1 = this.InitSelectButton(Language.StringByID(StringId.AlarmMessage), listContr, this.listMsgType, this.listMsgType.Contains("2")); + btnContr1.MainKey = "2"; + listContr.Add(btnContr1); + + //鏀剧疆鎵�鏈夌殑鎸夐挳鍒板鍣�,杩斿洖鏈�搴曢儴鎺т欢鐨勫簳閮ㄥ潗鏍� + yy = this.SetAllButtonToFrame(listView.frameTable, listContr, btnTitle.Bottom + Application.GetRealHeight(8)); + + return yy; + } + + #endregion + + #region 鈻� 鍒濆鍖栫偣鍑绘寜閽甠____________________ + + /// <summary> + /// 鍒濆鍖栫偣鍑绘寜閽� + /// </summary> + /// <param name="i_text">鏄剧ず鐨勬枃鏈�</param> + /// <param name="listContr">鐢熸垚鐨勬寜閽泦鍚�,鍦ㄧ敓鎴怳I杩囩▼涓�,璇峰嬁浣跨敤,鍥犱负瀹冭繕娌℃湁瀹屾垚</param> + /// <param name="listSelect">閫夋嫨鐨勪富閿�</param> + /// <param name="select">鏄惁鍒濆閫夋嫨</param> + /// <returns></returns> + private NormalViewControl InitSelectButton(string i_text, List<NormalViewControl> listContr, List<string> listSelectKey, bool select) + { + var btnContr = new NormalViewControl(98, 44, true); + btnContr.Radius = (uint)Application.GetRealWidth(8); + btnContr.TextAlignment = TextAlignment.Center; + btnContr.Text = i_text; + //璁剧疆鎸夐挳鐘舵�� + this.SetButtonStatu(btnContr, select); + + btnContr.ButtonClickEvent += (sender, e) => + { + var value = btnContr.MainKey; + //鍙栨秷 + if (listSelectKey.Contains(value) == true) + { + if (value == "all" || listSelectKey.Count == 1) + { + //涓嶈兘鍙栨秷銆愬叏閮ㄣ��,骞朵笖鑷冲皯瑕侀�夋嫨涓�涓� + return; + } + //璁剧疆鎸夐挳鐘舵�� + this.SetButtonStatu(btnContr, false); + listSelectKey.Remove(value); + } + //閫夋嫨 + else + { + //璁剧疆鎸夐挳鐘舵�� + this.SetButtonStatu(btnContr, true); + if (value == "all") + { + //銆愭墍鏈夈�戞寜閽浜庨�夋嫨鐘舵�佹椂,銆愭墍鏈夈�戞斁鍦ㄧ0浣嶇储寮� + for (int i = 1; i < listContr.Count; i++) + { + //璁剧疆鎸夐挳鐘舵�� + this.SetButtonStatu(listContr[i], false); + //绉婚櫎閫夋嫨 + listSelectKey.Remove(listContr[i].MainKey); + } + } + else if (listSelectKey.Contains("all") == true) + { + //鎵�鏈夋寜閽彇娑�,銆愭墍鏈夋斁鍦ㄧ0浣嶇储寮曘�� + this.SetButtonStatu(listContr[0], false); + listSelectKey.Remove("all"); + } + listSelectKey.Add(value); + } + }; + + return btnContr; + } + + #endregion + + #region 鈻� 鏀剧疆鎵�鏈夋寜閽甠______________________ + + /// <summary> + /// 鏀剧疆鎵�鏈夌殑鎸夐挳鍒板鍣�,杩斿洖鏈�搴曢儴鎺т欢鐨勫簳閮ㄥ潗鏍� + /// </summary> + /// <param name="frameBack">瀹瑰櫒</param> + /// <param name="listContr">鍒楄〃鎺т欢</param> + /// <param name="i_yy">鍒濆Y杞�</param> + private int SetAllButtonToFrame(FrameLayout frameBack, List<NormalViewControl> listContr, int i_yy) + { + //鍒濆X杞� + int defultXX = Application.GetRealWidth(24); + int nowXX = defultXX; + //鎸夐挳闂寸殑闂磋窛 + int space = Application.GetRealWidth(16); + //鎸夐挳鏈�澶у搴� + int maxWidth = Application.GetRealWidth(98) * 2 + space; + //鎸夐挳鏈�灏忓搴� + int minWidth = Application.GetRealWidth(98); + + //妗屽竷鐨勫搴� + int tableWidth = frameBack.Width - nowXX * 2; + + int bottomY = 0; + foreach (var contr in listContr) + { + //璁$畻瀹冪殑鐪熷疄瀹藉害,浣嗘槸涓嶈兘瓒呰繃鏈�澶у搴� + int realWidth = contr.GetRealWidthByText(); + if (realWidth >= maxWidth) + { + //鏈�澶у搴� + realWidth = maxWidth; + } + else if (realWidth <= minWidth) + { + //鏈�灏忓搴� + realWidth = minWidth; + } + else + { + //濡傛灉瀹冧粙浜庢渶灏忓拰鏈�澶т箣闂�,鍒欑敤瀹冪殑鐪熷疄鍊�+10,璁╁畠宸﹀彸鏈夌偣闂磋窛,鍗充娇瓒呰繃,搴旇涔熸病鍟ヤ簨 + realWidth += Application.GetRealWidth(10); + } + contr.Width = realWidth; + frameBack.AddChidren(contr); + + //鍐嶈绠楀姞涓婂畠鏈夋病鏈夎秴杩囧彸杈圭晫(闇�瑕佸噺鎺夊垵濮媂杞�) + if (nowXX + realWidth - defultXX <= tableWidth) + { + //娌℃湁瓒呰繃杈圭晫,鍙互鐩存帴娣诲姞 + contr.X = nowXX; + contr.Y = i_yy; + } + else + { + //濡傛灉瓒呰繃浜嗚竟鐣�,鍒欐崲琛�,閲嶇疆X杞�,Y杞村悜涓嬫帹绉� + contr.X = defultXX; + contr.Y = i_yy + contr.Height + space; + i_yy = contr.Y; + } + //X杞村線鍙虫帹绉� + nowXX = contr.Right + space; + //搴曢儴鍧愭爣(杩斿洖鍊�) + bottomY = contr.Bottom; + } + return bottomY; + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鑾峰彇鎵�鏈夐棬閿佺殑鍝佺墝 + /// </summary> + /// <returns></returns> + private Dictionary<string, string> GetAllLockBrand() + { + if (this.listDevice == null || this.listDevice.Count == 0) + { + return new Dictionary<string, string>(); + } + + var dicData = new Dictionary<string, string>(); + foreach (var device in this.listDevice) + { + if (device.spk == "door.sone") + { + dicData[device.spk] = "S-ONE"; + continue; + } + } + return dicData; + } + + /// <summary> + /// 璁剧疆鎸夐挳鐘舵�� + /// </summary> + /// <param name="btnContr">鎺т欢</param> + /// <param name="select">鏄惁鏄�夋嫨鐘舵��</param> + private void SetButtonStatu(NormalViewControl btnContr, bool select) + { + if (select == false) + { + btnContr.TextColor = CSS_Color.FirstLevelTitleColor; + btnContr.BackgroundColor = CSS_Color.MainBackgroundColor; + btnContr.BorderWidth = 1; + btnContr.BorderColor = CSS_Color.PromptingColor1; + } + else + { + btnContr.TextColor = CSS_Color.MainBackgroundColor; + btnContr.BackgroundColor = CSS_Color.MainColor; + btnContr.BorderWidth = 0; + btnContr.BorderColor = CSS_Color.viewTranslucence; + } + } + + /// <summary> + /// 鍚堝苟List闆嗗悎 + /// </summary> + /// <param name="listTarget"></param> + /// <param name="listSource"></param> + private void MergeList(ref List<string> listTarget, List<string> listSource) + { + if (listSource == null) { return; } + if (listTarget == null) + { + listTarget = new List<string>(); + } + listTarget.AddRange(listSource); + if (listTarget.Count == 0) + { + listTarget.Add("all"); + } + } + + /// <summary> + /// 鍏抽棴鐣岄潰 + /// </summary> + public override void Close() + { + base.Close(); + this.FinishEvent = null; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs new file mode 100644 index 0000000..914e3a1 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockListPage.cs @@ -0,0 +1,231 @@ +锘縰sing Shared; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; +using HDL_ON.UI.CSS; +using HDL_ON.Entity; + +namespace HDL_ON.UI +{ + /// <summary> + /// 闂ㄩ攣鍒楄〃鐣岄潰(鏈夊涓棬閿佺殑鏃跺��,鎵嶄細鏄剧ず鐨勭晫闈�) + /// </summary> + public class DoorLockListPage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 闂ㄩ攣璁惧鍒楄〃 + /// </summary> + private List<Function> listDevice = new List<Function>(); + /// <summary> + /// 鐢垫睜鎺т欢鍒楄〃(key:璁惧鐨剆id) + /// </summary> + private Dictionary<string, BatteryPersentControl> dicBatteryContr = new Dictionary<string, BatteryPersentControl>(); + /// <summary> + /// 鍒楄〃鎺т欢 + /// </summary> + private VerticalListControl listView = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_listDevice">闂ㄩ攣璁惧鍒楄〃</param> + public void ShowForm(List<Function> i_listDevice) + { + this.listDevice.AddRange(i_listDevice); + + //鏅鸿兘闂ㄩ攣 + base.SetTitleText(Language.StringByID(StringId.DoorLock)); + + //鍒濆鍖栧ご閮ㄥ巻鍙茶褰曟帶浠� + this.InitTopHistoryControl(); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + string nowSelectId = string.Empty; + //妤煎眰涓嬫媺鍥炬爣 + var btnFloor = new NormalViewControl(100, Application.GetRealHeight(16), false); + var btnFloorIcon = new IconViewControl(16); + btnFloorIcon.X = HdlControlResourse.XXLeft; + btnFloorIcon.Y = Application.GetRealHeight(18); + btnFloorIcon.UnSelectedImagePath = "Public/DownIcon.png"; + bodyFrameLayout.AddChidren(btnFloorIcon); + btnFloorIcon.ButtonClickEvent += (sender, e) => + { + //鏄剧ず涓嬫媺鍒楄〃 + var form = new FloorRoomSelectPopupView(); + form.ShowDeviceFunctionView(btnFloor, this.listDevice, (selectId, listFunc) => + { + nowSelectId = selectId; + //閲嶆柊鍒濆鍖栭棬閿佸垪琛ㄦ帶浠� + this.InitDoorListControl(listFunc); + + }, nowSelectId); + }; + //妤煎眰 + btnFloor.X = btnFloorIcon.Right + Application.GetRealWidth(2); + btnFloor.TextColor = CSS_Color.FirstLevelTitleColor; + btnFloor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnFloor.Text = DB_ResidenceData.Instance.CurFloor.roomName; + btnFloor.Width = btnFloor.GetRealWidthByText(); + bodyFrameLayout.AddChidren(btnFloor); + //璁╁畠鐩稿鍥炬爣灞呬腑 + btnFloor.Y = btnFloorIcon.Y + (btnFloorIcon.Height - btnFloor.Height) / 2; + btnFloor.ButtonClickEvent += (sender, e) => + { + btnFloorIcon.ButtonClickEvent(null, null); + }; + + //鍒楄〃鎺т欢 + this.listView = new VerticalListControl(); + listView.Y = Application.GetRealHeight(53); + listView.Height = bodyFrameLayout.Height - Application.GetRealHeight(53); + bodyFrameLayout.AddChidren(listView); + + //鍒濆鍖栭棬閿佸垪琛ㄦ帶浠� + this.InitDoorListControl(this.listDevice); + } + + #endregion + + #region 鈻� 娣诲姞闂ㄩ攣鎺т欢_______________________ + + /// <summary> + /// 鍒濆鍖栭棬閿佸垪琛ㄦ帶浠� + /// </summary> + private void InitDoorListControl(List<Function> i_listDevice) + { + this.listView.RemoveAll(); + this.dicBatteryContr = new Dictionary<string, BatteryPersentControl>(); + + //鐢熸垚闂ㄩ攣鎺т欢 + foreach (var device in i_listDevice) + { + this.AddDoorControl(device); + } + } + + /// <summary> + /// 娣诲姞闂ㄩ攣鎺т欢 + /// </summary> + /// <param name="i_device">闂ㄩ攣瀵硅薄</param> + private void AddDoorControl(Function i_device) + { + //鐧借壊鑳屾櫙瀹瑰櫒 + var frameBack = new FrameLayoutStatuControl(); + frameBack.Width = Application.GetRealWidth(343); + frameBack.Height = Application.GetRealHeight(96); + frameBack.Radius = (uint)Application.GetRealWidth(12); + frameBack.Gravity = Gravity.CenterHorizontal; + frameBack.BackgroundColor = CSS_Color.MainBackgroundColor; + this.listView.AddChidren(frameBack); + //闂ㄩ攣鍥炬爣 + var btnIcon = new IconViewControl(32); + btnIcon.X = Application.GetRealWidth(10); + btnIcon.Y = Application.GetRealHeight(15); + btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png"; + frameBack.AddChidren(btnIcon, ChidrenBindMode.BindEvent); + //璁惧鍚嶅瓧 + var btnName = new Button(); + btnName.X = btnIcon.Right + Application.GetRealWidth(12); + btnName.Y = Application.GetRealHeight(12); + btnName.Width = Application.GetRealWidth(150); + btnName.Height = Application.GetRealHeight(20); + btnName.TextColor = CSS_Color.FirstLevelTitleColor; + btnName.TextAlignment = TextAlignment.CenterLeft; + btnName.Text = i_device.name; + frameBack.AddChidren(btnName, ChidrenBindMode.BindEvent); + //鎴块棿 + var btnRoom = new Button(); + btnRoom.X = btnName.X; + btnRoom.Y = btnName.Bottom + Application.GetRealHeight(4); + btnRoom.Width = Application.GetRealWidth(150); + btnRoom.Height = Application.GetRealHeight(15); + btnRoom.TextColor = CSS_Color.PromptingColor1; + btnRoom.TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel; + btnRoom.TextAlignment = TextAlignment.CenterLeft; + btnRoom.Text = i_device.GetRoomListName(); + frameBack.AddChidren(btnRoom, ChidrenBindMode.BindEvent); + //鐢垫睜鍥炬爣 + var btnBattery = new BatteryPersentControl(); + btnBattery.Y = Application.GetRealHeight(62); + frameBack.AddChidren(btnBattery, ChidrenBindMode.BindEvent); + btnBattery.InitControl(); + btnBattery.SetValue(80); + btnBattery.X = frameBack.Width - btnBattery.Width - Application.GetRealWidth(12); + this.dicBatteryContr[i_device.sid] = btnBattery; + frameBack.ButtonClickEvent += (sender, e) => + { + var form = new DoorLockPage(); + form.AddForm(i_device, new Button(), btnName, btnRoom); + }; + + //搴曢儴鍐嶅姞涓棿璺� + var frameSpace = new FrameLayout(); + frameSpace.Height = Application.GetRealHeight(12); + this.listView.AddChidren(frameSpace); + } + + #endregion + + #region 鈻� 鍒濆鍖栧ご閮ㄥ巻鍙茶褰曞浘鏍嘷____________ + + /// <summary> + /// 鍒濆鍖栧ご閮ㄥ巻鍙茶褰曟帶浠� + /// </summary> + private void InitTopHistoryControl() + { + //鍘嗗彶璁板綍鍥炬爣 + var btnIcon = new IconViewControl(28); + btnIcon.X = Application.GetRealWidth(337); + btnIcon.Y = Application.GetRealHeight(9); + btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/History.png"; + topFrameLayout.AddChidren(btnIcon); + btnIcon.ButtonClickEvent += (sender, e) => + { + var form = new DoorLockHistoryInfoPage(); + form.AddForm(this.listDevice); + }; + } + + #endregion + + #region 鈻� 璁惧鐘舵�佹帹閫乢______________________ + + /// <summary> + /// 璁惧鐘舵�佹帹閫� + /// </summary> + /// <param name="i_LocalDevice"></param> + public override void DeviceStatuPush(Function i_LocalDevice) + { + //涓嶆槸鐩爣璁惧 + if (this.dicBatteryContr.ContainsKey(i_LocalDevice.sid) == false) + { + return; + } + + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs new file mode 100644 index 0000000..5b6d5ca --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs @@ -0,0 +1,1065 @@ +锘縰sing Shared; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; +using HDL_ON.UI.CSS; +using HDL_ON.Entity; + +namespace HDL_ON.UI +{ + /// <summary> + /// 闂ㄩ攣鐨勬帶鍒剁晫闈� + /// </summary> + public class DoorLockPage : DeviceFunctionCardCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鐢垫睜鎺т欢 + /// </summary> + private BatteryPersentControl batteryControl = null; + /// <summary> + /// 鍦ㄧ嚎鍥炬爣鎺т欢 + /// </summary> + private IconViewControl btnOnlineIcon = null; + /// <summary> + /// 鍦ㄧ嚎鏂囨湰鎺т欢 + /// </summary> + private NormalViewControl btnOnlineView = null; + /// <summary> + /// 澹伴煶鍥炬爣 + /// </summary> + private IconViewControl btnVoice = null; + /// <summary> + /// 澹伴煶鐨勬粦鍔ㄦ潯鎺т欢 + /// </summary> + private SeekBarImageControl seekBarVoiceControl = null; + /// <summary> + /// 澹伴煶鐧惧垎姣� + /// </summary> + private NormalViewControl btnVoicePersent = null; + /// <summary> + /// 甯稿紑妯″紡鍥炬爣 + /// </summary> + private IconViewControl btnNormallyOpenIcon = null; + /// <summary> + /// 涓棿鐨勫紑閿佹垨鑰呭叧閿佸浘鐗囨帶浠� + /// </summary> + private PicViewControl picLockControl = null; + /// <summary> + /// 涓存椂瀵嗙爜tab椤典腑闂寸殑鎺т欢瀹瑰櫒(瀹冪殑Y杞存槸 涓�閿紑閿�/涓存椂瀵嗙爜寮�閿佺殑搴曢儴(绮椾綋瀛椾綋)+4) + /// </summary> + private FrameLayout frameTempPsw = null; + /// <summary> + /// 1:閫夋嫨鐨勬槸涓�閿紑閿� 2:閫夋嫨鐨勬槸涓存椂瀵嗙爜寮�閿� + /// </summary> + private int nowSelectMenu = 1; + /// <summary> + /// 闂ㄩ攣鏁版嵁 + /// </summary> + private DoorLockData doorLockData = new DoorLockData(); + /// <summary> + /// 闂ㄩ攣鐨勫巻鍙茶褰� + /// </summary> + private List<DoorHistoryLog> listHistoryLog = null; + /// <summary> + /// 鎴愬憳鍒楄〃 + /// </summary> + private List<ResidenceMemberInfo> listMember = null; + /// <summary> + /// 鏂囨湰缂撳瓨 + /// </summary> + private Dictionary<string, string> dicText = new Dictionary<string, string>(); + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 闂ㄩ攣鐨勬帶鍒剁晫闈� + /// </summary> + public DoorLockPage() + { + //闂ㄩ攣涓嶅厑璁告敹钘� + this.ShowColltionButton = false; + } + + /// <summary> + /// 鍒濆鍖栫櫧鑹插尯鍩熺殑鍐呭 + /// </summary> + public override void InitFrameWhiteContent() + { + //鏅鸿兘闂ㄩ攣 + base.SetTitleText(Language.StringByID(StringId.DoorLock)); + + this.dicText["宸茶繛鎺�"] = Language.StringByID(StringId.Connected); + this.dicText["鏈繛鎺�"] = Language.StringByID(StringId.UnConnected); + + //宸﹀彸缈婚〉鐨勪簨浠� + base.PageChangeEvent += (index) => + { + if (index == 1) + { + //鍒濆鍖栭棬閿佸巻鍙茶褰曚互鍙婃帶浠� + this.InitDoorHistoryLogAndControl(); + } + }; + + //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� + this.RefreshNowDeviceStatuMemory(this.device); + //鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹� + this.InitFrameWhiteContent1(); + //鍒濆鍖栫浜屼釜绱㈠紩椤�(鍘嗗彶璁板綍) + this.InitFrameWhiteContent2(); + //鍒锋柊鐣岄潰鐘舵�� + this.RefreshFormStatu(); + } + + /// <summary> + /// 鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹� + /// </summary> + private void InitFrameWhiteContent1() + { + //鐢垫睜鎺т欢 + this.batteryControl = new BatteryPersentControl(); + //瀹冩湁涓渶灏忕殑X杞� + batteryControl.X = Application.GetRealWidth(104) > base.btnRoomName.Right ? + Application.GetRealWidth(104) : base.btnRoomName.Right + Application.GetRealWidth(4); + FrameWhiteCentet1.AddChidren(batteryControl); + if (batteryControl.Height > base.btnRoomName.Height) + { + //涓�涓槸25锛屼竴涓槸21锛屽紕涓嶅噯鍒板簳璋佹洿楂�,鍥犱负璁$畻鏂规硶涓嶄竴鏍� + batteryControl.Y = base.btnRoomName.Y - (batteryControl.Height - base.btnRoomName.Height) / 2; + } + else + { + batteryControl.Y = base.btnRoomName.Y + (batteryControl.Height - base.btnRoomName.Height) / 2; + } + batteryControl.InitControl(); + batteryControl.SetValue(100); + + //鍦ㄧ嚎鐘舵�� + this.btnOnlineIcon = new IconViewControl(24); + btnOnlineIcon.X = batteryControl.Right + Application.GetRealWidth(12); + btnOnlineIcon.Y = batteryControl.Y; + btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/Connect.png"; + FrameWhiteCentet1.AddChidren(btnOnlineIcon); + //鍦ㄧ嚎鏂囨湰 + this.btnOnlineView = new NormalViewControl(Application.GetRealWidth(100), btnOnlineIcon.Height, false); + btnOnlineView.X = btnOnlineIcon.Right + Application.GetRealWidth(4); + btnOnlineView.Y = btnOnlineIcon.Y; + btnOnlineView.TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel; + btnOnlineView.TextColor = CSS_Color.PromptingColor1; + btnOnlineView.TextID = StringId.Connected; + FrameWhiteCentet1.AddChidren(btnOnlineView); + //鍙充笂瑙掗厤缃粨鏉熺殑浜嬩欢 + base.SettionFinishEvent += () => + { + //浠庢柊璁剧疆鍧愭爣 + batteryControl.X = Application.GetRealWidth(104) > base.btnRoomName.Right ? + Application.GetRealWidth(104) : base.btnRoomName.Right + Application.GetRealWidth(4); + btnOnlineIcon.X = batteryControl.Right + Application.GetRealWidth(12); + btnOnlineView.X = btnOnlineIcon.Right + Application.GetRealWidth(4); + }; + + //涓棿鐨勫紑閿佹垨鑰呭叧閿佸浘鐗囨帶浠� + this.picLockControl = new PicViewControl(256, 260); + picLockControl.Y = Application.GetRealHeight(129); + picLockControl.Gravity = Gravity.CenterHorizontal; + picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue1.png"; + FrameWhiteCentet1.AddChidren(picLockControl); + picLockControl.ButtonClickEvent += (sender, e) => + { + //涓�閿紑閿� + this.DoOneKeyToUnlockDoor(); + }; + + //涓存椂瀵嗙爜鐨勬帶浠跺鍣� + this.frameTempPsw = new FrameLayout(); + frameTempPsw.Y = Application.GetRealHeight(129); + frameTempPsw.Height = Application.GetRealHeight(260); + frameTempPsw.Visible = false; + FrameWhiteCentet1.AddChidren(frameTempPsw); + + //澹伴煶 + this.btnVoice = new IconViewControl(24); + btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png"; + btnVoice.X = Application.GetRealWidth(23); + btnVoice.Y = Application.GetRealHeight(410); + FrameWhiteCentet1.AddChidren(btnVoice); + + //澹伴煶鐨勬粦鍔ㄦ潯 + this.seekBarVoiceControl = new SeekBarImageControl(215); + seekBarVoiceControl.Gravity = Gravity.CenterHorizontal; + FrameWhiteCentet1.AddChidren(seekBarVoiceControl); + seekBarVoiceControl.Y = btnVoice.Y - (seekBarVoiceControl.Height - btnVoice.Height) / 2; + //缁戝畾PageLayout鎺т欢 + seekBarVoiceControl.BindPageLayout(); + + //澹伴煶鐧惧垎姣� + this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false); + btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding; + btnVoicePersent.Y = btnVoice.Y; + btnVoicePersent.TextColor = CSS_Color.PromptingColor1; + btnVoicePersent.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnVoicePersent.Text = "100%"; + FrameWhiteCentet1.AddChidren(btnVoicePersent); + + seekBarVoiceControl.ProgressChangedEvent += (div, value) => + { + btnVoicePersent.Text = value + "%"; + if (div == 1) + { + } + }; + + //鍒濆鍖栧紑閿佽彍鍗�(涓�閿紑閿�,涓存椂瀵嗙爜寮�閿�) + this.InitUnLockMenuControl(); + //鍒濆鍖栧簳閮ㄨ彍鍗曞浘鏍� + this.InitBottomMenuIconControl(); + } + + /// <summary> + /// 鍒濆鍖栧紑閿佽彍鍗�(涓�閿紑閿�,涓存椂瀵嗙爜寮�閿�) + /// </summary> + private void InitUnLockMenuControl() + { + //濡傛灉鏄垚鍛�,鍒欏彧鏈変竴閿紑閿� + if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true) + { + //涓�閿紑閿� + var btnOneKey = new NormalViewControl(100, 25, true); + btnOneKey.Y = Application.GetRealHeight(100); + btnOneKey.TextSize = CSS_FontSize.HeadlineFontSize; + btnOneKey.TextColor = CSS_Color.MainColor; + btnOneKey.Text = Language.StringByID(StringId.OneKeyUnlocking); + btnOneKey.Width = this.GetTextRealWidth(btnOneKey.Text, CSS_FontSize.HeadlineFontSize, true); + btnOneKey.Gravity = Gravity.CenterHorizontal; + btnOneKey.IsBold = true; + FrameWhiteCentet1.AddChidren(btnOneKey); + } + else + { + //涓�閿紑閿� + var btnOneKey = new NormalViewControl(100, 25, true); + btnOneKey.Y = Application.GetRealHeight(100); + btnOneKey.TextSize = Language.CurrentLanguage == "Chinese" ? CSS_FontSize.HeadlineFontSize : CSS_FontSize.SubheadingFontSize; + btnOneKey.TextColor = CSS_Color.MainColor; + btnOneKey.Text = Language.StringByID(StringId.OneKeyUnlocking); + btnOneKey.TextAlignment = TextAlignment.CenterRight; + btnOneKey.IsBold = true; + btnOneKey.Width = this.GetTextRealWidth(btnOneKey.Text, CSS_FontSize.HeadlineFontSize, true); + FrameWhiteCentet1.AddChidren(btnOneKey); + btnOneKey.X = Application.GetRealWidth(140) - btnOneKey.Width; + + //涓存椂瀵嗙爜寮�閿� + var btnTempPsw = new NormalViewControl(100, 25, true); + btnTempPsw.X = btnOneKey.Right + Application.GetRealWidth(36); + btnTempPsw.Y = btnOneKey.Y; + btnTempPsw.TextColor = CSS_Color.PromptingColor1; + btnTempPsw.Text = Language.StringByID(StringId.TemporaryPasswordUnlocking); + btnTempPsw.Width = this.GetTextRealWidth(btnTempPsw.Text, CSS_FontSize.HeadlineFontSize, true); + FrameWhiteCentet1.AddChidren(btnTempPsw); + + btnOneKey.ButtonClickEvent += (sender, e) => + { + //閫夋嫨鐨勬槸鍚屼竴涓�,鍒欎笉澶勭悊 + if (this.nowSelectMenu == 1) { return; } + this.nowSelectMenu = 1; + + btnOneKey.IsBold = true; + btnOneKey.TextSize = Language.CurrentLanguage == "Chinese" ? CSS_FontSize.HeadlineFontSize : CSS_FontSize.SubheadingFontSize; + btnOneKey.TextColor = CSS_Color.MainColor; + + btnTempPsw.IsBold = false; + btnTempPsw.TextSize = CSS_FontSize.TextFontSize; + btnTempPsw.TextColor = CSS_Color.PromptingColor1; + + //璁剧疆涓棿瀹瑰櫒鎺т欢鍙鍖� + this.SetMiddleFrameControlVisible(); + }; + + btnTempPsw.ButtonClickEvent += (sender, e) => + { + //閫夋嫨鐨勬槸鍚屼竴涓�,鍒欎笉澶勭悊 + if (this.nowSelectMenu == 2) { return; } + this.nowSelectMenu = 2; + + btnOneKey.IsBold = false; + btnOneKey.TextSize = CSS_FontSize.TextFontSize; + btnOneKey.TextColor = CSS_Color.PromptingColor1; + + btnTempPsw.IsBold = true; + btnTempPsw.TextSize = Language.CurrentLanguage == "Chinese" ? CSS_FontSize.HeadlineFontSize : CSS_FontSize.SubheadingFontSize; + btnTempPsw.TextColor = CSS_Color.MainColor; + + //璁剧疆涓棿瀹瑰櫒鎺т欢鍙鍖� + this.SetMiddleFrameControlVisible(); + }; + } + } + + #endregion + + #region 鈻� 鍒濆鍖栫浜屼釜绱㈠紩椤�(鍘嗗彶璁板綍)_______ + + /// <summary> + /// 鍒濆鍖栫浜屼釜绱㈠紩椤�(鍘嗗彶璁板綍) + /// </summary> + private void InitFrameWhiteContent2() + { + //娣诲姞绗簩涓猵age + this.AddSecondPage(); + } + + /// <summary> + /// 鍒濆鍖栭棬閿佸巻鍙茶褰曚互鍙婃帶浠� + /// </summary> + private void InitDoorHistoryLogAndControl() + { + //宸茬粡鍒濆鍖� + if (this.listHistoryLog != null) { return; } + + this.ShowProgressBar(); + HdlThreadLogic.Current.RunThread(() => + { + //鍒濆鍖栨垚鍛樺垪琛ㄤ俊鎭� + if (this.InitMemberListInfo() == false) + { + this.CloseProgressBar(); + return; + } + //鑾峰彇闂ㄩ攣鍘嗗彶璁板綍 + this.listHistoryLog = new DAL.Server.HttpServerRequest().GetDoorHistoryLogs(this.device); + this.CloseProgressBar(); + if (this.listHistoryLog == null) + { + return; + } + HdlThreadLogic.Current.RunMain(() => + { + //鍒濆鍖栭棬閿佸巻鍙茶褰曞垪琛ㄦ帶浠� + this.InitDoorHistoryLogListControl(this.listHistoryLog); + }); + }); + } + + /// <summary> + /// 鍒濆鍖栭棬閿佸巻鍙茶褰曞垪琛ㄦ帶浠� + /// </summary> + /// <param name="listLog">鏄剧ず鐨勯棬閿佽褰�</param> + private void InitDoorHistoryLogListControl(List<DoorHistoryLog> listLog) + { + //鎸夊勾鍒嗙粍 + var dicData = new Dictionary<int, List<DoorHistoryLog>>(); + foreach (var info in listLog) + { + var year = info.Time.Year; + if (dicData.ContainsKey(year) == false) + { + dicData[year] = new List<DoorHistoryLog>(); + } + dicData[year].Add(info); + } + + //鍏堟竻绌� + base.FrameWhiteCentet2.RemoveAll(); + + //鏃ュ織 + var btnLog = new NormalViewControl(150, 35, true); + btnLog.Y = Application.GetRealHeight(15); + btnLog.X = HdlControlResourse.XXLeft; + btnLog.TextSize = CSS_FontSize.EmphasisFontSize_FirstLevel; + btnLog.TextColor = CSS_Color.FirstLevelTitleColor; + btnLog.TextID = StringId.Log; + FrameWhiteCentet2.AddChidren(btnLog); + + //鍒楄〃瀹瑰櫒 + var listView = new VerticalFrameControl(); + listView.Y = Application.GetRealHeight(72); + listView.Height = base.FrameWhiteCentet2.Height - Application.GetRealHeight(72); + base.FrameWhiteCentet2.AddChidren(listView); + + //鍒濆Y杞翠负0 + int yy = 0; + foreach (var strYear in dicData.Keys) + { + //骞� + var btnYear = new NormalViewControl(100, 24, true); + btnYear.X = HdlControlResourse.XXLeft; + btnYear.Y = yy; + btnYear.TextColor = CSS_Color.FirstLevelTitleColor; + btnYear.TextSize = CSS_FontSize.SubheadingFontSize; + btnYear.Text = strYear.ToString(); + //涓枃 + if (Language.CurrentLanguage == "Chinese") + { + btnYear.Text += Language.StringByID(StringId.Years); + } + listView.frameTable.AddChidren(btnYear); + + //骞翠笌娑堟伅璁板綍鐨勯棿璺濅负14 + yy = btnYear.Bottom + Application.GetRealHeight(14); + foreach (var logInfo in dicData[strYear]) + { + //娑堟伅 + var btnMsg = new NormalViewControl(295, 20, true); + btnMsg.Y = yy; + btnMsg.Gravity = Gravity.CenterHorizontal; + btnMsg.TextColor = CSS_Color.FirstLevelTitleColor; + btnMsg.Text = logInfo.StrMsg; + listView.frameTable.AddChidren(btnMsg); + //鏃堕棿 + var btnTime = new NormalViewControl(200, 18, true); + btnTime.Y = btnMsg.Bottom + Application.GetRealHeight(2); + btnTime.X = btnMsg.X; + btnTime.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnTime.TextColor = CSS_Color.PromptingColor1; + btnTime.Text = HdlCommonLogic.Current.ConvertDayText(logInfo.Time.Month, logInfo.Time.Day) + " " + logInfo.Time.ToString("HH:mm"); + listView.frameTable.AddChidren(btnTime); + //绾� + var btnLine = new NormalViewControl(btnMsg.Width, HdlControlResourse.BottomLineHeight, false); + btnLine.Y = btnTime.Bottom + Application.GetRealHeight(11); + btnLine.Gravity = Gravity.CenterHorizontal; + btnLine.BackgroundColor = CSS_Color.DividingLineColor; + listView.frameTable.AddChidren(btnLine); + //涓ゆ潯娑堟伅鐨勯棿璺濅负10 + yy = btnLine.Bottom + Application.GetRealHeight(10); + } + //骞翠笌骞翠箣闂寸殑闂磋窛涓�24 + yy += Application.GetRealHeight(24); + } + //璋冩暣妗屽竷楂樺害 + listView.AdjustTableHeight(); + } + + #endregion + + #region 鈻� 鍒濆鍖栧簳閮ㄨ彍鍗曞浘鏍嘷________________ + + /// <summary> + /// 鍒濆鍖栧簳閮ㄨ彍鍗曞浘鏍� + /// </summary> + private void InitBottomMenuIconControl() + { + //濡傛灉鏄垚鍛�,鍒欏彧鏈夊紑閿佹柟寮忕鐞� + if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true) + { + //寮�閿佹柟寮忕鐞嗗浘鏍� + var btnManagerIcon = new IconViewControl(40); + btnManagerIcon.Gravity = Gravity.CenterHorizontal; + btnManagerIcon.Y = Application.GetRealHeight(466); + btnManagerIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UnLockManager.png"; + this.FrameWhiteCentet1.AddChidren(btnManagerIcon); + btnManagerIcon.ButtonClickEvent += (sender, e) => + { + //鍒濆鍖栨垚鍛樺垪琛ㄤ俊鎭� + if (this.InitMemberListInfo() == false) + { + return; + } + var form = new DoorLockUnlockMethordManagerPage(); + form.AddForm(this.device, this.listMember); + }; + } + else + { + //寮�閿佹柟寮忕鐞嗗浘鏍� + var btnManagerIcon = new IconViewControl(40); + btnManagerIcon.Y = Application.GetRealHeight(466); + btnManagerIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UnLockManager.png"; + this.FrameWhiteCentet1.AddChidren(btnManagerIcon); + btnManagerIcon.X = (this.FrameWhiteCentet1.Width - btnManagerIcon.Width * 2 - Application.GetRealWidth(40)) / 2; + btnManagerIcon.ButtonClickEvent += (sender, e) => + { + //鍒濆鍖栨垚鍛樺垪琛ㄤ俊鎭� + if (this.InitMemberListInfo() == false) + { + return; + } + var form = new DoorLockUnlockMethordManagerPage(); + form.AddForm(this.device, this.listMember); + }; + + //甯稿紑妯″紡鍥炬爣 + this.btnNormallyOpenIcon = new IconViewControl(40); + btnNormallyOpenIcon.X = btnManagerIcon.Right + Application.GetRealWidth(40); + btnNormallyOpenIcon.Y = btnManagerIcon.Y; + btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon2.png"; + this.FrameWhiteCentet1.AddChidren(btnNormallyOpenIcon); + btnNormallyOpenIcon.ButtonClickEvent += (sender, e) => + { + var form = new DoorLockAlwaysOnListPage(); + form.AddForm(this.device); + }; + } + } + + #endregion + + #region 鈻� 鍒濆鍖栦复鏃跺瘑鐮佹帶浠禵________________ + + /// <summary> + /// 鍒濆鍖栦复鏃跺瘑鐮佹帶浠� + /// </summary> + private void InitTempPasswordControl() + { + this.frameTempPsw.RemoveAll(); + + //鐢熸垚涓存椂瀵嗙爜鐨勮儗鏅浘鐗� + var picBack = new PicViewControl(258, 165); + picBack.Gravity = Gravity.CenterHorizontal; + picBack.UnSelectedImagePath = "FunctionIcon/DoorLock/CrearPswBackgroud.png"; + this.frameTempPsw.AddChidren(picBack); + + //瀵嗙爜鏄剧ず鎺т欢 + var btnPassword = new NormalViewControl(150, 50, true); + btnPassword.Gravity = Gravity.CenterHorizontal; + btnPassword.TextSize = CSS_FontSize.SubheadingFontSize; + btnPassword.TextColor = CSS_Color.MainBackgroundColor; + btnPassword.TextAlignment = TextAlignment.Center; + this.frameTempPsw.AddChidren(btnPassword); + + //濡傛灉娌℃湁涓存椂瀵嗙爜 + if (this.doorLockData.TempPassword == string.Empty) + { + //褰撴病鏈変复鏃跺瘑鐮佹椂,杩欎釜鑳屾櫙鏀惧湪涓棿 + picBack.Y = Application.GetRealHeight(47); + //鍥犱负鍥剧墖鐨勫帇缂╅棶棰�,杩欎釜Y杞村拰钃濇箹鐨勪笉涓�鏍�,钃濇箹鏄�99 + btnPassword.Y = Application.GetRealHeight(88); + + //鐢熸垚涓存椂瀵嗙爜 + btnPassword.TextID = StringId.CreatTemporaryPassword; + btnPassword.ButtonClickEvent += (sender, e) => + { + //鏄剧ず鐢熸垚涓存椂瀵嗙爜鐨勫脊绐楃晫闈� + this.ShowCreatTemporaryPasswordDialog(DateTime.Now, DateTime.Now.AddDays(1).AddMinutes(-1)); + }; + } + //鎷ユ湁涓存椂瀵嗙爜 + else + { + //鏄剧ず涓存椂瀵嗙爜 + btnPassword.Text = this.doorLockData.TempPassword; + //鍥犱负鍥剧墖鐨勫帇缂╅棶棰�,杩欎釜Y杞村拰钃濇箹鐨勪笉涓�鏍�,钃濇箹鏄�51 + btnPassword.Y = Application.GetRealHeight(40); + + //鍒犻櫎涓存椂瀵嗙爜鍥炬爣 + var btnDelete = new IconViewControl(28); + btnDelete.UnSelectedImagePath = "FunctionIcon/DoorLock/Delete.png"; + btnDelete.X = Application.GetRealWidth(19); + btnDelete.Y = Application.GetRealHeight(115); + this.frameTempPsw.AddChidren(btnDelete); + btnDelete.ButtonClickEvent += (sender, e) => + { + //娓呴櫎褰撳墠涓存椂瀵嗙爜锛� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.ClearTempPsswordMsg), () => + { + //娓呯┖涓存椂瀵嗙爜 + this.doorLockData.TempPassword = string.Empty; + this.doorLockData.StatrtTime = string.Empty; + this.doorLockData.EndTime = string.Empty; + //閲嶆柊鍒濆鍖栦复鏃跺瘑鐮佹帶浠� + this.InitTempPasswordControl(); + }); + }; + + //澶嶅埗涓存椂瀵嗙爜鍥炬爣 + var btnCopy = new IconViewControl(28); + btnCopy.UnSelectedImagePath = "FunctionIcon/DoorLock/Shard.png"; + btnCopy.X = this.frameTempPsw.Width - btnCopy.IconSize - btnDelete.X; + btnCopy.Y = btnDelete.Y; + this.frameTempPsw.AddChidren(btnCopy); + btnCopy.ButtonClickEvent += (sender, e) => + { + //涓存椂瀵嗙爜宸茬粡澶嶅埗 + HdlCommonLogic.Current.SetTextToShearPlate(this.doorLockData.TempPassword, Language.StringByID(StringId.TempPsswordHasBeenCopy)); + }; + + //鐢熸晥鏃堕棿 + var frameEffective = this.CreatEffectiveTimeControl(this.frameTempPsw, Language.StringByID(StringId.EffectiveTime), this.doorLockData.StatrtTime); + frameEffective.X = Application.GetRealWidth(24); + frameEffective.Y = Application.GetRealHeight(180); + + //澶辨晥鏃堕棿 + var frameFailure = this.CreatEffectiveTimeControl(this.frameTempPsw, Language.StringByID(StringId.FailureTime), this.doorLockData.EndTime); + frameFailure.X = this.frameTempPsw.Width - frameFailure.Width - frameEffective.X; + frameFailure.Y = frameEffective.Y; + + //- + var btnLine = new NormalViewControl(frameFailure.X - frameEffective.Right, frameFailure.Height, false); + btnLine.X = frameEffective.Right; + btnLine.Y = frameEffective.Y; + btnLine.Text = "-"; + btnLine.TextAlignment = TextAlignment.Center; + btnLine.TextColor = CSS_Color.FirstLevelTitleColor; + btnLine.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + this.frameTempPsw.AddChidren(btnLine); + } + } + + /// <summary> + /// 鐢熸垚鐢熸晥/澶辨晥鏃堕棿鎺т欢 + /// </summary> + /// <param name="frameTempPsw">鐖舵帶浠�</param> + /// <param name="i_text">鏄剧ず鐨勬枃鏈�</param> + /// <param name="i_time">鏄剧ず鐨勬椂闂�</param> + /// <returns></returns> + private FrameLayout CreatEffectiveTimeControl(FrameLayout frameTempPsw, string i_text, string i_time) + { + //绾挎鑳屾櫙鎺т欢 + var frameBack = new FrameLayout(); + frameBack.Width = Application.GetRealWidth(120); + frameBack.Height = Application.GetRealHeight(50); + frameBack.Radius = (uint)Application.GetRealWidth(7); + frameBack.BorderWidth = 1; + frameBack.BorderColor = CSS_Color.PromptingColor1; + frameTempPsw.AddChidren(frameBack); + + //鏄剧ず鏂囨湰 + var btnText = new NormalViewControl(frameBack.Width, Application.GetRealHeight(18), false); + btnText.Y = Application.GetRealHeight(8); + btnText.TextColor = CSS_Color.FirstLevelTitleColor; + btnText.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnText.Text = i_text; + btnText.TextAlignment = TextAlignment.Center; + frameBack.AddChidren(btnText); + + //鏄剧ず鏃堕棿 + var btnTime = new NormalViewControl(frameBack.Width, Application.GetRealHeight(18), false); + btnTime.Y = btnText.Bottom; + btnTime.TextColor = CSS_Color.FirstLevelTitleColor; + btnTime.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnTime.Text = i_time; + btnTime.TextAlignment = TextAlignment.Center; + frameBack.AddChidren(btnTime); + + return frameBack; + } + + #endregion + + #region 鈻� 鐢熸垚涓存椂瀵嗙爜_______________________ + + /// <summary> + /// 鏄剧ず鐢熸垚涓存椂瀵嗙爜鐨勫脊绐楃晫闈� + /// </summary> + private void ShowCreatTemporaryPasswordDialog(DateTime startTime, DateTime endTime) + { + //榛樿鏃堕棿Form-To涓轰竴澶� + var contr = new BottomItemEditorControl(2, string.Empty); + //鐐瑰嚮纭鏃�,涓嶅叧闂晫闈� + contr.CloseByConfirm = false; + + //鐢熸晥鏃堕棿 + var effectiveTime = Language.StringByID(StringId.EffectiveTime); + contr.AddRowMenu(effectiveTime, startTime.ToString("yyyy.MM.dd HH:mm"), (btnView, btnValue) => + { + //鍏虫帀鐣岄潰,鐒跺悗閲嶆柊璋冭捣鏉� + contr.Close(); + + var form = new DoorLockSelectTimePage(); + form.AddForm(startTime); + form.SelectFinshEvent += (selectTime) => + { + //閲嶆柊璋冭捣鐣岄潰 + this.ShowCreatTemporaryPasswordDialog(selectTime, endTime); + }; + }); + + //澶辨晥鏃堕棿 + var failTime = Language.StringByID(StringId.FailureTime); + contr.AddRowMenu(failTime, endTime.ToString("yyyy.MM.dd HH:mm"), (btnView, btnValue) => + { + //鍏虫帀鐣岄潰,鐒跺悗閲嶆柊璋冭捣鏉� + contr.Close(); + + var form = new DoorLockSelectTimePage(); + form.AddForm(endTime); + form.SelectFinshEvent += (selectTime) => + { + //閲嶆柊璋冭捣鐣岄潰 + this.ShowCreatTemporaryPasswordDialog(startTime, selectTime); + }; + }); + contr.FinishEvent += (div) => + { + //鐐瑰嚮浜嗙敓鎴� + if (div == 1) + { + if (this.CheckEffectiveTime(startTime, endTime) == false) + { + return; + } + //鍏虫帀鐣岄潰 + contr.Close(); + + //鐢熸垚涓存椂瀵嗙爜 + this.doorLockData.TempPassword = "987654"; + this.doorLockData.StatrtTime = startTime.ToString("yyyy.MM.dd HH:mm"); + this.doorLockData.EndTime = endTime.ToString("yyyy.MM.dd HH:mm"); + //閲嶆柊鍒濆鍖栦复鏃跺瘑鐮佹帶浠� + this.InitTempPasswordControl(); + } + }; + + //闇�瑕佸垵濮嬪寲涔嬪悗,鎸夐挳鎵嶄笉浼氫负null 鍙樻洿銆愮敓鎴愩�戞寜閽殑瀹藉害鍜孹杞� + contr.btnConfirm.TextID = StringId.Generate; + contr.btnConfirm.Width = contr.btnConfirm.GetRealWidthByText(); + contr.btnConfirm.X = contr.btnConfirm.Parent.Width - contr.btnConfirm.Width - contr.btnCancel.X; + } + + /// <summary> + /// 妫�娴嬬敓鏁堟椂闂存槸鍚︽纭� + /// </summary> + /// <param name="startTime">鐢熸晥鏃堕棿</param> + /// <param name="endTime">澶辨晥鏃堕棿</param> + /// <returns></returns> + private bool CheckEffectiveTime(DateTime startTime, DateTime endTime) + { + if (startTime >= endTime) + { + //鐢熸晥鏃堕棿蹇呴』澶т簬澶辨晥鏃堕棿 + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.EffectiveTimeMustBeOverFailureTime)); + return false; + } + return true; + } + + #endregion + + #region 鈻� 璁惧鐘舵�佸弽棣坃______________________ + + /// <summary> + /// 璁惧鐘舵�佸弽棣� + /// </summary> + /// <param name="i_LocalDevice"></param> + public override void DeviceStatuPush(Function i_LocalDevice) + { + //涓嶆槸鍚屼竴涓笢瑗� + if (this.device.sid != i_LocalDevice.sid) { return; } + + //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� + this.RefreshNowDeviceStatuMemory(i_LocalDevice); + //鍒锋柊鐣岄潰鐘舵�� + this.RefreshFormStatu(); + } + + #endregion + + #region 鈻� 鍒锋柊鐣岄潰鐘舵�乢______________________ + + /// <summary> + /// 鍒锋柊鐣岄潰鐘舵�� + /// </summary> + private void RefreshFormStatu() + { + //濡傛灉涓嶅湪绾� + if (this.doorLockData.IsOnline == false) + { + //寮�閿佸浘鐗� + this.picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue2.png"; + //杩炴帴鐘舵�� + this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/UnConnect.png"; + this.btnOnlineView.Text = this.dicText["鏈繛鎺�"]; + this.btnOnlineView.TextColor = CSS_Color.AuxiliaryColor2; + //甯稿紑妯″紡鍥炬爣 + if (this.btnNormallyOpenIcon != null) + { + this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon2.png"; + } + } + else + { + //寮�閿佸浘鐗� + this.picLockControl.UnSelectedImagePath = this.doorLockData.Open == true ? "FunctionIcon/DoorLock/UnLockPictrue3.png" : "FunctionIcon/DoorLock/LockPictrue1.png"; + //杩炴帴鐘舵�� + this.btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/Connect.png"; + this.btnOnlineView.Text = this.dicText["宸茶繛鎺�"]; + this.btnOnlineView.TextColor = CSS_Color.PromptingColor1; + //甯稿紑妯″紡鍥炬爣 + if (this.btnNormallyOpenIcon != null) + { + this.btnNormallyOpenIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/NormallyOpenIcon1.png"; + } + } + } + + /// <summary> + /// 璁剧疆涓棿瀹瑰櫒鎺т欢鍙鍖� + /// </summary> + private void SetMiddleFrameControlVisible() + { + //濡傛灉閫夋嫨鐨勬槸 涓�閿紑閿� + if (this.nowSelectMenu == 1) + { + this.picLockControl.Visible = true; + this.frameTempPsw.Visible = false; + } + else + { + this.picLockControl.Visible = false; + this.frameTempPsw.Visible = true; + //涓存椂瀵嗙爜宸茬粡鍙樻洿,闇�瑕佸埛鏂扮晫闈� + if (this.doorLockData.IsTempPasswordChanged == true) + { + //鍒濆鍖栦复鏃跺瘑鐮佹帶浠� + this.InitTempPasswordControl(); + this.doorLockData.IsTempPasswordChanged = false; + } + } + } + + #endregion + + #region 鈻� 鍙戦�佸悇绉嶅懡浠______________________ + + /// <summary> + /// 鍙戦�佸紑鍏冲懡浠� + /// </summary> + private void SendSwitchComand() + { + //this.btnSwitch.CanClick = false; + + //string statu = this.btnSwitch.IsSelected == true ? "off" : "on"; + //HdlThreadLogic.Current.RunThread(() => + //{ + // var dic = new Dictionary<string, string>(); + // dic.Add(FunctionAttributeKey.OnOff, statu); + // Control.Ins.SendWriteCommand(this.device, dic, true); + // HdlThreadLogic.Current.RunMain(() => + // { + // this.btnSwitch.CanClick = true; + // }); + //}); + } + + #endregion + + #region 鈻� 鍒濆鍖栨垚鍛樺垪琛ㄤ俊鎭痏________________ + + /// <summary> + /// 鍒濆鍖栨垚鍛樺垪琛ㄤ俊鎭� + /// </summary> + /// <returns></returns> + private bool InitMemberListInfo() + { + //宸茬粡鍒濆鍖� + if (this.listMember != null) { return true; } + + //涓昏处鍙烽渶瑕佸幓鑾峰彇鎴愬憳鍒楄〃,鑰屽瓙璐﹀彿鍙兘浠栬嚜宸� + if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false) + { + //鑾峰彇鎴愬憳鍒楄〃 + var responePack = new DAL.Server.HttpServerRequest().GetResidenceMemberAccount(); + if (responePack.Code == DAL.Server.StateCode.SUCCESS) + { + this.listMember = Newtonsoft.Json.JsonConvert.DeserializeObject<List<ResidenceMemberInfo>>(responePack.Data.ToString()); + } + //澶辫触 + else + { + //鎻愮ず + DAL.Server.IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code); + return false; + } + } + else + { + //鍏堝垵濮嬪寲 + this.listMember = new List<ResidenceMemberInfo>(); + } + + //鑷韩鍔犺繘鍘�,鑷繁浣嶄簬棣栦綅 + var info = new ResidenceMemberInfo(); + info.childAccountId = OnAppConfig.Instance.LastLoginUserId; + info.childAccountType = DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false ? "ADMIN" : "ORDINARY"; + info.nickName = UserInfo.Current.userName; + this.listMember.Insert(0, info); + if (string.IsNullOrEmpty(info.nickName)) + { + info.nickName = UserInfo.Current.AccountString; + } + + foreach (var info2 in this.listMember) + { + //璁剧疆鐢ㄦ埛鏄电О + if (string.IsNullOrEmpty(info2.nickName)) + { + info2.nickName = info2.memberName; + } + } + + return true; + } + #endregion + + #region 鈻� 涓�閿紑閿乢__________________________ + + /// <summary> + /// 涓�閿紑閿� + /// </summary> + private void DoOneKeyToUnlockDoor() + { + if (this.doorLockData.IsOnline == false) + { + //璁惧涓嶅湪绾� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.DeviceNotOnline), null, null, null, 2); + return; + } + //绗竴娆′娇鐢紝璇峰厛缁戝畾闂ㄩ攣瀵嗙爜 + //HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.PleaseBindTheDoorPswFirst), () => + //{ + // var form = new TextInputDialog(Language.StringByID(StringId.PleaseInputDoorAdminPassword), string.Empty, Language.StringByID(StringId.PleaseInputDoorAdminPassword), null, null, true); + // form.Show((password) => + // { + // //闂ㄩ攣缁戝畾鎴愬姛 + // HdlMessageLogic.Current.ShowMassage(ShowMsgType.ConfirmSuccess, Language.StringByID(StringId.BindDoorLockSuccess), () => + // { + // }); + // }); + //}); + + if (UserInfo.Current.appUnlockPage.Contains("3") == true) + { + //璋冭捣瀹夊叏璁よ瘉 + HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) => + { + //閿佸凡鎵撳紑 + if (div == 1) + { + HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2); + } + else + { + //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () => + { + var page = new AppUnlockSettingsPage(); + MainPage.BasePageView.AddChidren(page); + page.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + + }, Language.StringByID(StringId.Jump)); + } + }); + } + else + { + //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () => + { + var page = new AppUnlockSettingsPage(); + MainPage.BasePageView.AddChidren(page); + page.LoadPage(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + + }, Language.StringByID(StringId.Jump)); + } + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + + /// <summary> + /// 鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� + /// </summary> + private void RefreshNowDeviceStatuMemory(Function i_LocalDevice) + { + this.doorLockData.IsOnline = i_LocalDevice.online; + for (int i = 0; i < i_LocalDevice.attributes.Count; i++) + { + var data = i_LocalDevice.attributes[i]; + //闂ㄩ攣鐘舵�� + if (data.key == "status") + { + if (data.state == "open") { this.doorLockData.Open = true; } + else if (data.state == "normal_open") + { + //甯稿紑妯″紡 + this.doorLockData.Open = true; + this.doorLockData.NormalOpen = true; + } + else + { + this.doorLockData.Open = false; + this.doorLockData.NormalOpen = false; + } + } + //闊抽噺 + else if (data.key == "volume") + { + var value = data.state; + if (value != string.Empty) + { + this.doorLockData.Voice = Convert.ToInt32(value); + } + } + //鐢垫睜鐧惧垎姣� + else if (data.key == "battery_percentage") + { + var value = data.state; + if (value != string.Empty) + { + this.doorLockData.BatteryPersent = Convert.ToInt32(value); + } + } + } + } + + #endregion + + #region 鈻� 缁撴瀯浣揰____________________________ + + /// <summary> + /// 闂ㄩ攣鐨勬暟鎹� + /// </summary> + private class DoorLockData + { + /// <summary> + /// 鏄惁鎵撳紑 + /// </summary> + public bool Open = true; + /// <summary> + /// 鐢垫睜鐢甸噺 + /// </summary> + public int BatteryPersent = 0; + /// <summary> + /// 鏄惁鍦ㄧ嚎 + /// </summary> + public bool IsOnline = false; + /// <summary> + /// 鏄惁闈欓煶 + /// </summary> + public bool Mute = false; + /// <summary> + /// 闊抽噺 + /// </summary> + public int Voice = 0; + /// <summary> + /// 鏄惁澶勪簬甯稿紑妯″紡 + /// </summary> + public bool NormalOpen = false; + /// <summary> + /// 涓存椂瀵嗙爜 + /// </summary> + public string TempPassword = string.Empty; + /// <summary> + /// 涓存椂瀵嗙爜鏄惁琚彉鏇� + /// </summary> + public bool IsTempPasswordChanged = true; + /// <summary> + /// 涓存椂瀵嗙爜鐢熸晥鏃堕棿(2020.03.17 13:27) + /// </summary> + public string StatrtTime = string.Empty; + /// <summary> + /// 涓存椂瀵嗙爜澶辨晥鏃堕棿(2020.03.17 13:27) + /// </summary> + public string EndTime = string.Empty; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs new file mode 100644 index 0000000..349efc6 --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs @@ -0,0 +1,120 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; + +namespace HDL_ON.UI +{ + /// <summary> + /// 闂ㄩ攣鐨勯�夋嫨鏃ユ湡鏃堕棿鐣岄潰 + /// </summary> + public class DoorLockSelectTimePage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 閫夋嫨缁撴潫鐨勪簨浠� + /// </summary> + public Action<DateTime> SelectFinshEvent = null; + /// <summary> + /// 閫夋嫨鐨勬椂闂� + /// </summary> + private DateTime selectDateTime; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_dateTime">涓�涓椂闂�</param> + public void ShowForm(DateTime i_dateTime) + { + this.selectDateTime = i_dateTime; + + //閫夋嫨鏃堕棿 + base.SetTitleText(Language.StringByID(StringId.SelectTime)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //閫夋嫨鏃ユ湡 + var rowDate = new RowLayoutControl(); + rowDate.BackgroundColor = CSS_Color.MainBackgroundColor; + bodyFrameLayout.AddChidren(rowDate); + rowDate.frameTable.AddLeftCaption(Language.StringByID(StringId.SelectDate), 300); + rowDate.frameTable.AddRightArrow(); + rowDate.frameTable.AddBottomLine(); + var btnDay = rowDate.frameTable.AddMostRightView(this.selectDateTime.ToString("yyyy.MM.dd"), 300); + rowDate.frameTable.ButtonClickEvent += (sender, e) => + { + //鏄剧ず鏃ユ湡閫夋嫨鐨勫簳閮ㄥ脊绐� + var contr = new BottomDateSelectControl(); + contr.InitControl(this.selectDateTime.Year, this.selectDateTime.Month, this.selectDateTime.Day, 1, 1); + contr.FinishEvent += (div, year, month, day) => + { + //瑕嗙洊鏃堕棿 + if (div == 1) + { + this.selectDateTime = new DateTime(year, month, day, this.selectDateTime.Hour, this.selectDateTime.Minute, 0); + btnDay.Text = this.selectDateTime.ToString("yyyy.MM.dd"); + } + }; + }; + + //閫夋嫨鏃堕棿 + var rowTime = new RowLayoutControl(); + rowTime.Y = rowDate.Bottom; + rowTime.BackgroundColor = CSS_Color.MainBackgroundColor; + bodyFrameLayout.AddChidren(rowTime); + rowTime.frameTable.AddLeftCaption(Language.StringByID(StringId.SelectTime), 300); + rowTime.frameTable.AddRightArrow(); + var btnTime = rowTime.frameTable.AddMostRightView(this.selectDateTime.ToString("HH:mm"), 300); + rowTime.frameTable.ButtonClickEvent += (sender, e) => + { + //鏄剧ず鏃ユ湡閫夋嫨鐨勫簳閮ㄥ脊绐� + var contr = new BottomTimeSelectControl(); + contr.RowCount = 5; + contr.InitControl(this.selectDateTime.Hour, this.selectDateTime.Minute, -1); + contr.FinishEvent += (div, hour, minute) => + { + //瑕嗙洊鏃堕棿 + if (div == 1) + { + this.selectDateTime = new DateTime(this.selectDateTime.Year, this.selectDateTime.Month, this.selectDateTime.Day, hour, minute, 0); + btnTime.Text = this.selectDateTime.ToString("HH:mm"); + } + }; + }; + } + + #endregion + + #region 鈻� 鐣岄潰鍏抽棴___________________________ + + /// <summary> + /// 鐣岄潰鍏抽棴 + /// </summary> + public override void CloseFormBefore() + { + base.CloseFormBefore(); + //璋冪敤鍥炶皟浜嬩欢 + this.SelectFinshEvent?.Invoke(this.selectDateTime); + this.SelectFinshEvent = null; + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockMethordManagerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockMethordManagerPage.cs new file mode 100644 index 0000000..e3b0a5c --- /dev/null +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockMethordManagerPage.cs @@ -0,0 +1,713 @@ +锘縰sing Shared; +using HDL_ON.UI.CSS; +using HDL_ON.Stan; +using System; +using System.Collections.Generic; +using System.Text; +using HDL_ON.Entity; +using HDL_ON.DAL.Server; + +namespace HDL_ON.UI +{ + /// <summary> + /// 闂ㄩ攣鐨勯�夋嫨鏃ユ湡鏃堕棿鐣岄潰 + /// </summary> + public class DoorLockUnlockMethordManagerPage : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鍒楄〃鎺т欢 + /// </summary> + private VerticalFrameControl listView = null; + /// <summary> + /// 寮�閿佹柟寮忓垪琛� + /// </summary> + private List<UnlockMethordInfo> listUnlockInfo = new List<UnlockMethordInfo>(); + /// <summary> + /// 鎴愬憳鍒楄〃 + /// </summary> + private List<ResidenceMemberInfo> listMember = null; + /// <summary> + /// 鐧借壊鑳屾櫙鐨勫鍣ㄦ帶浠堕泦鍚�(鍧愭爣鍙樻洿鏃朵娇鐢�) + /// </summary> + private List<NormalFrameLayout> listWhiteFrame = new List<NormalFrameLayout>(); + /// <summary> + /// 閫夋嫨鐨勫満鏅�(key:闂ㄩ攣鐨勬暟鎹簱涓婚敭 value:鍦烘櫙鍒楄〃鐨勪富閿�) + /// </summary> + private Dictionary<string, List<string>> dicSelectScene = new Dictionary<string, List<string>>(); + /// <summary> + /// 闂ㄩ攣瀵硅薄 + /// </summary> + private Function doorDevice = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + /// <param name="i_doorDevice">闂ㄩ攣瀵硅薄</param> + /// <param name="i_listMember">鎴愬憳鍒楄〃</param> + public void ShowForm(Function i_doorDevice, List<ResidenceMemberInfo> i_listMember) + { + this.doorDevice = i_doorDevice; + this.listMember = i_listMember; + this.dicSelectScene = new Dictionary<string, List<string>>(); + + //寮�閿佹柟寮忕鐞� + base.SetTitleText(Language.StringByID(StringId.UnlockingManagement)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鍒楄〃鎺т欢 + this.listView = new VerticalFrameControl(); + listView.Height = bodyFrameLayout.Height; + bodyFrameLayout.AddChidren(listView); + + //鎵撳紑杞湀鐨勯偅涓笢瑗� + this.ShowProgressBar(); + HdlThreadLogic.Current.RunThread(() => + { + //鍒濆鍖栧紑閿佹柟寮忎俊鎭垪琛� + var result = this.InitUnlockMethordInfoFromClound(); + //鍏抽棴杞湀鐨勯偅涓笢瑗� + this.CloseProgressBar(); + if (result == false) + { + return; + } + HdlThreadLogic.Current.RunMain(() => + { + //鍒濆鍖栨湭鍒嗛厤鎺т欢 + this.InitNotAssignControl(); + //鍒濆鍖栧叏閮ㄦ垚鍛樻帶浠� + this.InitAllMemberControl(); + //璋冩暣妗屽竷澶у皬 + this.listView.AdjustTableHeight(); + }); + }); + } + + #endregion + + #region 鈻� 鍒濆鍖栨湭鍒嗛厤鎺т欢___________________ + + /// <summary> + /// 鍒濆鍖栨湭鍒嗛厤鎺т欢 + /// </summary> + private void InitNotAssignControl() + { + //鍏堝垵濮嬪寲 + this.listWhiteFrame = new List<NormalFrameLayout>(); + + //鑾峰彇鏈垎閰嶇殑寮�閿佹柟寮� + var listInfo = new List<UnlockMethordInfo>(); + foreach (var info in this.listUnlockInfo) + { + if (info.UserId != string.Empty) + { + continue; + } + listInfo.Add(info); + } + //鐧借壊鑳屾櫙瀹瑰櫒 + var frameBack = new NormalFrameLayout(); + frameBack.Y = Application.GetRealHeight(12); + frameBack.Width = Application.GetRealWidth(343); + frameBack.Gravity = Gravity.CenterHorizontal; + frameBack.MainKey = "NotAssign"; + frameBack.Radius = (uint)Application.GetRealWidth(12); + frameBack.Height = Application.GetRealHeight(50); + frameBack.BackgroundColor = CSS_Color.MainBackgroundColor; + frameBack.Visible = listInfo.Count > 0; + this.listView.frameTable.AddChidren(frameBack); + this.listWhiteFrame.Add(frameBack); + + //鏈垎閰� + var frameRow = new FrameRowControl(); + frameBack.AddChidren(frameRow); + var btnNotAssign = frameRow.AddLeftCaption(Language.StringByID(StringId.Unallocated), 300); + btnNotAssign.TextSize = CSS_FontSize.SubheadingFontSize; + btnNotAssign.TextColor = CSS_Color.FirstLevelTitleColor; + frameRow.AddBottomLine(); + + for (int i = 0; i < listInfo.Count; i++) + { + //娣诲姞瀵嗙爜琛屾帶浠� + this.AddUnlockPasswordRowControl(frameBack, listInfo[i], i != listInfo.Count - 1); + } + //璋冩暣妗屽竷楂樺害 + listView.AdjustChidrenFrameHeight(frameBack, 0); + } + + #endregion + + #region 鈻� 鍒濆鍖栨垚鍛樻帶浠禵____________________ + + /// <summary> + /// 鍒濆鍖栧叏閮ㄦ垚鍛樻帶浠� + /// </summary> + private void InitAllMemberControl() + { + //澶村儚鍒楄〃 + var listIcon = new List<ImageView>(); + foreach (var info in this.listMember) + { + //鏍规嵁鎴愬憳淇℃伅鍒濆鍖栨垚鍛樻帶浠� + var btnIcon = this.InitMemberControlByMemberInfo(info); + listIcon.Add(btnIcon); + } + //鍐嶅姞涓�涓┖鐧介棿闅� + var frameSpace = new NormalFrameLayout(); + frameSpace.Height = Application.GetRealHeight(12); + frameSpace.Y = this.listView.frameTable.GetChildren(this.listView.frameTable.ChildrenCount - 1).Bottom; + this.listView.frameTable.AddChidren(frameSpace); + this.listWhiteFrame.Add(frameSpace); + + //涓嬭浇鐢ㄦ埛澶村儚 + this.DownLoadUserIcon(listIcon); + } + + /// <summary> + /// 鏍规嵁鎴愬憳淇℃伅鍒濆鍖栨垚鍛樻帶浠� + /// </summary> + private ImageView InitMemberControlByMemberInfo(ResidenceMemberInfo memberInfo) + { + //鑾峰彇鍒嗛厤缁欒繖涓垚鍛樼殑寮�閿佹柟寮� + var listInfo = new List<UnlockMethordInfo>(); + foreach (var info in this.listUnlockInfo) + { + if (info.UserId != memberInfo.childAccountId) + { + continue; + } + listInfo.Add(info); + } + + //鐧借壊鑳屾櫙瀹瑰櫒 + var frameBack = new NormalFrameLayout(); + frameBack.Width = Application.GetRealWidth(343); + if (listInfo.Count > 0) + { + frameBack.Y = this.listView.frameTable.GetChildren(this.listView.frameTable.ChildrenCount - 1).Bottom + Application.GetRealHeight(12); + } + else + { + //濡傛灉娌℃湁寮�閿佹柟寮�,鍒欐殏鏃堕殣钘� + frameBack.Visible = false; + } + frameBack.Gravity = Gravity.CenterHorizontal; + frameBack.MainKey = memberInfo.childAccountId; + frameBack.Radius = (uint)Application.GetRealWidth(12); + frameBack.Height = Application.GetRealHeight(80); + frameBack.BackgroundColor = CSS_Color.MainBackgroundColor; + this.listView.frameTable.AddChidren(frameBack); + this.listWhiteFrame.Add(frameBack); + + //鐢ㄦ埛琛� + var frameUserRow = new FrameRowControl(); + frameUserRow.Width = frameBack.Width; + frameUserRow.Height = Application.GetRealHeight(80); + frameBack.AddChidren(frameUserRow); + //鐢ㄦ埛澶村儚 + var btnUserIcon = new ImageView(); + btnUserIcon.X = HdlControlResourse.XXLeft; + btnUserIcon.Width = Application.GetRealWidth(48); + btnUserIcon.Height = Application.GetRealWidth(48); + btnUserIcon.Gravity = Gravity.CenterVertical; + btnUserIcon.ImagePath = "LoginIcon/2.png"; + btnUserIcon.Radius = (uint)btnUserIcon.Height / 2; + frameUserRow.AddChidren(btnUserIcon, ChidrenBindMode.NotBind); + //鐢ㄦ埛鍚� + var btnUserName = frameUserRow.AddLeftCaption(memberInfo.nickName, 150); + btnUserName.X = btnUserIcon.Right + Application.GetRealWidth(12); + btnUserName.TextColor = CSS_Color.FirstLevelTitleColor; + //搴曠嚎 + frameUserRow.AddBottomLine(); + //鎴愬憳韬唤鑳屾櫙鍥剧墖 + var frameUserType = new FrameLayout(); + frameUserType.X = Application.GetRealWidth(220); + frameUserType.Y = Application.GetRealHeight(16); + frameUserType.Height = Application.GetRealHeight(58); + frameUserType.Width = Application.GetRealWidth(180); + frameUserType.BackgroundImagePath = "PersonalCenter/UserTypebg2.png";//鐢ㄦ渶闀垮浘鏍囩殑閭d釜 + frameUserRow.AddChidren(frameUserType, ChidrenBindMode.NotBind); + //鎴愬憳韬唤缈昏瘧 + var btnUserTypeName = new NormalViewControl(270, 54, true); + btnUserTypeName.X = Application.GetRealWidth(35); + btnUserTypeName.Y = Application.GetRealHeight(-2); + btnUserTypeName.TextColor = CSS_Color.MainBackgroundColor; + btnUserTypeName.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + btnUserTypeName.TextID = memberInfo.childAccountType == "ADMIN" ? StringId.Administrators : StringId.Member; + btnUserTypeName.Width = btnUserTypeName.GetRealWidthByText(); + frameUserType.AddChidren(btnUserTypeName); + //鎸夌収鎺т欢瀹為檯闀垮害,鍙樻洿鑳屾櫙鍥剧殑X杞� Application.GetRealWidth(10)涓哄彸杈逛綑鐧� + frameUserType.X = frameBack.Width - btnUserTypeName.X - btnUserTypeName.Width - Application.GetRealWidth(10); + + for (int i = 0; i < listInfo.Count; i++) + { + //娣诲姞瀵嗙爜琛屾帶浠� + this.AddUnlockPasswordRowControl(frameBack, listInfo[i], i != listInfo.Count - 1); + } + //璋冩暣妗屽竷楂樺害 + listView.AdjustChidrenFrameHeight(frameBack, 0); + + return btnUserIcon; + } + + #endregion + + #region 鈻� 鐢熸垚瀵嗙爜琛屾帶浠禵____________________ + + /// <summary> + /// 鐢熸垚瀵嗙爜琛屾帶浠� + /// </summary> + /// <param name="frameFather">鐖舵帶浠�</param> + /// <param name="unlockInfo">寮�閿佹柟寮忎俊鎭�</param> + /// <param name="addLine">鏄惁娣诲姞搴曠嚎</param> + private void AddUnlockPasswordRowControl(NormalFrameLayout frameFather, UnlockMethordInfo unlockInfo, bool addLine) + { + //琛屾帶浠� + var frameRow = new FrameRowControl(); + frameRow.MainKey = unlockInfo.Id; + frameRow.RightOffset = Application.GetRealWidth(-32); + if (frameFather.ChildrenCount > 0) + { + //寰�鏈�搴曚笅娣诲姞 + frameRow.Y = frameFather.GetChildren(frameFather.ChildrenCount - 1).Bottom; + } + frameFather.AddChidren(frameRow); + if (addLine == true) + { + frameRow.AddBottomLine(); + } + + //寮�閿佹柟寮忓娉� + var btnCaption = frameRow.AddLeftCaption(unlockInfo.Remark, 120); + btnCaption.TextColor = CSS_Color.FirstLevelTitleColor; + + //鍦烘櫙鑱斿姩鍥炬爣 + IconViewControl btnScene = null; + //澶囨敞缂栬緫鍥炬爣 + IconViewControl btnEditor = null; + //鍒嗛厤鍥炬爣 + IconViewControl btnMove = null; + //鍒犻櫎鍥炬爣 + IconViewControl btnDelete = null; + //鏇村鍥炬爣 + var btnMore = frameRow.AddMostRightEmptyIcon(28, 28); + btnMore.UnSelectedImagePath = "FunctionIcon/DoorLock/More.png"; + btnMore.SelectedImagePath = "FunctionIcon/DoorLock/Hide.png"; + btnMore.ButtonClickEvent += (sender, e) => + { + btnMore.IsSelected = !btnMore.IsSelected; + btnEditor.Visible = btnMore.IsSelected; + btnMove.Visible = btnMore.IsSelected; + btnDelete.Visible = btnMore.IsSelected; + + //鍙樻洿鍒嗕韩鍦烘櫙鍥炬爣鐨刋杞� + int intSceneX = btnMore.IsSelected == true ? btnEditor.X : btnMore.X; + btnScene.X = intSceneX - btnScene.Width - Application.GetRealWidth(12); + }; + //鍒犻櫎鍥炬爣 + btnDelete = new IconViewControl(28); + btnDelete.UnSelectedImagePath = "FunctionIcon/DoorLock/Delete.png"; + btnDelete.Gravity = Gravity.CenterVertical; + btnDelete.X = btnMore.X - btnDelete.Width - Application.GetRealWidth(12); + btnDelete.Visible = false; + frameRow.AddChidren(btnDelete, ChidrenBindMode.NotBind); + btnDelete.ButtonClickEvent += (sender, e) => + { + //鍒犻櫎鎿嶄綔灏嗚鍚屾浜庡疄浣撻攣涓妠0}鏄惁杩橀渶瑕佸垹闄わ紵 + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.DeleteUnlockingMethordMsg), () => + { + //鍒犻櫎寮�閿佹柟寮� + this.DeleteUnlockMethrod(frameFather, unlockInfo); + + }, Language.StringByID(StringId.ConfirmDeletion)); + }; + + //鍒嗛厤鍥炬爣 + btnMove = new IconViewControl(28); + btnMove.UnSelectedImagePath = "FunctionIcon/DoorLock/Redistribution.png"; + btnMove.Gravity = Gravity.CenterVertical; + btnMove.X = btnDelete.X - btnMove.Width - Application.GetRealWidth(12); + btnMove.Visible = false; + frameRow.AddChidren(btnMove, ChidrenBindMode.NotBind); + btnMove.ButtonClickEvent += (sender, e) => + { + //鍒嗛厤寮�閿佹柟寮� + this.DistributeUnlockMethord(frameFather, unlockInfo); + }; + + //缂栬緫鍥炬爣 + btnEditor = new IconViewControl(28); + btnEditor.UnSelectedImagePath = "FunctionIcon/DoorLock/Editor.png"; + btnEditor.Gravity = Gravity.CenterVertical; + btnEditor.X = btnMove.X - btnEditor.Width - Application.GetRealWidth(12); + btnEditor.Visible = false; + frameRow.AddChidren(btnEditor, ChidrenBindMode.NotBind); + btnEditor.ButtonClickEvent += (sender, e) => + { + new UI.PublicAssmebly().LoadDialog_EditParater(StringId.EditorRemarkName, btnCaption.Text,(textValue)=> + { + btnCaption.Text = textValue; + + }, StringId.RemarkNameCanNotEmpty, 0, new List<string>()); + }; + + //鍦烘櫙鑱斿姩鍥炬爣 + btnScene = new IconViewControl(28); + btnScene.UnSelectedImagePath = "FunctionIcon/DoorLock/BindScene.png"; + btnScene.Gravity = Gravity.CenterVertical; + btnScene.X = btnMore.X - btnScene.Width - Application.GetRealWidth(12); + frameRow.AddChidren(btnScene, ChidrenBindMode.NotBind); + btnScene.ButtonClickEvent += (sender, e) => + { + //鏄剧ず閫夋嫨鍦烘櫙寮圭獥 + this.ShowSelectSceneDialog(unlockInfo); + }; + } + + #endregion + + #region 鈻� 璋冩暣鐧借壊瀹瑰櫒鎺т欢鐨勫潗鏍囧強楂樺害_______ + + /// <summary> + /// 璋冩暣鍏ㄩ儴鐧借壊瀹瑰櫒鎺т欢鐨勫潗鏍� + /// </summary> + private void AdjustAllWhiteFrameLocation() + { + //鍒濆Y杞� + int defultYY = 0; + for (int i = 0; i < this.listWhiteFrame.Count; i++) + { + var frame = this.listWhiteFrame[i]; + //涓嶆樉绀虹殑,涓嶅仛澶勭悊 + if (frame.Visible == false) { continue; } + //鐧借壊瀹瑰櫒闂寸殑闂磋窛涓�12锛屾渶鍚庝竴涓槸浣欑櫧,涓嶉渶瑕佸啀娣诲姞闂磋窛 + frame.Y = i != this.listWhiteFrame.Count - 1 ? defultYY + Application.GetRealHeight(12) : defultYY; + + defultYY = frame.Bottom; + } + } + + /// <summary> + /// 璋冩暣鐧借壊瀹瑰櫒鎺т欢鐨勯珮搴� + /// </summary> + /// <param name="frameFather">鎸囧畾鐧借壊鍖哄煙鐨勫鍣ㄦ帶浠�</param> + private void AdjustWhiteFrameHeight(NormalFrameLayout frameFather) + { + if (frameFather.ChildrenCount == 1) + { + //濡傛灉杩欎釜瀹瑰櫒閲岄潰宸茬粡娌℃湁浜嗗紑閿佹柟寮�,鍒欏皢瀹冪疆椤�,骞堕殣钘� + frameFather.Y = 0; + frameFather.Visible = false; + } + else + { + //浠庢柊璁$畻瀹冪殑楂樺害 + var rowLast = frameFather.GetChildren(frameFather.ChildrenCount - 1); + frameFather.Height = rowLast.Bottom; + if (rowLast is FrameRowControl) + { + //灏嗗畠鐨勫簳绾跨Щ闄ゆ帀 + ((FrameRowControl)rowLast).RemoveBottomLine(); + } + } + } + + #endregion + + #region 鈻� 鍒濆鍖栧紑閿佹柟寮忎俊鎭垪琛╛____________ + + /// <summary> + /// 鍒濆鍖栧紑閿佹柟寮忎俊鎭垪琛� + /// </summary> + /// <returns></returns> + private bool InitUnlockMethordInfoFromClound() + { + //鍏堝垵濮嬩紭鍖� + this.listUnlockInfo = new List<UnlockMethordInfo>(); + + for (int i = 0; i < 2; i++) + { + var unlockInfo = new UnlockMethordInfo(); + unlockInfo.Id = "MimaKey" + i.ToString(); + unlockInfo.Remark = "瀵嗙爜" + i; + this.listUnlockInfo.Add(unlockInfo); + } + for (int i = 0; i < 2; i++) + { + var unlockInfo = new UnlockMethordInfo(); + unlockInfo.Id = "ZhiwenKey" + i.ToString(); + unlockInfo.Remark = "鎸囩汗" + i; + this.listUnlockInfo.Add(unlockInfo); + } + return true; + } + + /// <summary> + /// 寮�閿佹柟寮忎俊鎭� + /// </summary> + private class UnlockMethordInfo + { + /// <summary> + /// 鏁版嵁搴撲富閿� + /// </summary> + public string Id = string.Empty; + /// <summary> + /// 瀵嗙爜澶囨敞 + /// </summary> + public string Remark = string.Empty; + /// <summary> + /// 鐢ㄦ埛璐﹀彿id + /// </summary> + public string UserId = string.Empty; + } + + #endregion + + #region 鈻� 鏄剧ず閫夋嫨鍦烘櫙寮圭獥___________________ + + /// <summary> + /// 鏄剧ず閫夋嫨鍦烘櫙寮圭獥 + /// </summary> + /// <param name="unlockInfo">寮�閿佹柟寮�</param> + private void ShowSelectSceneDialog(UnlockMethordInfo unlockInfo) + { + if (FunctionList.List.scenes.Count == 0) + { + //妫�娴嬩笉鍒板彲渚涢�夋嫨鐨勫満鏅� + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(StringId.NotHadCanSelectScene)); + return; + } + var listText = new List<string>(); + var listSelectIndex = new List<int>(); + var listSelect = new List<string>(); + if (this.dicSelectScene.ContainsKey(unlockInfo.Id) == true) + { + //褰撳墠宸茬粡閫夋嫨浜嗙殑鍦烘櫙 + listSelect = this.dicSelectScene[unlockInfo.Id]; + } + + for (int i = 0; i < FunctionList.List.scenes.Count; i++) + { + var info = FunctionList.List.scenes[i]; + listText.Add(info.name); + if (listSelect.Contains(info.userSceneId) == true) + { + //鍒濆閫夋嫨 + listSelectIndex.Add(i); + } + } + //璋冭捣寮圭獥 + var form = new BottomItemSelectControl(FunctionList.List.scenes.Count, Language.StringByID(StringId.SelectScene)); + form.AddRowMenu(listText, listSelectIndex); + form.FinishOnlyEvent += (div, selectIndex) => + { + if (div == 1) + { + this.dicSelectScene[unlockInfo.Id] = new List<string>(); + this.dicSelectScene[unlockInfo.Id].Add(FunctionList.List.scenes[selectIndex].userSceneId); + } + }; + } + + #endregion + + #region 鈻� 鍒犻櫎寮�閿佹柟寮廮______________________ + + /// <summary> + /// 鍒犻櫎寮�閿佹柟寮� + /// </summary> + /// <param name="frameFather">鐖舵帶浠�</param> + /// <param name="unlockInfo">寮�閿佷俊鎭�</param> + private void DeleteUnlockMethrod(NormalFrameLayout frameFather, UnlockMethordInfo unlockInfo) + { + //绉婚櫎鎸囧畾寮�閿佹柟寮忕殑琛屾帶浠� + this.RemoveUnlockMethrodRowControl(frameFather, unlockInfo); + + //璋冩暣鐧借壊瀹瑰櫒鎺т欢鐨勯珮搴� + this.AdjustWhiteFrameHeight(frameFather); + + //璋冩暣鍏ㄩ儴鐧借壊瀹瑰櫒鎺т欢鐨勫潗鏍� + this.AdjustAllWhiteFrameLocation(); + } + + /// <summary> + /// 绉婚櫎鎸囧畾寮�閿佹柟寮忕殑琛屾帶浠� + /// </summary> + /// <param name="frameFather">鐖舵帶浠�</param> + /// <param name="unlockInfo">寮�閿佷俊鎭�</param> + private void RemoveUnlockMethrodRowControl(NormalFrameLayout frameFather, UnlockMethordInfo unlockInfo) + { + //浠庣储寮�1寮�濮�,鍥犱负绱㈠紩0鏄爣棰� + for (int i = 1; i < frameFather.ChildrenCount; i++) + { + var row = frameFather.GetChildren(i) as FrameRowControl; + if (row == null || row.MainKey != unlockInfo.Id) + { + //涓嶆槸瀹� + continue; + } + //绉婚櫎鎺夊畠 + row.RemoveFromParent(); + break; + } + //鐒跺悗閲嶆柊鏁翠竴涓嬪叏閮ㄨ鐨刌杞� + int newYY = frameFather.GetChildren(0).Bottom; + for (int i = 1; i < frameFather.ChildrenCount; i++) + { + var row = frameFather.GetChildren(i) as FrameRowControl; + if (row == null) + { + //鐞嗚涓婂簲璇ヤ笉浼� + continue; + } + row.Y = newYY; + newYY = row.Bottom; + } + } + + #endregion + + #region 鈻� 鍒嗛厤寮�閿佹柟寮廮______________________ + + /// <summary> + /// 鍒嗛厤寮�閿佹柟寮� + /// </summary> + /// <param name="frameFather">鐖舵帶浠�</param> + /// <param name="unlockInfo">寮�閿佷俊鎭�</param> + private void DistributeUnlockMethord(NormalFrameLayout frameFather, UnlockMethordInfo unlockInfo) + { + //濡傛灉鏄湭鍒嗛厤鐨勫紑閿佹柟寮�,鍒欏脊璧锋垚鍛橀�夋嫨绐楀彛 + if (frameFather.MainKey == "NotAssign") + { + var listText = new List<string>(); + foreach (var info in this.listMember) + { + listText.Add(info.nickName); + } + //璋冭捣寮圭獥 + var form = new BottomItemSelectControl(this.listMember.Count, Language.StringByID(StringId.AssignTo)); + form.AddRowMenu(listText, new List<int>()); + form.FinishOnlyEvent += (div, selectIndex) => + { + if (div == 1) + { + //绉婚櫎鎸囧畾寮�閿佹柟寮忕殑琛屾帶浠� + this.RemoveUnlockMethrodRowControl(frameFather, unlockInfo); + //璋冩暣鐧借壊瀹瑰櫒鎺т欢鐨勯珮搴� + this.AdjustWhiteFrameHeight(frameFather); + //娣诲姞鏂扮殑寮�閿佹柟寮忚鎺т欢 + this.AddNewUnlockMethrodRowControl(this.listMember[selectIndex].childAccountId, unlockInfo); + //璋冩暣鍏ㄩ儴鐧借壊瀹瑰櫒鎺т欢鐨勫潗鏍� + this.AdjustAllWhiteFrameLocation(); + //璋冩暣妗屽竷楂樺害 + listView.AdjustTableHeight(); + } + }; + } + //濡傛灉鏄垚鍛樼殑,鍒欐妸瀹冩斁鍥炴湭鍒嗛厤 + else + { + //绉婚櫎鎸囧畾寮�閿佹柟寮忕殑琛屾帶浠� + this.RemoveUnlockMethrodRowControl(frameFather, unlockInfo); + //璋冩暣鐧借壊瀹瑰櫒鎺т欢鐨勯珮搴� + this.AdjustWhiteFrameHeight(frameFather); + //娣诲姞鏂扮殑寮�閿佹柟寮忚鎺т欢鍒版湭鍒嗛厤 + this.AddNewUnlockMethrodRowControl("NotAssign", unlockInfo); + //璋冩暣鍏ㄩ儴鐧借壊瀹瑰櫒鎺т欢鐨勫潗鏍� + this.AdjustAllWhiteFrameLocation(); + //璋冩暣妗屽竷楂樺害 + listView.AdjustTableHeight(); + } + } + + /// <summary> + /// 娣诲姞鏂扮殑寮�閿佹柟寮忚鎺т欢 + /// </summary> + /// <param name="i_childId">userId</param> + /// <param name="unlockInfo">寮�閿佹柟寮忎俊鎭�</param> + private void AddNewUnlockMethrodRowControl(string i_childId, UnlockMethordInfo unlockInfo) + { + NormalFrameLayout fatherFrame = null; + foreach (var frame in this.listWhiteFrame) + { + //鑾峰彇鎸囧畾鐨勭埗鎺т欢 + if (frame.MainKey != i_childId) { continue; } + fatherFrame = frame; + break; + } + //搴旇涓嶄細瀛樺湪 + if (fatherFrame == null) { return; } + + if (fatherFrame.ChildrenCount > 1) + { + //鍏堜负鏈�鍚庝竴琛岀敾搴曠嚎 + var lastRow = fatherFrame.GetChildren(fatherFrame.ChildrenCount - 1) as FrameRowControl; + lastRow?.AddBottomLine(); + } + else + { + //瀹冨彲浠ユ樉绀哄嚭鏉ヤ簡 + fatherFrame.Visible = true; + } + //鍚戞寚瀹氱殑瀹瑰櫒娣诲姞寮�閿佹柟寮忔帶浠� + this.AddUnlockPasswordRowControl(fatherFrame, unlockInfo, true); + //璋冩暣鐧借壊瀹瑰櫒鎺т欢鐨勯珮搴� + this.AdjustWhiteFrameHeight(fatherFrame); + } + + #endregion + + #region 鈻� 涓嬭浇鐢ㄦ埛澶村儚_______________________ + + /// <summary> + /// 涓嬭浇鐢ㄦ埛澶村儚 + /// </summary> + /// <param name="listIcon">澶村儚鎺т欢鍒楄〃,瀹冪殑绱㈠紩鍜宼his.listMember涓�鑷�</param> + private void DownLoadUserIcon(List<ImageView> listIcon) + { + //绱㈠紩0鏄綋鍓嶇殑鐧婚檰璐﹀彿 + listIcon[0].ImagePath = UserInfo.Current.headImagePagePath; + HdlThreadLogic.Current.RunThread(() => + { + for (int i = 1; i < this.listMember.Count; i++) + { + var resultData = ImageUtlis.Current.DownHeadImageByImageKey(this.listMember[i].memberHeadIcon, true, this.listMember[i].childAccountRegionUrl); + if (this.Parent == null) + { + //鐣岄潰宸茬粡鍏抽棴 + return; + } + if (resultData != null && resultData.Length > 0) + { + int nowIndex = i; + HdlThreadLogic.Current.RunMain(() => + { + listIcon[nowIndex].ImageBytes = resultData; + }, ShowErrorMode.NO); + } + System.Threading.Thread.Sleep(200); + } + + }, ShowErrorMode.NO); + } + + #endregion + } +} diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs index d0199bb..2074184 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaAirCleanerPage.cs @@ -341,7 +341,7 @@ } //璇风‘璁ゆ槸鍚﹀凡瀹為檯閲嶇疆婊よ姱骞舵寜{0}鐓ц鏄庝功瑕佹眰鎿嶄綔璁惧杩涜婊よ姱{0}瀵垮懡閲嶆柊璁℃椂 string msg = Language.StringByID(StringId.FilterElementResetMsg).Replace("{0}", "\r\n"); - this.ShowMassage(ShowMsgType.Confirm, msg, () => + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, msg, () => { //鍙戦�佷娇鑳藉懡浠� this.SendEnableComand(null, "filter_reset", "true"); diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs index 3d4d4c0..8532e4a 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/TuyaWeepRobotConsumablesMagPage.cs @@ -104,7 +104,7 @@ else { //寮�鍚渶瑕佺‘璁� - this.ShowMassage(ShowMsgType.Confirm, i_resetMsg, () => + HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, i_resetMsg, () => { btnSwitch.IsSelected = !btnSwitch.IsSelected; HdlThreadLogic.Current.RunThread(() => diff --git a/HDL_ON/UI/UI2/UserPage.cs b/HDL_ON/UI/UI2/UserPage.cs index 4397173..44540a8 100644 --- a/HDL_ON/UI/UI2/UserPage.cs +++ b/HDL_ON/UI/UI2/UserPage.cs @@ -563,7 +563,7 @@ /// <summary> /// 鍒囨崲鍒颁釜浜轰腑蹇冪晫闈� /// </summary> - void ChoosePersonalCenter() + public void ChoosePersonalCenter() { #if DEBUG if(MainPage.NoLoginMode) -- Gitblit v1.8.0