From d12e7730bb88d57763a6caaeacb0248a65bf3309 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 03 十二月 2019 13:10:32 +0800
Subject: [PATCH] 2019.12.3
---
ZigbeeApp/Shared/Common/House.cs | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/ZigbeeApp/Shared/Common/House.cs b/ZigbeeApp/Shared/Common/House.cs
index d78cfa6..204d2a4 100644
--- a/ZigbeeApp/Shared/Common/House.cs
+++ b/ZigbeeApp/Shared/Common/House.cs
@@ -311,7 +311,7 @@
house.Latitude = residence.Latitude;
}
Global.CreateHomeDirectory(residence.Id);
- house.Save();
+ house.Save(false);
}
//鍖归厤褰撳墠浣忓畢
if (Config.Instance.HomeFilePathList.Find((obj) => obj == $"House_{Config.Instance.HomeId}.json") == null)
@@ -443,6 +443,21 @@
}
return null;
}
+ /// <summary>
+ /// InitFloor
+ /// </summary>
+ public void InitFloor()
+ {
+ if (Config.Instance.Home.FloorDics.Count > 0 && string.IsNullOrEmpty(CurrentFloorId))
+ {
+ foreach (var floor in Config.Instance.Home.FloorDics)
+ {
+ CurrentFloorId = floor.Key;
+ Save(false);
+ return;
+ }
+ }
+ }
#endregion
--
Gitblit v1.8.0