From 121c045cf55c647420cb372f717e528c053295ef Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 19 一月 2022 09:24:31 +0800
Subject: [PATCH] 门锁功能修改

---
 HDL-ON_Android/Properties/AndroidManifest.xml             |    9 -
 HDL_ON/Entity/Function/Function.cs                        |   36 ++++++
 HDL_ON/UI/UI2/1-HomePage/HomePage.cs                      |   68 +++++-----
 HDL_ON/DAL/Server/HttpUtil.cs                             |    4 
 HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs |  156 +++++++++++++------------
 HDL_ON/DAL/DriverLayer/Control.cs                         |   39 ++++++
 HDL_ON/DAL/Mqtt/MqttClient.cs                             |    5 
 HDL_ON/UI/UI1-Login/LoginPage.cs                          |   14 +-
 HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs               |   10 +
 9 files changed, 210 insertions(+), 131 deletions(-)

diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 9a1f2f0..3fc1704 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,6 +1,5 @@
 锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202201141" android:versionName="1.5.2" package="com.hdl.onpro"
-	xmlns:tools="http://schemas.android.com/tools">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202201141" android:versionName="1.5.2" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools">
 	<uses-sdk android:minSdkVersion="28" android:targetSdkVersion="30" />
 	<!--鍙嬬洘-->
 	<!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
@@ -8,7 +7,6 @@
 	<!--<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>-->
 	<!--<uses-permission android:name="android.permission.READ_PHONE_STATE"/>-->
 	<!--<uses-permission android:name="android.permission.INTERNET"/>-->
-         
 	<!-- 涔愭鍙瀵硅闇�瑕佺殑鏉冮檺 -->
 	<!--<uses-permission android:name="android.permission.INTERNET" />-->
 	<!--缃戠粶璁块棶-->
@@ -89,12 +87,8 @@
 	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
 	<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
 	<uses-permission android:name="android.permission.READ_LOGS" />
-
-
-
 	<!-- 鏋佸厜鎺ㄩ�佺粨鏉� -->
 	<application android:allowBackup="true" android:debuggable="true" android:icon="@drawable/Icon" android:networkSecurityConfig="@xml/network_security_config" android:largeHeap="true" android:label="On Pro">
-		 
 		<!--/鎵弿浜岀淮鐮乤ctivity-->
 		<!--<activity
             android:name="com.journeyapps.barcodescanner.CaptureActivity"
@@ -201,5 +195,4 @@
 		<!-- 璁剧疆楂樺痉鍦板浘key -->
 		<meta-data android:name="com.amap.api.v2.apikey" android:value="9901dd06e30b229efdd4c5bf5e076224" />
 	</application>
-
 </manifest>
\ No newline at end of file
diff --git a/HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs b/HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs
index b4c7484..66599af 100644
--- a/HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs
+++ b/HDL_ON/DAL/DriverLayer/A_Protocol_Common.cs
@@ -196,5 +196,15 @@
                 return $"/user/{Control.Ins.GatewayId}/custom/security/list/get";
             }
         }
+
+        #region 闂ㄩ攣
+        public string OneKeyUnlock
+        {
+            get
+            {
+                return $"/base/{Control.Ins.GatewayId}/thing/service/doorRemoteOpen/down";
+            }
+        }
+        #endregion
     }
 }
\ No newline at end of file
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 277b20b..3eafb36 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -1,6 +1,7 @@
 锘縰sing System;
 using System.Collections.Generic;
 using System.Text;
+using HDL_ON.DAL.Server;
 using HDL_ON.Entity;
 using HDL_ON.UI;
 using Shared;
@@ -753,7 +754,7 @@
             //2.Body瀛楃涓茶浆涓篵yte鏁扮粍
             byte[] bodyBytes = Encoding.UTF8.GetBytes(bodyDataString);
             //鍒ゆ柇鏄惁闇�鍔犲瘑Body鏁版嵁
-            if (isEncryption && IsLocalEncryptAndGetAesKey)
+            //if (isEncryption && IsLocalEncryptAndGetAesKey)
             {
                 bodyBytes = Securitys.EncryptionService.AesEncryptPayload(bodyBytes, DB_ResidenceData.Instance.CurrentRegion.localSecret);
                 //bodyDataString = Encoding.UTF8.GetString(bodyBytes);
@@ -979,9 +980,11 @@
                         var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid);
                         if (localFunction == null)
                         {
-                            Console.WriteLine("鎵句笉鍒伴煶涔愭挱鏀惧櫒娣�=======" + revString);
+                            MainPage.Log("鎵句笉鍒伴煶涔愭挱鏀惧櫒娣�=======" + revString);
                             continue;
                         }
+                        MainPage.Log(localFunction.name);
+
                         if (Ins.GatewayOnline_Local && isCloudData)//鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞�
                         {
                             if (!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(localFunction.spk) && !SPK.MusicSpkList().Contains( localFunction.spk))
@@ -1006,7 +1009,7 @@
                         {
                             localFunction.time_stamp = temp.time_stamp;
                             localFunction.SetAttrState(attr.key, attr.value);
-                            Console.WriteLine("闊充箰鎾斁鍣ㄦ坊鍔犵紦瀛樻暟鎹�=======" + revString);
+                            //Console.WriteLine("闊充箰鎾斁鍣ㄦ坊鍔犵紦瀛樻暟鎹�=======" + revString);
 
                         }
 
@@ -1211,5 +1214,35 @@
             }
         }
 
+
+
+        #region 闂ㄩ攣
+
+        /// <summary>
+        /// //涓�閿紙杩滅▼锛夊紑閿�
+        /// </summary>
+        public void OneKeyUnlocking(Function doorlock,string extStr)
+        {
+            if (Ins.GatewayOnline_Local)
+            {
+                Dictionary<string, string> dic = new Dictionary<string, string>();
+                var functionControlDataObj = doorlock.GetGatewayAlinkDoorlockData(UserInfo.Current.ID,extStr);
+                var functionControlDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(functionControlDataObj);
+                var sendBytes = Ins.ConvertSendBodyData($"/base/{Control.Ins.GatewayId}/thing/service/doorRemoteOpen/down", functionControlDataJson);
+                new Control_Udp().SendLocalHdlLinkData(sendBytes, functionControlDataObj.id, 0);
+            }
+            else
+            {
+                Dictionary<string, object> d = new Dictionary<string, object>();
+                d.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id);
+                d.Add("deviceId", doorlock.deviceId);
+                var requestJson = HttpUtil.GetSignRequestJson(d);
+                HttpUtil.RequestHttpsPost("/home-wisdom/app/device/door/remoteOpen", requestJson);
+            }
+        }
+        //瀵嗙爜鍐荤粨
+        //瀵嗙爜楠岃瘉
+
+        #endregion
     }
 }
\ No newline at end of file
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index e617b29..c74affe 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -753,6 +753,9 @@
         /// </summary>
         static void ReceiveNotifySqueezeAsync(string mMes)
         {
+#if DEBUG
+            return;
+#endif
             if (mMes == PushSignStr) return;//鏄嚜宸辩殑鐧诲綍鎺ㄩ�佷笉澶勭悊//鎴栬�呭綋鍓嶄笉鏄繙绋嬮摼鎺ョ姸鎬�
             //娴嬭瘯璐﹀彿锛屼笉鎸や笅绾�
             switch (UserInfo.Current.userMobileInfo)
@@ -809,7 +812,9 @@
         static void SendPushSignOut()
         {
             byte[] message = Encoding.UTF8.GetBytes(PushSignStr);
+#if DEBUG
             MqttRemoteSend(message, 4);
+#endif
         }
 
         /// <summary>
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 6c692b6..315e9a2 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -17,8 +17,8 @@
         /// 鍥哄畾鍩熷悕,姝e紡鐜
         /// 鍏叡鍩熷悕灏辫繎瑙f瀽
         /// </summary>
-        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
-        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
+        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
+        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";//mmmm
         /// <summary>
         /// RegionMark
         /// </summary>
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 300e667..3772dc2 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -701,6 +701,24 @@
             sendDataObj.objects.Add(acd);
             return sendDataObj;
         }
+
+        public AlinkDoorlockObj GetGatewayAlinkDoorlockData(string userId,string extStr)
+        {
+            var sendDataObj = new AlinkDoorlockObj();
+            sendDataObj.id = Control.Ins.msg_id.ToString();
+            sendDataObj.time_stamp = Utlis.GetTimestamp();
+            var acd = new AlinkDoorlockStatus();
+            acd.sid = sid;
+            acd.user_id = userId;
+            acd.ext_str = extStr;
+#if DEBUG
+            acd.user_id = "013";
+            acd.ext_str = "999999";
+#endif
+            sendDataObj.objects.Add(acd);
+            return sendDataObj;
+        }
+
         /// <summary>
         /// 鑾峰彇Api鎺у埗鏁版嵁
         /// </summary>
@@ -755,6 +773,24 @@
         public string id = "";
     }
     /// <summary>
+    /// 闂ㄩ攣閫氳鏁版嵁
+    /// </summary>
+    public class AlinkDoorlockObj
+    {
+        public List<AlinkDoorlockStatus> objects = new List<AlinkDoorlockStatus>();
+        public string time_stamp = "";
+        public string id = "";
+    }
+
+    public class AlinkDoorlockStatus
+    {
+        public string sid;
+        public string user_id;
+        public string ext_str;
+    }
+
+
+    /// <summary>
     /// 鏈湴鐘舵�佽鍙�
     /// A鍗忚鐘舵�佽鍙栨牸寮忓璞�
     /// </summary>
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 5369bff..b416645 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -212,11 +212,10 @@
                     //etAccount.Text = "18022428438";//wjc
                     //etAccount.Text = "13602944661";//kx
                     //etAccount.Text = "13226233133";//璞嗚眴
-                    //etAccount.Text = "18316672920";
+                    etAccount.Text = "18316672920";
                     //etAccount.Text = "18316120654";//tujie
-                    //etAccount.Text = "15626203746";
                     //etAccount.Text = "13450425807";//榛勭婧� knx椤圭洰
-                    etAccount.Text = "18059593333";
+                    //etAccount.Text = "18140004933";
                 }
                 else
                 {
@@ -235,7 +234,7 @@
                     //etAccount.Text = "18598273624";
                     etAccount.Text = "tf@smarttech.com.ua";
                     //etAccount.Text = "18814122445";//钁f辰鏂� 澶╂渤鍔炲叕瀹�
-                    //etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
+                    etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
                     etAccount.Text = "18402017839";//wjc
                     //etAccount.Text = "13430286286";//cwc
                     //etAccount.Text = "13709260805";
@@ -243,19 +242,20 @@
                     //etAccount.Text = "13375012441";
                     //etAccount.Text = "info@smartlife-ks.com";
                     //etAccount.Text = "551775569@qq.com";//wcf
+                    etAccount.Text = "15626203746";
                 }
                 b = !b;
                 etPassword.Text = "123456";
-                if(etAccount.Text == "tf@smarttech.com.ua")
+                if(etAccount.Text == "18140004933")
                 {
-                    etPassword.Text = "Smart2021";
+                    etPassword.Text = "w889900";
                 }
                 //etPassword.Text = "Hdl85521566";
                 btnLogin.IsSelected = true;
             };
 #endif
 
-#region 鐧诲綍鏂瑰紡閫夋嫨
+            #region 鐧诲綍鏂瑰紡閫夋嫨
             btnPhoneLogin = new Button()
             {
                 X = Application.GetRealWidth(28),
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 3c652a7..87e2038 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -553,40 +553,40 @@
 
 #if DEBUG
 
-            FunctionList.List.Functions.Add(new Function
-            {
-                name = "闂ㄩ攣",
-                spk = SPK.DoorLock,
-                sid = "12345",
-                attributes = new List<FunctionAttributes> {
-                    new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" },
-                    new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" },
-                    new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" },
-                    new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" },
-                    new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" },
-                    new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" },
-                    new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" },
-                    new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" },
-                    new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" },
-                }
-            });
-            FunctionList.List.Functions.Add(new Function
-            {
-                name = "闂ㄩ攣1",
-                spk = SPK.DoorLock,
-                sid = "123",
-                attributes = new List<FunctionAttributes> {
-                    new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" },
-                    new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" },
-                    new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" },
-                    new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" },
-                    new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" },
-                    new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" },
-                    new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" },
-                    new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" },
-                    new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" },
-                }
-            });
+            //FunctionList.List.Functions.Add(new Function
+            //{
+            //    name = "闂ㄩ攣",
+            //    spk = SPK.DoorLock,
+            //    sid = "12345",
+            //    attributes = new List<FunctionAttributes> {
+            //        new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" },
+            //        new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" },
+            //        new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" },
+            //        new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" },
+            //        new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" },
+            //        new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" },
+            //        new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" },
+            //        new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" },
+            //        new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" },
+            //    }
+            //});
+            //FunctionList.List.Functions.Add(new Function
+            //{
+            //    name = "闂ㄩ攣1",
+            //    spk = SPK.DoorLock,
+            //    sid = "123",
+            //    attributes = new List<FunctionAttributes> {
+            //        new FunctionAttributes(){ key = "door_status",curValue= "open",state = "open" },
+            //        new FunctionAttributes(){ key = "normal_open",curValue= "true",state = "true" },
+            //        new FunctionAttributes(){ key = "normal_open_countdown",curValue= "10",state = "10" },
+            //        new FunctionAttributes(){ key = "local_id",curValue= "10",state = "10" },
+            //        new FunctionAttributes(){ key = "door_volume",curValue= "10",state = "10" },
+            //        new FunctionAttributes(){ key = "door_volume_step",curValue= "up",state = "up" },
+            //        new FunctionAttributes(){ key = "battery_value",curValue= "100",state = "100" },
+            //        new FunctionAttributes(){ key = "battery_percentage",curValue= "100",state = "100" },
+            //        new FunctionAttributes(){ key = "battery_state",curValue= "high",state = "high" },
+            //    }
+            //});
 
             //FunctionList.List.Functions.Add(new Function()
             //{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
index 5b6d5ca..6d6f61d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs
@@ -5,6 +5,7 @@
 using System.Text;
 using HDL_ON.UI.CSS;
 using HDL_ON.Entity;
+using HDL_ON.DriverLayer;
 
 namespace HDL_ON.UI
 {
@@ -96,24 +97,26 @@
             this.dicText["宸茶繛鎺�"] = Language.StringByID(StringId.Connected);
             this.dicText["鏈繛鎺�"] = Language.StringByID(StringId.UnConnected);
 
-            //宸﹀彸缈婚〉鐨勪簨浠�
-            base.PageChangeEvent += (index) =>
-            {
-                if (index == 1)
-                {
-                    //鍒濆鍖栭棬閿佸巻鍙茶褰曚互鍙婃帶浠�
-                    this.InitDoorHistoryLogAndControl();
-                }
-            };
+            ////宸﹀彸缈婚〉鐨勪簨浠�
+            //base.PageChangeEvent += (index) =>
+            //{
+            //    if (index == 1)
+            //    {
+            //        //鍒濆鍖栭棬閿佸巻鍙茶褰曚互鍙婃帶浠�
+            //        this.InitDoorHistoryLogAndControl();
+            //    }
+            //};
 
             //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛�
             this.RefreshNowDeviceStatuMemory(this.device);
             //鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹�
             this.InitFrameWhiteContent1();
-            //鍒濆鍖栫浜屼釜绱㈠紩椤�(鍘嗗彶璁板綍)
-            this.InitFrameWhiteContent2();
+            ////鍒濆鍖栫浜屼釜绱㈠紩椤�(鍘嗗彶璁板綍)
+            //this.InitFrameWhiteContent2();
             //鍒锋柊鐣岄潰鐘舵��
             this.RefreshFormStatu();
+            //璇诲彇璁惧鐘舵��
+            Control.Ins.SendReadCommand(device);
         }
 
         /// <summary>
@@ -182,42 +185,42 @@
             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)
+            //    {
+            //    }
+            //};
 
             //鍒濆鍖栧紑閿佽彍鍗�(涓�閿紑閿�,涓存椂瀵嗙爜寮�閿�)
             this.InitUnLockMenuControl();
             //鍒濆鍖栧簳閮ㄨ彍鍗曞浘鏍�
-            this.InitBottomMenuIconControl();
+            //this.InitBottomMenuIconControl();
         }
 
         /// <summary>
@@ -226,7 +229,7 @@
         private void InitUnLockMenuControl()
         {
             //濡傛灉鏄垚鍛�,鍒欏彧鏈変竴閿紑閿�
-            if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
+            if (true)// DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true)
             {
                 //涓�閿紑閿�
                 var btnOneKey = new NormalViewControl(100, 25, true);
@@ -908,6 +911,7 @@
                 HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.DeviceNotOnline), null, null, null, 2);
                 return;
             }
+            Control.Ins.OneKeyUnlocking(this.device, this.device.GetAttrState("key"));
             //绗竴娆′娇鐢紝璇峰厛缁戝畾闂ㄩ攣瀵嗙爜
             //HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.PleaseBindTheDoorPswFirst), () =>
             //{
@@ -921,42 +925,40 @@
             //    });
             //});
 
-            if (UserInfo.Current.appUnlockPage.Contains("3") == true)
-            {
-                //璋冭捣瀹夊叏璁よ瘉
-                HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
-                {
-                    //閿佸凡鎵撳紑
-                    if (div == 1)
-                    {
-                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2);
-                    }
-                    else
-                    {
-                        //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿�
-                        HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
-                        {
-                            var page = new AppUnlockSettingsPage();
-                            MainPage.BasePageView.AddChidren(page);
-                            page.LoadPage();
-                            MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-
-                        }, Language.StringByID(StringId.Jump));
-                    }
-                });
-            }
-            else
-            {
-                //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿�
-                HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
-                {
-                    var page = new AppUnlockSettingsPage();
-                    MainPage.BasePageView.AddChidren(page);
-                    page.LoadPage();
-                    MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
-
-                }, Language.StringByID(StringId.Jump));
-            }
+            //if (UserInfo.Current.appUnlockPage.Contains("3") == true)
+            //{
+            //    //璋冭捣瀹夊叏璁よ瘉
+            //    HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) =>
+            //    {
+            //        //閿佸凡鎵撳紑
+            //        if (div == 1)
+            //        {
+            //            HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2);
+            //        }
+            //        else
+            //        {
+            //            //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿�
+            //            HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
+            //            {
+            //                var page = new AppUnlockSettingsPage();
+            //                MainPage.BasePageView.AddChidren(page);
+            //                page.LoadPage();
+            //                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            //            }, Language.StringByID(StringId.Jump));
+            //        }
+            //    });
+            //}
+            //else
+            //{
+            //    //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿�
+            //    HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () =>
+            //    {
+            //        var page = new AppUnlockSettingsPage();
+            //        MainPage.BasePageView.AddChidren(page);
+            //        page.LoadPage();
+            //        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            //    }, Language.StringByID(StringId.Jump));
+            //}
         }
 
         #endregion

--
Gitblit v1.8.0