From e71c57108e6dd407c2c6f0361f68150f2ff9aed5 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 15 十二月 2021 13:41:16 +0800
Subject: [PATCH] 版本备份

---
 HDL_ON/Entity/DB_ResidenceData.cs |   61 ++++++++++++++++++++++++++++--
 1 files changed, 57 insertions(+), 4 deletions(-)

diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs
index af8b657..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>
         /// 浣忓畢鍩虹淇℃伅
@@ -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