From e90209beae6a4e822cecb18e6889f8bda23f630e Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 14 十二月 2020 11:16:06 +0800 Subject: [PATCH] 合并了晾衣架(非新云端) --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs | 42 +++++++++++++++++++++--------------------- 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Common/Logic/HdlAlarmsLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs similarity index 91% rename from ZigbeeApp/Shared/Phone/Common/Logic/HdlAlarmsLogic.cs rename to ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs index 42548cb..f2a48fa 100644 --- a/ZigbeeApp/Shared/Phone/Common/Logic/HdlAlarmsLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlAlarmsLogic.cs @@ -4,7 +4,7 @@ using Shared.Common; using ZigBee.Device; -namespace Shared.Phone +namespace Shared.Phone.UserCenter { /// <summary> /// 鎶ヨ绫荤殑閫昏緫 @@ -59,7 +59,7 @@ string fileName = DateTime.Now.ToString("yyyyMMdd"); //瀹夐槻鎶ヨ - string fullName = System.IO.Path.Combine(HdlFileNameResourse.SafeguardAlarmDirectory, fileName); + string fullName = System.IO.Path.Combine(DirNameResourse.SafeguardAlarmDirectory, fileName); var data1 = HdlFileLogic.Current.ReadFileByteContent(fullName); if (data1 != null) { @@ -71,7 +71,7 @@ } //闂ㄩ攣璁板綍 - fullName = System.IO.Path.Combine(HdlFileNameResourse.DoorLockAlarmDirectory, fileName); + fullName = System.IO.Path.Combine(DirNameResourse.DoorLockAlarmDirectory, fileName); var data2 = HdlFileLogic.Current.ReadFileByteContent(fullName); if (data2 != null) { @@ -128,19 +128,19 @@ //闄愬埗瀹冪殑闀垮害 this.listSafetyAlarmInfo.Insert(0, data); - if (this.listSafetyAlarmInfo.Count > HdlUserCenterResourse.ResidenceOption.SafetyOnedayMaxAlarmMsgCount) + if (this.listSafetyAlarmInfo.Count > UserCenterResourse.ResidenceOption.SafetyOnedayMaxAlarmMsgCount) { this.listSafetyAlarmInfo.RemoveAt(this.listSafetyAlarmInfo.Count - 1); } //淇濆瓨鍒版湰鍦� - string fullName = System.IO.Path.Combine(HdlFileNameResourse.SafeguardAlarmDirectory, fileName); + string fullName = System.IO.Path.Combine(DirNameResourse.SafeguardAlarmDirectory, fileName); HdlFileLogic.Current.SaveFileContent(fullName, this.listSafetyAlarmInfo); - var form = HdlFormLogic.Current.GetFormByName("SafetyManagementMainForm"); - if (form != null) + if (UserCenterResourse.DicActionForm.ContainsKey("SafetyManagementMainForm") == true) { - ((UserCenter.Safety.SafetyManagementMainForm)form).AddSafeguardLogPushRow(device); + var form = (Phone.UserCenter.Safety.SafetyManagementMainForm)UserCenterResourse.DicActionForm["SafetyManagementMainForm"]; + form?.AddSafeguardLogPushRow(device); } return true; } @@ -202,13 +202,13 @@ //闄愬埗瀹冪殑闀垮害 this.listSafetyAlarmInfo.Insert(0, data); - if (this.listSafetyAlarmInfo.Count > HdlUserCenterResourse.ResidenceOption.SafetyOnedayMaxAlarmMsgCount) + if (this.listSafetyAlarmInfo.Count > UserCenterResourse.ResidenceOption.SafetyOnedayMaxAlarmMsgCount) { this.listSafetyAlarmInfo.RemoveAt(this.listSafetyAlarmInfo.Count - 1); } //淇濆瓨鍒版湰鍦� - string fullName = System.IO.Path.Combine(HdlFileNameResourse.SafeguardAlarmDirectory, fileName); + string fullName = System.IO.Path.Combine(DirNameResourse.SafeguardAlarmDirectory, fileName); HdlFileLogic.Current.SaveFileContent(fullName, this.listSafetyAlarmInfo); } } @@ -237,7 +237,7 @@ { lock (listSafetyAlarmInfo) { - string fullPath = HdlFileNameResourse.SafeguardAlarmDirectory; + string fullPath = DirNameResourse.SafeguardAlarmDirectory; //鑾峰彇鎸囧畾鐩綍涓嬮潰鐨勬枃浠� List<string> listFile = HdlFileLogic.Current.GetFileFromDirectory(fullPath); //鍗囧簭 @@ -254,7 +254,7 @@ var listInfo = new List<SafeguardAlarmInfo>(); for (int j = 0; j < info.Count; j++) { - if (j == HdlUserCenterResourse.ResidenceOption.SafetyOnedayMaxAlarmMsgCount) + if (j == UserCenterResourse.ResidenceOption.SafetyOnedayMaxAlarmMsgCount) { //姣忓ぉ鏈�澶氫笁鍗佹潯鏁版嵁 break; @@ -263,7 +263,7 @@ } dic[listFile[i]] = listInfo; - if (dic.Count == HdlUserCenterResourse.ResidenceOption.SafetyMaxAlarmMsgDay) + if (dic.Count == UserCenterResourse.ResidenceOption.SafetyMaxAlarmMsgDay) { //鍙涓夊ぉ鐨勯噺 break; @@ -289,9 +289,9 @@ { return null; } - string mainkey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(i_device); + string mainkey = Common.LocalDevice.Current.GetDeviceMainKeys(i_device); //鍥犱负鎺ㄩ�佺殑鏄櫄鎷熺殑璁惧锛屾墍浠ュ幓鑾峰彇鐪熷疄鐗╃悊璁惧 - CommonDevice device = HdlDeviceCommonLogic.Current.GetDevice(mainkey); + CommonDevice device = Common.LocalDevice.Current.GetDevice(mainkey); if (device == null) { return null; @@ -435,7 +435,7 @@ /// <param name="jobject"></param> public bool SaveDoorLockAlarmInfo(Newtonsoft.Json.Linq.JObject jobject) { - var device = HdlDeviceCommonLogic.Current.GetDevice(jobject.Value<string>("DeviceAddr"), jobject.Value<int>("Epoint")); + var device = Common.LocalDevice.Current.GetDevice(jobject.Value<string>("DeviceAddr"), jobject.Value<int>("Epoint")); if ((device is ZigBee.Device.DoorLock) == false) { //瀹冧笉鏄棬閿� @@ -461,13 +461,13 @@ //闄愬埗瀹冪殑闀垮害 this.listDoorLockAlarmInfo.Insert(0, msgInfo); - if (this.listDoorLockAlarmInfo.Count > HdlUserCenterResourse.ResidenceOption.DoorLockOnedayMaxAlarmMsgCount) + if (this.listDoorLockAlarmInfo.Count > UserCenterResourse.ResidenceOption.DoorLockOnedayMaxAlarmMsgCount) { this.listDoorLockAlarmInfo.RemoveAt(this.listDoorLockAlarmInfo.Count - 1); } //淇濆瓨鍒版湰鍦� - string fullName = System.IO.Path.Combine(HdlFileNameResourse.DoorLockAlarmDirectory, fileName); + string fullName = System.IO.Path.Combine(DirNameResourse.DoorLockAlarmDirectory, fileName); HdlFileLogic.Current.SaveFileContent(fullName, this.listDoorLockAlarmInfo); return true; @@ -482,7 +482,7 @@ { lock (listDoorLockAlarmInfo) { - string fullPath = HdlFileNameResourse.DoorLockAlarmDirectory; + string fullPath = DirNameResourse.DoorLockAlarmDirectory; //鑾峰彇鎸囧畾鐩綍涓嬮潰鐨勬枃浠� List<string> listFile = HdlFileLogic.Current.GetFileFromDirectory(fullPath); //鍗囧簭 @@ -499,7 +499,7 @@ var listInfo = new List<DeviceAlarmInfo>(); for (int j = 0; j < info.Count; j++) { - if (j == HdlUserCenterResourse.ResidenceOption.DoorLockOnedayMaxAlarmMsgCount) + if (j == UserCenterResourse.ResidenceOption.DoorLockOnedayMaxAlarmMsgCount) { //姣忓ぉ鏈�澶氫笁鍗佹潯鏁版嵁 break; @@ -508,7 +508,7 @@ } dic[listFile[i]] = listInfo; - if (dic.Count == HdlUserCenterResourse.ResidenceOption.DoorLockMaxAlarmMsgDay) + if (dic.Count == UserCenterResourse.ResidenceOption.DoorLockMaxAlarmMsgDay) { //鍙涓夊ぉ鐨勯噺 break; -- Gitblit v1.8.0