From 2422903d38088046f882c6270eae0010eefef6c1 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期三, 24 十一月 2021 16:09:52 +0800
Subject: [PATCH] 2021-11-23-02
---
HDL_ON/Entity/DB_ResidenceData.cs | 63 +++++++++++++++++++++++++++++--
1 files changed, 58 insertions(+), 5 deletions(-)
diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs
index a775774..7e9c6f8 100644
--- a/HDL_ON/Entity/DB_ResidenceData.cs
+++ b/HDL_ON/Entity/DB_ResidenceData.cs
@@ -19,7 +19,6 @@
/// </summary>
public string MasterToken;
- //RegionInfoRes _residecenInfo;
RegionInfoRes _residecenInfo = new RegionInfoRes();
/// <summary>
/// 浣忓畢鍩虹淇℃伅
@@ -30,7 +29,7 @@
{
if (MainPage.NoLoginMode)
{
- return new RegionInfoRes() { homeName = "鏈湴妯″紡" };
+ return new RegionInfoRes() { homeName = "HDL Home" ,id = "text000001"};
}
else
{
@@ -68,6 +67,32 @@
{
if (instance == null)
{
+ if(MainPage.NoLoginMode)
+ {
+ instance = new DB_ResidenceData();
+ instance.functionTypeList.AddRange(new List<ShowFunction> {
+ ShowFunction.Light,ShowFunction.AC,ShowFunction.Curtain,
+ ShowFunction.FloorHeating,ShowFunction.Music,
+ ShowFunction.Electric,ShowFunction.Environmental,
+ ShowFunction.EnergyMonitoring,
+ ShowFunction.FreshAir,ShowFunction.DoorLock,
+ ShowFunction.Panel,ShowFunction.SecurityMonitoring,
+ ShowFunction.Sensor,ShowFunction.VideoIntercom,
+ ShowFunction.SecurityCenter
+ });
+ instance.SaveResidenceData();
+ instance.residenceImage = "Classification/Room/Roombg.png";
+ instance.HomeGateway = new HomeGatewayInfo()
+ {
+ homeId = "1396717478877241345",
+ gatewayId = "1396997079658602498",
+ mac = "123457890123456",
+ };
+ //鍒濆鍖栦綇瀹呭姛鑳芥暟鎹�
+ SpatialInfo.CurrentSpatial.InitRoomListFunctions();
+ return instance;
+ }
+
try
{
var residenceDataBytes = ReadResidenceInfo();
@@ -96,6 +121,7 @@
ShowFunction.Sensor,ShowFunction.VideoIntercom,
ShowFunction.SecurityCenter
});
+ instance.SupportFacePass = false;
instance.SaveResidenceData();
}
catch (Exception ex)
@@ -130,6 +156,10 @@
HDL_ON.UI.UI2.Intelligence.Automation.Logic.LogicList.Clear();
DAL.Mqtt.MqttClient.DisConnectRemote("閫�鍑虹櫥褰曪紝鎴栬�呭垏鎹綇瀹�");
}
+ /// <summary>
+ /// 鏄惁鏀寔浜鸿劯閫氳
+ /// </summary>
+ public bool SupportFacePass = false;
/// <summary>
/// 缃戝叧璇︾粏淇℃伅
@@ -137,8 +167,8 @@
public HomeGatewayInfo HomeGateway;
/// <summary>
- /// 0:bus缃戝叧
- /// 1:A鍗忚缃戝叧
+ /// 0:涓�绔彛
+ /// 1:Link鍗忚缃戝叧
/// </summary>
public int GatewayType
{
@@ -149,7 +179,7 @@
//#endif
if (HomeGateway == null)
return -1;
- if (HomeGateway.gatewayType == "AGATEWAY")
+ if (HomeGateway.gatewayType != "BUSUDPGATEWAY")
{
return 1;
}
@@ -225,6 +255,11 @@
}
}
+
+ ///// <summary>
+ ///// 鍩庡競淇℃伅
+ ///// </summary>
+ //public static Entity.CityInfo cityInfo = new Entity.CityInfo();
/// <summary>
/// 浣忓畢鍥剧墖
@@ -417,5 +452,23 @@
}
#endregion
+
+
+
+ /// <summary>
+ /// 涓婁竴娆℃彁绀虹殑鏃堕棿
+ /// </summary>
+ public DateTime LastTipTime = DateTime.MinValue;
+ /// <summary>
+ /// 鏄惁闇�瑕佹彁绀�
+ /// </summary>
+ public bool NeedTip
+ {
+ get
+ {
+ return (DateTime.Now - LastTipTime).TotalDays > 2;
+ }
+ }
+
}
}
--
Gitblit v1.8.0