xm
2020-05-18 cf0bffdf072bae11bdb8c780d0a355818700f713
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
old mode 100755 new mode 100644
@@ -16,7 +16,7 @@
        }
        /// 给徐梅刷新界面用的
        public  Action<bool> action;
        public Action<bool> action;
        ///第二块第一级父控件
        FrameLayout fLayout = new FrameLayout();
        ///第三块第一级父控件
@@ -33,7 +33,7 @@
        public int timeValue = 0;
        public async void Show()
        {
            #region  界面的布局代码
            UserView.HomePage.Instance.ScrollEnabled = false;//锁住左滑
            TopView view = new TopView();
@@ -41,7 +41,7 @@
            view.toptitleNameBtn.TextID = MyInternationalizationString.openmode;
            view.clickBtn.MouseDownEventHandler += (sender, e) =>
            {
                UserView.HomePage.Instance.ScrollEnabled = true;
                UserView.HomePage.Instance.ScrollEnabled = true;
                //把静态变量的这个东西置空
                soneLogicList = null;
                this.RemoveFromParent();
@@ -215,7 +215,7 @@
        /// <summary>
        /// 常开模式开关切换图标界面
        /// </summary>
        public  void ModeView()
        public void ModeView()
        {
            fLayout.RemoveAll();
@@ -367,25 +367,25 @@
                };
                modeFl.AddChidren(clickBtn);
                clickBtn.MouseUpEventHandler += (sender, e) =>
                 {
                {
                     LogicView.TipView.ShowConfrimTip(() =>
                    LogicView.TipView.ShowConfrimTip(() =>
                     {///再次确认
                    {///再次确认
                        LogicView.TipView.ShowInputTip(true, async (str) =>
                         {///确认发送命令
                        {///确认发送命令
                            CommonPage.Loading.Start();
                             try
                             {
                            try
                            {
                                ///xm
                                var result = await UserCenter.DoorLock.DoorLockCommonInfo.SetNormallyOpenModeFuncAsync(Send.CurrentDoorLock);
                                 if (!result)
                                 {
                                     LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.openFailed));
                                     return;
                                 }
                                 else
                                 {
                                if (!result)
                                {
                                    LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.openFailed));
                                    return;
                                }
                                else
                                {
                                    ///因为有常开模式下才可以创建失效逻辑;
                                    SkipView.GetLogicAll();//删除之前所有失效逻辑
                                    var addResult = await SkipView.LockAddModifyLogic(int.Parse(str), Send.CurrentDoorLock);//添加一条失效逻辑
@@ -400,8 +400,8 @@
                                    logicId = addResult;
                                    timeValue = int.Parse(str);
                                    Send.CurrentDoorLock.IsDoorLockNormallyMode = true;
                                    ModeView();
                                    //添加App开启常开模式的历史记录
                                    ModeView();
                                    //添加App开启常开模式的历史记录
                                    UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9001, string.Empty);
                                }
                            }
@@ -434,7 +434,7 @@
        /// 读取自动化列表数据;
        /// </summary>
        /// <param name="yes"></param>
        private async void Read( bool yes)
        private async void Read(bool yes)
        {
            if (yes)
            {
@@ -511,7 +511,7 @@
                    selectedRow = logicRow;
                };
                a++;
                ///显示逻辑名称的控件
                ///显示逻辑名称的控件
                var nameBtn = new Button
                {
                    Height = Application.GetRealHeight(58),
@@ -575,7 +575,7 @@
                    TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor,
                };
                logicRow.AddRightView(edit);
                ///删除
                var del = new Button
                {
@@ -628,19 +628,19 @@
                {
                    var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
                    Language.StringByID(MyInternationalizationString.doyouwanttodelete),
                    Language.StringByID(MyInternationalizationString.confrim));
                    alert.Show();
                    alert.ConfirmClickEvent += () =>
                    Language.StringByID(MyInternationalizationString.confrim));
                    alert.Show();
                    alert.ConfirmClickEvent += () =>
                    {
                        Common.Logic.SoneLogicList.Remove(logic);
                        //logicRow.Parent.RemoveFromParent();
                        fLayoutLogic.RemoveFromParent();
                        Send.DelLogic(logic.LogicId);
                        Send.DelLogic(logic.LogicId);
                    };
                };
                };
            }
        }
    }
}