HDL Home App 第二版本 旧平台金堂用 正在使用
xm
2020-06-19 eb5a57942bae8eb57fd7fb61124c247bebb67e8e
Home0618/Shared/Phone/Device/Logic/SoneLogicList.cs
@@ -65,7 +65,7 @@
            };
            this.AddChidren(middle);
            #endregion
            //是常开模式再去读取
            //是常开模式再去读取
            if (Send.CurrentDoorLock.IsDoorLockNormallyMode)
            {
                //进来更新一次
@@ -221,9 +221,25 @@
                    });
                }
                catch { }
            };
            updateCurrentDoorlockActionTemp = (DoorlockKey, _bool) =>             {                 var key = Send.CurrentDoorLock.DeviceAddr;                 if (DoorlockKey == key)                 {                     try                     {                         Application.RunOnMainThread(() =>                         {                             Send.CurrentDoorLock.IsDoorLockNormallyMode = _bool;                             ModeView();                         });                     }                     catch { }                 }             };
            };
            updateCurrentDoorlockActionTemp = (DoorlockKey, _bool) =>
            {
                var key = Send.CurrentDoorLock.DeviceAddr;
                if (DoorlockKey == key)
                {
                    try
                    {
                        Application.RunOnMainThread(() =>
                        {
                            Send.CurrentDoorLock.IsDoorLockNormallyMode = _bool;
                            ModeView();
                        });
                    }
                    catch { }
                }
            };
            UserCenter.DoorLock.DoorLockCommonInfo.UpdateCurrentDoorlockAction += updateCurrentDoorlockActionTemp;
        }
        /// <summary>
@@ -334,23 +350,16 @@
                        var datetime = GetLocalTime(timeLong);
                        ///有时效性常开才显示时间条件文本
                        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;//当前系统天数+执行后天数
                        month = datetime.Month.ToString();//那一月
                        days = int.Parse(datetime.ToString("dd"));//那一天
                        hour = int.Parse(datetime.ToString("HH"));//小时
                        minute = datetime.Minute;//分钟
                        timeLong = 0;
                    }
                    else
                    {
                        ///读取系统时间                         year = DateTime.Now.Year.ToString();//那一年
                        ///读取系统时间
                        year = DateTime.Now.Year.ToString();//那一年
                        month = DateTime.Now.Month.ToString();//那一月
                        var d = DateTime.Now.ToString("dd");//那一天
                        var h = int.Parse(DateTime.Now.ToString("HH"));//小时
@@ -449,8 +458,8 @@
                                        logicId = addResult;
                                        timeValue = int.Parse(str);
                                        Send.CurrentDoorLock.IsDoorLockNormallyMode = true;
                                        ModeView();
                                        ///添加APP开启常开模式的历史记录
                                        ModeView();
                                        ///添加APP开启常开模式的历史记录
                                        UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9001, string.Empty);
                                    }