| | |
| | | }; |
| | | this.AddChidren(middle); |
| | | #endregion |
| | | //是常开模式再去读取 |
| | | //是常开模式再去读取 |
| | | if (Send.CurrentDoorLock.IsDoorLockNormallyMode) |
| | | { |
| | | //进来更新一次 |
| | |
| | | }); |
| | | } |
| | | 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> |
| | |
| | | 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"));//小时 |
| | |
| | | logicId = addResult; |
| | | timeValue = int.Parse(str); |
| | | Send.CurrentDoorLock.IsDoorLockNormallyMode = true; |
| | | ModeView(); |
| | | ///添加APP开启常开模式的历史记录 |
| | | ModeView();
|
| | | ///添加APP开启常开模式的历史记录
|
| | | UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9001, string.Empty); |
| | | } |
| | | |