From 3c8f41f50076a3b904705ef9f94d1a827ecd8c52 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期六, 28 八月 2021 15:43:19 +0800
Subject: [PATCH] 2021-8-28-4

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

diff --git a/HDL_ON/Entity/DB_ResidenceData.cs b/HDL_ON/Entity/DB_ResidenceData.cs
index af8b657..0f6ca28 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();
@@ -137,8 +162,8 @@
         public HomeGatewayInfo HomeGateway;
 
         /// <summary>
-        /// 0:bus缃戝叧
-        /// 1:A鍗忚缃戝叧
+        /// 0:涓�绔彛
+        /// 1:Link鍗忚缃戝叧
         /// </summary>
         public int GatewayType
         {
@@ -149,7 +174,7 @@
                 //#endif
                 if (HomeGateway == null)
                     return -1;
-                if (HomeGateway.gatewayType == "AGATEWAY")
+                if (HomeGateway.gatewayType != "BUSUDPGATEWAY")
                 {
                     return 1;
                 }

--
Gitblit v1.8.0