| | |
| | | this.ShowTipMsg(msg);
|
| | | return false;
|
| | | }
|
| | | var mainWayId = HdlGatewayLogic.Current.GetGatewayId(mainGateway);
|
| | | var mainWayId = mainGateway.GwId;
|
| | |
|
| | | //主题数固定5+3+1
|
| | | int topicCount = 9;
|
| | |
| | | zoneInfo.ZoneId = allData.ZoneId;
|
| | | zoneInfo.ZoneName = allData.ZoneName;
|
| | |
|
| | | //信息推送
|
| | | zoneInfo.InformationPush = allData.IsDisablePushMessage;
|
| | |
|
| | | //处理设备
|
| | | foreach (var data2 in allData.DeviceList)
|
| | | {
|
| | |
| | |
|
| | | zoneInfo.dicAlarmDevice.Clear();
|
| | | zoneInfo.dicScenes.Clear();
|
| | |
|
| | | //信息推送
|
| | | zoneInfo.InformationPush = resData.IsDisablePushMessage;
|
| | |
|
| | | foreach (var data in resData.Actions)
|
| | | {
|
| | |
| | |
|
| | | if (this.UserPassword == null)
|
| | | {
|
| | | var data = Global.ReadFileByDirectory(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword);
|
| | | var data = HdlFileLogic.Current.ReadFileByteContent(DirNameResourse.SafeguardUserPassword);
|
| | | if (data != null)
|
| | | {
|
| | | this.UserPassword = System.Text.Encoding.UTF8.GetString(data);
|
| | |
| | | if (result != GarrisonMode.None && result != GarrisonMode.RemoveGarrison)
|
| | | {
|
| | | //保存加密的密码到本地
|
| | | Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword, System.Text.Encoding.UTF8.GetBytes(this.UserPassword));
|
| | | HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SafeguardUserPassword, this.UserPassword);
|
| | | }
|
| | | return result;
|
| | | }
|
| | |
| | | if (result2 != GarrisonMode.None && result2 != GarrisonMode.RemoveGarrison)
|
| | | {
|
| | | //保存加密密码到本地
|
| | | Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword, System.Text.Encoding.UTF8.GetBytes(this.UserPassword));
|
| | | HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SafeguardUserPassword, this.UserPassword);
|
| | | }
|
| | | return result2;
|
| | | }
|
| | |
| | | if (result2 != -1)
|
| | | {
|
| | | //保存到加密密码本地
|
| | | Global.WriteFileToDirectoryByBytes(DirNameResourse.LocalMemoryDirectory, DirNameResourse.SafeguardUserPassword, System.Text.Encoding.UTF8.GetBytes(this.UserPassword));
|
| | | HdlFileLogic.Current.SaveTextToFile(DirNameResourse.SafeguardUserPassword, this.UserPassword);
|
| | | }
|
| | | return result2;
|
| | | }
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (zoneId > 3)
|
| | | {
|
| | | zoneId = 3;
|
| | | }
|
| | | //状态变更
|
| | | var result = await Safeguard.DisablePushMessageAsync(zoneId, statu);
|
| | | if (result == null || result.disablePushMessageResponseData == null || result.disablePushMessageResponseData.Result == 1)
|
| | |
| | | /// <returns>0:推送 1:不推送</returns>
|
| | | public int GetGarrisonInformationPushStatu(int zoneId)
|
| | | {
|
| | | if (zoneId > 3)
|
| | | {
|
| | | zoneId = 3;
|
| | | }
|
| | | if (this.dicAllZoneInfo.ContainsKey(zoneId) == false)
|
| | | {
|
| | | return 1;
|
| | |
| | | bool success = false;
|
| | | //超时时间
|
| | | int TimeOut = 0;
|
| | | string checkTopic = HdlGatewayLogic.Current.GetGatewayId(realWay) + "/Security/AdminSetNewPassword_Respon";
|
| | | string checkTopic = realWay.GwId + "/Security/AdminSetNewPassword_Respon";
|
| | | Action<string, string> getResultAction = (topic, message) =>
|
| | | {
|
| | | try
|
| | |
| | | /// </summary>
|
| | | public string ZoneName;
|
| | | /// <summary>
|
| | | /// 信息推送 0:推送 1:不推送 (只有防区ID:1,2,3才会有。4,5的都归为3,因为它是以防区模式ID(ActionType)为单位的)
|
| | | /// 信息推送 0:推送 1:不推送 |
| | | /// </summary>
|
| | | public int InformationPush = 1;
|
| | | /// <summary>
|