From 6cbd0936d3245fd7c433884ac9c1f5448a7cf657 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 13 十二月 2019 13:49:44 +0800 Subject: [PATCH] 合并了代码 --- ZigbeeApp/Home.Ios/MainViewController.cs | 5 ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs | 10 ZigbeeApp/GateWay.Droid/Assets/Language.ini | 10 ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs | 480 ++++++++------- ZigbeeApp/Shared/Common/SendDataToServer.cs | 18 ZigbeeApp/Home.Ios/Resources/Language.ini | 10 ZigbeeApp/Home.Ios/Resources/Phone/Item/SwitchSelected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs | 81 ++ ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs | 2 ZigbeeApp/Shared/R.cs | 29 ZigbeeApp/Shared/Phone/Device/Category/Category.cs | 3 ZigbeeApp/Shared/Phone/UserCenter/Abount/SLAForm.cs | 55 + ZigbeeApp/Shared/Common/CommonPage.cs | 150 ---- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs | 637 ++++++++++++-------- ZigbeeApp/Home.Ios/Resources/Phone/Item/Switch.png | 0 ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs | 31 ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs | 1 ZigbeeApp/Shared/Common/Device.cs | 23 ZigbeeApp/Shared/Phone/UserView/UserPage.cs | 7 ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs | 1 ZigbeeApp/Shared/Phone/Device/Account/AccountLogic.cs | 85 ++ ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs | 28 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png | 0 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs | 60 + ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs | 3 ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs | 1 ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetFunctionRow.cs | 2 ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs | 5 ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs | 6 ZigbeeApp/Shared/Shared.projitems | 1 ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs | 3 ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs | 22 ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs | 2 ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png | 0 ZigbeeApp/Shared/Phone/UserView/HomePage.cs | 1 ZigbeeApp/Shared/Common/Room.cs | 3 37 files changed, 1,080 insertions(+), 697 deletions(-) diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini index 6610a60..7977c50 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini +++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini @@ -669,11 +669,16 @@ 10157=缃戝叧涓嶅湪绾� 10160=宸叉槸鏈�鏂扮増鏈� -10161=鏇存柊 +10161=鏇存柊鏈�鏂扮増 10162=鏇存柊鍐呭 10163=鏇存柊澶辫触 -10164=鏇存柊涓�... +10164=姝e湪鏇存柊涓�... 10165=鍙栨秷鏇存柊 +10166=鐗堟湰鍙� +10167=鏈嶅姟鍗忚 +10168=鐗堟湰鏇存柊 +10169=鍗忚鏂囨湰淇℃伅鍐呭 +10170=鍙兘鐢变簬褰撳墠缃戠粶杈冨樊鎴栬澶囧凡琚粬浜虹粦瀹氥�倇\r\n}1.璇风‘淇濇墜鏈轰笌璁惧涔嬮棿鐨勮窛绂昏冻澶熻繎锛屽苟涓斿懆鍥寸綉缁滅幆澧冩病鏈夊己骞叉壈銆倇\r\n}2.鍚屾椂闇�纭搴旂敤鐨勫畾浣嶆潈闄愭湭琚叧闂�傝嫢鎵嬪姩鍏抽棴浜嗗簲鐢ㄥ畾浣嶆潈闄愬彲鑳藉鑷存棤娉曞彂鐜拌澶囥�倇\r\n}3.濡傛灉浠嶅缁堟棤娉曞彂鐜拌澶囷紝鍙兘鍥犱负璁惧宸茬粡琚粬浜虹粦瀹氫簡銆� 濡傛灉浣犲苟涓嶆竻妤氭槸璋佽繛鎺ヤ簡璁惧锛屽彲浠ヨ繘琛岄噸缃紝閲嶇疆鏂瑰紡璇� 鏌ラ槄璇存槑涔︼紝鏍规嵁鎸囧紩鎿嶄綔銆� @@ -1720,6 +1725,7 @@ 15997=3.绯荤粺鎸囩ず鐏笉鏄�1绉掗棯鐑�,妫�鏌ヨ矾鐢卞櫒鏄惁寮�鍚疍HCP鑷姩鍒嗛厤IP 15998=璇峰墠寰�浣忓畢绠$悊{0}璁剧疆浣忓畢鐨勫湴鐞嗕綅缃� 15999=鏈煡妤煎眰 +16000=濡傛灉涓嶈缃綇瀹呯殑鍦扮悊浣嶇疆,鍒欎細褰卞搷鑷姩鍖栧湴鐞嗗洿鏍忓姛鑳界殑璁剧疆 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹� diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png index 39f3349..f8b5b97 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/Switch.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png index c5a8f2e..050c35f 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png +++ b/ZigbeeApp/GateWay.Droid/Assets/Phone/Item/SwitchSelected.png Binary files differ diff --git a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs index 8231f7c..bcf64c2 100644 --- a/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs +++ b/ZigbeeApp/GateWay.Droid/Resources/Resource.designer.cs @@ -3000,6 +3000,12 @@ // aapt resource value: 0x7f090028 public const int CTRL = 2131296296; + // aapt resource value: 0x7f09008e + public const int Custom = 2131296398; + + // aapt resource value: 0x7f09008d + public const int CustomLabel = 2131296397; + // aapt resource value: 0x7f090054 public const int FILL = 2131296340; @@ -3021,8 +3027,23 @@ // aapt resource value: 0x7f090051 public const int MatchLayout = 2131296337; + // aapt resource value: 0x7f090088 + public const int Notice = 2131296392; + + // aapt resource value: 0x7f09008c + public const int Password = 2131296396; + + // aapt resource value: 0x7f09008b + public const int PasswordLabel = 2131296395; + // aapt resource value: 0x7f09002b public const int SHIFT = 2131296299; + + // aapt resource value: 0x7f09008a + public const int SSID = 2131296394; + + // aapt resource value: 0x7f090089 + public const int SSIDLabel = 2131296393; // aapt resource value: 0x7f090056 public const int STROKE = 2131296342; @@ -3036,8 +3057,8 @@ // aapt resource value: 0x7f090053 public const int Translate = 2131296339; - // aapt resource value: 0x7f0900c0 - public const int action0 = 2131296448; + // aapt resource value: 0x7f0900cb + public const int action0 = 2131296459; // aapt resource value: 0x7f090079 public const int action_bar = 2131296377; @@ -3060,17 +3081,17 @@ // aapt resource value: 0x7f090057 public const int action_bar_title = 2131296343; - // aapt resource value: 0x7f0900bd - public const int action_container = 2131296445; + // aapt resource value: 0x7f0900c8 + public const int action_container = 2131296456; // aapt resource value: 0x7f09007a public const int action_context_bar = 2131296378; - // aapt resource value: 0x7f0900c4 - public const int action_divider = 2131296452; + // aapt resource value: 0x7f0900cf + public const int action_divider = 2131296463; - // aapt resource value: 0x7f0900be - public const int action_image = 2131296446; + // aapt resource value: 0x7f0900c9 + public const int action_image = 2131296457; // aapt resource value: 0x7f090003 public const int action_menu_divider = 2131296259; @@ -3087,11 +3108,11 @@ // aapt resource value: 0x7f090059 public const int action_mode_close_button = 2131296345; - // aapt resource value: 0x7f0900bf - public const int action_text = 2131296447; + // aapt resource value: 0x7f0900ca + public const int action_text = 2131296458; - // aapt resource value: 0x7f0900cd - public const int actions = 2131296461; + // aapt resource value: 0x7f0900d8 + public const int actions = 2131296472; // aapt resource value: 0x7f09005a public const int activity_chooser_view_content = 2131296346; @@ -3123,17 +3144,17 @@ // aapt resource value: 0x7f090032 public const int bottom = 2131296306; - // aapt resource value: 0x7f0900a8 - public const int btnCancel = 2131296424; + // aapt resource value: 0x7f0900b3 + public const int btnCancel = 2131296435; - // aapt resource value: 0x7f0900aa - public const int btnSubmit = 2131296426; + // aapt resource value: 0x7f0900b5 + public const int btnSubmit = 2131296437; // aapt resource value: 0x7f090060 public const int buttonPanel = 2131296352; - // aapt resource value: 0x7f0900c1 - public const int cancel_action = 2131296449; + // aapt resource value: 0x7f0900cc + public const int cancel_action = 2131296460; // aapt resource value: 0x7f09003a public const int center = 2131296314; @@ -3147,8 +3168,8 @@ // aapt resource value: 0x7f090070 public const int checkbox = 2131296368; - // aapt resource value: 0x7f0900c9 - public const int chronometer = 2131296457; + // aapt resource value: 0x7f0900d4 + public const int chronometer = 2131296468; // aapt resource value: 0x7f090043 public const int clip_horizontal = 2131296323; @@ -3159,20 +3180,20 @@ // aapt resource value: 0x7f09002e public const int collapseActionView = 2131296302; - // aapt resource value: 0x7f09008e - public const int container = 2131296398; + // aapt resource value: 0x7f090099 + public const int container = 2131296409; - // aapt resource value: 0x7f0900d6 - public const int contentFrame = 2131296470; + // aapt resource value: 0x7f0900e1 + public const int contentFrame = 2131296481; // aapt resource value: 0x7f090063 public const int contentPanel = 2131296355; - // aapt resource value: 0x7f0900ac - public const int content_container = 2131296428; + // aapt resource value: 0x7f0900b7 + public const int content_container = 2131296439; - // aapt resource value: 0x7f09008f - public const int coordinator = 2131296399; + // aapt resource value: 0x7f09009a + public const int coordinator = 2131296410; // aapt resource value: 0x7f09006a public const int custom = 2131296362; @@ -3180,8 +3201,8 @@ // aapt resource value: 0x7f090069 public const int customPanel = 2131296361; - // aapt resource value: 0x7f0900b8 - public const int day = 2131296440; + // aapt resource value: 0x7f0900c3 + public const int day = 2131296451; // aapt resource value: 0x7f090077 public const int decor_content_parent = 2131296375; @@ -3189,23 +3210,23 @@ // aapt resource value: 0x7f09005d public const int default_activity_button = 2131296349; - // aapt resource value: 0x7f090089 - public const int description = 2131296393; + // aapt resource value: 0x7f090094 + public const int description = 2131296404; - // aapt resource value: 0x7f090091 - public const int design_bottom_sheet = 2131296401; + // aapt resource value: 0x7f09009c + public const int design_bottom_sheet = 2131296412; - // aapt resource value: 0x7f090098 - public const int design_menu_item_action_area = 2131296408; + // aapt resource value: 0x7f0900a3 + public const int design_menu_item_action_area = 2131296419; - // aapt resource value: 0x7f090097 - public const int design_menu_item_action_area_stub = 2131296407; + // aapt resource value: 0x7f0900a2 + public const int design_menu_item_action_area_stub = 2131296418; - // aapt resource value: 0x7f090096 - public const int design_menu_item_text = 2131296406; + // aapt resource value: 0x7f0900a1 + public const int design_menu_item_text = 2131296417; - // aapt resource value: 0x7f090095 - public const int design_navigation_view = 2131296405; + // aapt resource value: 0x7f0900a0 + public const int design_navigation_view = 2131296416; // aapt resource value: 0x7f090015 public const int disableHome = 2131296277; @@ -3216,8 +3237,8 @@ // aapt resource value: 0x7f090025 public const int end = 2131296293; - // aapt resource value: 0x7f0900cf - public const int end_padder = 2131296463; + // aapt resource value: 0x7f0900da + public const int end_padder = 2131296474; // aapt resource value: 0x7f090034 public const int enterAlways = 2131296308; @@ -3243,8 +3264,8 @@ // aapt resource value: 0x7f09003d public const int fill_vertical = 2131296317; - // aapt resource value: 0x7f09008a - public const int fingerprint_icon = 2131296394; + // aapt resource value: 0x7f090095 + public const int fingerprint_icon = 2131296405; // aapt resource value: 0x7f090049 public const int @fixed = 2131296329; @@ -3252,56 +3273,56 @@ // aapt resource value: 0x7f09004d public const int forever = 2131296333; - // aapt resource value: 0x7f09009d - public const int gd_btn_back = 2131296413; + // aapt resource value: 0x7f0900a8 + public const int gd_btn_back = 2131296424; - // aapt resource value: 0x7f0900a6 - public const int gd_btn_myLocation = 2131296422; - - // aapt resource value: 0x7f0900a5 - public const int gd_btn_save = 2131296421; - - // aapt resource value: 0x7f0900a2 - public const int gd_img_search_delete = 2131296418; - - // aapt resource value: 0x7f0900a4 - public const int gd_ll_myhome = 2131296420; - - // aapt resource value: 0x7f0900a0 - public const int gd_ll_search = 2131296416; - - // aapt resource value: 0x7f09009f - public const int gd_mapView = 2131296415; - - // aapt resource value: 0x7f09009c - public const int gd_rl_topview = 2131296412; - - // aapt resource value: 0x7f09009e - public const int gd_tv_activity_title = 2131296414; - - // aapt resource value: 0x7f0900a3 - public const int gd_tv_radius = 2131296419; - - // aapt resource value: 0x7f0900a1 - public const int gd_tv_search_title = 2131296417; - - // aapt resource value: 0x7f09009a - public const int hdl_gallery_rootView = 2131296410; - - // aapt resource value: 0x7f09009b - public const int hdl_gallery_viewPager = 2131296411; - - // aapt resource value: 0x7f0900ae - public const int hdl_options1 = 2131296430; - - // aapt resource value: 0x7f0900af - public const int hdl_options2 = 2131296431; + // aapt resource value: 0x7f0900b1 + public const int gd_btn_myLocation = 2131296433; // aapt resource value: 0x7f0900b0 - public const int hdl_options3 = 2131296432; + public const int gd_btn_save = 2131296432; // aapt resource value: 0x7f0900ad - public const int hdl_pickerview_ll = 2131296429; + public const int gd_img_search_delete = 2131296429; + + // aapt resource value: 0x7f0900af + public const int gd_ll_myhome = 2131296431; + + // aapt resource value: 0x7f0900ab + public const int gd_ll_search = 2131296427; + + // aapt resource value: 0x7f0900aa + public const int gd_mapView = 2131296426; + + // aapt resource value: 0x7f0900a7 + public const int gd_rl_topview = 2131296423; + + // aapt resource value: 0x7f0900a9 + public const int gd_tv_activity_title = 2131296425; + + // aapt resource value: 0x7f0900ae + public const int gd_tv_radius = 2131296430; + + // aapt resource value: 0x7f0900ac + public const int gd_tv_search_title = 2131296428; + + // aapt resource value: 0x7f0900a5 + public const int hdl_gallery_rootView = 2131296421; + + // aapt resource value: 0x7f0900a6 + public const int hdl_gallery_viewPager = 2131296422; + + // aapt resource value: 0x7f0900b9 + public const int hdl_options1 = 2131296441; + + // aapt resource value: 0x7f0900ba + public const int hdl_options2 = 2131296442; + + // aapt resource value: 0x7f0900bb + public const int hdl_options3 = 2131296443; + + // aapt resource value: 0x7f0900b8 + public const int hdl_pickerview_ll = 2131296440; // aapt resource value: 0x7f090005 public const int home = 2131296261; @@ -3309,14 +3330,14 @@ // aapt resource value: 0x7f090016 public const int homeAsUp = 2131296278; - // aapt resource value: 0x7f0900b9 - public const int hour = 2131296441; + // aapt resource value: 0x7f0900c4 + public const int hour = 2131296452; // aapt resource value: 0x7f09005f public const int icon = 2131296351; - // aapt resource value: 0x7f0900ce - public const int icon_group = 2131296462; + // aapt resource value: 0x7f0900d9 + public const int icon_group = 2131296473; // aapt resource value: 0x7f09002f public const int ifRoom = 2131296303; @@ -3324,8 +3345,8 @@ // aapt resource value: 0x7f09005c public const int image = 2131296348; - // aapt resource value: 0x7f0900ca - public const int info = 2131296458; + // aapt resource value: 0x7f0900d5 + public const int info = 2131296469; // aapt resource value: 0x7f09004e public const int italic = 2131296334; @@ -3333,8 +3354,8 @@ // aapt resource value: 0x7f090000 public const int item_touch_helper_previous_elevation = 2131296256; - // aapt resource value: 0x7f09008d - public const int largeLabel = 2131296397; + // aapt resource value: 0x7f090098 + public const int largeLabel = 2131296408; // aapt resource value: 0x7f09003e public const int left = 2131296318; @@ -3351,35 +3372,35 @@ // aapt resource value: 0x7f09005e public const int list_item = 2131296350; - // aapt resource value: 0x7f0900d8 - public const int masked = 2131296472; + // aapt resource value: 0x7f0900e3 + public const int masked = 2131296483; - // aapt resource value: 0x7f0900c3 - public const int media_actions = 2131296451; + // aapt resource value: 0x7f0900ce + public const int media_actions = 2131296462; - // aapt resource value: 0x7f0900d5 - public const int message = 2131296469; + // aapt resource value: 0x7f0900e0 + public const int message = 2131296480; // aapt resource value: 0x7f090026 public const int middle = 2131296294; - // aapt resource value: 0x7f0900ba - public const int min = 2131296442; + // aapt resource value: 0x7f0900c5 + public const int min = 2131296453; // aapt resource value: 0x7f090048 public const int mini = 2131296328; - // aapt resource value: 0x7f0900b7 - public const int month = 2131296439; + // aapt resource value: 0x7f0900c2 + public const int month = 2131296450; // aapt resource value: 0x7f09001c public const int multiply = 2131296284; - // aapt resource value: 0x7f0900bc - public const int myButton = 2131296444; + // aapt resource value: 0x7f0900c7 + public const int myButton = 2131296455; - // aapt resource value: 0x7f090094 - public const int navigation_header_container = 2131296404; + // aapt resource value: 0x7f09009f + public const int navigation_header_container = 2131296415; // aapt resource value: 0x7f090030 public const int never = 2131296304; @@ -3390,29 +3411,29 @@ // aapt resource value: 0x7f090013 public const int normal = 2131296275; - // aapt resource value: 0x7f0900cc - public const int notification_background = 2131296460; + // aapt resource value: 0x7f0900d7 + public const int notification_background = 2131296471; - // aapt resource value: 0x7f0900c6 - public const int notification_main_column = 2131296454; + // aapt resource value: 0x7f0900d1 + public const int notification_main_column = 2131296465; - // aapt resource value: 0x7f0900c5 - public const int notification_main_column_container = 2131296453; + // aapt resource value: 0x7f0900d0 + public const int notification_main_column_container = 2131296464; - // aapt resource value: 0x7f0900b2 - public const int options1 = 2131296434; + // aapt resource value: 0x7f0900bd + public const int options1 = 2131296445; - // aapt resource value: 0x7f0900b3 - public const int options2 = 2131296435; + // aapt resource value: 0x7f0900be + public const int options2 = 2131296446; - // aapt resource value: 0x7f0900b4 - public const int options3 = 2131296436; + // aapt resource value: 0x7f0900bf + public const int options3 = 2131296447; - // aapt resource value: 0x7f0900b1 - public const int optionspicker = 2131296433; + // aapt resource value: 0x7f0900bc + public const int optionspicker = 2131296444; - // aapt resource value: 0x7f0900ab - public const int outmost_container = 2131296427; + // aapt resource value: 0x7f0900b6 + public const int outmost_container = 2131296438; // aapt resource value: 0x7f090041 public const int parallax = 2131296321; @@ -3435,14 +3456,14 @@ // aapt resource value: 0x7f09003f public const int right = 2131296319; - // aapt resource value: 0x7f0900cb - public const int right_icon = 2131296459; + // aapt resource value: 0x7f0900d6 + public const int right_icon = 2131296470; - // aapt resource value: 0x7f0900c7 - public const int right_side = 2131296455; + // aapt resource value: 0x7f0900d2 + public const int right_side = 2131296466; - // aapt resource value: 0x7f0900a7 - public const int rv_topbar = 2131296423; + // aapt resource value: 0x7f0900b2 + public const int rv_topbar = 2131296434; // aapt resource value: 0x7f09001d public const int screen = 2131296285; @@ -3492,8 +3513,8 @@ // aapt resource value: 0x7f090086 public const int search_voice_btn = 2131296390; - // aapt resource value: 0x7f0900bb - public const int second = 2131296443; + // aapt resource value: 0x7f0900c6 + public const int second = 2131296454; // aapt resource value: 0x7f090087 public const int select_dialog_listview = 2131296391; @@ -3510,14 +3531,14 @@ // aapt resource value: 0x7f09001a public const int showTitle = 2131296282; - // aapt resource value: 0x7f09008c - public const int smallLabel = 2131296396; + // aapt resource value: 0x7f090097 + public const int smallLabel = 2131296407; - // aapt resource value: 0x7f090093 - public const int snackbar_action = 2131296403; + // aapt resource value: 0x7f09009e + public const int snackbar_action = 2131296414; - // aapt resource value: 0x7f090092 - public const int snackbar_text = 2131296402; + // aapt resource value: 0x7f09009d + public const int snackbar_text = 2131296413; // aapt resource value: 0x7f090038 public const int snap = 2131296312; @@ -3537,29 +3558,41 @@ // aapt resource value: 0x7f090020 public const int src_over = 2131296288; - // aapt resource value: 0x7f0900d0 - public const int srl_classics_arrow = 2131296464; + // aapt resource value: 0x7f0900db + public const int srl_classics_arrow = 2131296475; - // aapt resource value: 0x7f0900d3 - public const int srl_classics_center = 2131296467; + // aapt resource value: 0x7f0900de + public const int srl_classics_center = 2131296478; - // aapt resource value: 0x7f0900d2 - public const int srl_classics_progress = 2131296466; + // aapt resource value: 0x7f0900dd + public const int srl_classics_progress = 2131296477; - // aapt resource value: 0x7f0900d1 - public const int srl_classics_title = 2131296465; + // aapt resource value: 0x7f0900dc + public const int srl_classics_title = 2131296476; - // aapt resource value: 0x7f0900d4 - public const int srl_classics_update = 2131296468; + // aapt resource value: 0x7f0900df + public const int srl_classics_update = 2131296479; // aapt resource value: 0x7f090040 public const int start = 2131296320; - // aapt resource value: 0x7f09008b - public const int status = 2131296395; + // aapt resource value: 0x7f09008f + public const int startV1 = 2131296399; - // aapt resource value: 0x7f0900c2 - public const int status_bar_latest_event_content = 2131296450; + // aapt resource value: 0x7f090091 + public const int startV1V4 = 2131296401; + + // aapt resource value: 0x7f090090 + public const int startV4 = 2131296400; + + // aapt resource value: 0x7f090096 + public const int status = 2131296406; + + // aapt resource value: 0x7f0900cd + public const int status_bar_latest_event_content = 2131296461; + + // aapt resource value: 0x7f090092 + public const int stop = 2131296402; // aapt resource value: 0x7f090073 public const int submenuarrow = 2131296371; @@ -3567,8 +3600,8 @@ // aapt resource value: 0x7f090084 public const int submit_area = 2131296388; - // aapt resource value: 0x7f090088 - public const int subtitle = 2131296392; + // aapt resource value: 0x7f090093 + public const int subtitle = 2131296403; // aapt resource value: 0x7f090014 public const int tabMode = 2131296276; @@ -3585,8 +3618,8 @@ // aapt resource value: 0x7f090066 public const int textSpacerNoTitle = 2131296358; - // aapt resource value: 0x7f090099 - public const int text_input_password_toggle = 2131296409; + // aapt resource value: 0x7f0900a4 + public const int text_input_password_toggle = 2131296420; // aapt resource value: 0x7f09000a public const int textinput_counter = 2131296266; @@ -3594,11 +3627,11 @@ // aapt resource value: 0x7f09000b public const int textinput_error = 2131296267; - // aapt resource value: 0x7f0900c8 - public const int time = 2131296456; + // aapt resource value: 0x7f0900d3 + public const int time = 2131296467; - // aapt resource value: 0x7f0900b5 - public const int timepicker = 2131296437; + // aapt resource value: 0x7f0900c0 + public const int timepicker = 2131296448; // aapt resource value: 0x7f090011 public const int title = 2131296273; @@ -3615,11 +3648,11 @@ // aapt resource value: 0x7f09006b public const int topPanel = 2131296363; - // aapt resource value: 0x7f090090 - public const int touch_outside = 2131296400; + // aapt resource value: 0x7f09009b + public const int touch_outside = 2131296411; - // aapt resource value: 0x7f0900a9 - public const int tvTitle = 2131296425; + // aapt resource value: 0x7f0900b4 + public const int tvTitle = 2131296436; // aapt resource value: 0x7f090022 public const int uniform = 2131296290; @@ -3633,8 +3666,8 @@ // aapt resource value: 0x7f09000c public const int view_offset_helper = 2131296268; - // aapt resource value: 0x7f0900d7 - public const int visible = 2131296471; + // aapt resource value: 0x7f0900e2 + public const int visible = 2131296482; // aapt resource value: 0x7f090031 public const int withText = 2131296305; @@ -3642,8 +3675,8 @@ // aapt resource value: 0x7f090023 public const int wrap_content = 2131296291; - // aapt resource value: 0x7f0900b6 - public const int year = 2131296438; + // aapt resource value: 0x7f0900c1 + public const int year = 2131296449; static Id() { @@ -3786,151 +3819,154 @@ public const int abc_select_dialog_material = 2130968602; // aapt resource value: 0x7f04001b - public const int biometric_prompt_dialog_content = 2130968603; + public const int activity_elian = 2130968603; // aapt resource value: 0x7f04001c - public const int design_bottom_navigation_item = 2130968604; + public const int biometric_prompt_dialog_content = 2130968604; // aapt resource value: 0x7f04001d - public const int design_bottom_sheet_dialog = 2130968605; + public const int design_bottom_navigation_item = 2130968605; // aapt resource value: 0x7f04001e - public const int design_layout_snackbar = 2130968606; + public const int design_bottom_sheet_dialog = 2130968606; // aapt resource value: 0x7f04001f - public const int design_layout_snackbar_include = 2130968607; + public const int design_layout_snackbar = 2130968607; // aapt resource value: 0x7f040020 - public const int design_layout_tab_icon = 2130968608; + public const int design_layout_snackbar_include = 2130968608; // aapt resource value: 0x7f040021 - public const int design_layout_tab_text = 2130968609; + public const int design_layout_tab_icon = 2130968609; // aapt resource value: 0x7f040022 - public const int design_menu_item_action_area = 2130968610; + public const int design_layout_tab_text = 2130968610; // aapt resource value: 0x7f040023 - public const int design_navigation_item = 2130968611; + public const int design_menu_item_action_area = 2130968611; // aapt resource value: 0x7f040024 - public const int design_navigation_item_header = 2130968612; + public const int design_navigation_item = 2130968612; // aapt resource value: 0x7f040025 - public const int design_navigation_item_separator = 2130968613; + public const int design_navigation_item_header = 2130968613; // aapt resource value: 0x7f040026 - public const int design_navigation_item_subheader = 2130968614; + public const int design_navigation_item_separator = 2130968614; // aapt resource value: 0x7f040027 - public const int design_navigation_menu = 2130968615; + public const int design_navigation_item_subheader = 2130968615; // aapt resource value: 0x7f040028 - public const int design_navigation_menu_item = 2130968616; + public const int design_navigation_menu = 2130968616; // aapt resource value: 0x7f040029 - public const int design_text_input_password_icon = 2130968617; + public const int design_navigation_menu_item = 2130968617; // aapt resource value: 0x7f04002a - public const int hdl_gallery_banner_view_layout = 2130968618; + public const int design_text_input_password_icon = 2130968618; // aapt resource value: 0x7f04002b - public const int hdl_widget_activity_crop_image = 2130968619; + public const int hdl_gallery_banner_view_layout = 2130968619; // aapt resource value: 0x7f04002c - public const int hdl_widget_activity_geofence_round = 2130968620; + public const int hdl_widget_activity_crop_image = 2130968620; // aapt resource value: 0x7f04002d - public const int hdl_widget_air_button = 2130968621; + public const int hdl_widget_activity_geofence_round = 2130968621; // aapt resource value: 0x7f04002e - public const int hdl_widget_include_pickerview_topbar = 2130968622; + public const int hdl_widget_air_button = 2130968622; // aapt resource value: 0x7f04002f - public const int hdl_widget_layout_basepickerview = 2130968623; + public const int hdl_widget_include_pickerview_topbar = 2130968623; // aapt resource value: 0x7f040030 - public const int hdl_widget_pickerview = 2130968624; + public const int hdl_widget_layout_basepickerview = 2130968624; // aapt resource value: 0x7f040031 - public const int hdl_widget_pickerview_options = 2130968625; + public const int hdl_widget_pickerview = 2130968625; // aapt resource value: 0x7f040032 - public const int hdl_widget_pickerview_time = 2130968626; + public const int hdl_widget_pickerview_options = 2130968626; // aapt resource value: 0x7f040033 - public const int Main = 2130968627; + public const int hdl_widget_pickerview_time = 2130968627; // aapt resource value: 0x7f040034 - public const int notification_action = 2130968628; + public const int Main = 2130968628; // aapt resource value: 0x7f040035 - public const int notification_action_tombstone = 2130968629; + public const int notification_action = 2130968629; // aapt resource value: 0x7f040036 - public const int notification_media_action = 2130968630; + public const int notification_action_tombstone = 2130968630; // aapt resource value: 0x7f040037 - public const int notification_media_cancel_action = 2130968631; + public const int notification_media_action = 2130968631; // aapt resource value: 0x7f040038 - public const int notification_template_big_media = 2130968632; + public const int notification_media_cancel_action = 2130968632; // aapt resource value: 0x7f040039 - public const int notification_template_big_media_custom = 2130968633; + public const int notification_template_big_media = 2130968633; // aapt resource value: 0x7f04003a - public const int notification_template_big_media_narrow = 2130968634; + public const int notification_template_big_media_custom = 2130968634; // aapt resource value: 0x7f04003b - public const int notification_template_big_media_narrow_custom = 2130968635; + public const int notification_template_big_media_narrow = 2130968635; // aapt resource value: 0x7f04003c - public const int notification_template_custom_big = 2130968636; + public const int notification_template_big_media_narrow_custom = 2130968636; // aapt resource value: 0x7f04003d - public const int notification_template_icon_group = 2130968637; + public const int notification_template_custom_big = 2130968637; // aapt resource value: 0x7f04003e - public const int notification_template_lines_media = 2130968638; + public const int notification_template_icon_group = 2130968638; // aapt resource value: 0x7f04003f - public const int notification_template_media = 2130968639; + public const int notification_template_lines_media = 2130968639; // aapt resource value: 0x7f040040 - public const int notification_template_media_custom = 2130968640; + public const int notification_template_media = 2130968640; // aapt resource value: 0x7f040041 - public const int notification_template_part_chronometer = 2130968641; + public const int notification_template_media_custom = 2130968641; // aapt resource value: 0x7f040042 - public const int notification_template_part_time = 2130968642; + public const int notification_template_part_chronometer = 2130968642; // aapt resource value: 0x7f040043 - public const int select_dialog_item_material = 2130968643; + public const int notification_template_part_time = 2130968643; // aapt resource value: 0x7f040044 - public const int select_dialog_multichoice_material = 2130968644; + public const int select_dialog_item_material = 2130968644; // aapt resource value: 0x7f040045 - public const int select_dialog_singlechoice_material = 2130968645; + public const int select_dialog_multichoice_material = 2130968645; // aapt resource value: 0x7f040046 - public const int srl_classics_footer = 2130968646; + public const int select_dialog_singlechoice_material = 2130968646; // aapt resource value: 0x7f040047 - public const int srl_classics_header = 2130968647; + public const int srl_classics_footer = 2130968647; // aapt resource value: 0x7f040048 - public const int support_simple_spinner_dropdown_item = 2130968648; + public const int srl_classics_header = 2130968648; // aapt resource value: 0x7f040049 - public const int tooltip = 2130968649; + public const int support_simple_spinner_dropdown_item = 2130968649; // aapt resource value: 0x7f04004a - public const int zxingscanneractivitylayout = 2130968650; + public const int tooltip = 2130968650; // aapt resource value: 0x7f04004b - public const int zxingscannerfragmentlayout = 2130968651; + public const int zxingscanneractivitylayout = 2130968651; + + // aapt resource value: 0x7f04004c + public const int zxingscannerfragmentlayout = 2130968652; static Layout() { diff --git a/ZigbeeApp/Home.Ios/MainViewController.cs b/ZigbeeApp/Home.Ios/MainViewController.cs old mode 100755 new mode 100644 index cb67d11..151b277 --- a/ZigbeeApp/Home.Ios/MainViewController.cs +++ b/ZigbeeApp/Home.Ios/MainViewController.cs @@ -41,7 +41,10 @@ public override void ViewWillAppear(bool animated) { - UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.LightContent; + //椤堕儴淇℃伅鏍忓瓧浣撻鑹蹭负榛戣壊 + UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.Default; + //椤堕儴淇℃伅鏍忓瓧浣撻鑹蹭负鐧借壊 + //UIApplication.SharedApplication.StatusBarStyle = UIStatusBarStyle.LightContent; //base.ViewWillAppear(animated); } diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini index 6610a60..7977c50 100755 --- a/ZigbeeApp/Home.Ios/Resources/Language.ini +++ b/ZigbeeApp/Home.Ios/Resources/Language.ini @@ -669,11 +669,16 @@ 10157=缃戝叧涓嶅湪绾� 10160=宸叉槸鏈�鏂扮増鏈� -10161=鏇存柊 +10161=鏇存柊鏈�鏂扮増 10162=鏇存柊鍐呭 10163=鏇存柊澶辫触 -10164=鏇存柊涓�... +10164=姝e湪鏇存柊涓�... 10165=鍙栨秷鏇存柊 +10166=鐗堟湰鍙� +10167=鏈嶅姟鍗忚 +10168=鐗堟湰鏇存柊 +10169=鍗忚鏂囨湰淇℃伅鍐呭 +10170=鍙兘鐢变簬褰撳墠缃戠粶杈冨樊鎴栬澶囧凡琚粬浜虹粦瀹氥�倇\r\n}1.璇风‘淇濇墜鏈轰笌璁惧涔嬮棿鐨勮窛绂昏冻澶熻繎锛屽苟涓斿懆鍥寸綉缁滅幆澧冩病鏈夊己骞叉壈銆倇\r\n}2.鍚屾椂闇�纭搴旂敤鐨勫畾浣嶆潈闄愭湭琚叧闂�傝嫢鎵嬪姩鍏抽棴浜嗗簲鐢ㄥ畾浣嶆潈闄愬彲鑳藉鑷存棤娉曞彂鐜拌澶囥�倇\r\n}3.濡傛灉浠嶅缁堟棤娉曞彂鐜拌澶囷紝鍙兘鍥犱负璁惧宸茬粡琚粬浜虹粦瀹氫簡銆� 濡傛灉浣犲苟涓嶆竻妤氭槸璋佽繛鎺ヤ簡璁惧锛屽彲浠ヨ繘琛岄噸缃紝閲嶇疆鏂瑰紡璇� 鏌ラ槄璇存槑涔︼紝鏍规嵁鎸囧紩鎿嶄綔銆� @@ -1720,6 +1725,7 @@ 15997=3.绯荤粺鎸囩ず鐏笉鏄�1绉掗棯鐑�,妫�鏌ヨ矾鐢卞櫒鏄惁寮�鍚疍HCP鑷姩鍒嗛厤IP 15998=璇峰墠寰�浣忓畢绠$悊{0}璁剧疆浣忓畢鐨勫湴鐞嗕綅缃� 15999=鏈煡妤煎眰 +16000=濡傛灉涓嶈缃綇瀹呯殑鍦扮悊浣嶇疆,鍒欎細褰卞搷鑷姩鍖栧湴鐞嗗洿鏍忓姛鑳界殑璁剧疆 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹� diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Item/Switch.png b/ZigbeeApp/Home.Ios/Resources/Phone/Item/Switch.png index 39f3349..f8b5b97 100755 --- a/ZigbeeApp/Home.Ios/Resources/Phone/Item/Switch.png +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Item/Switch.png Binary files differ diff --git a/ZigbeeApp/Home.Ios/Resources/Phone/Item/SwitchSelected.png b/ZigbeeApp/Home.Ios/Resources/Phone/Item/SwitchSelected.png index c5a8f2e..050c35f 100755 --- a/ZigbeeApp/Home.Ios/Resources/Phone/Item/SwitchSelected.png +++ b/ZigbeeApp/Home.Ios/Resources/Phone/Item/SwitchSelected.png Binary files differ diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs index 6e16115..e9bbe31 100755 --- a/ZigbeeApp/Shared/Common/CommonPage.cs +++ b/ZigbeeApp/Shared/Common/CommonPage.cs @@ -168,10 +168,7 @@ /// 鐢ㄤ簬楠岃瘉閭姝e垯琛ㄨ揪寮� /// </summary> public static string EmailRegexStr = "^\\s*([A-Za-z0-9_-]+(\\.\\w+)*@(\\w+\\.)+\\w{2,5})\\s*$"; - /// <summary> - /// 涓嬭浇瀹夊崜apk鐨刡yte闀垮害 - /// </summary> - public static long ApkBytesTotalLength = 0; + //public static Encoding EncodingUTF8 = Encoding.UTF8; //public static Encoding EncodingGB2312 = Encoding.GetEncoding("gb2312"); @@ -332,152 +329,7 @@ return null; } } -#if iOS - /// <summary> - /// 鑾峰彇iOS-APP鐗堟湰淇℃伅 - /// </summary> - /// <returns>The https app version async.</returns> - public async System.Threading.Tasks.Task<ResponseEntity.ResultPack> RequestHttpsiOSAppVersionAsync() - { - try - { - var webClient = new WebClient { }; - var result = await webClient.DownloadDataTaskAsync("https://itunes.apple.com/lookup?id=1461693569"); - if (result == null) - { - return null; - } - return Newtonsoft.Json.JsonConvert.DeserializeObject<ResponseEntity.ResultPack>(Encoding.UTF8.GetString(result)); - } - catch - { - return null; - } - } - /// <summary> - /// 璺宠浆鍒癆PP Store - /// </summary> - public void OpenUrl() - { - Uri url = new Uri("https://itunes.apple.com/cn/app/hdl-home/id1461693569?mt=8"); - UIKit.UIApplication.SharedApplication.OpenUrl(url); - } -#elif Android - /// <summary> - /// 鑾峰彇 Android-APP 鐗堟湰淇℃伅 - /// </summary> - /// <returns>The https app version async.</returns> - public async System.Threading.Tasks.Task<ResponseEntity.ApkInfoOBJ> RequestHttpsAndroidAppVersionAsync() - { - try - { - var requestOBJ = new SendDataToServer.GetAndroidApkInfoOBJ - { - Name = "ZigbeeApp", - RequestVersion = CodeIDString - }; - var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestOBJ); - var result = await RequestHttpsZigbeeAsync("FirmwareMana/DetectionPlatformUploadFirmware", System.Text.Encoding.UTF8.GetBytes(requestJson)); - if (result == null) - { - return null; - } - if (result.StateCode.ToUpper() == "SUCCESS") - { - if (result.ResponseData == null) - { - return null; - } - var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<ResponseEntity.ApkInfoRes>(result.ResponseData.ToString()); - if (responeData == null || responeData.pageData == null || responeData.pageData.Count == 0) - { - return null; - } - int MaxIndex = 0; - int NewVersion = 0; - for (int i = 0; i < responeData.pageData.Count; i++) - { - var apkInfo = responeData.pageData[i]; - var version = int.Parse(apkInfo.FirmwareVersion.Replace(".", "")); - if (version > NewVersion) - { - NewVersion = version; - MaxIndex = i; - } - } - return responeData.pageData[MaxIndex]; - } - return null; - } - catch (Exception ex) - { - return null; - } - } - - /// <summary> - /// 涓嬭浇瀹夎apk - /// </summary> - /// <returns>The load apk async.</returns> - /// <param name="requestUrl">璇锋眰閾炬帴</param> - /// <param name="byteData">璇锋眰鍙傛暟</param> - public System.Threading.Tasks.Task<byte[]> DownLoadApkAsync(string requestUrl, byte[] byteData) - { - try - { - AbountForm.instance.webClient.Headers.Add(HttpRequestHeader.ContentType, "application/json"); - AbountForm.instance.webClient.Headers.Add(HttpRequestHeader.Authorization, Config.Instance.Token); - AbountForm.instance.webClient.UploadProgressChanged += Client_DownloadProgressChanged; - AbountForm.instance.webClient.UploadDataCompleted += Client_UploadCompleted; - var result = AbountForm.instance.webClient.UploadDataTaskAsync($"{RequestHttpsHost}/{requestUrl}", "POST", byteData); - if (result == null) - { - return null; - } - return result; - } - catch (Exception ex) - { - return null; - } - finally - { - } - } - /// <summary> - /// apk涓嬭浇杩涘害 - /// </summary> - /// <param name="sender">Sender.</param> - /// <param name="e">E.</param> - void Client_DownloadProgressChanged(object sender, UploadProgressChangedEventArgs e) - { - System.Console.WriteLine($"褰撳墠杩涘害--{(int)(e.BytesReceived / (float)ApkBytesTotalLength * 100)} % --BytesReceived--{e.BytesReceived}--totalByte{e.TotalBytesToReceive}"); - if (e.BytesReceived <= ApkBytesTotalLength) - { - Application.RunOnMainThread(() => - { - //Loading.Start($"{(int)(e.BytesReceived / (float)ApkBytesTotalLength * 100)} %"); - AbountForm.instance.seekBar.Progress = (int)(e.BytesReceived / (float)ApkBytesTotalLength * 100); - AbountForm.instance.seekBarTitle.Text = $"{(int)(e.BytesReceived / (float)ApkBytesTotalLength * 100)}%"; - }); - } - } - void Client_UploadCompleted(object sender, UploadDataCompletedEventArgs e) - { - System.Console.WriteLine("涓嬭浇apk瀹屾垚"); - //Application.RunOnMainThread(Loading.Hide); - } - /// <summary> - /// 鍙栨秷涓嬭浇apk - /// </summary> - public static void CancelDownLoadApkAsync() - { - AbountForm.instance.webClient?.CancelAsync(); - System.Console.WriteLine("鍙栨秷涓嬭浇apk"); - } - -#endif /// <summary> /// 鏈嶅姟鍣ㄨ幏鍙栨暟鎹け璐ユ彁绀� /// </summary> diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs index 8dfbe3b..c8ace0a 100755 --- a/ZigbeeApp/Shared/Common/Device.cs +++ b/ZigbeeApp/Shared/Common/Device.cs @@ -72,6 +72,10 @@ /// </summary> private Dictionary<string, string> dicDeviceModelIdChanged = null; /// <summary> + /// 鍥剧墖鍏辨湁(keys:鎸囧畾璁惧鐨勫叿浣撶被鍨� value:鎸囧畾鍏辨湁瀵硅薄鐨勫叿浣撶被鍨�) + /// </summary> + private Dictionary<string, string> dicPictrueShard = null; + /// <summary> /// 鏈湴鎵�鏈夎澶囩殑缂撳瓨(闈炲叕寮�) /// </summary> private Dictionary<string, CommonDevice> dicAllDevice = new Dictionary<string, CommonDevice>(); @@ -1039,6 +1043,13 @@ //鑾峰彇瀹冨睘浜庝粈涔堢被鍨嬬殑璁惧 var myDeviceType = this.GetMyDeviceEnumInfo(listdevice); string strConcrete = Enum.GetName(typeof(DeviceConcreteType), myDeviceType.ConcreteType); + + //鍥剧墖鍏辨湁 + if (this.dicPictrueShard.ContainsKey(strConcrete) == true) + { + strConcrete = this.dicPictrueShard[strConcrete]; + } + string strType = strConcrete.Replace("_", string.Empty); //灏嗙被鍨嬭浆涓哄浘鐗囧湴鍧� string imageFilePath = "RealDevice/" + strType + ".png"; @@ -1111,6 +1122,12 @@ { //灏嗗叿浣撶被鍨嬭浆瀛楃涓� string strSpecific = Enum.GetName(typeof(DeviceConcreteType), specificType); + //鍥剧墖鍏辨湁 + if (this.dicPictrueShard.ContainsKey(strSpecific) == true) + { + strSpecific = this.dicPictrueShard[strSpecific]; + } + string strType = strSpecific.Replace("_", string.Empty); //灏嗙被鍨嬭浆涓哄浘鐗囧湴鍧� string imageFilePath = "Device/" + strType + ".png"; @@ -2097,6 +2114,12 @@ this.dicDeviceModelIdChanged["MULTI-MOTI--EA04"] = "MSPIR01/M-ZB.10";//绾㈠浼犳劅鍣� this.dicDeviceModelIdChanged["MULTI-WATE--EA02"] = "MSW01/M-ZB.10";//姘存蹈浼犳劅鍣� this.dicDeviceModelIdChanged["MULTI-BURO--EA06"] = "MBU01/M-ZB.10";//绱ф�ユ寜閿� + + //闇�瑕佸叡鏈夌殑鍥剧墖瀵硅薄 + this.dicPictrueShard = new Dictionary<string, string>(); + this.dicPictrueShard["ButtonPanel_SimpleFour"] = "ButtonPanel_Four";//绠�绾�4鎸夐敭闈㈡澘 娌跨敤 4鎸夐敭鐨勫浘鏍� + this.dicPictrueShard["ButtonPanel_SimpleThree"] = "ButtonPanel_Three";//绠�绾�3鎸夐敭闈㈡澘 娌跨敤 3鎸夐敭鐨勫浘鏍� + this.dicPictrueShard["ButtonPanel_SimpleTwo"] = "ButtonPanel_Two";//绠�绾�2鎸夐敭闈㈡澘 娌跨敤 2鎸夐敭鐨勫浘鏍� } #endregion diff --git a/ZigbeeApp/Shared/Common/Room.cs b/ZigbeeApp/Shared/Common/Room.cs index 65f8a03..9f1c2a6 100755 --- a/ZigbeeApp/Shared/Common/Room.cs +++ b/ZigbeeApp/Shared/Common/Room.cs @@ -891,6 +891,9 @@ room.Save(); //鏇存敼鑷姩澶囦唤 HdlAutoBackupLogic.AddOrEditorFile(room.FileName); + + //閫掑綊锛氬垹闄ゆ帀浠ュ墠鐨勬棫鏁版嵁瀵艰嚧鐨勫涓埧闂寸殑闂 + this.DeleteDevice(device); } #endregion diff --git a/ZigbeeApp/Shared/Common/SendDataToServer.cs b/ZigbeeApp/Shared/Common/SendDataToServer.cs index afce452..eb8c976 100755 --- a/ZigbeeApp/Shared/Common/SendDataToServer.cs +++ b/ZigbeeApp/Shared/Common/SendDataToServer.cs @@ -578,5 +578,23 @@ public string DeviceType; } #endregion + + #region 瀹氭椂涓婁紶瀹炴椂GPS淇℃伅 + /// <summary> + /// 瀹氭椂涓婁紶瀹炴椂GPS淇℃伅 + /// </summary> + public class ReceiveAppLatAndLonObj + { + /// <summary> + /// 缁忓害 + /// </summary> + public string Latitude; + /// <summary> + /// 绾害 + /// </summary> + public string Longitude; + } + #endregion + } } diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs index 2e2d466..9d5bd88 100755 --- a/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs +++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountForgetPWD.cs @@ -172,6 +172,7 @@ { phoneEmailForm.SelectedPhone.IsSelected = phoneEmailForm.SelectedEmail.IsSelected = false; resetBtn.Enable = resetBtn.IsSelected = false; + errorBtn.Text = string.Empty; (sender as Button).IsSelected = true; if ((sender as Button).Tag.ToString() == "Phone") { diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogic.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogic.cs index 534233a..97aaec9 100755 --- a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogic.cs +++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogic.cs @@ -1,4 +1,5 @@ 锘縰sing System; +using System.Text; using System.Text.RegularExpressions; using Shared.Common; @@ -97,5 +98,89 @@ } #endregion + + #region 鈼� 缁忕含搴_________________________ + /// <summary> + /// ReceiveAppLatAndLon + /// </summary> + /// <param name="lat"></param> + /// <param name="lon"></param> + public async void ReceiveAppLatAndLon(string lat, string lon) + { + try + { + var requestObj = new SendDataToServer.ReceiveAppLatAndLonObj + { + Latitude = lat, + Longitude = lon + }; + var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); + var revertObj = await RequestHttpsZigbeeAsync("ProcessRange/ReceiveAppLatAndLon", System.Text.Encoding.UTF8.GetBytes(requestJson)); + //if (revertObj.StateCode.ToUpper() == "SUCCESS") + //{ + // System.Console.WriteLine("涓婁紶浣嶇疆鎴愬姛" + lat + lon); + //} + } + catch { } + } + + /// <summary> + /// 璇锋眰鏈嶅姟鍣ㄦ柟娉� + /// 鎸囧畾涓�涓猆rl,鍜岃姹傛柟娉曪紝鏁版嵁锛孋ookie锛屽緱鍒板搷搴旂殑鏁版嵁 + /// </summary> + /// <param name="requestUrl">璇锋眰Url</param> + /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param> + /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns> + public async System.Threading.Tasks.Task<Shared.Common.ResponseEntity.ResponsePack> RequestHttpsZigbeeAsync(string requestUrl, byte[] byteData) + { + string result = await RequestHttpsZigbeeResultAsync(requestUrl, byteData); + if (result != null) + { + try + { + var data = Newtonsoft.Json.JsonConvert.DeserializeObject<Shared.Common.ResponseEntity.ResponsePack>(result); + return data; + } + catch (Exception ex) + { + System.Console.WriteLine(ex.Message); + } + } + return null; + } + + /// <summary> + /// 璇锋眰鏈嶅姟鍣ㄦ柟娉� + /// 鎸囧畾涓�涓猆rl,鍜岃姹傛柟娉曪紝鏁版嵁锛孋ookie锛屽緱鍒板搷搴旂殑鏁版嵁 + /// </summary> + /// <param name="requestUrl">璇锋眰Url</param> + /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param> + /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns> + public async System.Threading.Tasks.Task<string> RequestHttpsZigbeeResultAsync(string requestUrl, byte[] byteData) + { + var result = await RequestHttpsZigbeeBytesResultAsync(requestUrl, byteData); + if (result != null) + { + return Encoding.UTF8.GetString(result); + } + return null; + } + + /// <summary> + /// 璇锋眰鏈嶅姟鍣ㄦ柟娉� + /// 鎸囧畾涓�涓猆rl,鍜岃姹傛柟娉曪紝鏁版嵁锛孋ookie锛屽緱鍒板搷搴旂殑鏁版嵁 + /// </summary> + /// <param name="requestUrl">璇锋眰Url</param> + /// <param name="byteData">璇锋眰鐨勭殑鏁版嵁</param> + /// <param name="requestMethod">POST 鎴栬�� GET 绛夌瓑</param> + /// <returns>寰楀埌鍝嶅簲鐨勬暟鎹�</returns> + public async System.Threading.Tasks.Task<byte[]> RequestHttpsZigbeeBytesResultAsync(string requestUrl, byte[] byteData, string requestMethod = "POST") + { + //璇锋眰Url鐨勫畬鎴愯矾寰� + var fullUrl = $"{CommonPage.RequestHttpsHost}/{requestUrl}"; + return await CommonPage.Instance.DoRequestZigbeeHttpsInterface(fullUrl, byteData, Config.Instance.LoginToken, requestMethod); + } + + #endregion } } diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs index 0316b32..54e7481 100755 --- a/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs +++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountLogin.cs @@ -387,6 +387,7 @@ Config.Instance.MD5PWD = revertData.MD5PWD; Config.Instance.Guid = revertData.Guid; Config.Instance.LoginDateTime = DateTime.Now; + Config.Instance.LoginToken = revertData.Token; if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) { Config.Instance.AccountList.Add(revertData.Account); @@ -572,7 +573,7 @@ { IsBackground = true }.Start(); } }; - //} + //} //}; #endif diff --git a/ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs b/ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs index b5a99bb..88083b4 100755 --- a/ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs +++ b/ZigbeeApp/Shared/Phone/Device/Account/AccountLoginByCode.cs @@ -311,6 +311,7 @@ Config.Instance.Guid = revertData.Guid; Config.Instance.MD5PWD = revertData.MD5PWD; Config.Instance.LoginDateTime = DateTime.Now; + Config.Instance.LoginToken = revertData.Token; if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) { Config.Instance.AccountList.Add(revertData.Account); diff --git a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs index 4860b66..078d1c6 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/Category.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/Category.cs @@ -485,8 +485,9 @@ Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterLeft, TextID = R.MyInternationalizationString.Category, - TextSize = 20, + TextSize = 24, TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor, + IsBold=true }; topView.AddChidren(title); diff --git a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs index b0c2487..9736448 100755 --- a/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs +++ b/ZigbeeApp/Shared/Phone/Device/Category/CategoryAddScene.cs @@ -250,8 +250,17 @@ }; } } + } - + if (sceneTargetDevicesList.Count > 2) + { + var targetRowLayout = new RowLayout() + { + Height = Application.GetRealHeight(300), + LineColor = ZigbeeColor.Current.GXCBackgroundColor, + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + }; + TargetListScrolView.AddChidren(targetRowLayout); } } } @@ -670,15 +679,18 @@ EventHandler<MouseEventArgs> targetAddHander = (sender, e) => { - if (curRoom == null) + //if (curRoom == null) + //{ + // RoomCommon.ShowTipNoRoom(); + // return; + //} + if(curRoom != null) { - RoomCommon.ShowTipNoRoom(); - return; - } - if (curRoom.IsSharedRoom) - { - RoomCommon.ShowTipRoomIsShared(); - return; + if (curRoom.IsSharedRoom) + { + RoomCommon.ShowTipRoomIsShared(); + return; + } } int selectRow_Height = 150; @@ -1115,7 +1127,6 @@ } } - }; #endregion diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs index ec4ead2..fc27ca5 100755 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/ButtonLineForm.cs @@ -101,6 +101,7 @@ { NameBtn.IsSelected = Line.IsSelected = statu; NameBtn.TextSize = statu ? CommonFormResouce.TextSize_Selected : CommonFormResouce.TextSize; + NameBtn.IsBold = statu; } } } diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs index 74c4422..ff40bd5 100755 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/DeviceInfoRow.cs @@ -54,7 +54,7 @@ NameText = new Button { - X = Application.GetRealWidth(300), + X = Application.GetRealWidth(350), Width = Application.GetRealWidth(600), Height = Application.GetRealHeight(80), Gravity = Gravity.CenterVertical, @@ -106,6 +106,15 @@ SetTitle(Language.StringByID(title)); } + /// <summary> + /// SetTitleColor + /// </summary> + /// <param name="color"></param> + public void SetTitleColor(uint color) + { + NameText.TextColor = color; + } + /// <summary> /// SetName @@ -135,12 +144,21 @@ } /// <summary> - /// + /// HideNext /// </summary> /// <param name="hiden"></param> public void HideNext(bool hiden) { NextBtn.Visible = !hiden; } + + /// <summary> + /// CanClick + /// </summary> + /// <param name="canClick"></param> + public void CanClick(bool canClick) + { + ClickBtn.Enable = canClick; + } } } diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs old mode 100644 new mode 100755 index 6a5a053..62e5abc --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneMainView.cs @@ -131,7 +131,7 @@ CollectButton = new Button { - X = Application.GetMinRealAverage(340), + X = Application.GetMinRealAverage(350), Y = Application.GetMinRealAverage(1), Width = Application.GetMinRealAverage(107), Height = Application.GetMinRealAverage(107), diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetFunctionRow.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetFunctionRow.cs index 34e6352..8b99cb5 100755 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetFunctionRow.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/SceneTargetFunctionRow.cs @@ -54,7 +54,7 @@ { X = Application.GetRealWidth(219), Y = Application.GetRealHeight(14), - Width = Application.GetRealWidth(300), + Width = Application.GetRealWidth(500), Height = Application.GetRealHeight(58), TextColor = ZigbeeColor.Current.GXCTextBlackColor, TextAlignment = TextAlignment.CenterLeft, diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs index 4227c91..f5d0bda 100755 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/TopFrameLayout.cs @@ -118,13 +118,15 @@ { topTitle = new Button { - X=Application.GetRealWidth(164), + X = Application.GetRealWidth(164), Height = Application.GetRealHeight(CommonFormResouce.TopFrameLayout_Height - CommonFormResouce.TopStatuFrameLayout_Height), Width = Application.GetRealWidth(CommonFormResouce.TopTitle_Width), TextSize = CommonFormResouce.TopTitle_TextSize, TextColor = ZigbeeColor.Current.GXCTitleBlackTitle, - TextAlignment=TextAlignment.CenterLeft + TextAlignment = TextAlignment.CenterLeft, + IsBold = true, }; + topView.AddChidren(topTitle); } /// <summary> diff --git a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs index b367168..a476c9b 100755 --- a/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs +++ b/ZigbeeApp/Shared/Phone/Device/Room/RoomManagement.cs @@ -183,8 +183,7 @@ private void ShowUnallocatedRoom_MouseUpEvent(object sender,MouseEventArgs mouseEventArgs) { var unalloctedRoom = new UnallocatedRoom(); - HomePage.Instance.AddChidren(unalloctedRoom); - HomePage.Instance.PageIndex += 1; + AddChidren(unalloctedRoom); unalloctedRoom.Show(); } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs old mode 100755 new mode 100644 index 824b65f..e2faa2d --- a/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Abount/AbountForm.cs @@ -12,46 +12,40 @@ /// </summary> public class AbountForm : EditorCommonForm { - #region **鍙橀噺***************************** + #region 鈼� 鍙橀噺____________________________ /// <summary> /// 鏄惁姝e湪鏇存柊涓� /// </summary> - public bool isUpdating=false; + public bool isUpdating; /// <summary> /// The web client. /// </summary> public WebClient webClient=new WebClient { }; /// <summary> - /// 杩涘害鏉� - /// </summary> - public HorizontalSeekBar seekBar; - /// <summary> - /// 杩涘害鐧惧垎姣� - /// </summary> - public Button seekBarTitle; - /// <summary> - /// 鍙栨秷涓嬭浇鎸夐挳 - /// </summary> - public Button cancelDownLoadBtn; - /// <summary> - /// 鏇存柊鎸夐挳 - /// </summary> - public Button updateBtn; - /// <summary> /// 鏇存柊涓� /// </summary> public Button updatingBtn; /// <summary> - /// The instance. + /// distributedMark /// </summary> - public static AbountForm instance; + public string distributedMark; + /// <summary> + /// updateRow + /// </summary> + public DeviceInfoRow updateRow; + /// <summary> + /// 涓嬭浇瀹夊崜apk鐨刡yte闀垮害 + /// </summary> + public long ApkBytesTotalLength = 0; + #endregion + /// <summary> /// Initializes a new instance of the <see cref="T:Shared.Phone.UserCenter.Abount.AbountForm"/> class. /// </summary> public AbountForm() { - instance = this; + } /// <summary> /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) @@ -59,7 +53,7 @@ public void ShowForm() { //璁剧疆鏍囬淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uVersionInformation)); + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAboutMe)); //鍒濆鍖栦腑閮ㄦ帶浠� this.InitMiddleFrame(); } @@ -69,30 +63,28 @@ public override void CloseFormBefore() { #if Android - if(isUpdating==true) - { - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.CancelUpdating), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim)); - alert.Show(); - alert.ResultEventHandler += (send, e) => - { - if (e) - { - updateBtn.Visible = true; + //if (isUpdating == true) + //{ + //var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.CancelUpdating), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim)); + //alert.Show(); + //alert.ResultEventHandler += (send, e) => + //{ + // if (e) + // { SetDownLoadBtnNoVisible(); - CommonPage.CancelDownLoadApkAsync(); + CancelDownLoadApkAsync(); base.CloseFormBefore(); - } - else - { - return; - } - }; - } - else - { - Phone.UserView.HomePage.Instance.ScrollEnabled = true; - base.CloseFormBefore(); - } + //} + // else + // { + // return; + // } + // }; + //} + //else + //{ + // base.CloseFormBefore(); + //} #elif iOS base.CloseFormBefore(); #endif @@ -102,288 +94,290 @@ /// </summary> private void InitMiddleFrame() { + bodyFrameLayout.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor; + var logoFrameLayout = new FrameLayout + { + Height = Application.GetRealHeight(484), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor + }; + bodyFrameLayout.AddChidren(logoFrameLayout); + + var logoBackground = new FrameLayout + { + Y = Application.GetRealHeight(104), + Width = Application.GetMinRealAverage(167), + Height = Application.GetMinRealAverage(167), + Gravity = Gravity.CenterHorizontal, + BackgroundColor = ZigbeeColor.Current.GXCButtonBlackSelectedColor, + Radius = (uint)Application.GetRealHeight(37), + }; + logoFrameLayout.AddChidren(logoBackground); + var logoBtn = new Button() { - Width = Application.GetMinRealAverage(270), - Height = Application.GetMinRealAverage(270), - Y = Application.GetRealHeight(100), - UnSelectedImagePath = "Logo/Logo.png", - Gravity = Gravity.CenterHorizontal + Width = Application.GetMinRealAverage(144), + Height = Application.GetMinRealAverage(144), + UnSelectedImagePath = "Account/Logo_White.png", + Gravity = Gravity.Center }; - bodyFrameLayout.AddChidren(logoBtn); + logoBackground.AddChidren(logoBtn); var nameBtn = new Button() { - Width = Application.GetMinRealAverage(700), - Height = Application.GetMinRealAverage(100), - Y = Application.GetRealHeight(100)+logoBtn.Bottom, + Y = Application.GetRealHeight(294), + Width = Application.GetRealWidth(700), + Height = Application.GetRealHeight(60), Gravity = Gravity.CenterHorizontal, - Text="HDL Home", - TextSize=20, - TextColor=ZigbeeColor.Current.GXCTextBlackColor + Text = "HDL Home", + TextSize = 15, + TextColor = ZigbeeColor.Current.GXCTextDeepBlackColor }; - bodyFrameLayout.AddChidren(nameBtn); + logoFrameLayout.AddChidren(nameBtn); var versionBtn = new Button() { - Width = Application.GetMinRealAverage(700), - Height = Application.GetMinRealAverage(100), - Y = Application.GetRealHeight(10) + nameBtn.Bottom, + Y = Application.GetRealHeight(366), + Width = Application.GetRealWidth(700), + Height = Application.GetRealHeight(50), Gravity = Gravity.CenterHorizontal, - Text = $"v{CommonPage.CodeIDString}", - TextSize = 14, - TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor + Text = $"{Language.StringByID(R.MyInternationalizationString.VersionCode)} {CommonPage.CodeIDString}", + TextSize = 12, + TextColor = ZigbeeColor.Current.GXCTextGrayColor }; - bodyFrameLayout.AddChidren(versionBtn); + logoFrameLayout.AddChidren(versionBtn); - updateBtn = new Button() + + var versionFL = new FrameLayout { - Y= Application.GetRealHeight(50)+versionBtn.Bottom, - Width = Application.GetMinRealAverage(700), - Gravity = Gravity.CenterHorizontal, - Height =Application.GetRealHeight(Shared.Common.CommonPage.ButtonHeight), - TextID=R.MyInternationalizationString.Update, - TextColor=ZigbeeColor.Current.GXCTextBlueColor + Y = Application.GetRealHeight(510), + Height = Application.GetRealHeight(300), + BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor }; - bodyFrameLayout.AddChidren(updateBtn); - updateBtn.MouseUpEventHandler += GetVersion; + bodyFrameLayout.AddChidren(versionFL); - seekBar = new HorizontalSeekBar() + var SLARow = new DeviceInfoRow(12); + SLARow.Init(); + SLARow.SetTipTitle(R.MyInternationalizationString.SLA); + SLARow.NameText.TextAlignment = TextAlignment.CenterRight; + versionFL.AddChidren(SLARow); + SLARow.ClickBtn.MouseUpEventHandler += (sender, e) => { - Y = updateBtn.Bottom + Application.GetRealHeight(50), - Width = Application.GetRealWidth(750), - Height = Application.GetRealHeight(80), - Gravity = Gravity.CenterHorizontal, - BackgroundColor = ZigbeeColor.Current.GXCSliderUnSelectedColor, - ThumbColor = 0x00000000, - ProgressColor = ZigbeeColor.Current.GXCButtonBlueColor, - Max = 100, - Progress = 0, - IsCanScrolled=false, - IsCanMove=false + var slaForm = new SLAForm(); + slaForm.AddForm(); }; - bodyFrameLayout.AddChidren(seekBar); - seekBarTitle = new Button() + updateRow = new DeviceInfoRow(12 + 127 + 12); + updateRow.Init(); + updateRow.SetTipTitle(R.MyInternationalizationString.UpdateVersion); + updateRow.NameText.TextAlignment = TextAlignment.CenterRight; + updateRow.HideLine(true); + updateRow.SetTitle(R.MyInternationalizationString.TheAppVersionIsNewest); + updateRow.CanClick(false); + updateRow.SetTitleColor(ZigbeeColor.Current.GXCTextGrayColor); + versionFL.AddChidren(updateRow); + updateRow.ClickBtn.MouseUpEventHandler += (sender, e) => { - Y = updateBtn.Bottom + Application.GetRealHeight(50), - X= seekBar.Right+Application.GetRealWidth(10), - Width = Application.GetRealWidth(150), - Height = Application.GetRealHeight(80), - Text = $"{seekBar.Progress}%", - TextAlignment=TextAlignment.CenterLeft, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, + UpdateVersion(); }; - bodyFrameLayout.AddChidren(seekBarTitle); + updatingBtn = new Button() { - Y = seekBar.Bottom + Application.GetRealHeight(20), - Width = Application.GetRealWidth(300), - Height = Application.GetRealHeight(80), - TextID= R.MyInternationalizationString.Updating, - TextAlignment = TextAlignment.Center, - TextColor = ZigbeeColor.Current.GXCTextBlackColor, + Y = Application.GetRealHeight(994), + Width = Application.GetRealWidth(556), + Height = Application.GetRealHeight(106), + Radius=(uint)Application.GetRealHeight(53), + BackgroundColor=ZigbeeColor.Current.GXCDailogBackGroundColor, + TextID = R.MyInternationalizationString.Updating, + TextSize=15, + TextColor = ZigbeeColor.Current.GXCTextWhiteColor, Gravity=Gravity.CenterHorizontal }; bodyFrameLayout.AddChidren(updatingBtn); - cancelDownLoadBtn = new Button() - { - TextID = R.MyInternationalizationString.Cancel, - TextColor = ZigbeeColor.Current.GXCTextBlueColor, - Height = Application.GetRealHeight(80), - Width = Application.GetRealWidth(500), - Gravity = Gravity.CenterHorizontal, - Y = updatingBtn.Bottom + Application.GetRealHeight(500) - }; - bodyFrameLayout.AddChidren(cancelDownLoadBtn); -#if Android - cancelDownLoadBtn.MouseUpEventHandler += CancelDownLoadApk; -#endif + SetDownLoadBtnNoVisible(); + CheckVersion(); + } + + /// <summary> + /// CheckVersion + /// </summary> + private void CheckVersion() + { + new System.Threading.Thread(async () => + { + var re = await CanUpdateAsync(); + if (re) + { + Application.RunOnMainThread(() => + { + updateRow.CanClick(true); + updateRow.SetTitleColor(ZigbeeColor.Current.GXCButtonSelectedColor); + updateRow.SetTitle(R.MyInternationalizationString.Update); + }); + } + }) + { IsBackground = true }.Start(); + } /// <summary> /// 璁剧疆杩涘害鎺т欢涓嶅彲瑙� /// </summary> - public void SetDownLoadBtnNoVisible() + private void SetDownLoadBtnNoVisible() { - Phone.UserView.HomePage.Instance.ScrollEnabled = true; isUpdating = false; - updateBtn.Visible = true; - seekBar.Visible = seekBarTitle.Visible = cancelDownLoadBtn.Visible = updatingBtn.Visible = false; + updatingBtn.Visible = false; } /// <summary> /// 璁剧疆杩涘害鎺т欢鍙 /// </summary> - public void SetDownLoadBtnVisible() + private void SetDownLoadBtnVisible() { - Phone.UserView.HomePage.Instance.ScrollEnabled = false; isUpdating = true; - updateBtn.Visible = false; - seekBar.Visible = seekBarTitle.Visible = cancelDownLoadBtn.Visible = updatingBtn.Visible = true; + updatingBtn.Visible = true; + updateRow.CanClick(false); } + /// <summary> - /// Gets the version. + /// 妫�鏌ョ増鏈� /// </summary> - /// <param name="sender">Sender.</param> - /// <param name="e">E.</param> - private async void GetVersion(object sender, MouseEventArgs e) + /// <returns></returns> + private async System.Threading.Tasks.Task<bool> CanUpdateAsync() { #if iOS - try - { - CommonPage.Loading.Start(); - var versionResult = await Shared.Common.CommonPage.Instance.RequestHttpsiOSAppVersionAsync(); - if (versionResult == null || versionResult.Results == null) - { - CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail); - return; - } - var results = Newtonsoft.Json.Linq.JArray.Parse(versionResult.Results.ToString()); - if (results[0] == null) - { - CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail); - return; - } - var newVersion = results[0]["version"]?.ToString(); - var updateContent = results[0]["releaseNotes"]?.ToString(); - if (newVersion != CommonPage.CodeIDString) - { - Application.RunOnMainThread(() => - { - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.UpdateContent), updateContent, Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim)); - alert.Show(); - alert.ResultEventHandler += (sender1, e1) => - { - if (e1) - { - CommonPage.Instance.OpenUrl(); - } - }; - }); - } - else - { - Application.RunOnMainThread(() => - { - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TheAppVersionIsNewest), Language.StringByID(R.MyInternationalizationString.Close)); - alert.Show(); - }); - } - } - catch - { - - } - finally - { - CommonPage.Loading.Hide(); - } + try + { + CommonPage.Loading.Start(); + var versionResult = await RequestHttpsiOSAppVersionAsync(); + if (versionResult == null || versionResult.Results == null) + { + return false; + } + var results = Newtonsoft.Json.Linq.JArray.Parse(versionResult.Results.ToString()); + if (results[0] == null) + { + return false; + } + var newVersion = results[0]["version"]?.ToString(); + var updateContent = results[0]["releaseNotes"]?.ToString(); + if (newVersion != CommonPage.CodeIDString) + { + return true; + } + return false; + } + catch + { + return false; + + } + #elif Android try { - CommonPage.Loading.Start(); - var versionResult = await CommonPage.Instance.RequestHttpsAndroidAppVersionAsync(); + var versionResult = await RequestHttpsAndroidAppVersionAsync(); if (versionResult == null) { - CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail); - return; + return false; } - if (int.Parse(versionResult.FirmwareVersion.Replace(".","")) > int.Parse(CommonPage.CodeIDString.Replace(".",""))) + if (int.Parse(versionResult.FirmwareVersion.Replace(".", "")) > int.Parse(CommonPage.CodeIDString.Replace(".", ""))) { - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.UpdateContent), versionResult.Remarks, Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim)); - alert.Show(); - alert.ResultEventHandler += async (sender1, e1) => - { - if (e1) - { - try - { - SetDownLoadBtnVisible(); - var requestObj = new SendDataToServer.DownLoadAndroidApk - { - RequestVersion = CommonPage.RequestVersion, - DistributedMark = versionResult.DistributedMark - }; - var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); - - var bytesTotalLengthResult = await CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DownloadPlatformUploadFirmwarePreLength", Encoding.UTF8.GetBytes(requestJson)); - if (bytesTotalLengthResult == null || bytesTotalLengthResult.ResponseData == null) - { - SetDownLoadBtnNoVisible(); - CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail); - return; - } - var bytesTotalLength = Newtonsoft.Json.JsonConvert.DeserializeObject<long>(bytesTotalLengthResult.ResponseData.ToString()); - if (bytesTotalLength == 0) - { - SetDownLoadBtnNoVisible(); - CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail); - return; - } - CommonPage.ApkBytesTotalLength = bytesTotalLength; - var bytes = await CommonPage.Instance.DownLoadApkAsync("FirmwareMana/DownloadPlatformUploadFirmware", Encoding.UTF8.GetBytes(requestJson)); - if (bytes == null) - { - SetDownLoadBtnNoVisible(); - CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail); - return; - } - if(bytes.ToString().Contains("DownloadFail")) - { - SetDownLoadBtnNoVisible(); - CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain); - return; - } - var path = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, "home.apk"); - Shared.IO.FileUtils.WriteFileByBytes(path, bytes); - Install(Shared.Application.Activity); - } - catch(Exception ex) - { - SetDownLoadBtnNoVisible(); - System.Console.WriteLine($"涓嬭浇澶辫触--{ex.Message}"); - } - } - }; + distributedMark = versionResult.DistributedMark; + return true; } - else - { - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.TheAppVersionIsNewest), Language.StringByID(R.MyInternationalizationString.Close)); - alert.Show(); - } + return false; } catch (Exception ex) { - SetDownLoadBtnNoVisible(); - System.Console.WriteLine(ex.Message); - } - finally - { - CommonPage.Loading.Hide(); + return false; } #endif } -#if Android /// <summary> - /// Cancels down load apk. + /// 鏇存柊 /// </summary> - private void CancelDownLoadApk(object sender,MouseEventArgs mouseEventArgs) + private async void UpdateVersion() { - var alert = new Alert(Language.StringByID(R.MyInternationalizationString.TIP), Language.StringByID(R.MyInternationalizationString.CancelUpdating), Language.StringByID(R.MyInternationalizationString.Cancel), Language.StringByID(R.MyInternationalizationString.Confrim)); - alert.Show(); - alert.ResultEventHandler += (send, e) => - { - if (e) - { - isUpdating = false; - updateBtn.Visible = true; - SetDownLoadBtnNoVisible(); - CommonPage.CancelDownLoadApkAsync(); - } - }; +#if iOS + OpenUrl(); +#elif Android + try + { + var requestObj = new SendDataToServer.DownLoadAndroidApk + { + RequestVersion = CommonPage.RequestVersion, + DistributedMark = distributedMark + }; + var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); + + var bytesTotalLengthResult = await CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DownloadPlatformUploadFirmwarePreLength", Encoding.UTF8.GetBytes(requestJson)); + if (bytesTotalLengthResult == null || bytesTotalLengthResult.ResponseData == null) + { + CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail); + return; + } + var bytesTotalLength = Newtonsoft.Json.JsonConvert.DeserializeObject<long>(bytesTotalLengthResult.ResponseData.ToString()); + if (bytesTotalLength == 0) + { + CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail); + return; + } + ApkBytesTotalLength = bytesTotalLength; + var bytes = await DownLoadApkAsync("FirmwareMana/DownloadPlatformUploadFirmware", Encoding.UTF8.GetBytes(requestJson)); + if (bytes == null) + { + CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.UpdateAppFail); + return; + } + if (bytes.ToString().Contains("DownloadFail")) + { + CommonPage.Instance.ShowErrorInfoAlert(R.MyInternationalizationString.FailedPleaseTryAgain); + return; + } + var path = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, "home.apk"); + Shared.IO.FileUtils.WriteFileByBytes(path, bytes); + Install(Shared.Application.Activity); + } + catch (Exception ex) + { + System.Console.WriteLine($"涓嬭浇澶辫触--{ex.Message}"); + } +#endif } + +#if iOS + /// <summary> + /// 鑾峰彇iOS-APP鐗堟湰淇℃伅 + /// </summary> + /// <returns>The https app version async.</returns> + public async System.Threading.Tasks.Task<Common.ResponseEntity.ResultPack> RequestHttpsiOSAppVersionAsync() + { + try + { + var webClient = new WebClient { }; + var result = await webClient.DownloadDataTaskAsync("https://itunes.apple.com/lookup?id=1461693569"); + if (result == null) + { + return null; + } + return Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ResultPack>(Encoding.UTF8.GetString(result)); + } + catch + { + return null; + } + } + /// <summary> + /// 璺宠浆鍒癆PP Store + /// </summary> + public void OpenUrl() + { + Uri url = new Uri("https://itunes.apple.com/cn/app/hdl-home/id1461693569?mt=8"); + UIKit.UIApplication.SharedApplication.OpenUrl(url); + } +#elif Android + /// <summary> /// Install the specified context. /// </summary> @@ -411,6 +405,127 @@ } context.StartActivity(intent); } + + /// <summary> + /// 鑾峰彇 Android-APP 鐗堟湰淇℃伅 + /// </summary> + /// <returns>The https app version async.</returns> + private async System.Threading.Tasks.Task<Common.ResponseEntity.ApkInfoOBJ> RequestHttpsAndroidAppVersionAsync() + { + try + { + var requestOBJ = new SendDataToServer.GetAndroidApkInfoOBJ + { + Name = "ZigbeeApp", + RequestVersion = CommonPage.CodeIDString + }; + var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestOBJ); + var result = await CommonPage.Instance.RequestHttpsZigbeeAsync("FirmwareMana/DetectionPlatformUploadFirmware", System.Text.Encoding.UTF8.GetBytes(requestJson)); + if (result == null) + { + return null; + } + if (result.StateCode.ToUpper() == "SUCCESS") + { + if (result.ResponseData == null) + { + return null; + } + + var responeData = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.ResponseEntity.ApkInfoRes>(result.ResponseData.ToString()); + if (responeData == null || responeData.pageData == null || responeData.pageData.Count == 0) + { + return null; + } + int MaxIndex = 0; + int NewVersion = 0; + for (int i = 0; i < responeData.pageData.Count; i++) + { + var apkInfo = responeData.pageData[i]; + var version = int.Parse(apkInfo.FirmwareVersion.Replace(".", "")); + if (version > NewVersion) + { + NewVersion = version; + MaxIndex = i; + } + } + return responeData.pageData[MaxIndex]; + } + return null; + } + catch (Exception ex) + { + return null; + } + } + + /// <summary> + /// 涓嬭浇瀹夎apk + /// </summary> + /// <returns>The load apk async.</returns> + /// <param name="requestUrl">璇锋眰閾炬帴</param> + /// <param name="byteData">璇锋眰鍙傛暟</param> + private System.Threading.Tasks.Task<byte[]> DownLoadApkAsync(string requestUrl, byte[] byteData) + { + try + { + webClient.Headers.Add(HttpRequestHeader.ContentType, "application/json"); + webClient.Headers.Add(HttpRequestHeader.Authorization, Config.Instance.Token); + webClient.UploadProgressChanged += Client_DownloadProgressChanged; + webClient.UploadDataCompleted += Client_UploadCompleted; + var result = webClient.UploadDataTaskAsync($"{CommonPage.RequestHttpsHost}/{requestUrl}", "POST", byteData); + if (result == null) + { + return null; + } + return result; + } + catch (Exception ex) + { + return null; + } + finally + { + } + } + /// <summary> + /// apk涓嬭浇杩涘害 + /// </summary> + /// <param name="sender">Sender.</param> + /// <param name="e">E.</param> + void Client_DownloadProgressChanged(object sender, UploadProgressChangedEventArgs e) + { + //System.Console.WriteLine($"褰撳墠杩涘害--{(int)(e.BytesReceived / (float)ApkBytesTotalLength * 100)} % --BytesReceived--{e.BytesReceived}--totalByte{e.TotalBytesToReceive}"); + if (e.BytesReceived <= ApkBytesTotalLength) + { + Application.RunOnMainThread(() => + { + SetDownLoadBtnVisible(); + updatingBtn.Text = $"{ Language.StringByID(R.MyInternationalizationString.Updating)} {(int)(e.BytesReceived / (float)ApkBytesTotalLength * 100)}%"; + }); + } + } + + /// <summary> + /// Client_UploadCompleted + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + void Client_UploadCompleted(object sender, UploadDataCompletedEventArgs e) + { + System.Console.WriteLine("涓嬭浇apk瀹屾垚"); + SetDownLoadBtnNoVisible(); + } + /// <summary> + /// 鍙栨秷涓嬭浇apk + /// </summary> + private void CancelDownLoadApkAsync() + { + webClient?.CancelAsync(); + SetDownLoadBtnNoVisible(); + System.Console.WriteLine("鍙栨秷涓嬭浇apk"); + } #endif + } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Abount/SLAForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Abount/SLAForm.cs new file mode 100755 index 0000000..43d8046 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Abount/SLAForm.cs @@ -0,0 +1,55 @@ +锘縰sing System; +using Shared.Common; + +namespace Shared.Phone.UserCenter.Abount +{ + public class SLAForm : EditorCommonForm + { + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆鏍囬淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.SLA)); + //鍒濆鍖栦腑閮ㄦ帶浠� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄦ帶浠� + /// </summary> + private void InitMiddleFrame() + { + bodyFrameLayout.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor; + + var title = new Button + { + X = Application.GetRealWidth(58), + Y = Application.GetRealHeight(58), + Width = Application.GetRealWidth(600), + Height = Application.GetRealHeight(58), + TextID = R.MyInternationalizationString.SLA_Title, + TextAlignment = TextAlignment.CenterLeft, + TextColor = ZigbeeColor.Current.GXCTextBlackColor, + TextSize = 14 + }; + title.IsBold = true; + bodyFrameLayout.AddChidren(title); + + var detail=new Button + { + X = Application.GetRealWidth(58), + Y = Application.GetRealHeight(164), + Width = Application.GetRealWidth(942), + Height = Application.GetRealHeight(800), + Text = Language.StringByID(R.MyInternationalizationString.SLA_Detail).Replace("{\\r\\n}","\r\n\r\n"), + TextAlignment = TextAlignment.CenterLeft, + TextColor = ZigbeeColor.Current.GXCTextColor, + IsMoreLines=true, + TextSize = 12 + }; + bodyFrameLayout.AddChidren(detail); + } + } +} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs index c3c9468..7845367 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlLogLogic.cs @@ -94,7 +94,7 @@ private string GetLogFile(int div) { //鍔犲瘑,鍥犱负杩欐槸鏀堕泦鏁版嵁,鏈�濂戒笉璁╁埆浜虹煡閬撹繖鏄粈涔堟渶濂� - string fileName = DateTime.Now.ToString("yyyyMMdd"); + string fileName = UserCenterResourse.UserInfo.Account + DateTime.Now.ToString("yyyyMMdd"); if (div == -1) { fileName += "Error"; diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs index 766493a..f8d5139 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlShardLogic.cs @@ -572,41 +572,45 @@ //鍏堝垵濮嬪寲鎴块棿 foreach (string fileName in listFile) { - if (fileName.StartsWith("Room_") == true) + try { - //鎴块棿鏂囦欢 - var byteData = this.GetShardFileContent(fileName); - if (byteData != null) + if (fileName.StartsWith("Room_") == true) { - string valueData = System.Text.Encoding.UTF8.GetString(byteData); - var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Room>(valueData); - memberShardInfo.dicShardRoom[fileName] = roomTemp; + //鎴块棿鏂囦欢 + var byteData = this.GetShardFileContent(fileName); + if (byteData != null) + { + string valueData = System.Text.Encoding.UTF8.GetString(byteData); + var roomTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<Common.Room>(valueData); + memberShardInfo.dicShardRoom[fileName] = roomTemp; + } } - } - else if (fileName == DirNameResourse.ShardFloorFile) - { - //妤煎眰鏂囦欢 - var byteData = this.GetShardFileContent(fileName); - if (byteData != null) + else if (fileName == DirNameResourse.ShardFloorFile) { - string valueData = System.Text.Encoding.UTF8.GetString(byteData); - memberShardInfo.dicShardFloor = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(valueData); + //妤煎眰鏂囦欢 + var byteData = this.GetShardFileContent(fileName); + if (byteData != null) + { + string valueData = System.Text.Encoding.UTF8.GetString(byteData); + memberShardInfo.dicShardFloor = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(valueData); + } } - } - else if (fileName.StartsWith("Device_") == true) - { - string[] Arry = fileName.Split(new string[] { "_" }, StringSplitOptions.RemoveEmptyEntries); - string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(Arry[2], Convert.ToInt32(Arry[3])); - this.dicShardDeviceFile[mainKeys] = fileName; + else if (fileName.StartsWith("Device_") == true) + { + string[] Arry = fileName.Split(new string[] { "_" }, StringSplitOptions.RemoveEmptyEntries); + string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(Arry[2], Convert.ToInt32(Arry[3])); + this.dicShardDeviceFile[mainKeys] = fileName; - //璁惧鏂囦欢 - listDeviceFile.Add(fileName); + //璁惧鏂囦欢 + listDeviceFile.Add(fileName); + } + else if (fileName.StartsWith("Scene_") == true) + { + //鍦烘櫙鏂囦欢 + listSceneFile.Add(fileName); + } } - else if (fileName.StartsWith("Scene_") == true) - { - //鍦烘櫙鏂囦欢 - listSceneFile.Add(fileName); - } + catch (Exception ex) { HdlLogLogic.Current.WriteLog(ex); } } //璁剧疆鎴块棿閲岄潰璁惧鐨刄I瀵硅薄(鍥犱负杩欎釜涓滆タ鏄弽搴忓垪鍖栧嚭鏉ョ殑,璁惧UI瀵硅薄鏄笉搴忓垪鍖栧璞�) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs index e1c92a4..f7d429f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs @@ -90,10 +90,36 @@ { List<Shared.Phone.UserCenter.MemberInfoRes> localAccountList = new List<Shared.Phone.UserCenter.MemberInfoRes> { }; List<Shared.Phone.UserCenter.MemberInfoRes> SubAccounList = new List<Shared.Phone.UserCenter.MemberInfoRes> { }; + //鍙湁涓讳汉鎵嶆湁鏉冮檺鑾峰彇鑷繁鐨勫瓙璐︽埛 if (UserCenterResourse.UserInfo.AuthorityNo == 1) { - SubAccounList = await ZigBee.Device.DoorLock.GetSubAccountByDistributedMark(); + var SubAccounListTemp = await ZigBee.Device.DoorLock.GetSubAccountByDistributedMark(); + var SubAccounListDictionary = new Dictionary<string, Shared.Phone.UserCenter.MemberInfoRes> { }; + + foreach (var member in SubAccounListTemp) + { + //鍒ゆ柇涓�涓处鎴风粦瀹氫簡閭鐨勬儏鍐� + if (SubAccounListDictionary.ContainsKey(member.DistributedMark) == true + || member.Account == UserCenterResourse.UserInfo.Phone + || member.Account == UserCenterResourse.UserInfo.Email) + { + //濡傛灉鏄畠鑷繁鐨勮瘽锛屼笉鏄剧ず + continue; + } + //鍘绘帀瀛愯处鎴蜂腑鏅�氭垚鍛橈紝鐣欎笅鎷ユ湁绠$悊鍛樻潈闄愮殑鎴愬憳 + if (member.AccountType != 1) + { + continue; + } + + SubAccounListDictionary.Add(member.DistributedMark, member); + } + + foreach (var addMemberID in SubAccounListDictionary.Keys) + { + SubAccounList.Add(SubAccounListDictionary[addMemberID]); + } } // 娉ㄦ剰锛歋ubAccountDistributedMark杩欎釜鍊煎緢鏈夌敤,鈥滄坊鍔犻棬閿佲�濆埌浜戠淇℃伅涓紝CloudAccountId濡傛灉鏄瓙璐︽埛锛屽垯鏄疭ubAccountDistributedMark杩欎釜鍊煎緢鏈夌敤锛屽鏋滄槸绠$悊鍛樻垨鑰呬富浜哄垯鏄櫥褰曞埌G diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs index 36dee6e..0e493af 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs @@ -5,7 +5,22 @@ /// 娣诲姞缃戝叧鐨勯�夋嫨鐢婚潰 /// </summary> public class NewGateWayMenuSelectForm : EditorCommonForm - { + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 鏄惁鏄剧ず鎻愮ず璁剧疆浣忓畢鍦扮悊浣嶇疆 + /// </summary> + private bool showSettion = true; + /// <summary> + /// 鎻愮ず鐨凢rameLayout + /// </summary> + private FrameLayout frameTip = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + /// <summary> /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) /// </summary> @@ -81,14 +96,50 @@ form.AddForm(); }); }; - } + //濡傛灉杩樻病鏈夎缃湴鐞嗕綅缃� + if (Common.Config.Instance.Home.Latitude == 0 && Common.Config.Instance.Home.Longitude == 0) + { + this.frameTip = new FrameLayout(); + frameTip.X = Application.GetRealWidth(179); + frameTip.Y = Application.GetRealHeight(1426); + frameTip.Height = Application.GetRealHeight(100); + frameTip.Width = Application.GetRealWidth(714); + bodyFrameLayout.AddChidren(frameTip); + + var btnIcon = new IconViewControl(58); + btnIcon.UnSelectedImagePath = "Item/Tips.png"; + frameTip.AddChidren(btnIcon); + + //濡傛灉涓嶈缃綇瀹呯殑鍦扮悊浣嶇疆,鍒欎細褰卞搷鑷姩鍖栧湴鐞嗗洿鏍忓姛鑳界殑璁剧疆 + var btnTip = new NormalViewControl(Application.GetRealWidth(636), Application.GetRealHeight(100), false); + btnTip.X = btnIcon.Right + Application.GetRealWidth(20); + btnTip.TextAlignment = TextAlignment.Center; + btnTip.TextColor = UserCenterColor.Current.TextGrayColor1; + btnTip.TextSize = 12; + btnTip.IsMoreLines = true; + btnTip.Text = Language.StringByID(R.MyInternationalizationString.uNotSetLocationWillAffectTheAutomaticGeofencingFunction); + frameTip.AddChidren(btnTip); + } + } + + #endregion + + #region 鈻� 涓�鑸柟娉昣__________________________ + /// <summary> /// 妫�娴嬩綇瀹呯粡绾害 /// </summary> /// <returns></returns> private bool CheckResidencePoint() { + //鍙脊涓�娆� + if (this.showSettion == false) + { + return true; + } + this.showSettion = false; + if (Common.Config.Instance.Home.Latitude == 0 && Common.Config.Instance.Home.Longitude == 0) { //璇峰墠寰�浣忓畢绠$悊{0}璁剧疆浣忓畢鐨勫湴鐞嗕綅缃� @@ -102,6 +153,30 @@ return false; } return true; - } + } + + #endregion + + #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________ + + /// <summary> + /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠� + /// </summary> + public override int FormActionAgainEvent() + { + if (frameTip == null) + { + return 0; + } + if (Common.Config.Instance.Home.Latitude != 0 || Common.Config.Instance.Home.Longitude != 0) + { + //绉婚櫎鎺夋彁绀� + frameTip.RemoveFromParent(); + return 1; + } + return 1; + } + + #endregion } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs index 048ad79..1e6a2f3 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs @@ -162,7 +162,7 @@ { //闈欓煶闃插尯涓嶅彈甯冮槻銆佹挙闃插奖鍝嶏紝闃插尯琚珄0}瑙﹀彂绔嬪嵆鎶ヨ锛岄�氬父涓嶄骇鐢熷0闊虫垨{0}鍏朵粬鎻愮ず锛屽彧鍙戦�佷俊鎭埌鐗瑰畾鐨勬帴鏀惰�� msg = Language.StringByID(R.MyInternationalizationString.uMuteSectorsTipMsg); - btnIcon.X = Application.GetRealWidth(182); + btnIcon.X = Application.GetRealWidth(175); } //鍐呴儴闃插尯 else if (zoonID == 4) diff --git a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs index 7abd292..4386e5e 100755 --- a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs +++ b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs @@ -174,6 +174,7 @@ Config.Instance.MD5PWD = revertData.MD5PWD; Config.Instance.Guid = revertData.Guid; Config.Instance.LoginDateTime = DateTime.Now; + Config.Instance.LoginToken = revertData.Token; if (Config.Instance.AccountList.Find((obj) => obj == revertData.Account) == null) { Config.Instance.AccountList.Add(revertData.Account); diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs index e0b94c9..fc11533 100755 --- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs +++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs @@ -466,7 +466,8 @@ TextAlignment = TextAlignment.CenterLeft, Text = Config.Instance.Home.Name ?? Language.StringByID(R.MyInternationalizationString.TheResidenceNameNull), TextSize = 24, - TextColor = ZigbeeColor.Current.GXCTextBlackColor + TextColor = ZigbeeColor.Current.GXCTextBlackColor, + IsBold=true }; if (Config.Instance.Home.IsOthreShare) { @@ -686,7 +687,8 @@ SelectedTextColor = ZigbeeColor.Current.GXCTextWhiteColor, TextID = R.MyInternationalizationString.Scence, IsSelected = true, - TextSize=16 + TextSize=16, + IsBold=true }; functionSceneView.AddChidren(sceneBtn); @@ -721,7 +723,9 @@ sceneBtn.IsSelected = false; functionBtn.IsSelected = true; sceneBtn.TextSize = 14; + sceneBtn.IsBold = false; functionBtn.TextSize = 16; + functionBtn.IsBold = true; RefreshBodyView(); }; //閫夋嫨鍦烘櫙鍒嗘爮 @@ -730,7 +734,9 @@ functionBtn.IsSelected = false; sceneBtn.IsSelected = true; sceneBtn.TextSize = 16; + sceneBtn.IsBold = true; functionBtn.TextSize = 14; + functionBtn.IsBold = false; RefreshBodyView(); }; diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs index 63af97b..ba987ee 100755 --- a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs +++ b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs @@ -3,7 +3,8 @@ using Shared.Common; using ZigBee.Device; using Shared.Phone.Device.AC; - +using Shared.Phone.Device.Account; + namespace Shared.Phone.UserView { /// <summary> @@ -328,6 +329,10 @@ { BackgroundColor = Shared.Common.ZigbeeColor.Current.MainColor; ZbGateway.StatusList.Add(this); + Shared.Application.LocationAction += (lat, lon) => + { + AccountLogic.Instance.ReceiveAppLatAndLon(lat.ToString(), lon.ToString()); + }; } /// <summary> diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs index 1ae04c4..7a256a9 100755 --- a/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Common/Config.cs @@ -120,6 +120,11 @@ } /// <summary> + /// 鐧诲綍鏃禩oken + /// </summary> + public string LoginToken = string.Empty; + + /// <summary> /// 鐧诲綍杩囩殑甯愬彿淇℃伅 /// </summary> public List<string> AccountList = new List<string> { }; diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs index 140ad23..68f0599 100755 --- a/ZigbeeApp/Shared/R.cs +++ b/ZigbeeApp/Shared/R.cs @@ -801,7 +801,7 @@ /// </summary> public const int TheAppVersionIsNewest = 10160; /// <summary> - /// 鏇存柊 + /// 鏇存柊鏈�鏂扮増 /// </summary> public const int Update = 10161; /// <summary> @@ -813,13 +813,33 @@ /// </summary> public const int UpdateAppFail = 10163; /// <summary> - /// 鏇存柊涓�... + /// 姝e湪鏇存柊涓�... /// </summary> public const int Updating = 10164; /// <summary> /// 鍙栨秷鏇存柊 /// </summary> public const int CancelUpdating = 10165; + /// <summary> + /// 鐗堟湰鍙� + /// </summary> + public const int VersionCode = 10166; + /// <summary> + /// 鏈嶅姟鍗忚 + /// </summary> + public const int SLA = 10167; + /// <summary> + /// 鐗堟湰鏇存柊 + /// </summary> + public const int UpdateVersion = 10168; + /// <summary> + /// 鍗忚鏂囨湰淇℃伅鍐呭 + /// </summary> + public const int SLA_Title = 10169; + /// <summary> + /// 鍗忚璇︾粏 + /// </summary> + public const int SLA_Detail = 10170; #endregion @@ -4923,7 +4943,10 @@ /// 鏈煡妤煎眰 /// </summary> public const int uUnKnownFloor = 15999; - + /// <summary> + /// 濡傛灉涓嶈缃綇瀹呯殑鍦扮悊浣嶇疆,鍒欎細褰卞搷鑷姩鍖栧湴鐞嗗洿鏍忓姛鑳界殑璁剧疆 + /// </summary> + public const int uNotSetLocationWillAffectTheAutomaticGeofencingFunction = 16000; //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� /// <summary> diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems index bea5467..62307b9 100755 --- a/ZigbeeApp/Shared/Shared.projitems +++ b/ZigbeeApp/Shared/Shared.projitems @@ -120,6 +120,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Room\RoomTemperatureSetting.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Room\UnallocatedRoom.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Abount\AbountForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Abount\SLAForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Common\AccountOption.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ClickButtonControls\BottomLeftClickButton.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Controls\ClickButtonControls\BottomRightClickButton.cs" /> -- Gitblit v1.8.0