From 62d6c4bf6c30da21ccd8245199234c5004117d56 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 21 四月 2023 13:32:15 +0800 Subject: [PATCH] V1.7.1发布版本 --- HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs | 70 +-- HDL-ON_Android/Properties/AndroidManifest.xml | 2 HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 27 HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs | 7 HDL-ON_Android/Assets/Language.ini | 46 ++ HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs | 12 HDL_ON/DAL/Mqtt/MqttClient.cs | 3 HDL_ON/DAL/Server/IMessageCommon.cs | 1 HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs | 20 HDL-ON_iOS/Info.plist | 4 HDL-ON_iOS/Resources/Language.ini | 52 ++ HDL_ON/Entity/Room.cs | 7 HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs | 1 HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs | 19 HDL_ON/UI/MainPage.cs | 2 HDL_ON/UI/UI1-Login/LoginPage.cs | 1 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs | 280 +++++++++------ HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs | 13 HDL_ON/Common/ImageUtlis.cs | 2 HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs | 69 ++++ HDL_ON/DAL/Server/NewAPI.cs | 9 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 1 HDL_ON/UI/UI2/2-Classification/FunctionPage.cs | 12 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs | 109 ++---- HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs | 74 +++ HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs | 51 +- HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs | 3 HDL_ON/Common/R.cs | 30 + HDL_ON/DAL/Server/HttpServerRequest.cs | 30 + HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs | 19 + 31 files changed, 632 insertions(+), 346 deletions(-) diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index 8293603..d683e18 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -375,7 +375,7 @@ 371=Can not use the function, please bind the gateway 372=Can not create the scene, please bind the gateway 373=Fail to add the floor -374=The residential data has been deleted, APP will automatically swift to another residence. +374=Residence has been delivered or deleted, APP will automatically swift to another residence. 375=The gateway is not connected to the server, fail to create the scene. 376=Can not enter special character 377=The whole residence @@ -587,9 +587,9 @@ 600=Add combined dimming 601=Please select two or more devices 602=My Home -603= In order to protect your personal privacy rights, we hereby notify you and apply for explicit consent authorization. Please read it carefully +603= Please read it carefully 604= 'On Pro Face Information Collection Protocol' -605= If you agree to this agreement, please click the [Agree] button to indicate that you have understood and agreed to the face information collection agreement. +605= If you agree to this agreement, please click the [Agree] button. 606=Account binding is successful.You can continue to complete the device association operation 607=Previous page 608=Next page @@ -600,7 +600,13 @@ 613=Revoke Authorization 614=Statement on account binding 615=After the authorization is revoked, all the devices associated with the brand in on Pro will be unbound, and the relevant use information and device value will also become invalid - +616=Bind account +617=Residential status +618=To_Be_Debugged +619=Debugging +620=To_Be_Accepted +621=INITIAL_TATE +622=ACCEPTANCE 2532=Visitor Invitation Record @@ -1644,7 +1650,7 @@ 371=鍔熻兘鏃犳硶浣跨敤锛岃缁戝畾缃戝叧 372=鏃犳硶鍒涘缓鍦烘櫙锛岃缁戝畾缃戝叧 373=娣诲姞妤煎眰澶辫触銆� -374=浣忓畢鏁版嵁宸茶鍒犻櫎锛孉PP灏嗚嚜鍔ㄥ垏鎹㈠埌鍙︿竴浣忓畢銆� +374=浣忓畢宸插垹闄ゆ垨宸蹭氦浠橈紝APP灏嗚嚜鍔ㄥ垏鎹㈠埌鍙︿竴浣忓畢銆� 375=缃戝叧鏈繛鎺ユ湇鍔″櫒锛屾棤娉曞垱寤哄満鏅�� 376=鏃犳硶杈撳叆鐗规畩瀛楃 377=鍏ㄥ畢鍖哄煙 @@ -1869,8 +1875,13 @@ 613=鎾ゅ洖鎺堟潈 614=鍏充簬璐﹀彿缁戝畾鐨勫0鏄� 615=鎾ら攢鎺堟潈鍚庯紝璇ュ搧鐗屽叧鑱斿湪On Pro涓殑璁惧灏嗗叏閮ㄨ瑙g粦锛岀浉鍏充娇鐢ㄤ俊鎭悎璁惧鍊间篃灏嗗け鏁� - - +616=缁戝畾璐﹀彿 +617=浣忓畢鐘舵�� +618=寰呰皟璇� +619=璋冭瘯涓� +620=寰呴獙鏀� +621=鍒濆鎬� +622=楠屾敹 2532=璁垮閭�璇疯褰� @@ -3138,6 +3149,13 @@ 613=Revoke Authorization 614=Statement on account binding 615=After the authorization is revoked, all the devices associated with the brand in on Pro will be unbound, and the relevant use information and device value will also become invalid +616=Bind account +617=Residential status +618=To_Be_Debugged +619=Debugging +620=To_Be_Accepted +621=INITIAL_TATE +622=ACCEPTANCE 2532=Visitor Invitation Record @@ -4400,6 +4418,13 @@ 613=Revoke Authorization 614=Statement on account binding 615=After the authorization is revoked, all the devices associated with the brand in on Pro will be unbound, and the relevant use information and device value will also become invalid +616=Bind account +617=Residential status +618=To_Be_Debugged +619=Debugging +620=To_Be_Accepted +621=INITIAL_TATE +622=ACCEPTANCE @@ -5652,6 +5677,13 @@ 613=Revoke Authorization 614=Statement on account binding 615=After the authorization is revoked, all the devices associated with the brand in on Pro will be unbound, and the relevant use information and device value will also become invalid +616=Bind account +617=Residential status +618=To_Be_Debugged +619=Debugging +620=To_Be_Accepted +621=INITIAL_TATE +622=ACCEPTANCE diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml index 77c6da9..91773bc 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.7" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202304071"> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.7.1" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202304211"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <!--鍙嬬洘--> <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index 41220e7..d47619a 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -98,9 +98,9 @@ <key>UIStatusBarStyle</key> <string>UIStatusBarStyleLightContent</string> <key>CFBundleShortVersionString</key> - <string>1.7</string> + <string>1.7.1</string> <key>CFBundleVersion</key> - <string>1.7</string> + <string>1.7.1</string> <key>NSAppleMusicUsageDescription</key> <string>App needs to access your music library to connect to an external player to play music.</string> <key>NSLocationAlwaysUsageDescription</key> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index d071d03..d683e18 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -375,7 +375,7 @@ 371=Can not use the function, please bind the gateway 372=Can not create the scene, please bind the gateway 373=Fail to add the floor -374=The residential data has been deleted, APP will automatically swift to another residence. +374=Residence has been delivered or deleted, APP will automatically swift to another residence. 375=The gateway is not connected to the server, fail to create the scene. 376=Can not enter special character 377=The whole residence @@ -587,9 +587,9 @@ 600=Add combined dimming 601=Please select two or more devices 602=My Home -603= In order to protect your personal privacy rights, we hereby notify you and apply for explicit consent authorization. Please read it carefully +603= Please read it carefully 604= 'On Pro Face Information Collection Protocol' -605= If you agree to this agreement, please click the [Agree] button to indicate that you have understood and agreed to the face information collection agreement. +605= If you agree to this agreement, please click the [Agree] button. 606=Account binding is successful.You can continue to complete the device association operation 607=Previous page 608=Next page @@ -600,7 +600,13 @@ 613=Revoke Authorization 614=Statement on account binding 615=After the authorization is revoked, all the devices associated with the brand in on Pro will be unbound, and the relevant use information and device value will also become invalid - +616=Bind account +617=Residential status +618=To_Be_Debugged +619=Debugging +620=To_Be_Accepted +621=INITIAL_TATE +622=ACCEPTANCE 2532=Visitor Invitation Record @@ -1150,9 +1156,6 @@ 8512=Serial number 8513=Model - - - @@ -1647,7 +1650,7 @@ 371=鍔熻兘鏃犳硶浣跨敤锛岃缁戝畾缃戝叧 372=鏃犳硶鍒涘缓鍦烘櫙锛岃缁戝畾缃戝叧 373=娣诲姞妤煎眰澶辫触銆� -374=浣忓畢鏁版嵁宸茶鍒犻櫎锛孉PP灏嗚嚜鍔ㄥ垏鎹㈠埌鍙︿竴浣忓畢銆� +374=浣忓畢宸插垹闄ゆ垨宸蹭氦浠橈紝APP灏嗚嚜鍔ㄥ垏鎹㈠埌鍙︿竴浣忓畢銆� 375=缃戝叧鏈繛鎺ユ湇鍔″櫒锛屾棤娉曞垱寤哄満鏅�� 376=鏃犳硶杈撳叆鐗规畩瀛楃 377=鍏ㄥ畢鍖哄煙 @@ -1872,8 +1875,13 @@ 613=鎾ゅ洖鎺堟潈 614=鍏充簬璐﹀彿缁戝畾鐨勫0鏄� 615=鎾ら攢鎺堟潈鍚庯紝璇ュ搧鐗屽叧鑱斿湪On Pro涓殑璁惧灏嗗叏閮ㄨ瑙g粦锛岀浉鍏充娇鐢ㄤ俊鎭悎璁惧鍊间篃灏嗗け鏁� - - +616=缁戝畾璐﹀彿 +617=浣忓畢鐘舵�� +618=寰呰皟璇� +619=璋冭瘯涓� +620=寰呴獙鏀� +621=鍒濆鎬� +622=楠屾敹 2532=璁垮閭�璇疯褰� @@ -2425,9 +2433,6 @@ 8511=鐢ㄦ埛浜哄憳 8512=搴忓垪鍙� 8513=鍨嬪彿 - - - @@ -3144,6 +3149,13 @@ 613=Revoke Authorization 614=Statement on account binding 615=After the authorization is revoked, all the devices associated with the brand in on Pro will be unbound, and the relevant use information and device value will also become invalid +616=Bind account +617=Residential status +618=To_Be_Debugged +619=Debugging +620=To_Be_Accepted +621=INITIAL_TATE +622=ACCEPTANCE 2532=Visitor Invitation Record @@ -4406,6 +4418,13 @@ 613=Revoke Authorization 614=Statement on account binding 615=After the authorization is revoked, all the devices associated with the brand in on Pro will be unbound, and the relevant use information and device value will also become invalid +616=Bind account +617=Residential status +618=To_Be_Debugged +619=Debugging +620=To_Be_Accepted +621=INITIAL_TATE +622=ACCEPTANCE @@ -5658,6 +5677,13 @@ 613=Revoke Authorization 614=Statement on account binding 615=After the authorization is revoked, all the devices associated with the brand in on Pro will be unbound, and the relevant use information and device value will also become invalid +616=Bind account +617=Residential status +618=To_Be_Debugged +619=Debugging +620=To_Be_Accepted +621=INITIAL_TATE +622=ACCEPTANCE diff --git a/HDL_ON/Common/ImageUtlis.cs b/HDL_ON/Common/ImageUtlis.cs index 87c0daf..253319b 100644 --- a/HDL_ON/Common/ImageUtlis.cs +++ b/HDL_ON/Common/ImageUtlis.cs @@ -181,7 +181,7 @@ /// </summary> public byte[] GetImageDownloadUrl(string imageKey) { - if (imageKey.StartsWith("https:")) + if (imageKey.StartsWith("https:") || imageKey.StartsWith("http:")) { return HttpUtil.HttpsDownload(imageKey); } diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index f9c1c13..4471ca8 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -4,6 +4,36 @@ { public static class StringId { + + + /// <summary> + /// 楠屾敹 + /// </summary> + public const int ACCEPTANCE = 622; + /// <summary> + /// 鍒濆鎬� + /// </summary> + public const int INITIAL_TATE = 621; + /// <summary> + /// 寰呴獙鏀� + /// </summary> + public const int To_Be_Accepted = 620; + /// <summary> + /// 璋冭瘯涓� + /// </summary> + public const int Debugging = 619; + /// <summary> + /// 寰呰皟璇� + /// </summary> + public const int To_Be_Debugged = 618; + /// <summary> + /// 浣忓畢鐘舵�� + /// </summary> + public const int HouseStatus = 617; + /// <summary> + /// 缁戝畾璐﹀彿 + /// </summary> + public const int BindSubAccount = 616; /// <summary> /// 鎾ら攢鎺堟潈鍚庯紝璇ュ搧鐗屽叧鑱斿湪On Pro涓殑璁惧灏嗗叏閮ㄨ瑙g粦锛岀浉鍏充娇鐢ㄤ俊鎭悎璁惧鍊间篃灏嗗け鏁� /// </summary> diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index f5b5a83..d5cd85e 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -374,7 +374,7 @@ try { var topic = e.ApplicationMessage.Topic; - //MainPage.Log($"鏀跺埌mqtt涓婚:{topic}"); + MainPage.Log($"鏀跺埌mqtt涓婚:{topic}"); //涓�绔彛涓婚澶勭悊 if (DB_ResidenceData.Instance.GatewayType == 0 && !DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull()) { @@ -460,6 +460,7 @@ else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/event/appHomeRefresh/up") { MainPage.Log("浣忓畢鏁版嵁鍒锋柊閫氱煡"); + System.Threading.Thread.Sleep(2000); new HttpServerRequest().GetHomePager(); } //appRoomRefresh锛氭埧闂存暟鎹埛鏂伴�氱煡 diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index dc58537..bb8c83c 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -697,6 +697,20 @@ } } /// <summary> + /// 鑾峰彇浣忓畢浜や粯閾炬帴 + /// </summary> + /// <returns></returns> + public ResponsePackNew GetHouseDeliveryUrl() + { + var d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + var jsonString = HttpUtil.GetSignRequestJson(d); + var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.APi_Post_GetHoserDeliverUrl, jsonString); + return revertObj; + } + + + /// <summary> /// 鑾峰彇缃戝叧淇℃伅 /// </summary> public string GetGatewayInfo() @@ -1042,6 +1056,22 @@ var requestJson = HttpUtil.GetSignRequestJson(d); return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_UpdateFace, requestJson); } + /// <summary> + /// 瀹跺涵鎴愬憳缁戝畾璐﹀彿 + /// </summary> + /// <param name="childId"></param> + /// <param name="faceUrl"></param> + /// <returns></returns> + public ResponsePackNew SubChildBindAccount(string childId, string account) + { + Dictionary<string, object> d = new Dictionary<string, object>(); + d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); + d.Add("childId", childId); + d.Add("account", account); + var requestJson = HttpUtil.GetSignRequestJson(d); + return HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_Child_BindAccount, requestJson); + } + /// <summary> /// 淇敼浣忓畢璋冭瘯鏉冮檺 diff --git a/HDL_ON/DAL/Server/IMessageCommon.cs b/HDL_ON/DAL/Server/IMessageCommon.cs index 61819a7..7626dff 100644 --- a/HDL_ON/DAL/Server/IMessageCommon.cs +++ b/HDL_ON/DAL/Server/IMessageCommon.cs @@ -164,6 +164,7 @@ stateCodeDic["14007"] = StringId.ControlFailure; //缃戝叧绂荤嚎 stateCodeDic["14005"] = StringId.GatewayOffline; + stateCodeDic["124005"] = StringId.GatewayOffline; //璁惧绂荤嚎 stateCodeDic["14006"] = StringId.DeviceOffline; diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs index c987e9d..1d0d10e 100644 --- a/HDL_ON/DAL/Server/NewAPI.cs +++ b/HDL_ON/DAL/Server/NewAPI.cs @@ -111,6 +111,11 @@ /// </summary> public const string Api_Post_BindlingResidence = "/app/home/deliver"; /// <summary> + /// 鑾峰彇浣忓畢浜や粯閾炬帴 + /// </summary> + public const string APi_Post_GetHoserDeliverUrl = "/home-wisdom/app/home/obtainDeliveryUrl"; + + /// <summary> /// 鑾峰彇浣忓畢鍒嗛〉 /// </summary> public const string API_POST_Gethomepager = "/home-wisdom/app/home/list"; @@ -163,6 +168,10 @@ /// </summary> public const string API_POST_Child_UpdateFace = "/home-wisdom/app/child/account/updateFace"; /// <summary> + /// 瀛愯处鍙风粦瀹氳处鍙� + /// </summary> + public const string API_POST_Child_BindAccount = "/home-wisdom/app/child/account/accountBind"; + /// <summary> /// 鍒犻櫎鎴愬憳璐﹀彿浜鸿劯淇℃伅 /// </summary> public const string API_POST_Child_RemoveFace = "/home-wisdom/app/child/account/removeFace"; diff --git a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs index f64b239..e43615c 100644 --- a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs +++ b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs @@ -88,8 +88,25 @@ public double latitude; /// <summary> /// 浜や粯鐘舵�� + /// To_Be_Debugged(0, "寰呰皟璇�"), + /// Debugging(1, "璋冭瘯涓�"), + /// To_Be_Accepted(2, "寰呴獙鏀�"), + /// Completed(3, "璋冭瘯瀹屾垚"), + /// WAIT_DELIVERED(3, "璋冭瘯瀹屾垚"), + /// Delivered(4, "宸蹭氦浠�"), + /// INITIAL_TATE(5,"鍒濆鎬�"), + /// ACCEPTANCE(6,"楠屾敹"), + /// SECONDARY_DEBUGGIN(7,"浜屾璋冭瘯"), /// </summary> - public string deliverStatus; + public string deliverStatus + { + get + { + return debugStatus; + } + } + + public string debugStatus; /// <summary> /// 浣忓畢绫诲瀷 Zigbee, Buspro, A /// </summary> diff --git a/HDL_ON/Entity/Room.cs b/HDL_ON/Entity/Room.cs index 1fdebfd..2606c6c 100644 --- a/HDL_ON/Entity/Room.cs +++ b/HDL_ON/Entity/Room.cs @@ -504,6 +504,13 @@ functions.Add(f); } } + foreach(var g in FunctionList.List.groupControls) + { + if (g.roomIds.Contains(roomId) && roomId != null) + { + functions.Add(g); + } + } } return functions; } diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index 87a799f..1740a16 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -26,7 +26,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "1.7.0"; + public static string VersionString = "1.7.1"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs index 1bd77d6..fd6cc65 100644 --- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs +++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs @@ -225,6 +225,8 @@ }; EditParaterEvent(btnConfirm, errorId_IsNullOrEmpty, errorId_ContainsPar, baseList, etParater, callBackAction, contentView, btnLine, btnCancel, editView, dialog, titleId); + + etParater.Foucs = true; } /// <summary> diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index d8eb09a..f030bea 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -236,6 +236,7 @@ //etAccount.Text = "18321091245"; //etAccount.Text = "13751916353"; etAccount.Text = "13549566666"; + etAccount.Text = "18316672920"; } else { diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 8835c07..987ec8e 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -1058,7 +1058,7 @@ if (//SPK.CurtainSpkList().Contains(function.spk)) function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainDream || - function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex ) + function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex) { btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainIcon.png"; btnIcon.SelectedImagePath = "FunctionIcon/Curtain/CurtainOnIcon.png"; @@ -1143,7 +1143,7 @@ btnPower.IsSelected = true; status = "on"; } - function.SetAttrState("on_off", status); + function.SetAttrState("on_off", status); Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("on_off", status); Music.SendMethod.Current.SendControlCommand(function, dic); @@ -1157,7 +1157,7 @@ Button btnUp; btnUp = new Button() { - X = Application.GetRealWidth(84+3), + X = Application.GetRealWidth(84 + 3), Y = Application.GetRealWidth(89), Width = Application.GetRealWidth(38), Height = Application.GetRealWidth(38), @@ -1182,7 +1182,7 @@ LoadEvent_ControlClothesHanger(function, btnUp, btnDown); } - + else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) { //btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}.png"; @@ -1207,8 +1207,13 @@ } else if (function.spk == SPK.VideoDoorLock) { - btnIcon.UnSelectedImagePath =UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect); + btnIcon.UnSelectedImagePath = UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.collect); //btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; + } + else if (function.spk == SPK.GroupControl) + { + btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png"; + btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png"; } else { @@ -1223,16 +1228,8 @@ SelectedImagePath = "Public/SwitchOn.png", }; view.AddChidren(btnSwitch); - if (function.spk == SPK.GroupControl) - { - btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png"; - btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png"; - } - else - { - btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; - btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; - } + btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; + btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; LoadEvent_SwitchFunction(function, btnSwitch); } //鍙栨秷鏀惰棌浜嬩欢 diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs index 7cb16f3..6c9a2e3 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs @@ -199,6 +199,7 @@ { btnIcon.UnSelectedImagePath =UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockIcon(UI2.FuntionControlView.VideoDoorLock.CommonMethod.Comerom.function); } + else if(function.spk == SPK.GroupControl) { } else if (function.spk == SPK.HvacCac) { var btnHumidityIcon = new Button() diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs index d6bf43f..afdeb75 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionPage.cs @@ -141,8 +141,8 @@ if (titleId == StringId.Lights) { - functionList.AddRange(FunctionList.List.GetLightList()); functionList.AddRange(FunctionList.List.groupControls); + functionList.AddRange(FunctionList.List.GetLightList()); var lightScene = FunctionList.List.scenes.FindAll((obj) => obj.sceneType == SceneType.LightScene); @@ -242,15 +242,15 @@ showCount = 0; functionListView.RemoveAll(); } - int i = 0; - foreach (var function in showList) + for(var i = 0;i<50;i++) + //foreach (var function in showList) { - i++; - if (i > 50) + showCount++; + if (showCount >= showList.Count) { break; } - showCount++; + var function = showList[showCount]; if (function.spk == SPK.SensorDryContact || function.spk == SPK.SensorDryContact2) { diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs index 710917c..5d5edce 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AboutOn/AboutOnPage.cs @@ -47,6 +47,7 @@ public void LoadPage() { new TopViewDiv(bodyView, Language.StringByID(StringId.About)).LoadTopView(); + this.BackgroundColor = CSS_Color.MainBackgroundColor; Button btnOnIcon = new Button() { diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs index d82cd54..29127b6 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs @@ -90,7 +90,7 @@ var contentView = new FrameLayout() { Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(550), + Height = Application.GetRealHeight(667-64), }; bodyView.AddChidren(contentView); @@ -105,7 +105,7 @@ Button btnGroupNameTitle = new Button() { X = Application.GetRealWidth(16), - Width = Application.GetRealWidth(78), + Width = Application.GetRealWidth(178), TextID = StringId.GroupNmae, TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.SubheadingFontSize, @@ -253,13 +253,13 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextID = StringId.SelectedAll, }; - if (groupControlLightList.Count > 0) + if (groupControlLightList.Count == lightList.Count) { btnChooseAll.TextID = StringId.Cancel; } roomFloorChangeView.AddChidren(btnChooseAll); btnChooseAll.MouseUpEventHandler = (sender, e) => { - if (groupControlLightList.Count > 0) + if (groupControlLightList.Count == lightList.Count) { groupControlLightList.Clear(); btnChooseAll.TextID = StringId.SelectAll; @@ -267,11 +267,33 @@ } else { + groupControlLightList.Clear(); groupControlLightList.AddRange(lightList); btnChooseAll.TextID = StringId.Cancel; btnConfrim.IsSelected = true; } - LoadLightRow(lightList); + + for (int i = 0; i < functionListView.ChildrenCount; i++) + { + var view = functionListView.GetChildren(i); + if (view.GetType() == typeof(LightRow)) + { + if (view.Tag != null && view.Tag.ToString() == "row") + { + for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++) + { + var btn = (view as FrameLayout).GetChildren(j); + if (btn.GetType() == typeof(Button)) + { + if (btn.Tag != null && btn.Tag.ToString() == "ChooseIcon") + { + (btn as Button).IsSelected = groupControlLightList.Count == lightList.Count; + } + } + } + } + } + } }; #endregion @@ -360,8 +382,8 @@ { try { - var addTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<GroupControl>(pack.Data.ToString()); - FunctionList.List.groupControls.Add(addTemp); + var addTemp = Newtonsoft.Json.JsonConvert.DeserializeObject<List<GroupControl>>(pack.Data.ToString()); + FunctionList.List.groupControls.AddRange(addTemp); } catch (Exception ex) { @@ -413,6 +435,11 @@ { if (pack.Code == StateCode.SUCCESS) { + var temp = FunctionList.List.groupControls.Find((obj) => obj.userDeviceGroupControlId == groupControl.userDeviceGroupControlId); + if(temp!= null) + { + temp = groupControl; + } backActon?.Invoke(); this.RemoveFromParent(); } @@ -484,6 +511,10 @@ groupControl = groupControlTemps[0]; Application.RunOnMainThread(() => { + if (groupControl.sids.Count == lightList.Count) + { + btnChooseAll.TextID = StringId.Cancel; + } LoadLightRow(lightList); }); } @@ -534,15 +565,16 @@ showCount = 0; functionListView.RemoveAll(); } - int i = 0; - foreach (var function in functions) + for(var i =0;i<100;i++) + //foreach (var function in functions) { - i++; - if (i > 100) + showCount++; + if (showCount >= functions.Count) { break; } - showCount++; + var function = functions[showCount]; + var functionDiv = new LightRow(function) { Gravity = Gravity.CenterHorizontal, @@ -550,7 +582,7 @@ BorderColor = 0x00FFFFFF, BorderWidth = 1, BackgroundColor = CSS_Color.MainBackgroundColor, - Tag = function.spk + function.sid + Tag = "row" }; functionDiv.AddChidren(new Button() { @@ -563,7 +595,7 @@ Action setAction = () => { - if (groupControlLightList.Count > 0) + if (groupControlLightList.Count > 1) { btnConfrim.IsSelected = true; } @@ -571,6 +603,20 @@ { btnConfrim.IsSelected = false; } + if (groupControlLightList.Count == functions.Count) + { + if (!btnChooseAll.IsSelected) + { + btnChooseAll.IsSelected = true; + } + } + else + { + if (btnChooseAll.IsSelected) + { + btnChooseAll.IsSelected = false; + } + } }; if (groupControl.sids.Find((obj) => obj.sid == function.sid) != null) { diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs index 886a2f0..c009c40 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs @@ -39,7 +39,7 @@ contentView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(550), + Height = Application.GetRealHeight(667 - 64), BackgroundColor = CSS_Color.MainBackgroundColor, }; bodyView.AddChidren(contentView); @@ -185,7 +185,16 @@ EventHandler<MouseEventArgs> eventHandler = (sender, e) => { var page = new AddGroupControlPage(groupControl, () => { - + try + { + Application.RunOnMainThread(() => + { + btnFunctionLocationInfo.Text = groupControl.GetRoomListName(); + }); + }catch(Exception ex) + { + MainPage.Log($"鍒锋柊缇ゆ帶鎴块棿淇℃伅寮傚父:{ex.Message}"); + } }); MainPage.BasePageView.AddChidren(page); page.LoadPage(); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs index e62de92..c4ed617 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupChooseRoomPage.cs @@ -62,9 +62,7 @@ bodyView.BackgroundColor = CSS_Color.BackgroundColor; new TopViewDiv(bodyView, Language.StringByID(StringId.CombinedDimming)).LoadTopView(); - - - var contentView = new VerticalScrolViewLayout() + contentView = new VerticalScrolViewLayout() { Y = Application.GetRealHeight(64), Height = Application.GetRealHeight(667 - 64), @@ -176,41 +174,50 @@ /// </summary> void LoadMethod_AllElection() { - btnAllRoomText.MouseUpEventHandler += (sender, e) => + btnAllRoomText.MouseUpEventHandler = (sender, e) => { - btnChooseAll.IsSelected = !btnChooseAll.IsSelected; - - for (int i = 0; i < contentView.ChildrenCount; i++) + try { - var view = contentView.GetChildren(i); - if (view.GetType() == typeof(FrameLayout)) + btnChooseAll.IsSelected = !btnChooseAll.IsSelected; + + for (int i = 0; i < contentView.ChildrenCount; i++) { - if (view.Tag != null && view.Tag.ToString() == "row") + var view = contentView.GetChildren(i); + if (view.GetType() == typeof(FrameLayout)) { - for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++) + if (view.Tag != null && view.Tag.ToString() == "row") { - var btn = (view as FrameLayout).GetChildren(j); - if (btn.GetType() == typeof(Button)) + for (int j = 0; j < (view as FrameLayout).ChildrenCount; j++) { - if (btn.Tag != null && btn.Tag.ToString() == "ChooseIcon") + var btn = (view as FrameLayout).GetChildren(j); + if (btn.GetType() == typeof(Button)) { - (btn as Button).IsSelected = btnChooseAll.IsSelected; + if (btn.Tag != null && btn.Tag.ToString() == "ChooseIcon") + { + (btn as Button).IsSelected = btnChooseAll.IsSelected; + } } } } } } - } - function.roomIds.Clear(); - if (btnChooseAll.IsSelected) - { - foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList) + function.roomIds.Clear(); + if (btnChooseAll.IsSelected) { - if (btnChooseAll.IsSelected) + foreach (var room in Entity.SpatialInfo.CurrentSpatial.RoomList) { - function.roomIds.Add(room.roomId); + if (btnChooseAll.IsSelected) + { + function.roomIds.Add(room.roomId); + } } } + }catch(Exception ex) + { + MainPage.Log($"GroupChooseRoom 鍏ㄩ�夋寜閽簨浠� error : {ex.Message}"); + Application.RunOnMainThread(() => { + this.RemoveFromParent(); + }); } }; } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs index c5a8ad0..db9bf9a 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs @@ -109,13 +109,9 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.TextualColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = " 涓轰繚鎶ゆ偍鐨勪釜浜洪殣绉佹潈鐩婏紝鐗瑰悜鎮ㄩ�氱煡骞剁敵璇锋槑纭悓鎰忔巿鏉冦�傝浣犱粩缁嗛槄璇�", + TextID = StringId.FaceProTipText1, IsMoreLines = true, }; - if (Language.CurrentLanguage != "Chinese") - { - btnMsg.Text = " In order to protect your personal privacy rights, we hereby notify you and apply for explicit consent authorization. Please read it carefully"; - } contentView.AddChidren(btnMsg); Button btnMsg1 = new Button() @@ -127,13 +123,9 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.MainColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = " 銆奜n Pro浜鸿劯淇℃伅閲囬泦鍗忚銆�", + TextID = StringId.FaceProTipText2, IsMoreLines = true, }; - if (Language.CurrentLanguage != "Chinese") - { - btnMsg1.Text = " 'On Pro Face Information Collection Protocol'"; - } contentView.AddChidren(btnMsg1); @@ -146,13 +138,9 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = CSS_Color.TextualColor, TextSize = CSS_FontSize.PromptFontSize_FirstLevel, - Text = " 鑻ュ悓鎰忚鍗忚锛岃鐐瑰嚮銆愬悓鎰忋�戞寜閿紝琛ㄧず鎮ㄥ凡缁忕悊瑙e苟鍚屾剰浜鸿劯淇℃伅閲囬泦鍗忚銆�", + TextID = StringId.FaceProTipText3, IsMoreLines = true, }; - if (Language.CurrentLanguage != "Chinese") - { - btnMsg2.Text = " If you agree to this agreement, please click the [Agree] button to indicate that you have understood and agreed to the face information collection agreement."; - } contentView.AddChidren(btnMsg2); Button btnLine = new Button() @@ -256,6 +244,7 @@ { Application.RunOnMainThread(() => { + memberInfo.userFaceUrl = ""; btnAddFace.ImageBytes = null; btnAddFace.UnSelectedImagePath = "PersonalCenter/FacePassage/FaceIcon.png"; btnDeleteFaceDate.Enable = btnDeleteFaceDate.Visible = false; diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs index 0186ae1..1eb0921 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPage.cs @@ -178,6 +178,13 @@ Width = Application.GetRealWidth(311), BackgroundColor = CSS_Color.DividingLineColor, }); + + if(string.IsNullOrEmpty(memberInfo.Account)) + { + LoadView_BindAccount(memberInfo, btnMemberEmail, btnMemberName, memberHeadImageView); + } + + #endregion #region 鏄电О淇℃伅 diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs index 213d8af..60cdde3 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberManagementPageBLL.cs @@ -227,6 +227,75 @@ btn2.MouseUpEventHandler = eventHandler; } + void LoadView_BindAccount(ResidenceMemberInfo mInfo,Button btnShowText,Button btnClick,ImageView ivClick) + { + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { + if (!string.IsNullOrEmpty(btnShowText.Text)) + { + return; + } + + Action<string> callBack = (str) => + { + if (string.IsNullOrEmpty(str)) + { + new Tip() + { + CloseTime = 1, + Text = Language.StringByID(StringId.PleaseEnterContent), + Direction = AMPopTipDirection.None, + }.Show(bodyView); + return; + } + + var waitPage = new Loading(); + bodyView.AddChidren(waitPage); + waitPage.Start(Language.StringByID(StringId.PleaseWait)); + new Thread(() => + { + try + { + var responsePack = new HttpServerRequest().SubChildBindAccount(mInfo.id, str); + if (responsePack.Code.ToUpper() == StateCode.SUCCESS) + { + Application.RunOnMainThread(() => + { + btnShowText.Text = str; + }); + //mInfo.Account = str; + + } + else + { + IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code); + } + } + catch (Exception ex) + { + MainPage.Log($"update user name error : {ex.Message}"); + } + finally + { + Application.RunOnMainThread(() => + { + if (waitPage != null) + { + waitPage.RemoveFromParent(); + waitPage = null; + } + }); + } + }) + { IsBackground = true }.Start(); + }; + new PublicAssmebly().LoadDialog_EditParater(StringId.BindSubAccount, "", callBack, StringId.NicknameCannotBeEmpty, 0, new List<string>()); + }; + btnShowText.MouseUpEventHandler = eventHandler; + btnClick.MouseUpEventHandler = eventHandler; + ivClick.MouseUpEventHandler = eventHandler; + } + /// <summary> /// 淇敼鍒涘缓鍦烘櫙鏉冮檺 /// </summary> diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs index b5b4628..b70cf7f 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPage.cs @@ -616,7 +616,8 @@ TextID = StringId.CombinedDimming, TextAlignment = TextAlignment.Center, TextColor = CSS_Color.FirstLevelTitleColor, - TextSize = CSS_FontSize.PromptFontSize_FirstLevel + TextSize = CSS_FontSize.PromptFontSize_FirstLevel, + IsMoreLines = true, }; faceManagementView.AddChidren(btnFaceManagementText); diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs index 35af275..e77c9d6 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/DeliveryQrCodePage.cs @@ -20,7 +20,6 @@ /// <summary> /// /// </summary> - /// <param name="isStartCheckResidenceThread">鏄惁寮�鍚綇瀹呯洃鍚嚎绋嬶紝娌℃湁浣忓畢鐨勬椂鍊欏埆浜烘壂鐮佹坊鍔犱綘涓烘垚鍛樼殑鏃跺�欒皟鐢�</param> public void LoadPage() { bodyView.BackgroundColor = CSS_Color.BackgroundColor; @@ -56,90 +55,52 @@ }; bodyView.AddChidren(btnHomeName); - - - //浜岀淮鐮� - int codeWidth = Application.GetRealWidth(266); - ImageView codeImage = new ImageView() - { - Gravity = Gravity.Center, - Height = codeWidth, - Width = codeWidth, - ImageBytes = Scan.BytesFromText(Entity.DB_ResidenceData.Instance.CurrentRegion.deliverUrl,codeWidth, codeWidth), - }; - backView.AddChidren(codeImage); - - ////浜岀淮鐮佷腑蹇冨ご鍍� - //int imageWidth = Application.GetMinRealAverage(60); - //int imageX = codeImage.X + (codeWidth - imageWidth) / 2; - //int imageY = codeImage.Y + (codeWidth - imageWidth) / 2; - //ImageView headImage2 = new ImageView() - //{ - // X = imageX, - // Y = imageY, - // Width = imageWidth, - // Height = imageWidth, - // ImagePath = UserInfo.Current.headImagePagePath, - // BorderColor = CSS_Color.MainBackgroundColor, - // BorderWidth = (uint)Application.GetRealWidth(2), - // Radius = (uint)Application.GetMinRealAverage(30), - //}; - //backView.AddChidren(headImage2); - - - - } - - /// <summary> - /// 寮�鍚娴嬩綇瀹呮槸鍚﹀凡缁忔坊鍔犱簡鐨勭嚎绋� - /// </summary> - private void StartCheckResidenceThread() - { - //鑾峰彇浣忓畢鍒楄〃鐨勫弬鏁� - var requestJson = DAL.Server.HttpUtil.GetSignRequestJson(new DAL.Server.GetHomeListObj() { homeType = HomeTypeEnum.ALL.ToString() }); - - new System.Threading.Thread(() => - { - while (this.Parent != null) + var waitPage = new Loading(); + bodyView.AddChidren(waitPage); + waitPage.Start(""); + new System.Threading.Thread(() => { + try { - System.Threading.Thread.Sleep(4000); - if (this.Parent == null) + var pack = Common.ApiUtlis.Ins.HttpRequest.GetHouseDeliveryUrl(); + if (pack != null) { - break; - } - //璁块棶浜戠鑾峰彇鍒楄〃 - var resultObj = DAL.Server.HttpUtil.RequestHttpsPost(DAL.Server.NewAPI.API_POST_Gethomepager, requestJson); - if (resultObj.Code == DAL.Server.StateCode.SUCCESS) - { - var homeList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<RegionInfoRes>>(resultObj.Data.ToString()); - if (homeList == null || homeList.Count == 0) + if (pack.Code == DAL.Server.StateCode.SUCCESS) { - //濡傛灉杩樻病鏈変綇瀹呯殑璇�,缁х画涓嬩竴娆℃娴� - continue; + var deliveryUrl = pack.Data.ToString(); + Application.RunOnMainThread(() => { + //浜岀淮鐮� + int codeWidth = Application.GetRealWidth(266); + ImageView codeImage = new ImageView() + { + Gravity = Gravity.Center, + Height = codeWidth, + Width = codeWidth, + ImageBytes = Scan.BytesFromText(deliveryUrl, codeWidth, codeWidth), + }; + backView.AddChidren(codeImage); + }); } - //璋冪敤On鍘熸潵鐨勬柟娉�,鍒锋柊浣忓畢鍒楄〃鍙婂叾缂撳瓨 - var pm = new DAL.Server.HttpServerRequest(); - pm.GetHomePager(); + } + } + catch (Exception ex) + { + MainPage.Log($"鑾峰彇浣忓畢浜や粯閾炬帴寮傚父:{ex.Message}"); + } + finally + { + if(waitPage!= null) + { Application.RunOnMainThread(() => { - if (this.Parent == null) - { - return; - } - - //璺宠浆椤甸潰---- - MainPage.GoUserPage(true, false, () => - { - //鏄剧ず娆㈣繋鍥炲鐨勫脊绐楃晫闈� - var form = new WellcomToHomeForm(); - form.ShowForm(); - }); + waitPage.RemoveFromParent(); }); - break; } } }) { IsBackground = true }.Start(); + + } + } } diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs index 81224f4..5cb1eb4 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs @@ -274,121 +274,124 @@ }; roomManagementRow.AddChidren(btnRoomManagementSkinIcon); #endregion - - if (DB_ResidenceData.Instance.CurrentRegion.deliverStatus == "PAID") + //宸茬粡浜や粯 + if (DB_ResidenceData.Instance.CurrentRegion.deliverStatus == "Delivered" || DB_ResidenceData.Instance.CurrentRegion.deliverStatus == "SECONDARY_DEBUGGIN") { - #region 绠$悊鍛樻潈闄愯縼绉� - contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); - administratorPermissionMigrationRow = new FrameLayout() - { - Height = Application.GetRealHeight(65), - BackgroundColor = CSS_Color.MainBackgroundColor, - }; - if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false) - { - //鏄富璐﹀彿鏈汉鎵嶈兘鏄剧ず杩欎釜鑿滃崟 - contentView.AddChidren(administratorPermissionMigrationRow); - } - btnAdministratorPermissionMigrationTitle = new Button() + if (DB_ResidenceData.Instance.CurrentRegion.deliverStatus != "SECONDARY_DEBUGGIN") { - 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); - - - 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() + #region 绠$悊鍛樻潈闄愯縼绉� + contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); + administratorPermissionMigrationRow = new FrameLayout() { - Gravity = Gravity.CenterHorizontal, - Y = Application.GetRealHeight(64), - Height = Application.GetRealHeight(1), - Width = Application.GetRealWidth(343), - BackgroundColor = CSS_Color.DividingLineColor, - }); - #endregion + Height = Application.GetRealHeight(65), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == false) + { + //鏄富璐﹀彿鏈汉鎵嶈兘鏄剧ず杩欎釜鑿滃崟 + contentView.AddChidren(administratorPermissionMigrationRow); + } - #region 杩囨埛 - 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); + 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); + + + 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 + + #region 杩囨埛 + 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); + + 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 } - - 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); - - 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 璋冭瘯鏉冮檺 contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); @@ -452,12 +455,11 @@ #endregion - - LoadEvent_SkipAdminMigrationConfirmPage(); LoadEvent_SkipTransferConfirmPage(); } - else + //璋冭瘯瀹屾垚 鎵嶈兘鍔犺浇浜岀淮鐮� + else if (DB_ResidenceData.Instance.CurrentRegion.deliverStatus == "WAIT_DELIVERED") { #region 浜や粯浜岀淮鐮� contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); @@ -479,7 +481,7 @@ }; deliveryQRcodeRow.AddChidren(btnDeliveryQRcodeTitle); - + var btnDeliveryQRcodeRightIcon = new Button() { X = Application.GetRealWidth(343), @@ -491,7 +493,8 @@ deliveryQRcodeRow.AddChidren(btnDeliveryQRcodeRightIcon); - EventHandler<MouseEventArgs> eventHandler = (sender, e) => { + EventHandler<MouseEventArgs> eventHandler = (sender, e) => + { var skipPage = new DeliveryQrCodePage(); MainPage.BasePageView.AddChidren(skipPage); skipPage.LoadPage(); @@ -502,6 +505,55 @@ btnDeliveryQRcodeRightIcon.MouseUpEventHandler = eventHandler; #endregion } + else + { + #region 鎴垮眿鐘舵�佹彁绀� + contentView.AddChidren(new Button() { Height = Application.GetRealHeight(8) }); + var houseStatusTipRow = new FrameLayout() + { + Height = Application.GetRealHeight(50), + BackgroundColor = CSS_Color.MainBackgroundColor, + }; + contentView.AddChidren(houseStatusTipRow); + + var btnHouseStatusTipTitle = new Button() + { + X = Application.GetRealWidth(16), + Width = Application.GetRealWidth(308), + TextID = StringId.HouseStatus, + TextAlignment = TextAlignment.CenterLeft, + TextSize = CSS_FontSize.SubheadingFontSize, + TextColor = CSS_Color.FirstLevelTitleColor, + }; + houseStatusTipRow.AddChidren(btnHouseStatusTipTitle); + + switch (DB_ResidenceData.Instance.CurrentRegion.deliverStatus) + { + case "To_Be_Debugged"://寰呰皟璇� + btnHouseStatusTipTitle.Text += Language.StringByID(StringId.To_Be_Debugged); + break; + case "Debugging"://璋冭瘯涓� + btnHouseStatusTipTitle.Text += Language.StringByID(StringId.Debugging); + break; + case "INITIAL_TATE"://鍒濆鎬� + btnHouseStatusTipTitle.Text += Language.StringByID(StringId.INITIAL_TATE); + break; + case "ACCEPTANCE"://楠屾敹 + btnHouseStatusTipTitle.Text += Language.StringByID(StringId.ACCEPTANCE); + break; + case "To_Be_Accepted"://寰呴獙鏀� + btnHouseStatusTipTitle.Text += Language.StringByID(StringId.To_Be_Accepted); + break; + default: + btnHouseStatusTipTitle.Text += Language.StringByID(StringId.INITIAL_TATE); + break; + } + + + #endregion + + + } LoadEventList(); } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs index b25118e..4add0af 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage.cs @@ -122,13 +122,38 @@ int attrViewHight = Application.GetRealHeight(18 + 22); - //鍙湁缁х數鍣� - if (!hadDimming && !hadCCT && !hadRGB) - { attrViewHight += Application.GetRealHeight(50); + if (hadRGB) + { + attrViewHight += Application.GetRealHeight(248); + hadDimming = true; + } + if (hadCCT) + { + attrViewHight += Application.GetRealHeight(75 + 11); + hadDimming = true; + } + if (hadDimming) + { + attrViewHight += Application.GetRealHeight(54 + 11); + } attrView.Height = attrViewHight; contentView.AddChidren(attrView); attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) }); + + + if (hadDimming) + { + LoadDimmingAttrView(attrView); + } + if (hadCCT) + { + LoadCctAttrView(attrView); + } + if (hadRGB) + { + LoadRgbAttrView(attrView); + } var view = new FrameLayout() { @@ -188,42 +213,7 @@ group.Control(d); }; - } - else - { - if (hadRGB) - { - attrViewHight += Application.GetRealHeight(248); - hadDimming = true; - } - if (hadCCT) - { - attrViewHight += Application.GetRealHeight(54 + 11); - hadDimming = true; - } - if (hadDimming) - { - attrViewHight += Application.GetRealHeight(54 + 11); - } - attrView.Height = attrViewHight; - contentView.AddChidren(attrView); - attrView.AddChidren(new Button() { Height = Application.GetRealHeight(18) }); - - - if (hadDimming) - { - LoadDimmingAttrView(attrView); - } - if (hadCCT) - { - LoadCctAttrView(attrView); - } - if (hadRGB) - { - LoadRgbAttrView(attrView); - } - } contentView.Height = Application.GetRealHeight(52 + 44) + attrViewHight; contentView.Gravity = Gravity.Center; @@ -352,7 +342,7 @@ #region 鑹叉俯 var cctView = new FrameLayout() { - Height = Application.GetRealHeight(54 + 11) + Height = Application.GetRealHeight(75 + 11) }; attrView.AddChidren(cctView); @@ -362,7 +352,7 @@ btnTempClolor.X = Application.GetRealWidth(35); btnTempClolor.Y = Application.GetRealHeight(1); btnTempClolor.Width = Application.GetRealWidth(224); - btnTempClolor.Height = Application.GetRealHeight(21); + btnTempClolor.Height = Application.GetRealHeight(42); btnTempClolor.TextAlignment = TextAlignment.CenterLeft; btnTempClolor.TextColor = CSS_Color.FirstLevelTitleColor; btnTempClolor.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs index 2e7b60c..fd09740 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs @@ -217,15 +217,16 @@ showCount = 0; functionListView.RemoveAll(); } - int i = 0; - foreach (var function in functions) + for(var i =0;i<100;i++) + //foreach (var function in functions) { - i++; - if (i > 100) + showCount++; + if (showCount >= functions.Count) { break; } - showCount++; + var function = functions[showCount]; + var functionDiv = new LightRow(function) { Gravity = Gravity.CenterHorizontal, @@ -415,7 +416,8 @@ Height = Application.GetRealWidth(32), UnSelectedImagePath = "FunctionIcon/Light/LightScene/CheckIcon.png", SelectedImagePath = "FunctionIcon/Light/LightScene/CheckOnIcon.png", - IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null + IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null, + Tag = "ChooseIcon" }; if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl) { @@ -443,10 +445,10 @@ } } ///鍒锋柊鐣岄潰 - if (functions.Count == 0 || functions.Count == 1) - { + //if (functions.Count == 0 || functions.Count == 1) + //{ action(); - } + //} }; } diff --git a/HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs b/HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs index 3652c6a..958b494 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/OrderFunctionPage.cs @@ -136,18 +136,16 @@ showCount = 0; functionListView.RemoveAll(); } - int i = 0; - - - foreach (var function in functions) + for(var i =0;i<100;i++) + //foreach (var function in functions) { - i++; - if (i > 100) + showCount++; + if (showCount >= functions.Count) { break; } - showCount++; + var function = functions[showCount]; var functionDiv = new OrderFunctionRow() { Gravity = Gravity.CenterHorizontal, -- Gitblit v1.8.0