From d9feb1d52963982a89a6e6d741a9b841042ce0b6 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 22 七月 2022 17:22:41 +0800
Subject: [PATCH] 毫米波传感器,温控一体化
---
HDL-ON_iOS/Resources/Phone/Collection/FunctionArmOnbg.png | 0
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 119 +++++++++++--
HDL-ON_Android/Assets/Language.ini | 2
HDL-ON_Android/Assets/Phone/Collection/FunctionArmOnbg.png | 0
HDL-ON_iOS/HDL-ON_iOS.csproj | 2
HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensormegahealth.png | 0
HDL-ON_Android/HDL-ON_Android.csproj | 2
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 41 ++++
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs | 24 +-
HDL-ON_iOS/Info.plist | 4
HDL-ON_iOS/Resources/Language.ini | 2
HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs | 6
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs | 83 +++++++++
HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensormegahealth.png | 0
HDL_ON/DAL/DriverLayer/Control.cs | 46 ++++
HDL_ON/UI/MainPage.cs | 2
HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs | 1
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs | 4
HDL_ON/Common/ImageUtlis.cs | 12 +
HDL_ON/DAL/Server/NewAPI.cs | 4
HDL_ON/Entity/Function/Function.cs | 25 ++
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 88 +++++++++
HDL_ON/DAL/Server/HttpUtil.cs | 6
HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs | 9
HDL_ON/Common/UserInfo.cs | 2
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs | 33 +++
27 files changed, 469 insertions(+), 50 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index bb99937..30811f4 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1741,7 +1741,7 @@
551=婀垮害鏍″噯
552=姣涚粏闃�
553=鍦版殩闃�
-554=*涓轰繚闅滄渶浣冲欢鏃舵晥鏋滐紝寤鸿浜烘暟鍦�4浜轰竴涓嬨��
+554=*涓轰繚闅滄渶浣冲欢鏃舵晥鏋滐紝寤鸿浜烘暟鍦�4浜轰互涓嬨��
555=閫�鍑哄疄楠屽妯″紡
556=鏈変汉鍦ㄨ窇
557=鏈変汉绔欑潃
diff --git a/HDL-ON_Android/Assets/Phone/Collection/FunctionArmOnbg.png b/HDL-ON_Android/Assets/Phone/Collection/FunctionArmOnbg.png
new file mode 100644
index 0000000..0b95080
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/Collection/FunctionArmOnbg.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensormegahealth.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensormegahealth.png
new file mode 100644
index 0000000..e2ab882
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensormegahealth.png
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 09a30a1..5bf954c 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -256,6 +256,8 @@
<AndroidAsset Include="Assets\Phone\FunctionIcon\ArmSensor\SomeoneRunBgIcon.png" />
<AndroidAsset Include="Assets\Phone\FunctionIcon\ArmSensor\SomeoneSitBgIcon.png" />
<AndroidAsset Include="Assets\Phone\FunctionIcon\ArmSensor\SomeoneStandBgIcon.png" />
+ <AndroidAsset Include="Assets\Phone\Collection\FunctionArmOnbg.png" />
+ <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensormegahealth.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\colors.xml" />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 103dbbb..f5e40f7 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.9" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202207181">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.9" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202207222">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
<!--鍙嬬洘-->
<!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index b8e078d..b40f28c 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -1418,6 +1418,8 @@
<BundleResource Include="Resources\Phone\FunctionIcon\ArmSensor\SomeoneRunBgIcon.png" />
<BundleResource Include="Resources\Phone\FunctionIcon\ArmSensor\SomeoneSitBgIcon.png" />
<BundleResource Include="Resources\Phone\FunctionIcon\ArmSensor\SomeoneStandBgIcon.png" />
+ <BundleResource Include="Resources\Phone\Collection\FunctionArmOnbg.png" />
+ <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensormegahealth.png" />
</ItemGroup>
<ItemGroup>
<ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index 941eb51..75cd9de 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -100,9 +100,9 @@
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>CFBundleShortVersionString</key>
- <string>1.5.902207181</string>
+ <string>1.5.902207191</string>
<key>CFBundleVersion</key>
- <string>1.5.907181</string>
+ <string>1.5.907191</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Use geographic location to provide services such as weather</string>
<key>NSAppleMusicUsageDescription</key>
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 4fb7ae2..175b5fe 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1742,7 +1742,7 @@
551=婀垮害鏍″噯
552=姣涚粏闃�
553=鍦版殩闃�
-554=*涓轰繚闅滄渶浣冲欢鏃舵晥鏋滐紝寤鸿浜烘暟鍦�4浜轰竴涓嬨��
+554=*涓轰繚闅滄渶浣冲欢鏃舵晥鏋滐紝寤鸿浜烘暟鍦�4浜轰互涓嬨��
555=閫�鍑哄疄楠屽妯″紡
556=鏈変汉鍦ㄨ窇
557=鏈変汉绔欑潃
diff --git a/HDL-ON_iOS/Resources/Phone/Collection/FunctionArmOnbg.png b/HDL-ON_iOS/Resources/Phone/Collection/FunctionArmOnbg.png
new file mode 100644
index 0000000..0b95080
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/Collection/FunctionArmOnbg.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensormegahealth.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensormegahealth.png
new file mode 100644
index 0000000..e2ab882
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensormegahealth.png
Binary files differ
diff --git a/HDL_ON/Common/ImageUtlis.cs b/HDL_ON/Common/ImageUtlis.cs
index 3b3a486..b13acd1 100644
--- a/HDL_ON/Common/ImageUtlis.cs
+++ b/HDL_ON/Common/ImageUtlis.cs
@@ -3,6 +3,7 @@
using HDL_ON.DAL.Server;
using System.IO;
using HDL_ON.Common;
+using System.Collections.Generic;
namespace HDL_ON
{
@@ -160,6 +161,17 @@
}
return "";
}
+ /// <summary>
+ /// 鑾峰彇鍦烘櫙榛樿鍥惧簱鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ public ResponsePackNew GetSceneDefaultIconList()
+ {
+ var d = new Dictionary<string, object>();
+ var requestJson = HttpUtil.GetSignRequestJson(d);
+ var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.Api_Post_GetSceneDefaultIconList, requestJson);
+ return revertObj;
+ }
/// <summary>
/// 閫氳繃鍥剧墖璺緞涓嬭浇鍥剧墖
diff --git a/HDL_ON/Common/UserInfo.cs b/HDL_ON/Common/UserInfo.cs
index c162a0c..cecd374 100644
--- a/HDL_ON/Common/UserInfo.cs
+++ b/HDL_ON/Common/UserInfo.cs
@@ -166,7 +166,7 @@
{
get
{
- return (DateTime.Now - LastTime).TotalMinutes > 5;
+ return (DateTime.Now - LastTimeOpenDoor).TotalMinutes > 5;
}
}
[Newtonsoft.Json.JsonIgnore]
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index e008c9e..08092a6 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -1267,15 +1267,57 @@
case SPK.SensorSmoke:
case SPK.SensorWater:
case SPK.ClothesHanger:
- case SPK.SenesorMegahealth:
- case SPK.SenesorMegahealth2:
case SPK.AirFreshStandard:
case SPK.HvacAirFresh:
case SPK.SensorGas:
+ case SPK.HvacCac:
//璁惧鐘舵�佹帹閫�
//鐘舵�佹洿鏂�
Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status);
break;
+ case SPK.SenesorMegahealth:
+ case SPK.SenesorMegahealth2:
+
+ var tempStatus = localFunction.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
+ if (tempStatus != null)
+ {
+
+ switch (tempStatus.state)
+ {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+ case "0":
+ localFunction.lastState = Language.StringByID(StringId.SensorNormalState);
+ break;
+ case "1":
+ localFunction.lastState = Language.StringByID(StringId.SomeoneIn);
+ break;
+ case "2":
+ if (localFunction.extSet.labModel)
+ {
+ localFunction.lastState = Language.StringByID(StringId.SomeoneRunning);
+ }
+ break;
+ case "3":
+ if (localFunction.extSet.labModel)
+ {
+ localFunction.lastState = Language.StringByID(StringId.SomeoneSitting);
+ }
+ break;
+ case "4":
+ localFunction.lastState = Language.StringByID(StringId.SomeoneFell);
+ break;
+ case "5":
+ if (localFunction.extSet.labModel)
+ {
+ localFunction.lastState = Language.StringByID(StringId.SomeoneStanding);
+ }
+ break;
+ default:
+
+ break;
+ }
+ }
+ Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status);
+ break;
case SPK.AvMusic:
case SPK.MusicStandard:
//UI.Music.MusicMain.mMusicMain.RefreshView(updateTemp);
diff --git a/HDL_ON/DAL/Server/HttpUtil.cs b/HDL_ON/DAL/Server/HttpUtil.cs
index 72fa068..ce16936 100644
--- a/HDL_ON/DAL/Server/HttpUtil.cs
+++ b/HDL_ON/DAL/Server/HttpUtil.cs
@@ -31,9 +31,9 @@
/// 鐗规畩鎺ュ彛璇锋眰瓒呮椂鏃堕棿
/// </summary>
public const int TIME_OUT_LONG = 20;
- /////// <summary>
- /////// Bearer 鏆傛椂璁句负绌猴紝浠庣櫥闄嗘垚鍔熺殑杩斿洖鐨刪eaderPrefix鍙傛暟鍔ㄦ�佽幏鍙�
- /////// </summary>
+ ///// <summary>
+ ///// Bearer 鏆傛椂璁句负绌猴紝浠庣櫥闄嗘垚鍔熺殑杩斿洖鐨刪eaderPrefix鍙傛暟鍔ㄦ�佽幏鍙�
+ ///// </summary>
//public const string TOKEN_BEARER = "Bearer ";
#endregion
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index c74fae2..6e52668 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -363,6 +363,10 @@
/// </summary>
public const string API_POST_UploadImage = "/home-wisdom/app/images/upload_image";
/// <summary>
+ /// 鑾峰彇鍦烘櫙榛樿鍥惧簱鍒楄〃
+ /// </summary>
+ public const string Api_Post_GetSceneDefaultIconList = "/iot-cloud/mgmt/scene/default/icon/list";
+ /// <summary>
/// 鏌ヨ鍥剧墖璺緞
/// </summary>
public const string API_POST_GetImageUrl = "/home-wisdom/app/images/get_image_url";
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 38b98be..1482e07 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -423,6 +423,31 @@
/// </summary>
[Newtonsoft.Json.JsonIgnore]
public string lastState = "";
+ /// <summary>
+ /// 鑾峰彇鐘舵�佹樉绀烘枃鏈�
+ /// </summary>
+ /// <returns></returns>
+ public string GetLastStateText()
+ {
+ var text = "";
+ switch (spk)
+ {
+ case SPK.HvacCac:
+ switch (GetAttrState(FunctionAttributeKey.Mode))
+ {
+ case "cool":
+ text = Language.StringByID(StringId.Cool);
+ break;
+ case "heat":
+ text = Language.StringByID(StringId.Heat);
+ break;
+ }
+
+ break;
+
+ }
+ return text;
+ }
FunctionAttributes _trait_on_off;
[Newtonsoft.Json.JsonIgnore]
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 8029597..5121da4 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -131,7 +131,7 @@
_RoomNotSupportFunctionList.Add(SPK.AirSwitch);
_RoomNotSupportFunctionList.Add(SPK.ElectricEnergy);
_RoomNotSupportFunctionList.AddRange(SPK.EnvironDeviceSpkList());
- _RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList());
+ //_RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList());
}
return _RoomNotSupportFunctionList;
}
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index e800dda..e44aaf9 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -193,7 +193,12 @@
#if DEBUG
btnResidenceName.MouseUpEventHandler = (sender, e) =>
{
+ var imageUrl = ImageUtlis.Current.GetSceneDefaultIconList();
+ if (imageUrl != null)
+ {
+
+ }
//if (UserInfo.Current.VerOpenDoorPw || string.IsNullOrEmpty(UserInfo.Current.doorPasswordString))
//{
// var page = new DoorLockUnlockPage(new Function());
@@ -591,22 +596,22 @@
}
});
- FunctionList.List.Functions.Add(new Function
- {
- name = "娴嬭瘯姣背娉紶鎰熷櫒",
- spk = SPK.SenesorMegahealth,
- attributes = new List<FunctionAttributes>
- {
- new FunctionAttributes(){ key = "enable",curValue = "true",state = "true" },
- new FunctionAttributes(){ key = "people_num",curValue = "0",state = "0" },
- new FunctionAttributes(){ key = "people_id",curValue = "1",state = "1" },
- new FunctionAttributes(){ key = "target_status",curValue = "0",state = "0" },//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
- new FunctionAttributes(){ key = "people_status",curValue = "false",state = "false" },//鐘舵�� 鏈変汉鏃犱汉
- //new FunctionAttributes(){ key = "",curValue = "",state = "" },
- //new FunctionAttributes(){ key = "",curValue = "",state = "" },
- //new FunctionAttributes(){ key = "",curValue = "",state = "" },
- }
- });
+ //FunctionList.List.Functions.Add(new Function
+ //{
+ // name = "娴嬭瘯姣背娉紶鎰熷櫒",
+ // spk = SPK.SenesorMegahealth,
+ // attributes = new List<FunctionAttributes>
+ // {
+ // new FunctionAttributes(){ key = "enable",curValue = "true",state = "true" },
+ // new FunctionAttributes(){ key = "people_num",curValue = "0",state = "0" },
+ // new FunctionAttributes(){ key = "people_id",curValue = "1",state = "1" },
+ // new FunctionAttributes(){ key = "target_status",curValue = "0",state = "0" },//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+ // new FunctionAttributes(){ key = "people_status",curValue = "false",state = "false" },//鐘舵�� 鏈変汉鏃犱汉
+ // //new FunctionAttributes(){ key = "",curValue = "",state = "" },
+ // //new FunctionAttributes(){ key = "",curValue = "",state = "" },
+ // //new FunctionAttributes(){ key = "",curValue = "",state = "" },
+ // }
+ //});
FunctionList.List.Functions.Add(new Function
{
name = "娴嬭瘯娓╂帶鍣�",
@@ -1036,6 +1041,11 @@
LoadDeviceFunctionDiv(functionView, function);
index++;
+ if(SPK.ArmSensorSpkList().Contains(function.spk))
+ {
+ btnbg.UnSelectedImagePath = "Collection/FunctionOnbg.png";
+ btnbg.SelectedImagePath = "Collection/FunctionArmOnbg.png";
+ }
if (!function.online)
{
@@ -1178,9 +1188,6 @@
};
view.AddChidren(btnIcon);
- btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
- btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png";
-
Button btnName;
btnName = new Button()
{
@@ -1211,6 +1218,7 @@
};
view.AddChidren(btnZone);
+
Button btnState;
btnState = new Button()
{
@@ -1225,6 +1233,69 @@
Tag = "state",
Text = function.lastState
};
+
+
+ if (function.spk == SPK.SenesorMegahealth)
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/Icon/HomeIcon/sensormegahealth.png";
+ btnIcon.SelectedImagePath = "FunctionIcon/Icon/HomeIcon/sensormegahealth.png";
+ btnName.TextColor = CSS_Color.MainBackgroundColor;
+ btnZone.TextColor = CSS_Color.MainBackgroundColor;
+ btnState.TextColor = CSS_Color.MainBackgroundColor;
+
+ var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
+ if (tempStatus != null)
+ {
+ switch (tempStatus.state)
+ {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+ case "0":
+ function.lastState = Language.StringByID(StringId.SensorNormalState);
+ break;
+ case "1":
+ function.lastState = Language.StringByID(StringId.SomeoneIn);
+ break;
+ case "2":
+ if (function.extSet.labModel)
+ {
+ function.lastState = Language.StringByID(StringId.SomeoneRunning);
+ }
+ else
+ {
+ function.lastState = Language.StringByID(StringId.Someone);
+ }
+ break;
+ case "3":
+ if (function.extSet.labModel)
+ {
+ function.lastState = Language.StringByID(StringId.SomeoneSitting);
+ }
+ else
+ {
+ function.lastState = Language.StringByID(StringId.Someone);
+ }
+ break;
+ case "4":
+ function.lastState = Language.StringByID(StringId.SomeoneFell);
+ break;
+ case "5":
+ if (function.extSet.labModel)
+ {
+ function.lastState = Language.StringByID(StringId.SomeoneStanding);
+ }
+ else
+ {
+ function.lastState = Language.StringByID(StringId.Someone);
+ }
+ break;
+ }
+ btnState.Text = function.lastState;
+ }
+ }
+ else
+ {
+ btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png";
+ btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png";
+ }
if (function.spk != SPK.LightSwitch)
{
@@ -1376,7 +1447,15 @@
LoadEvent_ControlClothesHanger(function, btnUp, btnDown);
}
-
+
+ else if (function.spk == SPK.SenesorMegahealth)
+ {
+ //btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}.png";
+ //btnIcon.SelectedImagePath = "FunctionIcon/Icon/HomeIcon/sensormegahealth.png";
+ //btnIcon.IsSelected = true;
+ btnState.SelectedTextColor = CSS_Color.MainBackgroundColor;
+ btnState.TextColor = CSS_Color.MainColor;//PromptingColor1
+ }
else
{
Button btnSwitch;
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 3f85a44..dbba017 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -400,13 +400,52 @@
if (function.GetAttribute(FunctionAttributeKey.Percent) != null)
{
state = function.GetAttrState(FunctionAttributeKey.Percent) != "0";
- }else
+ }
+ else
{
if (function.GetAttrState(FunctionAttributeKey.OnOff) == "stop")
return;
state = function.trait_on_off.curValue.ToString() == "on";
}
}
+ else if (function.spk == SPK.SenesorMegahealth)
+ {
+
+ var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
+ if (tempStatus != null)
+ {
+ switch (tempStatus.state)
+ {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+ case "0":
+ state = false;
+ break;
+ case "1":
+ state = true;
+ break;
+ case "2":
+ if (function.extSet.labModel)
+ {
+ state = true;
+ }
+ break;
+ case "3":
+ if (function.extSet.labModel)
+ {
+ state = true;
+ }
+ break;
+ case "4":
+ state = true;
+ break;
+ case "5":
+ if (function.extSet.labModel)
+ {
+ state = true;
+ }
+ break;
+ }
+ }
+ }
else
{
state = function.trait_on_off.curValue.ToString() == "on";
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
index 2cb9b13..1af093e 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -171,6 +171,89 @@
}
#endregion
}
+ //鏇存柊姣背娉紶鎰熷櫒鐘舵��
+ else if(SPK.SenesorMegahealth == updataFunction.spk)
+ {
+ if (cTag == updataFunction.sid + "_SenesorMegahealth_Status")
+ {
+ try
+ {
+ Button btnStatus = (fcView.GetChildren(j) as Button);
+
+ var tempStatus = updataFunction.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
+ if (tempStatus != null)
+ {
+
+ switch (tempStatus.state)
+ {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+ case "0":
+ btnStatus.TextID = StringId.SensorNormalState;
+ btnStatus.TextColor = CSS_Color.MainColor;
+ break;
+ case "1":
+ btnStatus.TextID = StringId.SomeoneIn;
+ break;
+ case "2":
+ if (updataFunction.extSet.labModel)
+ {
+ btnStatus.TextID = StringId.SomeoneRunning;
+ }
+ else
+ {
+ btnStatus.TextID = StringId.Someone;
+ }
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ break;
+ case "3":
+ if (updataFunction.extSet.labModel)
+ {
+ btnStatus.TextID = StringId.SomeoneSitting;
+ }
+ else
+ {
+ btnStatus.TextID = StringId.Someone;
+ }
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ break;
+ case "4":
+ btnStatus.TextID = StringId.SomeoneFell;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ break;
+ case "5":
+ if (updataFunction.extSet.labModel)
+ {
+ btnStatus.TextID = StringId.SomeoneStanding;
+ }
+ else
+ {
+ btnStatus.TextID = StringId.Someone;
+ }
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ break;
+ }
+
+ }
+
+
+ }
+ catch (Exception ex)
+ {
+ MainPage.Log($"{this.GetType()} error 3 : {ex.Message}");
+ }
+ }
+ }
+ //鏇存柊娓╂帶鍣ㄧ姸鎬�
+ else if(SPK.HvacCac == updataFunction.spk)
+ {
+ if (cTag == updataFunction.sid + "_Humidity")
+ {
+ (fcView.GetChildren(j) as Button).Text = updataFunction.GetAttrState(FunctionAttributeKey.RoomHumidity) + "%";
+ }
+ else if (cTag == updataFunction.sid + "_Temp")
+ {
+ (fcView.GetChildren(j) as Button).Text = updataFunction.GetAttrState(FunctionAttributeKey.RoomTemp) + "掳C";
+ }
+ }
}
}
}
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index a873ee1..2dfc170 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -95,6 +95,87 @@
this.AddChidren(btnTipPowerLow);
}
}
+
+
+
+ else if (function.spk == SPK.SenesorMegahealth)
+ {
+ var btnStatus = new Button()
+ {
+ X = Application.GetRealWidth(51),
+ Y = Application.GetRealHeight(64),
+ Height = Application.GetRealHeight(18),
+ TextColor = CSS_Color.MainColor,
+ TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
+ Text = "",
+ TextAlignment = TextAlignment.CenterLeft,
+ Tag = function.sid + "_SenesorMegahealth_Status"
+ };
+ bodyDiv.AddChidren(btnStatus);
+
+
+
+ var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
+ if (tempStatus != null)
+ {
+
+ switch (tempStatus.state)
+ {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+ case "0":
+ btnStatus.TextID = StringId.SensorNormalState;
+ btnStatus.TextColor = CSS_Color.MainColor;
+ break;
+ case "1":
+ btnStatus.TextID = StringId.SomeoneIn;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ break;
+ case "2":
+ if (function.extSet.labModel)
+ {
+ btnStatus.TextID = StringId.SomeoneRunning;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ }
+ else
+ {
+ btnStatus.TextID = StringId.SomeoneIn;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ }
+ break;
+ case "3":
+ if (function.extSet.labModel)
+ {
+ btnStatus.TextID = StringId.SomeoneSitting;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ }
+ else
+ {
+ btnStatus.TextID = StringId.SomeoneIn;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ }
+ break;
+ case "4":
+ btnStatus.TextID = StringId.SomeoneFell;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ break;
+ case "5":
+ if (function.extSet.labModel)
+ {
+ btnStatus.TextID = StringId.SomeoneStanding;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ }
+ else
+ {
+ btnStatus.TextID = StringId.SomeoneIn;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ }
+ break;
+ }
+
+
+ }
+
+ }
+
}
else if (function.spk == SPK.DoorLock)
{
@@ -120,6 +201,7 @@
TextSize = CSS_FontSize.TextFontSize,
Text = function.GetAttrState(FunctionAttributeKey.RoomHumidity) + "%",
TextAlignment = TextAlignment.CenterLeft,
+ Tag = function.sid + "_Humidity",
};
btnHumidityValues.Width = btnHumidityValues.GetTextWidth();
bodyDiv.AddChidren(btnHumidityValues);
@@ -143,6 +225,7 @@
TextSize = CSS_FontSize.TextFontSize,
Text = function.GetAttrState(FunctionAttributeKey.RoomTemp) + "掳C",
TextAlignment = TextAlignment.CenterLeft,
+ Tag = function.sid + "_Temp",
};
btnTempValues.Width = btnTempValues.GetTextWidth();
bodyDiv.AddChidren(btnTempValues);
@@ -290,6 +373,11 @@
bodyDiv.AddChidren(btnCollectionIcon);
}
+ if(function.spk == SPK.SenesorMegahealth)
+ {
+ bodyDiv.AddChidren(btnCollectionIcon);
+ }
+
if (!function.online)
{
bodyDiv.BackgroundColor = CSS_Color.PromptingColor2;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
index 13e5034..607333f 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
@@ -83,6 +83,12 @@
FrameWhiteCentet1.AddChidren(btnSuctionView);
+ //int i = 0;
+ //btnIcon.MouseUpEventHandler = (sender, e) => {
+ // device.GetAttribute(FunctionAttributeKey.TargetStatus).state = i.ToString();
+ // i++;
+ // RefreshFormStatu();
+ //};
@@ -172,7 +178,7 @@
})
{ IsBackground = true }.Start();
};
-
+ //鍥炲埌缃《鍒锋柊
base.SettionFinishEvent += () => {
exitLabView.Visible = device.extSet.labModel;
};
@@ -298,6 +304,14 @@
btnSuctionView.TextID = StringId.SomeoneRunning;
btnSuctionView.IsSelected = true;
}
+ else
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneInBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.SomeoneIn;
+ btnSuctionView.IsSelected = true;
+ }
break;
case "3":
if (device.extSet.labModel)
@@ -306,6 +320,14 @@
btnIcon.IsSelected = true;
btnIcon.IsSelected = false;
btnSuctionView.TextID = StringId.SomeoneSitting;
+ btnSuctionView.IsSelected = true;
+ }
+ else
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneInBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.SomeoneIn;
btnSuctionView.IsSelected = true;
}
break;
@@ -325,7 +347,14 @@
btnSuctionView.TextID = StringId.SomeoneStanding;
btnSuctionView.IsSelected = true;
}
- Console.WriteLine(btnSuctionView.Text);
+ else
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneInBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.SomeoneIn;
+ btnSuctionView.IsSelected = true;
+ }
break;
default:
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs
index a9993b7..77c25b5 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPage.cs
@@ -40,7 +40,14 @@
public override void RemoveFromParent()
{
- backAction?.Invoke();
+ new System.Threading.Thread(() =>
+ {
+ Application.RunOnMainThread(() =>
+ {
+ backAction?.Invoke();
+ });
+ })
+ { IsBackground = true }.Start();
base.RemoveFromParent();
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
index 56f5bde..9600527 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -31,7 +31,9 @@
{
if (!bodyView.onCurtainAnimation)
{
- bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)));
+ bodyView.btnProgress.Text = updateTemp.GetAttrState(FunctionAttributeKey.Percent) + "%";
+ bodyView.curtainSeekBar.Progress = Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent));
+ //bodyView.CurtainAnimation(Convert.ToInt32(updateTemp.GetAttrState(FunctionAttributeKey.Percent)));
}
}
catch { }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs
index 357373a..b416b21 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockUnlockPage.cs
@@ -182,6 +182,7 @@
if (agreeBtn.IsSelected)
{
UserInfo.Current.doorPasswordString = password;
+ UserInfo.Current.LastTimeOpenDoor = DateTime.Now;
}
Control.Ins.OneKeyUnlocking(this.device, etPassword.Text.Trim());
this.RemoveFromParent();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
index 9377363..4f31eee 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPage.cs
@@ -49,7 +49,14 @@
public override void RemoveFromParent()
{
- actionRefresh?.Invoke();
+ new System.Threading.Thread(() =>
+ {
+ Application.RunOnMainThread(() =>
+ {
+ actionRefresh?.Invoke();
+ });
+ })
+ { IsBackground = true }.Start();
base.RemoveFromParent();
}
@@ -497,7 +504,7 @@
btnTempCcValue.MouseUpEventHandler = (sender, e) =>
{
- LoadEditDialog(-5, 5, Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.room_humidity_cc)), (reslut) =>
+ LoadEditDialog(-10, 10, Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.room_humidity_cc)), (reslut) =>
{
btnTempCcValue.Text = reslut + "掳C";
Dictionary<string, string> dic = new Dictionary<string, string>();
@@ -558,7 +565,7 @@
btnHumidityCcValue.MouseUpEventHandler = (sender, e) =>
{
- LoadEditDialog(-10, 10, Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.room_humidity_cc)), (reslut) =>
+ LoadEditDialog(-20, 20, Convert.ToInt32(function.GetAttrState(FunctionAttributeKey.room_humidity_cc)), (reslut) =>
{
btnHumidityCcValue.Text = reslut + "%";
Dictionary<string, string> dic = new Dictionary<string, string>();
@@ -603,7 +610,7 @@
TextAlignment = TextAlignment.CenterRight,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.TextFontSize,
- Text = function.GetAttrState(FunctionAttributeKey.cac_valve) + "掳C",
+ TextID = function.GetAttrState(FunctionAttributeKey.cac_valve) == "on"? StringId.On:StringId.OFF,
};
cacValveRow.AddChidren(btnCacValvaValue);
}
@@ -641,7 +648,7 @@
TextAlignment = TextAlignment.CenterRight,
TextColor = CSS_Color.PromptingColor1,
TextSize = CSS_FontSize.TextFontSize,
- Text = function.GetAttrState(FunctionAttributeKey.fh_valve),
+ TextID = function.GetAttrState(FunctionAttributeKey.fh_valve) == "on"? StringId.On:StringId.OFF,
};
fhValveRow.AddChidren(btnFhValvaValue);
}
@@ -701,14 +708,7 @@
{
if (result != null && result.Code == StateCode.SUCCESS)
{
- if (result.Data.ToString() == "true")
- {
deviceMessageRules.push = push;
- }
- else
- {
- btnSwtichIcon0.IsSelected = deviceMessageRules.push;
- }
}
else
{
diff --git a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
index 7c78d90..006e71d 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/FunctionBaseInfoSetPageBLL.cs
@@ -56,7 +56,11 @@
{
//淇敼鍔熻兘鎵�灞炴埧闂翠箣鍚庣殑鍥炶皟浜嬩欢
Action chooseRoomBackAction = () => {
- btnLocationValues.Text = function.GetRoomListName();
+ try
+ {
+ btnLocationValues.Text = function.GetRoomListName();
+ }
+ catch { }
};
var view = new ChooseRoomPage(function,chooseRoomBackAction);
MainPage.BasePageView.AddChidren(view);
--
Gitblit v1.8.0