From bce17e5a91e596d29209056e2e4ac3a6f88c2219 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 09 七月 2021 10:03:53 +0800
Subject: [PATCH] 海林传感器
---
HDL_ON/Entity/Function/Function.cs | 10 ++++++++++
HDL_ON/Common/ApiUtlis.cs | 1 +
.vs/HDL_APP_Project/xs/UserPrefs.xml | 23 ++++++++++++++++-------
HDL_ON/UI/UI1-Login/LoginPage.cs | 15 ++++++++-------
4 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 9ec7481..deaba39 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,9 +1,14 @@
锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
<MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/Entity/Function/Function.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI1-Login/LoginPage.cs">
<Files>
- <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="190" Column="57" />
- <File FileName="HDL_ON/Entity/Function/Function.cs" Line="420" Column="21" />
+ <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs" Line="760" Column="169" />
+ <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" />
+ <File FileName="HDL_ON/UI/UI2/FuntionControlView/AC/ACPageBLL.cs" />
+ <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="154" Column="69" />
+ <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="1848" Column="82" />
+ <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="346" Column="86" />
+ <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="527" Column="46" />
</Files>
<Pads>
<Pad Id="ProjectPad">
@@ -12,11 +17,15 @@
<Node name="HDL_ON" expanded="True">
<Node name="Common" expanded="True" />
<Node name="DAL" expanded="True">
+ <Node name="DriverLayer" expanded="True" />
<Node name="Server" expanded="True" />
</Node>
<Node name="Entity" expanded="True">
- <Node name="Function" expanded="True">
- <Node name="Function.cs" selected="True" />
+ <Node name="Function" expanded="True" />
+ </Node>
+ <Node name="UI" expanded="True">
+ <Node name="UI1-Login" expanded="True">
+ <Node name="LoginPage.cs" selected="True" />
</Node>
</Node>
</Node>
@@ -32,8 +41,8 @@
<String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
<String>Shared.IOS/Shared.IOS.csproj</String>
</DisabledProjects>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
- <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.7374d754" />
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+ <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore>
<Breakpoint file="/Users/kaede/Desktop/HDL_APP_Project/HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" relfile="HDL_ON/UI/UI2/FuntionControlView/Electrical/IrFanPage.cs" line="42" column="1" />
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index 51ea108..26204e8 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -187,6 +187,7 @@
//澶勭悊鍓╀笅鐨勬柊澧炲姛鑳�
foreach (var newFunction in deviceList.list)
{
+ newFunction.AssembleStatus();
newFunction.SaveFunctionFile();
FunctionList.List.IniFunctionList(newFunction.savePath);
}
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 38ecf24..b9e3102 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -285,6 +285,16 @@
/// 鍔熻兘鐨勫睘鎬х姸鎬佸垪琛�
/// </summary>
public List<AttributesStatus> status = new List<AttributesStatus>();
+ /// <summary>
+ /// 閫氳繃鐘舵�佸垪琛ㄧ粍瑁呭睘鎬ч噷闈㈢殑鐘舵��
+ /// </summary>
+ public void AssembleStatus()
+ {
+ foreach (var sta in status)
+ {
+ SetAttrState(sta.key, sta.value);
+ }
+ }
/// <summary>
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 8d3d3da..58ce5a1 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Threading;
+using HDL_ON.Common;
using HDL_ON.DAL.Server;
using HDL_ON.Entity;
using HDL_ON.UI.CSS;
@@ -522,7 +523,12 @@
};
bodyView.AddChidren(btnDomeLogin);
btnDomeLogin.MouseUpEventHandler = (sender, e) => {
+
MainPage.NoLoginMode = true;
+#if DEBUG
+ FileUtlis.Files.DeleteAllFile();
+#endif
+
//妤煎眰鎴块棿鍒楄〃
var floor1 = new SpatialInfo("FLOOR") { roomName = "F1", parentId = DB_ResidenceData.Instance.CurrentRegion.id };
floor1.SaveRoomFile();
@@ -664,9 +670,9 @@
{
sid = "light4",
deviceId = "light4",
- name = Language.CurrentLanguage == "Chinese" ? "澶х伅" : "light 1" ,
+ name = Language.CurrentLanguage == "Chinese" ? "澶х伅" : "light 1",
spk = SPK.LightSwitch,
- roomIds = new List<string>() { "1405771024583090178"},
+ roomIds = new List<string>() { "1405771024583090178" },
attributes = new List<FunctionAttributes>()
{
new FunctionAttributes() { key = "on_off",value =new List<string>(){ "on","off" }, curValue="on",state = "on" },
@@ -1056,11 +1062,6 @@
#endregion
var fileList = Common.FileUtlis.Files.ReadFiles();
-
- //foreach (var file in fileList)
- //{
- // FunctionList.List.IniFunctionList(file,true);
- //}
Room.CurrentSpatial.InitRoomListFunctions();
--
Gitblit v1.8.0