From 59a004efa8bdc3bde2d46c7bdab5c6c294da0620 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 01 六月 2023 10:23:05 +0800
Subject: [PATCH] 1.8 优化安卓经纬度获取,门锁音量功能,临时密码功能

---
 HDL-ON_iOS/ViewController.cs                                           |    2 
 HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs                         |   11 
 HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs                              |    3 
 HDL-ON_Android/Other/LocationUtils.cs                                  |   25 +
 HDL-ON_Android/Assets/Language.ini                                     |   22 +
 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs              |  301 ++++++++++++++++++----
 HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs                |    1 
 HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs  |    2 
 HDL-ON_Android/HDL-ON_Android.csproj                                   |    1 
 HDL-ON_Android/SplashActivity.cs                                       |   22 +
 HDL-ON_iOS/Resources/Language.ini                                      |   22 +
 HDL_ON/DAL/Server/NewAPI.cs                                            |   18 +
 HDL_ON/DAL/Server/HttpUtil.cs                                          |    4 
 HDL_ON/Common/R.cs                                                     |   12 
 HDL_ON/DAL/Server/HttpServerRequest.cs                                 |   68 ++++
 HDL_ON/UI/MainPage.cs                                                  |   31 ++
 HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs |   81 +++++
 HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs                          |    4 
 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs    |  104 ++++++-
 19 files changed, 615 insertions(+), 119 deletions(-)

diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 02de4b8..718fae7 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -609,6 +609,9 @@
 622=ACCEPTANCE
 623=Latitude and longitude
 624=Triggered range
+625=Residential unbound
+626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed?
+627=The set time needs to be later than the current time
 
 
 2532=Visitor Invitation Record
@@ -731,7 +734,7 @@
 1095=Select Date
 1096=Generate
 1097=Temporary password has been copied
-1098=Clear Password?
+1098=Do you want to delete the temporary password?
 1099=The expire time must be later than the effective time
 1100=Unlock Method
 1101=It'll synchronize with actual lock, confirm to delete?
@@ -1886,7 +1889,9 @@
 622=楠屾敹
 623=缁忕含搴�
 624=瑙﹀彂鑼冨洿
-
+625=浣忓畢瑙g粦
+626=浣忓畢瑙g粦涔嬪悗锛屼綇瀹呭皢浼氫粠浣犵殑璐﹀彿涓Щ闄わ紝纭畾瑕佹搷浣滃悧锛�
+627=璁剧疆鐨勬椂闂撮渶瑕佹櫄浜庡綋鍓嶆椂闂�
 
 
 2532=璁垮閭�璇疯褰�
@@ -2018,8 +2023,8 @@
 1095=閫夋嫨鏃ユ湡
 1096=鐢熸垚
 1097=涓存椂瀵嗙爜宸茬粡澶嶅埗
-1098=娓呴櫎褰撳墠涓存椂瀵嗙爜锛�
-1099=鐢熸晥鏃堕棿蹇呴』澶т簬澶辨晥鏃堕棿
+1098=鏄惁鍒犻櫎涓存椂瀵嗙爜锛�
+1099=鐢熸晥鏃堕棿蹇呴』鏃╀簬澶辨晥鏃堕棿
 1100=寮�閿佹柟寮忕鐞�
 1101=鍒犻櫎鎿嶄綔灏嗚鍚屾浜庡疄浣撻攣涓妠0}鏄惁杩橀渶瑕佸垹闄わ紵
 1102=纭鍒犻櫎
@@ -3163,6 +3168,9 @@
 622=ACCEPTANCE
 623=Latitude and longitude
 624=Triggered range
+625=Residential unbound
+626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed?
+627=The set time needs to be later than the current time
 
 
 2532=Visitor Invitation Record
@@ -4434,6 +4442,9 @@
 622=ACCEPTANCE
 623=Latitude and longitude
 624=Triggered range
+625=Residential unbound
+626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed?
+627=The set time needs to be later than the current time
 
 
 
@@ -5695,6 +5706,9 @@
 622=ACCEPTANCE
 623=Latitude and longitude
 624=Triggered range
+625=Residential unbound
+626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed?
+627=The set time needs to be later than the current time
 
 
 
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index d60a2f0..361fa47 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -226,6 +226,7 @@
     <Compile Include="Zxing\CustomCaptureActivity.cs" />
     <Compile Include="Zxing\ScanActivity.cs" />
     <Compile Include="LeChengVideo\LeTest.cs" />
+    <Compile Include="Other\LocationUtils.cs" />
   </ItemGroup>
   <ItemGroup>
     <AndroidAsset Include="Assets\agconnect-services.json" />
diff --git a/HDL-ON_Android/Other/LocationUtils.cs b/HDL-ON_Android/Other/LocationUtils.cs
new file mode 100644
index 0000000..7073140
--- /dev/null
+++ b/HDL-ON_Android/Other/LocationUtils.cs
@@ -0,0 +1,25 @@
+锘縰sing System;
+using System.Threading.Tasks;
+using Xamarin.Essentials;
+
+namespace HDL_ON_Android
+{
+    public static class LocationUtils
+    {
+        public static async Task<Location> GetCurrentLocationAsync()
+        {
+            try
+            {
+                var request = new GeolocationRequest(GeolocationAccuracy.Medium);
+                var location = await Geolocation.GetLocationAsync(request);
+                return location;
+            }
+            catch (Exception ex)
+            {
+                // 澶勭悊寮傚父
+                Console.WriteLine($"鑾峰彇浣嶇疆淇℃伅澶辫触: {ex.Message}");
+                return null;
+            }
+        }
+    }
+}
diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs
index 4271cff..76e7e2b 100644
--- a/HDL-ON_Android/SplashActivity.cs
+++ b/HDL-ON_Android/SplashActivity.cs
@@ -252,20 +252,22 @@
             HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider");
 
             //Shared.Application.IsGpsEnable = true;
-            bool isfirst = true;
+            //bool isfirst = true;
+
+            
+
             //鑾峰彇缁忕含搴� 
             Shared.Application.LocationAction = (lon, lat) =>
             {
                 try
                 {
-
-                    if (isfirst)
-                    {
-                        //鍙Е鍙戜竴娆�
-                        //Shared.Application.LocationAction = null;
-                        new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString().Replace(",", "."), lat.ToString().Replace(",", "."));
-                    }
-                    isfirst = false;
+                    //if (isfirst)
+                    //{
+                    //    //鍙Е鍙戜竴娆�
+                    //    //Shared.Application.LocationAction = null;
+                    //    new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(lon.ToString().Replace(",", "."), lat.ToString().Replace(",", "."));
+                    //}
+                    //isfirst = false;
                     ///鐩戝惉缁忕含搴�
                     HDL_ON.UI.UI2.Intelligence.Automation.LogicMethod.Current.AppLatAndLonEvent(lon, lat);
                     //鍏抽棴瀹氫綅鏈嶅姟
@@ -279,6 +281,8 @@
             };
         }
 
+        
+
         /// <summary>
         /// 
         /// </summary>
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 02de4b8..718fae7 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -609,6 +609,9 @@
 622=ACCEPTANCE
 623=Latitude and longitude
 624=Triggered range
+625=Residential unbound
+626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed?
+627=The set time needs to be later than the current time
 
 
 2532=Visitor Invitation Record
@@ -731,7 +734,7 @@
 1095=Select Date
 1096=Generate
 1097=Temporary password has been copied
-1098=Clear Password?
+1098=Do you want to delete the temporary password?
 1099=The expire time must be later than the effective time
 1100=Unlock Method
 1101=It'll synchronize with actual lock, confirm to delete?
@@ -1886,7 +1889,9 @@
 622=楠屾敹
 623=缁忕含搴�
 624=瑙﹀彂鑼冨洿
-
+625=浣忓畢瑙g粦
+626=浣忓畢瑙g粦涔嬪悗锛屼綇瀹呭皢浼氫粠浣犵殑璐﹀彿涓Щ闄わ紝纭畾瑕佹搷浣滃悧锛�
+627=璁剧疆鐨勬椂闂撮渶瑕佹櫄浜庡綋鍓嶆椂闂�
 
 
 2532=璁垮閭�璇疯褰�
@@ -2018,8 +2023,8 @@
 1095=閫夋嫨鏃ユ湡
 1096=鐢熸垚
 1097=涓存椂瀵嗙爜宸茬粡澶嶅埗
-1098=娓呴櫎褰撳墠涓存椂瀵嗙爜锛�
-1099=鐢熸晥鏃堕棿蹇呴』澶т簬澶辨晥鏃堕棿
+1098=鏄惁鍒犻櫎涓存椂瀵嗙爜锛�
+1099=鐢熸晥鏃堕棿蹇呴』鏃╀簬澶辨晥鏃堕棿
 1100=寮�閿佹柟寮忕鐞�
 1101=鍒犻櫎鎿嶄綔灏嗚鍚屾浜庡疄浣撻攣涓妠0}鏄惁杩橀渶瑕佸垹闄わ紵
 1102=纭鍒犻櫎
@@ -3163,6 +3168,9 @@
 622=ACCEPTANCE
 623=Latitude and longitude
 624=Triggered range
+625=Residential unbound
+626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed?
+627=The set time needs to be later than the current time
 
 
 2532=Visitor Invitation Record
@@ -4434,6 +4442,9 @@
 622=ACCEPTANCE
 623=Latitude and longitude
 624=Triggered range
+625=Residential unbound
+626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed?
+627=The set time needs to be later than the current time
 
 
 
@@ -5695,6 +5706,9 @@
 622=ACCEPTANCE
 623=Latitude and longitude
 624=Triggered range
+625=Residential unbound
+626=After unbinding the residence, the residence will be removed from your account. Are you sure you want to proceed?
+627=The set time needs to be later than the current time
 
 
 
diff --git a/HDL-ON_iOS/ViewController.cs b/HDL-ON_iOS/ViewController.cs
index 52dee5d..7b984a0 100644
--- a/HDL-ON_iOS/ViewController.cs
+++ b/HDL-ON_iOS/ViewController.cs
@@ -26,7 +26,7 @@
         {
             base.ViewDidLoad();
 
-            HDL_ON.MainPage.Show();
+            HDL_ON.MainPage.ShowAsync();
 
             try
             {
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 4c060dd..d01a31a 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -5,6 +5,18 @@
     public static class StringId
     {
         /// <summary>
+        /// 璁剧疆鐨勬椂闂撮渶瑕佹櫄浜庡綋鍓嶆椂闂�
+        /// </summary>
+        public const int TempPwdSettingTip = 627;
+        /// <summary>
+        /// 浣忓畢鍥炴粴鎻愮ず
+        /// </summary>
+        public const int RollBackTipMsg = 626;
+        /// <summary>
+        /// 浣忓畢鍥炴粴
+        /// </summary>
+        public const int RollBack = 625;
+        /// <summary>
         /// 瑙﹀彂鑼冨洿
         /// </summary>
         public const int TriggeredRange = 624;
diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs
index ea5035b..4909dce 100644
--- a/HDL_ON/DAL/Server/HttpServerRequest.cs
+++ b/HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -708,7 +708,21 @@
             var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.APi_Post_GetHoserDeliverUrl, jsonString);
             return revertObj;
         }
-
+        /// <summary>
+        /// 浣忓畢浜や粯鍥炴粴
+        /// </summary>
+        /// <returns></returns>
+        public ResponsePackNew RollBack()
+        {
+            var d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("communityId", DB_ResidenceData.Instance.CurrentRegion.communityId);
+            d.Add("flowRecordContent", "onPro浜や粯鍥炴粴");
+            d.Add("projectFlowRecordActionEnum", "DELIVERY_ROLLBACK");
+            var jsonString = HttpUtil.GetSignRequestJson(d);
+            var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.APi_Post_UpdateProjectDebugStatus, jsonString);
+            return revertObj;
+        }
 
         /// <summary>
         /// 鑾峰彇缃戝叧淇℃伅
@@ -1542,6 +1556,7 @@
                             MainPage.cityInfo.lowestTemperature = jt.GetValue("lowestTemperature").ToString();
                             MainPage.cityInfo.highestTemperature = jt.GetValue("highestTemperature").ToString();
                             MainPage.CityWeatherAction?.Invoke();
+                            HDL_ON.UI.HomePage.LoadEvent_RefreshAir();
                             break;
                         }
                         catch (Exception ex)
@@ -1551,14 +1566,6 @@
                     }
                     System.Threading.Thread.Sleep(5000);
                 }
-                Shared.Application.RunOnMainThread(() =>
-                {
-                    try
-                    {
-                        HDL_ON.UI.HomePage.LoadEvent_RefreshAir();
-                    }
-                    catch { }
-                });
             });
         }
         ///// <summary>
@@ -3044,8 +3051,49 @@
             //IMessageCommon.Current.ShowErrorInfoAlter(responePack.Code);
             return listSortLog;
         }
+        /// <summary>
+        /// 鑾峰彇闂ㄩ攣涓存椂瀵嗙爜
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <returns></returns>
+        public ResponsePackNew GetDoorTempPassword(string deviceId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetTempPasswrod, requestJson);
+        }
+        /// <summary>
+        /// 鍒涘缓闂ㄩ攣涓存椂瀵嗙爜
+        /// </summary>
+        /// <param name="deviceId"></param>
+        /// <returns></returns>
+        public ResponsePackNew CreateDoorTempPassword(string deviceId,string beginTime,string endTime)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("beginTime", beginTime);
+            d.Add("endTime", endTime);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_CreateTempPasswrod, requestJson);
+        }
+        /// <summary>
+        /// 鍒犻櫎闂ㄩ攣涓存椂瀵嗙爜
+        /// </summary>
+        /// <returns></returns>
+        public ResponsePackNew DelDoorTempPassword(string deviceId, string pwdId)
+        {
+            Dictionary<string, object> d = new Dictionary<string, object>();
+            d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+            d.Add("deviceId", deviceId);
+            d.Add("pwdId", pwdId);
+            var requestJson = HttpUtil.GetSignRequestJson(d);
+            return HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_DelTempPasswrod, requestJson);
+        }
 
-#endregion
+        #endregion
 
         #region 鈻� 闊崇璇█鎺у埗鐩稿叧_________________________
         /// <summary>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 211486b..62b4b3f 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
+        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
         const string APP_KEY = "HDL-HOME-APP-TEST";
         const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
         //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index cc98e76..2b2a1a7 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -114,7 +114,10 @@
         /// 鑾峰彇浣忓畢浜や粯閾炬帴
         /// </summary>
         public const string APi_Post_GetHoserDeliverUrl = "/home-wisdom/app/home/obtainDeliveryUrl";
-
+        /// <summary>
+        /// 鏇存柊椤圭洰鐘舵�� 锛堜氦浠樸�侀獙鏀躲�佹挙閿�浜や粯銆侀獙鏀舵湭閫氳繃銆侀噸鏂拌皟璇曘�佷氦浠樺洖婊氱瓑鎿嶄綔锛�
+        /// </summary>
+        public const string APi_Post_UpdateProjectDebugStatus = "/smart-footstone/mgmt/community/project/updateProjectDebugStatus";
         /// <summary>
         /// 鑾峰彇浣忓畢鍒嗛〉
         /// </summary>
@@ -881,6 +884,19 @@
         /// 闂ㄩ攣鐨勫巻鍙茶褰�
         /// </summary>
         public const string API_POST_DoorHistory = "/home-wisdom/app/device/door/logs";
+        /// <summary>
+        /// 鑾峰彇涓存椂瀵嗙爜
+        /// </summary>
+        public const string Api_Post_GetTempPasswrod = "/home-wisdom/app/device/door/getTempPwds";
+        /// <summary>
+        /// 鍒涘缓涓存椂瀵嗙爜
+        /// </summary>
+        public const string Api_Post_CreateTempPasswrod = "/home-wisdom/app/device/door/createTempPwd";
+        /// <summary>
+        /// 鍒犻櫎闂ㄩ攣涓存椂瀵嗙爜
+        /// </summary>
+        public const string Api_Post_DelTempPasswrod = "/home-wisdom/app/device/door/tempPwdDel";
+
 
         #endregion
 
diff --git a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
index e43615c..962b95c 100644
--- a/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
+++ b/HDL_ON/Entity/ResponseEntity/RegionInfoRes.cs
@@ -56,6 +56,10 @@
         /// </summary>
         public string id { get; set; }
         /// <summary>
+        /// 椤圭洰id
+        /// </summary>
+        public string communityId = string.Empty;
+        /// <summary>
         /// 浣忓畢鍚嶇О
         /// </summary>
         public string homeName { get; set; }
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index d9e600b..f2dd572 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -219,6 +219,37 @@
             {
 
             }
+
+#if __ANDROID__
+            new System.Threading.Thread(async () =>
+            {
+                int i = 0;
+                while (i < 10) {
+                    try
+                    {
+                        var location_android = await HDL_ON_Android.LocationUtils.GetCurrentLocationAsync();
+                        if (location_android != null)
+                        {
+                            MainPage.cityInfo.lat = location_android.Latitude.ToString();
+                            MainPage.cityInfo.lon = location_android.Longitude.ToString();
+                            new HDL_ON.DAL.Server.HttpServerRequest().GetCityWeatherInfo(MainPage.cityInfo.lon.Replace(",", "."), MainPage.cityInfo.lat.ToString().Replace(",", "."));
+                            i = 100;
+                            Application.RunOnMainThread(() => {
+                                HomePage.LoadEvent_RefreshAir();
+                            });
+                        }
+                        else
+                        {
+                            i++;
+                        }
+                    } catch (Exception ex)
+                    {
+                        Log($"缁忕含搴﹁幏鍙栧紓甯�: {ex.Message}");
+                    }
+                }
+            })
+            { IsBackground = true }.Start();
+#endif
         }
 
         /// <summary>
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index 4bd3b61..3c7a086 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -247,9 +247,10 @@
                             Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().RefreshDeviceList();
                         }
                         //璺宠浆澶у崕鎽勫儚澶�
+                        Shared.Application.currentVC.NavigationController.NavigationBar.BarTintColor = UIKit.UIColor.LightGray;
                         Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().RefreshDeviceList();
                         Shared.IOS.HDLCNVRSDK.HDLLCNVRSDK.SharedInstance().ToMonitorViewWithDeviceId(function.extDevId, function.name, Shared.Application.currentVC);
-                        Shared.Application.currentVC.NavigationController.NavigationBar.Hidden = false;
+                        //Shared.Application.currentVC.NavigationController.NavigationBar.Hidden = false;
 #else
                         FunctionList.List.GetIpCamImouList();
                         if (string.IsNullOrEmpty(Com.Utils.HdlToLcUtils.Instance.SubAccessToken))
diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs
index 924fa9d..26672ed 100644
--- a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs
+++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs
@@ -95,7 +95,7 @@
             //鍒濆鍖栧簳灞傛帶浠�
             var frameWhiteBack = base.InitBaseControl();
             frameWhiteBack.Height = Application.GetRealHeight(contentView);
-            //frameWhiteBack.Y = frameWhiteBack.Parent.Height - Application.GetRealHeight(297 + 20);
+            //frameWhiteBack.Y = Application.GetRealHeight(667 - contentView + 60);
 
             //鍙栨秷
             base.btnCancel.ButtonClickEvent += (sender, e) =>
diff --git a/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs b/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
index 11911e0..adbdd74 100644
--- a/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
+++ b/HDL_ON/UI/UI0-Stan/Form/Base/CommonFormBase.cs
@@ -115,8 +115,15 @@
             }
             catch (Exception ex)
             {
-                //鍑虹幇鏈煡閿欒
-                HdlMessageLogic.Current.ShowAppProgramIsError(ex);
+                if (ex.Message == "stop")
+                {
+                    //鑷畾涔変腑鏂叧闂〉闈紝鍙厓鍐欑殑澶鏉傦紝鍙兘鐢ㄨ繖绉嶆柟寮忓己琛屼腑鏂柟娉曡繍琛�  2023-06-01 09:22:46
+                }
+                else
+                {
+                    //鍑虹幇鏈煡閿欒
+                    HdlMessageLogic.Current.ShowAppProgramIsError(ex);
+                }
             }
         }
 
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
index 9ac7244..f13369a 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs
@@ -1,4 +1,5 @@
 锘縰sing System;
+using HDL_ON.DAL.Server;
 using HDL_ON.Entity;
 using HDL_ON.UI.CSS;
 using Shared;
@@ -554,26 +555,94 @@
                 switch (DB_ResidenceData.Instance.CurrentRegion.deliverStatus)
                 {
                     case "To_Be_Debugged"://寰呰皟璇�
-                        btnHouseStatusTipTitle.Text += Language.StringByID(StringId.To_Be_Debugged);
+                        btnHouseStatusTipTitle.Text += " : "+ Language.StringByID(StringId.To_Be_Debugged);
                         break;
                     case "Debugging"://璋冭瘯涓�
-                        btnHouseStatusTipTitle.Text += Language.StringByID(StringId.Debugging);
+                        btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.Debugging);
                         break;
                     case "INITIAL_TATE"://鍒濆鎬�
-                        btnHouseStatusTipTitle.Text += Language.StringByID(StringId.INITIAL_TATE);
+                        btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.INITIAL_TATE);
                         break;
                     case "ACCEPTANCE"://楠屾敹
-                        btnHouseStatusTipTitle.Text += Language.StringByID(StringId.ACCEPTANCE);
+                        btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.ACCEPTANCE);
+
+                       var btnRollBack = new Button()
+                        {
+                            Y = Application.GetRealHeight(623),
+                            Height = Application.GetRealHeight(50),
+                            TextAlignment = TextAlignment.Center,
+                            TextSize = CSS_FontSize.SubheadingFontSize,
+                            TextColor = CSS_Color.AuxiliaryColor2,
+                            TextID = StringId.RollBack,
+                            BackgroundColor = CSS_Color.MainBackgroundColor,
+                        };
+                        bodyView.AddChidren(btnRollBack);
+
+                        if (MainPage.Increase)
+                        {
+                            btnRollBack.Y = Application.GetRealHeight(613);
+                            btnRollBack.Height = Application.GetRealHeight(50);
+                            bodyView.AddChidren(new Button() { Y = Application.GetRealHeight(663), Height = Application.GetRealHeight(20), BackgroundColor = CSS_Color.MainBackgroundColor });
+                        }
+                        btnRollBack.MouseUpEventHandler += (sender, e) =>
+                        {
+                            Action okAction = () =>
+                            {
+                                var waitPage = new Loading();
+                                this.AddChidren(waitPage);
+                                waitPage.Start("");
+                                new System.Threading.Thread(() => {
+                                    try
+                                    {
+                                        var pack = Common.ApiUtlis.Ins.HttpRequest.RollBack();
+                                        Application.RunOnMainThread(() =>
+                                        {
+                                            if (pack != null)
+                                            {
+                                                if (pack.Code == StateCode.SUCCESS)
+                                                {
+                                                    Common.ApiUtlis.Ins.HttpRequest.GetHomePager();
+                                                }
+                                                else
+                                                {
+                                                    IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+                                                }
+                                            }
+                                        });
+                                    }
+                                    catch (Exception ex)
+                                    {
+                                        MainPage.Log($"浣忓畢鍥炴粴寮傚父锛歿ex.Message}");
+                                    }
+                                    finally
+                                    {
+                                        Application.RunOnMainThread(() =>
+                                        {
+                                            try
+                                            {
+                                                waitPage.Hide();
+                                                waitPage.RemoveFromParent();
+                                                waitPage = null;
+                                            }
+                                            catch { }
+                                        });
+                                    }
+                                }) { IsBackground = true }.Start();
+                            };
+                            new ConfirmDialog().ShowDialog(StringId.Tip, StringId.RollBackTipMsg, okAction);
+                        };
+
                         break;
                     case "To_Be_Accepted"://寰呴獙鏀�
-                        btnHouseStatusTipTitle.Text += Language.StringByID(StringId.To_Be_Accepted);
+                        btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.To_Be_Accepted);
                         break;
                     default:
-                        btnHouseStatusTipTitle.Text += Language.StringByID(StringId.INITIAL_TATE);
+                        btnHouseStatusTipTitle.Text += " : " + Language.StringByID(StringId.INITIAL_TATE);
                         break;
                 }
 
 
+
                 #endregion
 
 
diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
index 6b7887f..a79684c 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
@@ -6,6 +6,7 @@
 using HDL_ON.UI.CSS;
 using HDL_ON.Entity;
 using HDL_ON.DriverLayer;
+using HDL_ON.DAL.Server;
 
 namespace HDL_ON.UI
 {
@@ -73,6 +74,8 @@
         /// </summary>
         private Dictionary<string, string> dicText = new Dictionary<string, string>();
 
+
+
         #endregion
 
         #region 鈻� 鍒濆鍖朹____________________________
@@ -117,6 +120,48 @@
             this.RefreshFormStatu();
             //璇诲彇璁惧鐘舵��
             Control.Ins.SendReadCommand(device);
+
+            // 鑾峰彇涓存椂瀵嗙爜
+            GetTempPwd();
+        }
+
+        /// <summary>
+        /// 鑾峰彇涓存椂瀵嗙爜
+        /// </summary>
+        private void GetTempPwd()
+        {
+            return;
+            new System.Threading.Thread(() =>
+            {
+                try
+                {
+                    var pack = Common.ApiUtlis.Ins.HttpRequest.GetDoorTempPassword(device.deviceId);
+                    if (pack != null)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            if (pack.Code == StateCode.SUCCESS)
+                            {
+                                var tempPasswrodObj = Newtonsoft.Json.JsonConvert.DeserializeObject<List<DoorTempPassword>>(pack.Data.ToString());
+                                if (tempPasswrodObj.Count > 0)
+                                {
+                                    doorLockData.TempPassword = tempPasswrodObj[0].pwd;
+                                    doorLockData.StartTimeTick = tempPasswrodObj[0].beginTime;
+                                    doorLockData.EndTimeTick = tempPasswrodObj[0].endTime;
+                                    doorLockData.PwdId = tempPasswrodObj[0].pwdId;
+                                    this.InitTempPasswordControl();
+                                }
+                            }
+                        });
+                    }
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log($"鑾峰彇涓存椂瀵嗙爜寮傚父:{ex.Message}");
+                }
+            })
+            { IsBackground = true }.Start();
+
         }
 
         /// <summary>
@@ -185,37 +230,43 @@
             frameTempPsw.Visible = false;
             FrameWhiteCentet1.AddChidren(frameTempPsw);
 
-            ////澹伴煶
-            //this.btnVoice = new IconViewControl(24);
-            //btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png";
-            //btnVoice.X = Application.GetRealWidth(23);
-            //btnVoice.Y = Application.GetRealHeight(410);
-            //FrameWhiteCentet1.AddChidren(btnVoice);
+            
+            //澹伴煶
+            this.btnVoice = new IconViewControl(24);
+            btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png";
+            btnVoice.X = Application.GetRealWidth(23);
+            btnVoice.Y = Application.GetRealHeight(410);
+            FrameWhiteCentet1.AddChidren(btnVoice);
 
-            ////澹伴煶鐨勬粦鍔ㄦ潯
-            //this.seekBarVoiceControl = new SeekBarImageControl(215);
-            //seekBarVoiceControl.Gravity = Gravity.CenterHorizontal;
-            //FrameWhiteCentet1.AddChidren(seekBarVoiceControl);
-            //seekBarVoiceControl.Y = btnVoice.Y - (seekBarVoiceControl.Height - btnVoice.Height) / 2;
-            ////缁戝畾PageLayout鎺т欢
-            //seekBarVoiceControl.BindPageLayout();
+            //澹伴煶鐨勬粦鍔ㄦ潯
+            this.seekBarVoiceControl = new SeekBarImageControl(215);
+            seekBarVoiceControl.Gravity = Gravity.CenterHorizontal;
+            FrameWhiteCentet1.AddChidren(seekBarVoiceControl);
+            seekBarVoiceControl.Y = btnVoice.Y - (seekBarVoiceControl.Height - btnVoice.Height) / 2;
+            //缁戝畾PageLayout鎺т欢
+            seekBarVoiceControl.BindPageLayout();
 
-            ////澹伴煶鐧惧垎姣�
-            //this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false);
-            //btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding;
-            //btnVoicePersent.Y = btnVoice.Y;
-            //btnVoicePersent.TextColor = CSS_Color.PromptingColor1;
-            //btnVoicePersent.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
-            //btnVoicePersent.Text = "100%";
-            //FrameWhiteCentet1.AddChidren(btnVoicePersent);
+            //澹伴煶鐧惧垎姣�
+            this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false);
+            btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding;
+            btnVoicePersent.Y = btnVoice.Y;
+            btnVoicePersent.TextColor = CSS_Color.PromptingColor1;
+            btnVoicePersent.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
+            btnVoicePersent.Text = "100%";
+            FrameWhiteCentet1.AddChidren(btnVoicePersent);
 
-            //seekBarVoiceControl.ProgressChangedEvent += (div, value) =>
-            //{
-            //    btnVoicePersent.Text = value + "%";
-            //    if (div == 1)
-            //    {
-            //    }
-            //};
+            seekBarVoiceControl.ProgressChangedEvent += (div, value) =>
+            {
+                btnVoicePersent.Text = value + "%";
+                //if (div == 1)
+                //{
+                //}
+            };
+            seekBarVoiceControl.OnStopTrackingTouchEvent = (sender, e) => {
+                var dic = new Dictionary<string, string>();
+                dic.Add("door_volume", e.ToString());
+                Control.Ins.SendWriteCommand(this.device, dic);
+            };
 
             //鍒濆鍖栧紑閿佽彍鍗�(涓�閿紑閿�,涓存椂瀵嗙爜寮�閿�)
             this.InitUnLockMenuControl();
@@ -229,7 +280,7 @@
         private void InitUnLockMenuControl()
         {
             //濡傛灉鏄垚鍛�,鍒欏彧鏈変竴閿紑閿�
-            if (true)// DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
+            if ( DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
             {
                 //涓�閿紑閿�
                 var btnOneKey = new NormalViewControl(100, 25, true);
@@ -556,32 +607,34 @@
                 this.frameTempPsw.AddChidren(btnDelete);
                 btnDelete.ButtonClickEvent += (sender, e) =>
                 {
-                    //娓呴櫎褰撳墠涓存椂瀵嗙爜锛�
-                    HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.ClearTempPsswordMsg), () =>
+                    if (Convert.ToInt64(this.doorLockData.EndTimeTick) < DateTime.Now.Ticks)
                     {
-                        //娓呯┖涓存椂瀵嗙爜
-                        this.doorLockData.TempPassword = string.Empty;
-                        this.doorLockData.StatrtTime = string.Empty;
-                        this.doorLockData.EndTime = string.Empty;
-                        //閲嶆柊鍒濆鍖栦复鏃跺瘑鐮佹帶浠�
-                        this.InitTempPasswordControl();
-                    });
+                        DelTempPwd();
+                    }
+                    else
+                    {
+                        //娓呴櫎褰撳墠涓存椂瀵嗙爜锛�
+                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.ClearTempPsswordMsg), () =>
+                        {
+                            DelTempPwd();
+                        });
+                    }
                 };
 
-                //澶嶅埗涓存椂瀵嗙爜鍥炬爣
-                var btnCopy = new IconViewControl(28);
-                btnCopy.UnSelectedImagePath = "FunctionIcon/DoorLock/Shard.png";
-                btnCopy.X = this.frameTempPsw.Width - btnCopy.IconSize - btnDelete.X;
-                btnCopy.Y = btnDelete.Y;
-                this.frameTempPsw.AddChidren(btnCopy);
-                btnCopy.ButtonClickEvent += (sender, e) =>
-                {
-                    //涓存椂瀵嗙爜宸茬粡澶嶅埗
-                    HdlCommonLogic.Current.SetTextToShearPlate(this.doorLockData.TempPassword, Language.StringByID(StringId.TempPsswordHasBeenCopy));
-                };
+                ////澶嶅埗涓存椂瀵嗙爜鍥炬爣
+                //var btnCopy = new IconViewControl(28);
+                //btnCopy.UnSelectedImagePath = "FunctionIcon/DoorLock/Shard.png";
+                //btnCopy.X = this.frameTempPsw.Width - btnCopy.IconSize - btnDelete.X;
+                //btnCopy.Y = btnDelete.Y;
+                //this.frameTempPsw.AddChidren(btnCopy);
+                //btnCopy.ButtonClickEvent += (sender, e) =>
+                //{
+                //    //涓存椂瀵嗙爜宸茬粡澶嶅埗
+                //    HdlCommonLogic.Current.SetTextToShearPlate(this.doorLockData.TempPassword, Language.StringByID(StringId.TempPsswordHasBeenCopy));
+                //};
 
                 //鐢熸晥鏃堕棿
-                var frameEffective = this.CreatEffectiveTimeControl(this.frameTempPsw, Language.StringByID(StringId.EffectiveTime), this.doorLockData.StatrtTime);
+                var frameEffective = this.CreatEffectiveTimeControl(this.frameTempPsw, Language.StringByID(StringId.EffectiveTime), this.doorLockData.StartTime);
                 frameEffective.X = Application.GetRealWidth(24);
                 frameEffective.Y = Application.GetRealHeight(180);
 
@@ -600,6 +653,61 @@
                 btnLine.TextSize = CSS_FontSize.PromptFontSize_FirstLevel;
                 this.frameTempPsw.AddChidren(btnLine);
             }
+        }
+        /// <summary>
+        /// 鍒犻櫎涓存椂瀵嗙爜
+        /// </summary>
+        private void DelTempPwd()
+        {
+            var waitPage = new Loading();
+            this.AddChidren(waitPage);
+            waitPage.Start("");
+            new System.Threading.Thread(() =>
+            {
+                try
+                {
+                    var pack = Common.ApiUtlis.Ins.HttpRequest.DelDoorTempPassword(device.deviceId, doorLockData.PwdId);
+                    if (pack != null)
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            if (pack.Code == StateCode.SUCCESS)
+                            {
+                                //娓呯┖涓存椂瀵嗙爜
+                                this.doorLockData.TempPassword = string.Empty;
+                                this.doorLockData.StartTimeTick = string.Empty;
+                                this.doorLockData.EndTimeTick = string.Empty;
+                                this.doorLockData.PwdId = string.Empty;
+                                //閲嶆柊鍒濆鍖栦复鏃跺瘑鐮佹帶浠�
+                                this.InitTempPasswordControl();
+                            }
+                            else
+                            {
+                                IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+                            }
+                        });
+                    }
+                }
+                catch (Exception ex)
+                {
+                    MainPage.Log($"鍒犻櫎闂ㄩ攣涓存椂瀵嗙爜寮傚父: {ex.Message}");
+                }
+                finally
+                {
+                    Application.RunOnMainThread(() =>
+                    {
+                        try
+                        {
+                            waitPage.Hide();
+                            waitPage.RemoveFromParent();
+                            waitPage = null;
+                        }
+                        catch { }
+                    });
+                }
+            })
+            { IsBackground = true }.Start();
+
         }
 
         /// <summary>
@@ -657,12 +765,13 @@
 
             //鐢熸晥鏃堕棿
             var effectiveTime = Language.StringByID(StringId.EffectiveTime);
-            contr.AddRowMenu(effectiveTime, startTime.ToString("yyyy.MM.dd HH:mm"), (btnView, btnValue) =>
+            contr.AddRowMenu(effectiveTime + ": " + startTime.ToString("yyyy.MM.dd HH:mm"),"", (btnView, btnValue) =>
             {
                 //鍏虫帀鐣岄潰,鐒跺悗閲嶆柊璋冭捣鏉�
                 contr.Close();
 
                 var form = new DoorLockSelectTimePage();
+                form.TimeCheck = true;
                 form.AddForm(startTime);
                 form.SelectFinshEvent += (selectTime) =>
                 {
@@ -673,12 +782,13 @@
 
             //澶辨晥鏃堕棿
             var failTime = Language.StringByID(StringId.FailureTime);
-            contr.AddRowMenu(failTime, endTime.ToString("yyyy.MM.dd HH:mm"), (btnView, btnValue) =>
+            contr.AddRowMenu(failTime+": "+ endTime.ToString("yyyy.MM.dd HH:mm"),"", (btnView, btnValue) =>
             {
                 //鍏虫帀鐣岄潰,鐒跺悗閲嶆柊璋冭捣鏉�
                 contr.Close();
 
                 var form = new DoorLockSelectTimePage();
+                form.TimeCheck = true;
                 form.AddForm(endTime);
                 form.SelectFinshEvent += (selectTime) =>
                 {
@@ -698,12 +808,32 @@
                     //鍏虫帀鐣岄潰
                     contr.Close();
 
-                    //鐢熸垚涓存椂瀵嗙爜
-                    this.doorLockData.TempPassword = "987654";
-                    this.doorLockData.StatrtTime = startTime.ToString("yyyy.MM.dd HH:mm");
-                    this.doorLockData.EndTime = endTime.ToString("yyyy.MM.dd HH:mm");
-                    //閲嶆柊鍒濆鍖栦复鏃跺瘑鐮佹帶浠�
-                    this.InitTempPasswordControl();
+                    new System.Threading.Thread(() =>
+                    {
+                        var pack = Common.ApiUtlis.Ins.HttpRequest.CreateDoorTempPassword(device.deviceId,
+                            Utlis.DateTimeToUnix(startTime).ToString(), Utlis.DateTimeToUnix(endTime).ToString());
+                        if (pack != null)
+                        {
+                            if (pack.Code == StateCode.SUCCESS)
+                            {
+                                // 鑾峰彇涓存椂瀵嗙爜
+                                GetTempPwd();
+                            }
+                            else
+                            {
+                                Application.RunOnMainThread(() => {
+                                    IMessageCommon.Current.ShowErrorInfoAlter(pack.Code);
+                                });
+                            }
+                        }
+                    })
+                    { IsBackground = true }.Start();
+                    ////鐢熸垚涓存椂瀵嗙爜
+                    //this.doorLockData.TempPassword = "987654";
+                    //this.doorLockData.StatrtTime = startTime.ToString("yyyy.MM.dd HH:mm");
+                    //this.doorLockData.EndTime = endTime.ToString("yyyy.MM.dd HH:mm");
+                    ////閲嶆柊鍒濆鍖栦复鏃跺瘑鐮佹帶浠�
+                    //this.InitTempPasswordControl();
                 }
             };
 
@@ -1001,7 +1131,7 @@
                     }
                 }
                 //闊抽噺
-                else if (data.key == "volume")
+                else if (data.key == "door_volume") 
                 {
                     var value = data.state;
                     if (value != string.Empty)
@@ -1065,13 +1195,62 @@
             /// <summary>
             /// 涓存椂瀵嗙爜鐢熸晥鏃堕棿(2020.03.17 13:27)
             /// </summary>
-            public string StatrtTime = string.Empty;
+            public string StartTime {
+                get
+                {
+                    try
+                    {
+                        if(string.IsNullOrEmpty(StartTimeTick))
+                        {
+                            return string.Empty;
+                        }
+                        return Utlis.UnixToDateTime(Convert.ToInt64(StartTimeTick)).ToString("yyyy.MM.dd HH:mm");
+                    }catch(Exception ex)
+                    {
+                        MainPage.Log($"涓存椂瀵嗙爜鐢熸晥鏃堕棿杞崲寮傚父: {ex.Message}");
+                        return string.Empty;
+                    }
+                }
+            }
+            public string StartTimeTick = string.Empty;
             /// <summary>
             /// 涓存椂瀵嗙爜澶辨晥鏃堕棿(2020.03.17 13:27)
             /// </summary>
-            public string EndTime = string.Empty;
+            public string EndTime {
+                get
+                {
+                    try
+                    {
+                        if (string.IsNullOrEmpty(EndTimeTick))
+                        {
+                            return string.Empty;
+                        }
+                        return Utlis.UnixToDateTime(Convert.ToInt64(EndTimeTick)).ToString("yyyy.MM.dd HH:mm");
+                    }
+                    catch (Exception ex)
+                    {
+                        MainPage.Log($"涓存椂瀵嗙爜鐢熸晥鏃堕棿杞崲寮傚父: {ex.Message}");
+                        return string.Empty;
+                    }
+                }
+            }
+            public string EndTimeTick = string.Empty;
+            /// <summary>
+            /// 涓存椂瀵嗙爜id
+            /// </summary>
+            public string PwdId = string.Empty;
         }
 
+        /// <summary>
+        /// 闂ㄩ攣涓存椂瀵嗙爜
+        /// </summary>
+        private class DoorTempPassword
+        {
+            public string pwdId = string.Empty;
+            public string pwd = string.Empty;
+            public string beginTime = string.Empty;
+            public string endTime = string.Empty;
+        }
         #endregion
     }
 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs
index 349efc6..34ec007 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockSelectTimePage.cs
@@ -22,6 +22,12 @@
         /// 閫夋嫨鐨勬椂闂�
         /// </summary>
         private DateTime selectDateTime;
+        /// <summary>
+        /// 鏃堕棿鏍¢獙
+        /// 鏄惁闇�瑕佹牎楠屾椂闂村ぇ浜庡綋鍓嶆椂闂�
+        /// </summary>
+        public bool TimeCheck = false;
+
 
         #endregion
 
@@ -51,18 +57,44 @@
             this.ClearBodyFrame();
 
             //閫夋嫨鏃ユ湡
-            var rowDate = new RowLayoutControl();
+            var rowDate = new FrameLayout() {
+                Height = Application.GetRealHeight(50),
+            };
             rowDate.BackgroundColor = CSS_Color.MainBackgroundColor;
             bodyFrameLayout.AddChidren(rowDate);
-            rowDate.frameTable.AddLeftCaption(Language.StringByID(StringId.SelectDate), 300);
-            rowDate.frameTable.AddRightArrow();
-            rowDate.frameTable.AddBottomLine();
-            var btnDay = rowDate.frameTable.AddMostRightView(this.selectDateTime.ToString("yyyy.MM.dd"), 300);
-            rowDate.frameTable.ButtonClickEvent += (sender, e) =>
+            var btnDateLeft = new Button()
+            {
+                TextID = StringId.SelectDate,
+                TextAlignment = TextAlignment.CenterLeft,
+                Width = Application.GetRealWidth(300),
+                X = Application.GetRealWidth(16),
+                TextColor = CSS_Color.FirstLevelTitleColor,
+            };
+            rowDate.AddChidren(btnDateLeft);
+            var btnDateRight = new Button()
+            {
+                X = Application.GetRealWidth(339),
+                Gravity = Gravity.CenterVertical,
+                Width = Application.GetMinRealAverage(16),
+                Height = Application.GetMinRealAverage(16),
+                UnSelectedImagePath = "Public/Right.png",
+            };
+            rowDate.AddChidren(btnDateRight);
+            rowDate.AddChidren(new Button() { X = Application.GetRealWidth(16),Y = Application.GetRealHeight(49), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+
+            var btnDay = new Button()
+            {
+                Width = Application.GetRealWidth(327),
+                TextAlignment = TextAlignment.CenterRight,
+                Text = selectDateTime.ToString("yyyy.MM.dd"),
+                TextColor = CSS_Color.FirstLevelTitleColor,
+            };
+            rowDate.AddChidren(btnDay);
+            EventHandler<MouseEventArgs> dateEvent = (sender, e) =>
             {
                 //鏄剧ず鏃ユ湡閫夋嫨鐨勫簳閮ㄥ脊绐�
                 var contr = new BottomDateSelectControl();
-                contr.InitControl(this.selectDateTime.Year, this.selectDateTime.Month, this.selectDateTime.Day, 1, 1);
+                contr.InitControl(this.selectDateTime.Year, this.selectDateTime.Month, this.selectDateTime.Day, 0, 1);
                 contr.FinishEvent += (div, year, month, day) =>
                 {
                     //瑕嗙洊鏃堕棿
@@ -73,21 +105,50 @@
                     }
                 };
             };
+            btnDateLeft.MouseUpEventHandler = dateEvent;
+            btnDateRight.MouseUpEventHandler = dateEvent;
+            btnDay.MouseUpEventHandler = dateEvent;
 
             //閫夋嫨鏃堕棿
-            var rowTime = new RowLayoutControl();
-            rowTime.Y = rowDate.Bottom;
-            rowTime.BackgroundColor = CSS_Color.MainBackgroundColor;
+            var rowTime = new FrameLayout() {
+                Y = rowDate.Bottom,
+                Height = Application.GetRealHeight(50),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+            };
             bodyFrameLayout.AddChidren(rowTime);
-            rowTime.frameTable.AddLeftCaption(Language.StringByID(StringId.SelectTime), 300);
-            rowTime.frameTable.AddRightArrow();
-            var btnTime = rowTime.frameTable.AddMostRightView(this.selectDateTime.ToString("HH:mm"), 300);
-            rowTime.frameTable.ButtonClickEvent += (sender, e) =>
+            rowTime.AddChidren(new Button() { X = Application.GetRealWidth(16),Y = Application.GetRealHeight(49), Height = Application.GetRealHeight(1), Width = Application.GetRealWidth(343), BackgroundColor = CSS_Color.DividingLineColor });
+            var btnTimeLeft = new Button()
+            {
+                TextID = StringId.SelectTime,
+                TextAlignment = TextAlignment.CenterLeft,
+                Width = Application.GetRealWidth(300),
+                X = Application.GetRealWidth(16),
+                TextColor = CSS_Color.FirstLevelTitleColor,
+            };
+            rowTime.AddChidren(btnTimeLeft);
+            var btnTimeRight = new Button()
+            {
+                X = Application.GetRealWidth(339),
+                Gravity = Gravity.CenterVertical,
+                Width = Application.GetMinRealAverage(16),
+                Height = Application.GetMinRealAverage(16),
+                UnSelectedImagePath = "Public/Right.png",
+            };
+            rowTime.AddChidren(btnTimeRight);
+            var btnTime = new Button()
+            {
+                Width = Application.GetRealWidth(327),
+                TextAlignment = TextAlignment.CenterRight,
+                Text = selectDateTime.ToString("HH:mm"),
+                TextColor = CSS_Color.FirstLevelTitleColor,
+            };
+            rowTime.AddChidren(btnTime);
+            EventHandler<MouseEventArgs> timeEvent = (sender, e) =>
             {
                 //鏄剧ず鏃ユ湡閫夋嫨鐨勫簳閮ㄥ脊绐�
                 var contr = new BottomTimeSelectControl();
-                contr.RowCount = 5;
-                contr.InitControl(this.selectDateTime.Hour, this.selectDateTime.Minute, -1);
+                contr.RowCount = 4;
+                contr.InitControl(this.selectDateTime.Hour, this.selectDateTime.Minute,250);
                 contr.FinishEvent += (div, hour, minute) =>
                 {
                     //瑕嗙洊鏃堕棿
@@ -98,6 +159,9 @@
                     }
                 };
             };
+            btnTimeLeft.MouseUpEventHandler = timeEvent;
+            btnTimeRight.MouseUpEventHandler = timeEvent;
+            btnTime.MouseUpEventHandler = timeEvent;
         }
 
         #endregion
@@ -109,6 +173,14 @@
         /// </summary>
         public override void CloseFormBefore()
         {
+            if (TimeCheck)
+            {
+                if (DateTime.Now > this.selectDateTime)
+                {
+                    new PublicAssmebly().TipMsg(StringId.Tip, StringId.TempPwdSettingTip);
+                    throw new Exception("stop");
+                }
+            }
             base.CloseFormBefore();
             //璋冪敤鍥炶皟浜嬩欢
             this.SelectFinshEvent?.Invoke(this.selectDateTime);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs b/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs
index c045e40..e79f5b4 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Music/View/PlayView.cs
@@ -214,7 +214,6 @@
             SeekBarViewHeight = Application.GetRealWidth(8),//杩涘害鏉$殑楂樺害
             ProgressChangeDelayTime = 300,//0.3绉掑彂閫佷竴娆�
             SeekBarPadding = Application.GetRealWidth(20),
-
         };
 
         /// <summary>

--
Gitblit v1.8.0