| | |
| | | if (bolSave == true) |
| | | { |
| | | //删掉这个文件,重新生成 |
| | | HdlAutoBackupLogic.DeleteFile(file); |
| | | HdlBackupLogic.Current.DeleteAutoBackFileStatu(file); |
| | | Global.DeleteFilebyHomeId(file); |
| | | } |
| | | |
| | |
| | | //不存在的话,重新生成 |
| | | device.IconPath = string.Empty; |
| | | device.ReSave(); |
| | | HdlAutoBackupLogic.AddOrEditorFile(device.FilePath); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(device.FilePath); |
| | | |
| | | bolSave = false; |
| | | } |
| | |
| | | if (bolSave == true) |
| | | { |
| | | device.ReSave(); |
| | | HdlAutoBackupLogic.AddOrEditorFile(device.FilePath); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(device.FilePath); |
| | | } |
| | | } |
| | | //成员身份的时候,删除掉非法的网关文件 |
| | |
| | | if (exists == false) |
| | | { |
| | | //添加自动备份 |
| | | HdlAutoBackupLogic.AddOrEditorFile(device.FilePath); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(device.FilePath); |
| | | } |
| | | return; |
| | | } |
| | |
| | | if (exists2 == false) |
| | | { |
| | | //添加自动备份 |
| | | HdlAutoBackupLogic.AddOrEditorFile(device.FilePath); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(device.FilePath); |
| | | } |
| | | } |
| | | |
| | |
| | | //如果当前是虚拟住宅 |
| | | if (Common.Config.Instance.Home.IsVirtually == true) |
| | | { |
| | | return Phone.TemplateData.TemplateDeviceDataLogic.Current.ReDeviceMacName(device, macName); |
| | | return Phone.HdlTemplateDeviceDataLogic.Current.ReDeviceMacName(device, macName); |
| | | } |
| | | |
| | | //获取编辑设备Mac名字的命令字符 |
| | |
| | | return null; |
| | | } |
| | | //加缓存 |
| | | Phone.TemplateData.TemplateDeviceDataLogic.Current.ReDeviceMacName(device, macName); |
| | | Phone.HdlTemplateDeviceDataLogic.Current.ReDeviceMacName(device, macName); |
| | | |
| | | var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.RenameDeviceMacNameData>(result.ReceiptData); |
| | | return new CommonDevice.RenameDeviceMacNameAllData { renameDeviceMacNameData = tempData }; |
| | |
| | | //如果当前是虚拟住宅 |
| | | if (Common.Config.Instance.Home.IsVirtually == true) |
| | | { |
| | | return Phone.TemplateData.TemplateDeviceDataLogic.Current.ReDeviceEpointName(device, deviceName); |
| | | return Phone.HdlTemplateDeviceDataLogic.Current.ReDeviceEpointName(device, deviceName); |
| | | } |
| | | //获取编辑设备端点名字的命令字符 |
| | | var sendData = this.GetReDeviceEpointNameCommandText(device.DeviceAddr, device.DeviceEpoint, deviceName); |
| | |
| | | return null; |
| | | } |
| | | //加缓存 |
| | | Phone.TemplateData.TemplateDeviceDataLogic.Current.ReDeviceEpointName(device, deviceName); |
| | | Phone.HdlTemplateDeviceDataLogic.Current.ReDeviceEpointName(device, deviceName); |
| | | |
| | | var tempData = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.DeviceRenameResponseData>(result.ReceiptData); |
| | | return new CommonDevice.DeviceRenameAllData { deviceRenameData = tempData }; |
| | |
| | | device.ReSave(); |
| | | |
| | | //添加自动备份 |
| | | HdlAutoBackupLogic.AddOrEditorFile(device.FilePath); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(device.FilePath); |
| | | } |
| | | else if (this.dicOTADevice.ContainsKey(mainKeys) == true) |
| | | { |
| | |
| | | device.ReSave(); |
| | | |
| | | //添加自动备份 |
| | | HdlAutoBackupLogic.AddOrEditorFile(device.FilePath); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(device.FilePath); |
| | | |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | //删除模板数据 |
| | | Phone.TemplateData.TemplateCommonLogic.Current.DeleteDevice(device); |
| | | Phone.HdlTemplateCommonLogic.Current.DeleteDevice(device); |
| | | |
| | | //删除设备文件 |
| | | string filePath = device.FilePath; |
| | |
| | | //变更:搞掉它,不留了 |
| | | Global.DeleteFilebyHomeId(filePath); |
| | | //删除自动备份 |
| | | HdlAutoBackupLogic.DeleteFile(device.FilePath); |
| | | HdlBackupLogic.Current.DeleteAutoBackFileStatu(device.FilePath); |
| | | } |
| | | } |
| | | } |
| | |
| | | //变更:搞掉它,不留了 |
| | | Global.DeleteFilebyHomeId(otaFile); |
| | | //删除自动备份 |
| | | HdlAutoBackupLogic.DeleteFile(otaFile); |
| | | HdlBackupLogic.Current.DeleteAutoBackFileStatu(otaFile); |
| | | } |
| | | } |
| | | this.dicOTADevice.Remove(otaKeys); |
| | |
| | | { |
| | | //重新生成缓存 |
| | | tempDevice.ReSave(); |
| | | HdlAutoBackupLogic.AddOrEditorFile(tempDevice.FilePath); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(tempDevice.FilePath); |
| | | //全部主页菜单需要刷新 |
| | | Phone.UserView.UserPage.Instance.RefreshAllForm = true; |
| | | } |
| | |
| | | device.IsCustomizeImage = true; |
| | | device.ReSave(); |
| | | |
| | | HdlAutoBackupLogic.AddOrEditorFile(device.FilePath); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(device.FilePath); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | //重新生成缓存 |
| | | tempDevice.ReSave(); |
| | | HdlAutoBackupLogic.AddOrEditorFile(tempDevice.FilePath); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(tempDevice.FilePath); |
| | | //全部主页菜单需要刷新 |
| | | Phone.UserView.UserPage.Instance.RefreshAllForm = true; |
| | | } |
| | |
| | | } |
| | | //删除本地文件 |
| | | HdlFileLogic.Current.DeleteFile(oldFile); |
| | | HdlAutoBackupLogic.DeleteFile(oldLocalDevice.FilePath); |
| | | HdlBackupLogic.Current.DeleteAutoBackFileStatu(oldLocalDevice.FilePath); |
| | | |
| | | //重新生成文件 |
| | | if (newDevice.IsCustomizeImage == false) |
| | |
| | | } |
| | | myGateway.Actions -= receiptAction; |
| | | receiptAction = null; |
| | | if (listCheckTopic.Count != listReceiptTopic.Count) |
| | | |
| | | int receveCount = listCheckTopic.Count; |
| | | if (receveCount > 1) |
| | | { |
| | | //看看里面有没有重复的 |
| | | var listTemp = new HashSet<string>(); |
| | | foreach (var value in listCheckTopic) |
| | | { |
| | | if (listTemp.Contains(value) == false) |
| | | { |
| | | listTemp.Add(value); |
| | | } |
| | | } |
| | | receveCount = listTemp.Count; |
| | | } |
| | | if (receveCount != listReceiptTopic.Count) |
| | | { |
| | | reResult.ErrorMsgDiv = 0; |
| | | } |