| | |
| | | /// 安防数据缓存
|
| | | /// </summary>
|
| | | private Dictionary<int, SafeguardZoneInfo> dicAllZoneInfo = new Dictionary<int, SafeguardZoneInfo>();
|
| | | /// <summary>
|
| | | /// 安防上报信息
|
| | | /// </summary>
|
| | | public List<SafeguardAlarmInfo> listAlarmInfo = new List<SafeguardAlarmInfo>();
|
| | | /// <summary>
|
| | | /// 上一次安防上报信息保存的文件名字(考虑到用户有可能24点的时候,不退出APP)
|
| | | /// </summary>
|
| | | private string oldDeviceAlarmFile = string.Empty;
|
| | | /// <summary>
|
| | | /// 锁
|
| | | /// </summary>
|
| | | private object objLock = new object();
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 刷新安防___________________________
|
| | |
| | | try
|
| | | {
|
| | | var jObject = new Newtonsoft.Json.Linq.JObject() { { "Cluster_ID", 0 }, { "Command", 4036 } };
|
| | | await mainGateway.Send("Security/GetSecurityInfo", jObject.ToString());
|
| | | mainGateway.Send("Security/GetSecurityInfo", jObject.ToString());
|
| | | }
|
| | | catch { }
|
| | |
|
| | |
| | | {
|
| | | return GarrisonMode.None;
|
| | | }
|
| | | //判断有没有其他逻辑去修改了布防模式
|
| | | //所以再次获取模式
|
| | | var safetyMode = await this.GetSafetyMode();
|
| | | if (safetyMode != null)
|
| | | {
|
| | | return GarrisonMode.None;
|
| | | }
|
| | |
|
| | | //参数
|
| | | var Pra = new Safeguard.EnableModeData();
|
| | |
| | | this.ShowErrorMsg(msg);
|
| | | return GarrisonMode.RemoveGarrison;
|
| | | }
|
| | |
|
| | | //保存布防操作信息到本地
|
| | | HdlAlarmsLogic.Current.SaveSafeguardAlarmInfo(garrison);
|
| | |
|
| | | return garrison;
|
| | | }
|
| | |
|
| | |
| | | this.ShowErrorMsg(msg);
|
| | | return -1;
|
| | | }
|
| | |
|
| | | if (garrison == GarrisonMode.RemoveGarrison)
|
| | | {
|
| | | //保存布防操作信息到本地
|
| | | HdlAlarmsLogic.Current.SaveSafeguardAlarmInfo(garrison);
|
| | | }
|
| | |
|
| | | return 1;
|
| | | }
|
| | |
|
| | |
| | | var jObject = new Newtonsoft.Json.Linq.JObject { { "Cluster_ID", 0 }, { "Command", 4033 } };
|
| | | var data = new Newtonsoft.Json.Linq.JObject { { "HomeId", Common.Config.Instance.HomeId }, { "Password", password } };
|
| | | jObject.Add("Data", data);
|
| | | await realWay.Send("Security/AdminSetNewPassword", jObject.ToString());
|
| | | realWay.Send("Security/AdminSetNewPassword", jObject.ToString());
|
| | | }
|
| | | catch
|
| | | {
|