陈嘉乐
2020-06-02 49ecdeae6cafbfbed6edcf2c209b674e2fe8c31e
ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -37,7 +37,7 @@
        public int timeLong = 0;
        public async void Show()
        {
            #region  界面的布局代码
            UserView.HomePage.Instance.ScrollEnabled = false;//锁住左滑
            TopView view = new TopView();
@@ -64,7 +64,6 @@
            this.AddChidren(middle);
            #endregion
            //是常开模式再去读取
            Send.CurrentDoorLock.IsDoorLockNormallyMode = true;
            if (Send.CurrentDoorLock.IsDoorLockNormallyMode)
            {
                //进来更新一次
@@ -221,8 +220,23 @@
                }
                catch { }
            };
            //UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction += (DoorlockKey, _bool) =>             //{             //    var key = Send.CurrentDoorLock.DeviceAddr + Send.CurrentDoorLock.DeviceEpoint;             //    if (DoorlockKey == key)             //    {             //        try             //        {             //            Application.RunOnMainThread(() =>             //            {             //                Send.CurrentDoorLock.IsDoorLockNormallyMode = _bool;             //                ModeView();             //            });             //        }             //        catch { }             //    }             //};
            //UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction += (DoorlockKey, _bool) =>
            //{
            //    var key = Send.CurrentDoorLock.DeviceAddr + Send.CurrentDoorLock.DeviceEpoint;
            //    if (DoorlockKey == key)
            //    {
            //        try
            //        {
            //            Application.RunOnMainThread(() =>
            //            {
            //                Send.CurrentDoorLock.IsDoorLockNormallyMode = _bool;
            //                ModeView();
            //            });
            //        }
            //        catch { }
            //    }
            //};
        }
        /// <summary>
        /// 常开模式开关切换图标界面
@@ -268,6 +282,7 @@
                openModeFl.AddChidren(closeBtn);
                closeBtn.MouseUpEventHandler += async (sender, e) =>
                {
                    CommonPage.Loading.Start();
                    try
                    {
@@ -298,8 +313,7 @@
                        });
                    }
                };
                if (logicId != 0)
                {
                    ///显示失效设置时间文本控件
@@ -333,15 +347,15 @@
                        ///有时效性常开才显示时间条件文本
                        year = datetime.Year.ToString();//那一年
                        month = datetime.Month.ToString();//那一月
                        var d = int.Parse(datetime.ToString("dd"));//那一天
                        var h = int.Parse(datetime.ToString("HH"));//小时
                        int dayInt = (h + timeValue) / 24;//设置时间+当前系统时间是否超出24小时
                        hour = (h + timeValue) % 24;//设置时间+当前系统时间是否超出24小时剩下多少小时
                        days = d + dayInt;//当前系统天数+执行后天数
                        days = int.Parse(datetime.ToString("dd"));//那一天
                        hour = int.Parse(datetime.ToString("HH"));//小时
                        minute = datetime.Minute;//分钟
                        timeLong = 0;
                    }
                    else
                    {
                        ///读取系统时间                         year = DateTime.Now.Year.ToString();//那一年
                        month = DateTime.Now.Month.ToString();//那一月
                        var d = DateTime.Now.ToString("dd");//那一天
@@ -407,12 +421,13 @@
                modeFl.AddChidren(clickBtn);
                clickBtn.MouseUpEventHandler += (sender, e) =>
                {
                    LogicView.TipView.ShowConfrimTip(() =>
                    {///再次确认
                        LogicView.TipView.ShowInputTip(true, async (str) =>
                        {///确认发送命令
                            CommonPage.Loading.Start();
                            try
                            {