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