From a4d29f9f72452ccae2f607e6ad31cad493822da4 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 06 五月 2020 11:36:47 +0800
Subject: [PATCH] 2020-05-06-1

---
 ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs |  134 ++++++++++++++++----------------------------
 1 files changed, 50 insertions(+), 84 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
index ae7f8e6..4501171 100644
--- a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -108,48 +108,28 @@
                     TextSize = 16,
                 };
                 openModeFl.AddChidren(closeBtn);
-                closeBtn.MouseUpEventHandler += (sender, e) =>
+                closeBtn.MouseUpEventHandler += async (sender, e) =>
                 {
-
-                    var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
-                   Language.StringByID(MyInternationalizationString.doyouwanttodelete),
-                   Language.StringByID(MyInternationalizationString.confrim));
-                    alert.Show();
-                    alert.ConfirmClickEvent += async () =>
+                    var result = await UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(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
+                    {
+                        ///鎻愮ず澶辫触
+                    }
 
-                     Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(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(() => { }, 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 {
-                        //    ///鎻愮ず澶辫触
-                        //}
-
-                    };
                 };
 
                 ///鏄剧ず澶辨晥璁剧疆鏃堕棿鏂囨湰鎺т欢
@@ -226,67 +206,53 @@
                 };
                 modeFl.AddChidren(nextIconBtn);
 
-               
 
-              nextIconBtn.MouseUpEventHandler += (sender, e) =>
-               {
 
-                   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);
-
-                   };
-                   #region 
-                   /*
-                   LogicView.TipView.ShowConfrimTip(() =>
-                   {///鍐嶆纭
+                nextIconBtn.MouseUpEventHandler += (sender, e) =>
+                 {
+                     LogicView.TipView.ShowConfrimTip(() =>
+                     {///鍐嶆纭
                        LogicView.TipView.ShowInputTip(true, async (str) =>
-                       {///纭鍙戦�佸懡浠�
+                         {///纭鍙戦�佸懡浠�
                            try
-                           {
+                             {
                                ///xm
-                               var result = await SkipView.OpenMode(true,Send.CurrentDoorLock);
-                               if (!result)
-                               {
-                                   Application.RunOnMainThread(() =>
-                                   {
-                                     ///鎻愮ず澶辫触
+                               var result = await UserCenter.DoorLock.DoorLockCommonInfo.SetNormallyOpenModeFuncAsync(Send.CurrentDoorLock);
+                                 if (!result)
+                                 {
+                                     Application.RunOnMainThread(() =>
+                                     {
+                                       ///鎻愮ず澶辫触
                                    });
-                                   return;
-                               }
-                               else
-                               {
+                                     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);
+                                     }
+                                     this.RemoveFromParent();
+                                     var soneLogicList = new SoneLogicList();
+                                     UserView.HomePage.Instance.AddChidren(soneLogicList);
+                                     UserView.HomePage.Instance.PageIndex += 1;
+                                     soneLogicList.Show(() => { }, true);
 
-                               }
-                           }
-                           catch
-                           {
+                                 }
+                             }
+                             catch
+                             {
 
-                           }
-                       });
+                             }
+                         });
 
-                   });
-                  */
+                     });
 
-                   #endregion
-               };
+                 };
             }
 
             #endregion

--
Gitblit v1.8.0