From ee888ab45a850245b1e1372375ba9040316086ab Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 30 四月 2020 18:05:34 +0800
Subject: [PATCH] 2020-04-30

---
 ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs         |  353 +++++++++++++++++++++++++++-
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs |    2 
 ZigbeeApp/GateWay.Droid/Assets/Language.ini                      |   10 
 ZigbeeApp/Home.Ios/Resources/Language.ini                        |   11 
 ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml                           |   42 +-
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs   |   30 ++
 ZigbeeApp/Shared/Phone/Device/Logic/Method.cs                    |    2 
 ZigbeeApp/Shared/R.cs                                            |   10 
 ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs                  |   47 +--
 ZigbeeApp/Shared/Common/ZigbeeColor.cs                           |    1 
 ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide                     |    0 
 .DS_Store                                                        |    0 
 ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs             |  156 ++++++++----
 13 files changed, 531 insertions(+), 133 deletions(-)

diff --git a/.DS_Store b/.DS_Store
index b86f0d7..7dd0f9d 100644
--- a/.DS_Store
+++ b/.DS_Store
Binary files differ
diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
index 6f2ed5f..0cb68fd 100644
--- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
+++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml
@@ -1,40 +1,44 @@
 锘�<Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default">
   <MonoDevelop.Ide.ItemProperties.GateWay.Droid PreferredExecutionTarget="Android.5c86e4357d63" />
   <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.M7BBB18B19152766" />
-  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/LogicView/TipView.cs">
+  <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/SoneLogicList.cs">
     <Files>
-      <File FileName="Shared/Phone/Device/Logic/SoneLogicList.cs" Line="214" Column="31" />
-      <File FileName="Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs" Line="326" Column="22" />
-      <File FileName="Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs" Line="179" Column="15" />
+      <File FileName="Shared/Phone/Device/Logic/SoneLogicList.cs" Line="19" Column="22" />
+      <File FileName="Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs" Line="8" Column="43" />
+      <File FileName="Shared/Phone/UserCenter/DoorLock/ShowDoorLockMsgControl.cs" Line="442" Column="18" />
       <File FileName="Shared/Phone/UserCenter/CommonBase/Common/UserCenterEnumCommon.cs" Line="483" Column="19" />
-      <File FileName="Shared/Phone/Device/Logic/SkipView.cs" Line="43" Column="74" />
+      <File FileName="Shared/Phone/Device/Logic/SkipView.cs" Line="28" Column="26" />
       <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="214" Column="45" />
-      <File FileName="Shared/Phone/UserCenter/CommonBase/Controls/MessageControls/ShowMsgControl.cs" Line="205" Column="48" />
-      <File FileName="Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs" Line="1068" Column="64" />
-      <File FileName="Shared/Phone/Device/Logic/Method.cs" Line="783" Column="38" />
-      <File FileName="Shared/Phone/Device/Logic/LogicView/TipView.cs" Line="10" Column="21" />
-      <File FileName="Shared/Phone/Device/Logic/CustomText.cs" Line="26" Column="82" />
-      <File FileName="Shared/Common/ZigbeeColor.cs" Line="354" Column="62" />
-      <File FileName="Shared/Phone/ZigBee/Device/DoorLock.cs" Line="1" Column="1" />
-      <File FileName="Shared/Phone/Device/Logic/LogicView/FunView.cs" Line="28" Column="65" />
+      <File FileName="Shared/Phone/UserCenter/CommonBase/Controls/MessageControls/ShowMsgControl.cs" Line="161" Column="45" />
+      <File FileName="Shared/Phone/Device/Logic/Method.cs" Line="834" Column="50" />
+      <File FileName="Shared/R.cs" Line="559" Column="23" />
+      <File FileName="Shared/Phone/Device/Logic/LogicView/TipView.cs" Line="119" Column="23" />
+      <File FileName="Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs" Line="608" Column="22" />
+      <File FileName="Shared/Phone/UserCenter/DoorLock/MasterManagementPage.cs" Line="138" Column="60" />
+      <File FileName="Shared/Phone/ZigBee/Device/DoorLock.cs" Line="42" Column="41" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
         <State name="__root__">
           <Node name="GateWay" expanded="True">
-            <Node name="GateWay.Droid" expanded="True" />
+            <Node name="GateWay.Droid" expanded="True">
+              <Node name="Assets" expanded="True" />
+            </Node>
+            <Node name="Home.IOS" expanded="True">
+              <Node name="Resources" expanded="True" />
+            </Node>
             <Node name="Shared" expanded="True">
               <Node name="Common" expanded="True" />
               <Node name="Phone" expanded="True">
                 <Node name="Device" expanded="True">
                   <Node name="Logic" expanded="True">
-                    <Node name="LogicView" expanded="True">
-                      <Node name="TipView.cs" selected="True" />
-                    </Node>
+                    <Node name="LogicView" expanded="True" />
+                    <Node name="SoneLogicList.cs" selected="True" />
                   </Node>
                 </Node>
                 <Node name="UserCenter" expanded="True">
                   <Node name="CommonBase" expanded="True">
+                    <Node name="Common" expanded="True" />
                     <Node name="Controls" expanded="True">
                       <Node name="BaseCommonControl" expanded="True">
                         <Node name="Base" expanded="True" />
@@ -42,10 +46,6 @@
                       <Node name="MessageControls" expanded="True" />
                       <Node name="NormalControls" expanded="True" />
                     </Node>
-                    <Node name="Logic" expanded="True" />
-                  </Node>
-                  <Node name="Device" expanded="True">
-                    <Node name="Bind" expanded="True" />
                   </Node>
                   <Node name="DoorLock" expanded="True" />
                 </Node>
diff --git a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
index d188940..6eb247a 100644
--- a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
+++ b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide
Binary files differ
diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
index 09067d8..82442c6 100755
--- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini
+++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini
@@ -536,7 +536,15 @@
 5387=鍙�
 5388=甯稿紑鑷姩鍖�
 5389=鏃舵晥鎬у父寮�璁剧疆
-
+5390=澶辨晥璁剧疆
+5391=灏忔椂
+5392=闂ㄩ攣濮嬬粓鎵撳紑
+5393=璁剧疆甯稿紑妯″紡鍚庯紝鎮ㄧ殑闂ㄩ攣灏嗗缁坽0}澶勪簬鎵撳紑鐘舵�侊紝纭寮�鍚紵 
+5394=涓嶈兘灏忎簬1灏忔椂
+5395=澶т簬12灏忔椂
+5396=鎴�
+5397=鏃堕棿涓虹┖
+5398=鍙敮鎸佹暟瀛楄緭鍏�
 
 10000=HDL Home
 10001=甯哥敤
diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini
index 9028fa0..82442c6 100755
--- a/ZigbeeApp/Home.Ios/Resources/Language.ini
+++ b/ZigbeeApp/Home.Ios/Resources/Language.ini
@@ -536,8 +536,15 @@
 5387=鍙�
 5388=甯稿紑鑷姩鍖�
 5389=鏃舵晥鎬у父寮�璁剧疆
-
-
+5390=澶辨晥璁剧疆
+5391=灏忔椂
+5392=闂ㄩ攣濮嬬粓鎵撳紑
+5393=璁剧疆甯稿紑妯″紡鍚庯紝鎮ㄧ殑闂ㄩ攣灏嗗缁坽0}澶勪簬鎵撳紑鐘舵�侊紝纭寮�鍚紵 
+5394=涓嶈兘灏忎簬1灏忔椂
+5395=澶т簬12灏忔椂
+5396=鎴�
+5397=鏃堕棿涓虹┖
+5398=鍙敮鎸佹暟瀛楄緭鍏�
 
 10000=HDL Home
 10001=甯哥敤
diff --git a/ZigbeeApp/Shared/Common/ZigbeeColor.cs b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
index 3e1da83..7086938 100644
--- a/ZigbeeApp/Shared/Common/ZigbeeColor.cs
+++ b/ZigbeeApp/Shared/Common/ZigbeeColor.cs
@@ -367,6 +367,7 @@
         public uint LogicListWeekTextColor = 0xFF666666;
         public uint LogicTipColor = 0xFF333443;
         public uint LogicTipTextColor= 0xFFcccccc;
+        public uint LogicEditTextBackgroundColor=0xFFD1D1D3;
         #endregion
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs
index f20ec2d..0a63986 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs
@@ -5,12 +5,23 @@
 {
     public class TipView
     {
-     
-
-        public void ShowTip(FrameLayout fLayout)
+        /// <summary>
+        /// 纭畾妗�
+        /// </summary>
+        /// <param name="action"></param>
+        public static void ShowConfrimTip(Action action)
         {
-            
-
+            ///涓绘帶浠�
+            Dialog dialog = new Dialog();
+            dialog.Show();
+            ///鑳屾櫙鐨勭埗鎺т欢
+            FrameLayout fLayout = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
+            dialog.AddChidren(fLayout);
+            fLayout.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///寮规鐖舵帶浠�
             FrameLayout tipFLayout = new FrameLayout
             {
                 X = Application.GetRealWidth(144),
@@ -18,17 +29,17 @@
                 Width = Application.GetRealWidth(792),
                 Height = Application.GetRealHeight(351 + 127),
                 BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(17)
             };
             fLayout.AddChidren(tipFLayout);
-            tipFLayout.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft| HDLUtils.RectCornerTopRight| HDLUtils.RectCornerBottomLeft| HDLUtils.RectCornerBottomRight);
-
+            ///涓婇潰蹇殑鐖舵帶浠�
             FrameLayout topFrame = new FrameLayout
             {
                 Width = Application.GetRealWidth(792),
                 Height = Application.GetRealHeight(351),
             };
             tipFLayout.AddChidren(topFrame);
-
+            ///鎻愮ず鎺т欢
             Button tipBtn = new Button
             {
                 TextID = R.MyInternationalizationString.Tip,
@@ -41,11 +52,10 @@
                 Width = Application.GetRealWidth(492),
             };
             topFrame.AddChidren(tipBtn);
-
-
+            ///鑷畾涔夋枃鏈帶浠�
             Button tipTextBtn = new Button
             {
-                Text=Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n"),
+                Text = Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n"),
                 TextAlignment = TextAlignment.Center,
                 TextColor = ZigbeeColor.Current.LogicTipTextColor,
                 TextSize = 14,
@@ -56,7 +66,7 @@
                 IsMoreLines = true,
             };
             topFrame.AddChidren(tipTextBtn);
-
+            ///涓嬮潰蹇殑鐖舵帶浠�
             FrameLayout bottomFrame = new FrameLayout
             {
                 Y = topFrame.Bottom,
@@ -65,7 +75,7 @@
             };
             tipFLayout.AddChidren(bottomFrame);
 
-
+            ///鍙栨秷鎺т欢
             Button cancelBtn = new Button
             {
                 TextAlignment = TextAlignment.Center,
@@ -74,10 +84,11 @@
                 Height = Application.GetRealHeight(127),
                 Width = Application.GetRealWidth(397),
                 BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
-                Text="123",
+                TextID = R.MyInternationalizationString.cancel,
             };
             bottomFrame.AddChidren(cancelBtn);
-            cancelBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerTopLeft );
+            cancelBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft);
+            ///纭鎺т欢
             Button okBtn = new Button
             {
                 TextAlignment = TextAlignment.Center,
@@ -85,16 +96,320 @@
                 TextSize = 14,
                 X = cancelBtn.Right,
                 Height = Application.GetRealHeight(127),
-                Width = bottomFrame.Width- cancelBtn.Width, 
+                Width = bottomFrame.Width - cancelBtn.Width,
                 BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor,
-                Text = "456",
+                TextID = R.MyInternationalizationString.confrim,
             };
             bottomFrame.AddChidren(okBtn);
             okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomRight);
-            cancelBtn.MouseUpEventHandler += (sender,e) => {
-                fLayout.RemoveFromParent();
+            ///鍙栨秷鐐瑰嚮浜嬩欢
+            cancelBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///纭鐐瑰嚮浜嬩欢
+            okBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+                action();
             };
         }
+        /// <summary>
+        /// 杈撳叆妗�
+        /// </summary>
+        /// <param name="_if">鏄惁闇�瑕佸彇娑堟寜閽�</param>
+        /// <param name="action"></param>
+        public static void ShowInputTip(bool _if, Action<string> action)
+        {
 
+            ///涓绘帶浠�
+            Dialog dialog = new Dialog();
+            dialog.Show();
+            ///鑳屾櫙鐨勭埗鎺т欢
+            FrameLayout fLayout = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
+            dialog.AddChidren(fLayout);
+            fLayout.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///寮规鐖舵帶浠�
+            FrameLayout tipFLayout = new FrameLayout
+            {
+                X = Application.GetRealWidth(144),
+                Y = Application.GetRealHeight(706),
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351 + 127),
+                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(17)
+            };
+            fLayout.AddChidren(tipFLayout);
+            ///涓婇潰蹇殑鐖舵帶浠�
+            FrameLayout topFrame = new FrameLayout
+            {
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351),
+            };
+            tipFLayout.AddChidren(topFrame);
+            ///鎻愮ず鎺т欢
+            Button tipBtn = new Button
+            {
+                Y = Application.GetRealHeight(69),
+                X = Application.GetRealWidth(150),
+                Height = Application.GetRealHeight(63),
+                Width = Application.GetRealWidth(492),
+               TextID = R.MyInternationalizationString.invalidSetting,
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicTipColor,
+                TextSize = 16,
+
+            };
+            topFrame.AddChidren(tipBtn);
+            ///鏂囨湰1鎺т欢
+            Button Text1Btn = new Button
+            {
+                Y = Application.GetRealHeight(187),
+                X = Application.GetRealWidth(50),
+                Height = Application.GetRealHeight(58),
+                Width = Application.GetRealWidth(242 + 94),
+                TextID = R.MyInternationalizationString.lockOpen,
+                TextAlignment = TextAlignment.CenterRight,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+
+            };
+            topFrame.AddChidren(Text1Btn);
+            ///杈撳叆鏂囨湰妗�
+            EditText editTime = new EditText()
+            {
+                X = Application.GetRealWidth(409),
+                Y = Application.GetRealHeight(173),
+                Height = Application.GetRealHeight(81),
+                Width = Application.GetRealWidth(132),
+                Radius = (uint)Application.GetMinRealAverage(17),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+                TextColor = ZigbeeColor.Current.LogicTextBlackColor,
+                TextAlignment = TextAlignment.Center,
+                TextSize = 14,
+                Text = "12",
+                IsNumberKeyboardType=true,//鍙緭鍏ユ暟瀛楃殑灞炴��
+            };
+            topFrame.AddChidren(editTime);
+            ///鏂囨湰2鎺т欢
+            Button Text2Btn = new Button
+            {
+                Y = Application.GetRealHeight(187),
+                X = Application.GetRealWidth(564),
+                Height = Application.GetRealHeight(58),
+                Width = Application.GetRealWidth(51 + 100),
+                TextID = R.MyInternationalizationString.hour,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+
+            };
+            topFrame.AddChidren(Text2Btn);
+
+            ///涓嬮潰蹇殑鐖舵帶浠�
+            FrameLayout bottomFrame = new FrameLayout
+            {
+                Y = topFrame.Bottom,
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(127),
+            };
+            tipFLayout.AddChidren(bottomFrame);
+            ///鍙栨秷鎺т欢
+            Button cancelBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+                Height = Application.GetRealHeight(127),
+                Width = Application.GetRealWidth(397),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+                TextID = R.MyInternationalizationString.cancel,
+            };
+            bottomFrame.AddChidren(cancelBtn);
+            ///纭鎺т欢
+            Button okBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                TextSize = 14,
+                X = cancelBtn.Right,
+                Height = Application.GetRealHeight(127),
+                Width = bottomFrame.Width - cancelBtn.Width,
+                BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor,
+                TextID = R.MyInternationalizationString.confrim,
+            };
+            bottomFrame.AddChidren(okBtn);
+
+            if (_if) {
+                cancelBtn.X = Application.GetRealWidth(0);
+                cancelBtn.Width = Application.GetRealWidth(0);
+                okBtn.X = Application.GetRealWidth(0);
+                okBtn.Width = Application.GetRealWidth(792);
+                okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            }
+            else
+            {
+                cancelBtn.X = Application.GetRealWidth(0);
+                cancelBtn.Width = Application.GetRealWidth(397);
+                okBtn.X = Application.GetRealWidth(397);
+                okBtn.Width = bottomFrame.Width - cancelBtn.Width;
+                cancelBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft);
+                okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomRight);
+
+            }
+            ///鍙栨秷鐐瑰嚮浜嬩欢
+            cancelBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///纭鐐瑰嚮浜嬩欢
+            okBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                if (string.IsNullOrEmpty(editTime.Text))
+                {
+                    ShowTip(Language.StringByID(R.MyInternationalizationString.timeNull),true);
+                    return;
+                }
+                if (int.Parse(editTime.Text) < 1 || int.Parse(editTime.Text) > 12)
+                {  ///闄愬埗杈撳叆鏁板瓧鑼冨洿;
+                    string str = Language.StringByID(R.MyInternationalizationString.less) + Language.StringByID(R.MyInternationalizationString.or) + Language.StringByID(R.MyInternationalizationString.more);
+                    ShowTip(str, true);
+                    return;
+
+
+                }
+                dialog.Close();
+                action(editTime.Text);
+           };
+
+        }
+        /// <summary>
+        /// 鎻愮ず妗�
+        /// </summary>
+        public static void ShowTip(string tipText,bool _if )
+        {
+            ///涓绘帶浠�
+            Dialog dialog = new Dialog();
+            dialog.Show();
+            ///鑳屾櫙鐨勭埗鎺т欢
+            FrameLayout fLayout = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
+            dialog.AddChidren(fLayout);
+            fLayout.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///寮规鐖舵帶浠�
+            FrameLayout tipFLayout = new FrameLayout
+            {
+                X = Application.GetRealWidth(144),
+                Y = Application.GetRealHeight(706),
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351 + 127),
+                BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                Radius = (uint)Application.GetRealHeight(17)
+            };
+            fLayout.AddChidren(tipFLayout);
+            ///涓婇潰蹇殑鐖舵帶浠�
+            FrameLayout topFrame = new FrameLayout
+            {
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(351),
+            };
+            tipFLayout.AddChidren(topFrame);
+            ///鎻愮ず鎺т欢
+            Button tipBtn = new Button
+            {
+                Y = Application.GetRealHeight(69),
+                X = Application.GetRealWidth(150),
+                Height = Application.GetRealHeight(63),
+                Width = Application.GetRealWidth(492),
+                TextID = R.MyInternationalizationString.tip,
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicTipColor,
+                TextSize = 16,
+
+            };
+            topFrame.AddChidren(tipBtn);
+            ///鏂囨湰鎺т欢
+            Button Text1Btn = new Button
+            {
+                Y = Application.GetRealHeight(187),
+                X = Application.GetRealWidth(50),
+                Height = Application.GetRealHeight(58),
+                Width = Application.GetRealWidth(792-100),
+                Text= tipText,
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+
+            };
+            topFrame.AddChidren(Text1Btn);
+
+            ///涓嬮潰蹇殑鐖舵帶浠�
+            FrameLayout bottomFrame = new FrameLayout
+            {
+                Y = topFrame.Bottom,
+                Width = Application.GetRealWidth(792),
+                Height = Application.GetRealHeight(127),
+            };
+            tipFLayout.AddChidren(bottomFrame);
+            ///鍙栨秷鎺т欢
+            Button cancelBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBtnCancelColor,
+                TextSize = 14,
+                Height = Application.GetRealHeight(127),
+                Width = Application.GetRealWidth(397),
+                BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
+                TextID = R.MyInternationalizationString.cancel,
+            };
+            bottomFrame.AddChidren(cancelBtn);
+            ///纭鎺т欢
+            Button okBtn = new Button
+            {
+                TextAlignment = TextAlignment.Center,
+                TextColor = ZigbeeColor.Current.LogicBlankBackgroundColor,
+                TextSize = 14,
+                X = cancelBtn.Right,
+                Height = Application.GetRealHeight(127),
+                Width = bottomFrame.Width - cancelBtn.Width,
+                BackgroundColor = ZigbeeColor.Current.LogicBtnTypeColor,
+                TextID = R.MyInternationalizationString.confrim,
+            };
+            bottomFrame.AddChidren(okBtn);
+
+            if (_if)
+            {
+                cancelBtn.X = Application.GetRealWidth(0);
+                cancelBtn.Width = Application.GetRealWidth(0);
+                okBtn.X = Application.GetRealWidth(0);
+                okBtn.Width = Application.GetRealWidth(792);
+                okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft | HDLUtils.RectCornerBottomRight);
+            }
+            else
+            {
+                cancelBtn.X = Application.GetRealWidth(0);
+                cancelBtn.Width = Application.GetRealWidth(397);
+                okBtn.X = Application.GetRealWidth(397);
+                okBtn.Width = bottomFrame.Width - cancelBtn.Width;
+                cancelBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomLeft);
+                okBtn.SetCornerWithSameRadius(Application.GetRealHeight(17), HDLUtils.RectCornerBottomRight);
+
+            }
+            ///鍙栨秷鐐瑰嚮浜嬩欢
+            cancelBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+            ///纭鐐瑰嚮浜嬩欢
+            okBtn.MouseUpEventHandler += (sender, e) =>
+            {
+                dialog.Close();
+            };
+        }
     }
 }
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
old mode 100755
new mode 100644
index 5df1e25..fc95b32
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
@@ -831,7 +831,7 @@
                 var soneLogicList = new SoneLogicList();
                 UserView.HomePage.Instance.AddChidren(soneLogicList);
                 UserView.HomePage.Instance.PageIndex += 1;
-                soneLogicList.Show();
+                soneLogicList.Show(()=> { },false);
             }
 
         }
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
index 9238130..efdbc61 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs
@@ -36,7 +36,7 @@
                         var addLogicPage = new SoneLogicList();
                         UserView.HomePage.Instance.AddChidren(addLogicPage);
                         UserView.HomePage.Instance.PageIndex += 1;
-                        addLogicPage.Show();
+                        addLogicPage.Show(()=> { },false);
 
                         ////new涓�涓柊閫昏緫瀵硅薄锛�
                         ////鏂板姝e父鑷姩鍖栧叆鍙�
@@ -78,28 +78,7 @@
                         doorLockLogicList.Show();
                     }
                     break;
-                case 2:
-                    {
-                        ///Sone闂ㄩ攣涓诲叆鍙�
-                        if (doorLock == null)
-                        {
-                            ///闃叉鎶涘紓甯�
-                            doorLock = new DoorLock();
-                        }
-                        Send.CurrentDoorLock = doorLock;
-                        ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱
-                        Common.Logic.LogicDviceList.Clear();
-                        if (Common.Logic.LogicDviceList.Count == 0)
-                        {
-                            Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
-                        }
-                        var addLogicPage = new SoneLogicList();
-                        UserView.HomePage.Instance.AddChidren(addLogicPage);
-                        UserView.HomePage.Instance.PageIndex += 1;
-                        addLogicPage.Show();
-                     
-                    }
-                    break;
+              
             }
 
         }
@@ -716,7 +695,7 @@
         #endregion
 
         /// <summary>
-        /// 闂ㄩ攣鍙栨秷璁剧疆鐢ㄧ殑鏂规硶(鐩稿綋涓�涓叧闂父寮�妯″紡鎸夐挳,鍒嗙被-鑷姩鍖�-涓嶉渶瑕佹樉绀鸿鑷姩鍖�)
+        /// 闂ㄩ攣澶辨晥璁剧疆鐢ㄧ殑鏂规硶(鐩稿綋涓�涓叧闂父寮�妯″紡鎸夐挳,鍒嗙被-鑷姩鍖�-涓嶉渶瑕佹樉绀鸿鑷姩鍖�)
         /// </summary>
         /// <param name="timeVlaue">鏃堕棿鍊�</param>
         /// <param name="common">璁惧</param>
@@ -818,7 +797,25 @@
             return _if;
         }
 
-     
+        /// <summary>
+        /// 甯稿紑妯″紡寮�鍏�
+        /// </summary>
+        /// <returns></returns>
+        public static async System.Threading.Tasks.Task<bool> OpenMode(bool _if, DoorLock doorLock)
+        {
+            var result = await doorLock.SetNormallyOpenModeFuncAsync(_if);
+            
+            if (result == null || result.defaultControlResponseData == null || result.defaultControlResponseData.status != 0)
+            {
+                return false;
+            }
+            if (result.defaultControlResponseData.status == 0)
+            {
+                //app纭鍙栨秷鈥滃父寮�妯″紡鈥濇垚鍔� 
+                return true;
+            }
+            return false;
+        }
     }
 }
 
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
index b84b75c..ae7f8e6 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -11,12 +11,28 @@
         /// <summary>
         /// 缁橲one闂ㄩ攣寰愭鏇存柊鐣岄潰鐢ㄧ殑
         /// </summary>
+        ///
         public SoneLogicList()
         {
             Tag = "SoneLogic";
         }
-        public async void Show(Action action = null, bool bool_If = false)
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="action">缁欏緪姊呭埛鏂扮晫闈㈢敤鐨�</param>
+        /// <param name="bool_If"></param>
+        public async void Show(Action action, bool bool_If = false)
         {
+            #region  寰愭鍙繖鏍峰仛鐨�
+            string key = Send.CurrentDoorLock.DeviceAddr + "_" + Send.CurrentDoorLock.DeviceEpoint;
+            if (Send.CurrentDoorLock.IsDoorLockNormallyMode.ContainsKey(key))
+            {
+                if (Send.CurrentDoorLock.IsDoorLockNormallyMode[key] == true)
+                {
+                    bool_If = true;
+                }
+            }
+            #endregion
             #region  鐣岄潰鐨勫竷灞�浠g爜
             UserView.HomePage.Instance.ScrollEnabled = false;//閿佷綇宸︽粦
             TopView view = new TopView();
@@ -102,23 +118,37 @@
                     alert.ConfirmClickEvent += async () =>
                     {
 
-                        var bool_ = await UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(new ZigBee.Device.DoorLock { });
-                        if (bool_)
-                        {
+                     Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(Send.CurrentDoorLock, action);
 
-                        }
-                        else { }
-                        if (logic != null)
-                        {
-                            ///鏈夊彲鑳藉彧鏈夊父寮�妯″紡锛屾病鏈夋椂鏁堟�ц嚜鍔ㄥ寲
-                            ///娌℃湁鍒ゆ柇鐨勮瘽锛岄�昏緫浼氫负绌猴紝鎶涘嚭寮傚父;
-                            Send.DelLogic(logic.LogicId);
-                        }
-                        this.RemoveFromParent();
-                        var soneLogicList = new SoneLogicList();
-                        UserView.HomePage.Instance.AddChidren(soneLogicList);
-                        UserView.HomePage.Instance.PageIndex += 1;
-                        soneLogicList.Show();
+                     Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.LogicAction += (d) => {
+                            this.RemoveFromParent();
+                            var soneLogicList = new SoneLogicList();
+                            UserView.HomePage.Instance.AddChidren(soneLogicList);
+                            UserView.HomePage.Instance.PageIndex += 1;
+                            soneLogicList.Show(() => { }, false);
+
+                        };
+
+                        /////xm
+                        //var result = await SkipView.OpenMode(false, Send.CurrentDoorLock);
+                        //if (result)
+                        //{
+                        //    if (logic != null)
+                        //    {
+                        //        ///鏈夊彲鑳藉彧鏈夊父寮�妯″紡锛屾病鏈夋椂鏁堟�ц嚜鍔ㄥ寲
+                        //        ///娌℃湁鍒ゆ柇鐨勮瘽锛岄�昏緫浼氫负绌猴紝鎶涘嚭寮傚父;
+                        //        Send.DelLogic(logic.LogicId);
+                        //    }
+                        //    this.RemoveFromParent();
+                        //    var soneLogicList = new SoneLogicList();
+                        //    UserView.HomePage.Instance.AddChidren(soneLogicList);
+                        //    UserView.HomePage.Instance.PageIndex += 1;
+                        //    soneLogicList.Show(()=>{ },false);
+                        //}
+                        //else {
+                        //    ///鎻愮ず澶辫触
+                        //}
+
                     };
                 };
 
@@ -196,54 +226,66 @@
                 };
                 modeFl.AddChidren(nextIconBtn);
 
-                var clickBtn = new Button
-                {
-                    Y = Application.GetRealHeight(478),
-                    X = Application.GetRealWidth(58),
-                    Height = Application.GetRealHeight(138),
-                    Width = Application.GetRealWidth(1022),
-                };
-                // modeFl.AddChidren(clickBtn);
+               
 
-                nextIconBtn.MouseUpEventHandler += (sender, e) =>
+              nextIconBtn.MouseUpEventHandler += (sender, e) =>
                {
-                   Logic.LogicView.TipView tipView = new LogicView.TipView();
 
-                   FrameLayout fLayout1 = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor };
-                   this.AddChidren(fLayout1);
-                   tipView.ShowTip(fLayout1);
-                   //string msg = Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n");
-                   //var confirm = Language.StringByID(R.MyInternationalizationString.Confrim);
-                   //var alert = new UserCenter.DoorLock.ShowDoorLockMsgControl(UserCenter.DoorLock.ShowDoorLockMsgControl.DoorLockMsgType.Confirm, msg, confirm);
-                   //alert.Show();
-                   //alert.ConfirmClickEvent += () =>
-                   // {
-                   //     string msgTimeInValidSetting = Language.StringByID(R.MyInternationalizationString.DoorLockOpenAllTheTime);
-                   //     var timeConfrim = Language.StringByID(R.MyInternationalizationString.Confrim);
-                   //     var alertTimeInValidSetting = new UserCenter.DoorLock.ShowDoorLockMsgControl(UserCenter.DoorLock.ShowDoorLockMsgControl.DoorLockMsgType.InValid, msgTimeInValidSetting, timeConfrim);
-                   //     alertTimeInValidSetting.Show();
-                   //     alertTimeInValidSetting.InvalidTimeAction += async (obj) =>
-                   //     {
+                   Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidTimeDialog(Send.CurrentDoorLock, action);
+                   Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.LogicAction += (d) => {
+                       this.RemoveFromParent();
+                       var soneLogicList = new SoneLogicList();
+                       UserView.HomePage.Instance.AddChidren(soneLogicList);
+                       UserView.HomePage.Instance.PageIndex += 1;
+                       soneLogicList.Show(() => { }, true);
 
-                   //         var result = await new ZigBee.Device.DoorLock { }.SetNormallyOpenModeFuncAsync(true);
-                   //         //var res = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock);
-                   //     };
-                   // };
+                   };
+                   #region 
+                   /*
+                   LogicView.TipView.ShowConfrimTip(() =>
+                   {///鍐嶆纭
+                       LogicView.TipView.ShowInputTip(true, async (str) =>
+                       {///纭鍙戦�佸懡浠�
+                           try
+                           {
+                               ///xm
+                               var result = await SkipView.OpenMode(true,Send.CurrentDoorLock);
+                               if (!result)
+                               {
+                                   Application.RunOnMainThread(() =>
+                                   {
+                                     ///鎻愮ず澶辫触
+                                   });
+                                   return;
+                               }
+                               else
+                               {
+                                   ///鍥犱负鏈夊父寮�妯″紡涓嬫墠鍙互鍒涘缓澶辨晥閫昏緫锛�
+                                   SkipView.GetLogicAll();//鍒犻櫎涔嬪墠鎵�鏈夊け鏁堥�昏緫
+                                   var addResult = await SkipView.LockAddModifyLogic(int.Parse(str), Send.CurrentDoorLock);//娣诲姞涓�鏉″け鏁堥�昏緫
+                                   if (!addResult)
+                                   {
+                                       ///鎻愮ず澶辫触
+                                       return;
+                                   }
+                                   this.RemoveFromParent();
+                                   var soneLogicList = new SoneLogicList();
+                                   UserView.HomePage.Instance.AddChidren(soneLogicList);
+                                   UserView.HomePage.Instance.PageIndex += 1;
+                                   soneLogicList.Show(() => { }, true);
 
-                   //   //UserCenter.DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidTimeDialog(new ZigBee.Device.DoorLock { });
+                               }
+                           }
+                           catch
+                           {
 
-                   //UserCenter.DoorLock.DoorLockCommonInfo.NomallyOpenModeStartDialog(new ZigBee.Device.DoorLock { }, () =>
-                   //{
-                   //});
-                   // var d = await SkipView.LockAddModifyLogic(12, Send.CurrentDoorLock);
+                           }
+                       });
 
-                   // var contr = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Tip, "sdgdgdfhfhfhgjggfg");
-                   //contr.Show();
-                   //contr.ConfirmClickEvent += () =>
-                   //  {
-                   //  };
+                   });
+                  */
 
-                   //UserCenter.DoorLock.DoorLockCommonInfo.NomallyOpenModeInvalidTimeDialog();
+                   #endregion
                };
             }
 
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
index bccfa65..f88ba42 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs
@@ -388,6 +388,8 @@
             }
             return false;
         }
+    
+
 
         /// <summary>
         /// 鍚姩甯稿紑妯″紡銆愬脊绐椼��
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
index 821bca3..b45641d 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -1057,13 +1057,31 @@
 
             action = () =>
             {
+                {
+                    #region WJC
+                    if (doorLock == null)
+                    {
+                        ///闃叉鎶涘紓甯�
+                        doorLock = new ZigBee.Device.DoorLock();
+                    }
+                    Shared.Phone.Device.Logic.Send.CurrentDoorLock = doorLock;
+                    ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱
+                    Common.Logic.LogicDviceList.Clear();
+                    if (Common.Logic.LogicDviceList.Count == 0)
+                    {
+                        Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
+                    }
+                    var addLogicPage = new Shared.Phone.Device.Logic.SoneLogicList();
+                    UserView.HomePage.Instance.AddChidren(addLogicPage);
+                    UserView.HomePage.Instance.PageIndex += 1;
+                    addLogicPage.Show(() =>
+                    {
+                        UpdateNomallyOpenStatus();//寰愭鐨勬柟娉�
+                    });
+                    //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤娓╁眳鍩庣殑鐣岄潰銆愬父寮�鑷姩鍖栥��
+                    #endregion
+                }
 
-                Shared.Phone.Device.Logic.SkipView.SkipAddLogic(2, doorLock);
-                //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤娓╁眳鍩庣殑鐣岄潰銆愬父寮�鑷姩鍖栥��
-               // functionSetting.aaaAction = () =>
-               //{
-               //    UpdateNomallyOpenStatus();
-               //};
             };
             HdlCheckLogic.Current.CheckSecondarySecurity(action);
             #endregion
diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs
old mode 100755
new mode 100644
index 49e7bfe..7743eee
--- a/ZigbeeApp/Shared/R.cs
+++ b/ZigbeeApp/Shared/R.cs
@@ -822,7 +822,15 @@
         public readonly static int numberSone = 5387;
         public readonly static int openAutomationSone = 5388;
         public readonly static int timeSetSone= 5389;
-
+        public readonly static int invalidSetting = 5390;
+        public readonly static int hour = 5391;
+        public readonly static int lockOpen = 5392;
+        public readonly static int setDoorLockOpen = 5393;
+        public readonly static int less = 5394;
+        public readonly static int more = 5395;
+        public readonly static int or = 5396;
+        public readonly static int timeNull = 5397;
+        public readonly static int numberInput = 5398;
 
         #region 鐧诲綍娉ㄥ唽
         /// <summary>

--
Gitblit v1.8.0