From 4e4f9c3ee4ff6d05d5a431626901fbf43eb368a9 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 20 十月 2023 14:26:12 +0800 Subject: [PATCH] Merge branch 'wxr-2.2' into Dev-Branch --- HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs | 6 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off_home_click.png | 0 HDL-ON_Android/Properties/AndroidManifest.xml | 4 HDL-ON_Android/Assets/Language.ini | 13 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off_home.png | 0 HDL-ON_iOS/HDL-ON_iOS.csproj | 18 + HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs | 16 HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorlight.png | 0 HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs | 24 + HDL_ON/DAL/Mqtt/MqttClient.cs | 2 HDL_ON/Entity/Function/Sensor.cs | 8 HDL-ON_Android/HDL-ON_Android.csproj | 13 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 24 + HDL-ON_iOS/Info.plist | 4 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensordryContact.png | 0 HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 14 HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs | 47 ++ HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs | 38 -- HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_white.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_white.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off_home_click.png | 0 HDL_ON/UI/UI1-Login/LoginPage.cs | 143 ++++++-- HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs | 2 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.png | 0 SiriIntents/Server/HttpUtil.cs | 4 HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs | 1 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on_home_click.png | 0 HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs | 37 -- HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off_home.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensordryContact.png | 0 DLL/Shared.IOS-1.dll | 0 HDL_ON/Entity/Function/Function.cs | 11 HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 85 ++++ HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_blue.png | 0 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs | 6 HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_blue.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_blue.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_white.png | 0 HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 130 +++++++ HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorpir_hold.png | 0 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 2 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs | 18 HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs | 38 -- HDL-ON_iOS/AppDelegate.cs | 11 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on_home.png | 0 HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs | 109 ++---- HDL-ON_iOS/Resources/Language.ini | 6 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorlight.png | 0 HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs | 4 HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on_home.png | 0 HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs | 66 ++++ HDL_ON/DAL/DriverLayer/Control.cs | 23 + HDL_ON/UI/MainPage.cs | 8 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_white.png | 0 HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on_home_click.png | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_blue.png | 0 HDL_ON/UI/UI1-Login/RegisterPage.cs | 1 DLL/Shared.IOS.dll | 0 HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorpir_hold.png | 0 HDL_ON/Common/R.cs | 4 HDL_ON/DAL/Server/HttpServerRequest.cs | 2 64 files changed, 623 insertions(+), 319 deletions(-) diff --git a/DLL/Shared.IOS-1.dll b/DLL/Shared.IOS-1.dll new file mode 100644 index 0000000..77ca2c5 --- /dev/null +++ b/DLL/Shared.IOS-1.dll Binary files differ diff --git a/DLL/Shared.IOS.dll b/DLL/Shared.IOS.dll index a6ea8af..b46417a 100644 --- a/DLL/Shared.IOS.dll +++ b/DLL/Shared.IOS.dll Binary files differ diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini index ff8cadd..e4f7f4b 100644 --- a/HDL-ON_Android/Assets/Language.ini +++ b/HDL-ON_Android/Assets/Language.ini @@ -682,7 +682,7 @@ 695=Daily data of the past month 696=Monthly data of the past year 697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. - +698=Break @@ -2078,6 +2078,7 @@ 695=杩囧幓涓�涓湀鐨勬瘡鏃ユ暟鎹� 696=杩囧幓涓�骞寸殑姣忔湀鏁版嵁 697=鎻愮ず锛氳捣濮嬮鑹查�夋嫨瓒婇潬杩戣壊鐜竟缂橈紝鐐僵鏁堟灉瓒婃槑鏄俱�傝秺闈犺繎鐧借壊涓績锛岀偒褰╂晥鏋滆秺涓嶆槑鏄俱�� +698=鏂紑 @@ -2628,9 +2629,6 @@ 7174=鐓ф槑搴﹂珮浜� 7175=鐓ф槑搴︿綆浜� 7176=鍏夌収 - - - @@ -3473,6 +3471,7 @@ 695=Daily data of the past month 696=Monthly data of the past year 697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. +698=Break @@ -4861,6 +4860,7 @@ 695=Daily data of the past month 696=Monthly data of the past year 697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. +698=Break @@ -6234,6 +6234,7 @@ 695=Daily data of the past month 696=Monthly data of the past year 697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. +698=Break @@ -6943,8 +6944,6 @@ 10032=袩芯褌褉械斜懈褌械谢褟褌 薪褟屑邪 褉邪蟹褉械褕械薪懈械. 10033=校褋褌褉芯泄褋褌胁芯褌芯 薪械 褋褗褖械褋褌胁褍胁邪. - - [Ukraine] 1=袙褏褨写 胁 褋懈褋褌械屑褍 2=袧芯屑械褉 褌械谢械褎芯薪褍 @@ -7535,7 +7534,7 @@ 601=袙懈斜械褉褨褌褜 写胁邪 邪斜芯 斜褨谢褜褕械 锌褉懈褋褌褉芯褩胁 602=袦褨泄 写褨屑 603=袘褍写褜 谢邪褋泻邪, 锌褉芯褔懈褌邪泄褌械 褍胁邪卸薪芯 -604=袩褉芯褌芯泻芯谢 蟹斜芯褉褍 褨薪褎芯褉屑邪褑褨褩 锌褉芯 芯斜谢懈褔褔褟 Pro Face +604="袩褉芯褌芯泻芯谢 蟹斜芯褉褍 褨薪褎芯褉屑邪褑褨褩 锌褉芯 芯斜谢懈褔褔褟 Pro Face 605= 携泻褖芯 胁懈 蟹谐芯写薪褨 蟹 褑褨褦褞 褍谐芯写芯褞, 斜褍写褜 谢邪褋泻邪, 薪邪褌懈褋薪褨褌褜 泻薪芯锌泻褍 [袟谐芯写械薪]. 606=袩褉懈胁'褟蟹泻邪 芯斜谢褨泻芯胁芯谐芯 蟹邪锌懈褋褍 褍褋锌褨褕薪邪, 胁懈 屑芯卸械褌械 锌褉芯写芯胁卸懈褌懈 芯锌械褉邪褑褨褞 蟹胁'褟蟹褍胁邪薪薪褟 锌褉懈褋褌褉芯褩胁 607=袩芯锌械褉械写薪褟 褋褌芯褉褨薪泻邪 diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_blue.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_blue.png new file mode 100644 index 0000000..a428a90 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_blue.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_white.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_white.png new file mode 100644 index 0000000..8981bc3 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_white.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_blue.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_blue.png new file mode 100644 index 0000000..bcae4f4 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_blue.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_white.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_white.png new file mode 100644 index 0000000..98c78b4 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_white.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensordryContact.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensordryContact.png new file mode 100644 index 0000000..1f2a6bc --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensordryContact.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorlight.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorlight.png new file mode 100644 index 0000000..4ac2186 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorlight.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorpir_hold.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorpir_hold.png new file mode 100644 index 0000000..4f7a978 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Icon/sensorpir_hold.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.png new file mode 100644 index 0000000..55fe174 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off_home.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off_home.png new file mode 100644 index 0000000..96a1303 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off_home.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off_home_click.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off_home_click.png new file mode 100644 index 0000000..0b2d8e7 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off_home_click.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.png new file mode 100644 index 0000000..4dd5fff --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on_home.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on_home.png new file mode 100644 index 0000000..4496b78 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on_home.png Binary files differ diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on_home_click.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on_home_click.png new file mode 100644 index 0000000..15aa556 --- /dev/null +++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on_home_click.png Binary files differ diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj index a4b6c45..41524db 100644 --- a/HDL-ON_Android/HDL-ON_Android.csproj +++ b/HDL-ON_Android/HDL-ON_Android.csproj @@ -606,6 +606,19 @@ <AndroidAsset Include="Assets\Phone\FunctionIcon\GroupControl\gp_all_on_home_click.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\GroupControl\gp_all_on_home.png" /> <AndroidAsset Include="Assets\Phone\FunctionIcon\GroupControl\gp_all_on.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensordryContact.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorpir_hold.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensordryContact_blue.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensordryContact_white.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensorpir_hold_blue.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\HomeIcon\sensorpir_hold_white.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Icon\sensorlight.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\LightScene\gp_all_off_home_click.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\LightScene\gp_all_off_home.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\LightScene\gp_all_off.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\LightScene\gp_all_on_home_click.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\LightScene\gp_all_on_home.png" /> + <AndroidAsset Include="Assets\Phone\FunctionIcon\Light\LightScene\gp_all_on.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 deda7a1..a4d7874 100644 --- a/HDL-ON_Android/Properties/AndroidManifest.xml +++ b/HDL-ON_Android/Properties/AndroidManifest.xml @@ -1,6 +1,6 @@ 锘�<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.1.3" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202309111"> - <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.3.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202310201"> + <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="30" /> <uses-permission android:name="android.permission.RECEIVE_SMS" /> <!--鍙嬬洘--> <!--<uses-sdk android:minSdkVersion="8"></uses-sdk>--> diff --git a/HDL-ON_iOS/AppDelegate.cs b/HDL-ON_iOS/AppDelegate.cs index 86dd531..f70d5d8 100644 --- a/HDL-ON_iOS/AppDelegate.cs +++ b/HDL-ON_iOS/AppDelegate.cs @@ -62,6 +62,17 @@ { UIApplication.SharedApplication.ApplicationIconBadgeNumber = 0; } + + [Export("application:shouldAllowExtensionPointIdentifier:")] + public override bool ShouldAllowExtensionPointIdentifier(UIApplication application, NSString extensionPointIdentifier) + { + //if (extensionPointIdentifier == UIApplicationKeyboardExtensionPointIdentifier) + //{ + // return false; + //} + return true; + + } public override void RegisteredForRemoteNotifications(UIApplication application, NSData deviceToken) { diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj index 5ceca1e..8618ee8 100644 --- a/HDL-ON_iOS/HDL-ON_iOS.csproj +++ b/HDL-ON_iOS/HDL-ON_iOS.csproj @@ -1762,6 +1762,24 @@ <BundleResource Include="Resources\Phone\FunctionIcon\GroupControl\gp_all_on_home_click.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\GroupControl\gp_all_on_home.png" /> <BundleResource Include="Resources\Phone\FunctionIcon\GroupControl\gp_all_on.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensordryContact_blue.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensordryContact_white.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensorpir_hold_blue.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensorpir_hold_white.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorpir_hold.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensordryContact.png" /> + <BundleResource Include="Resources\Phone\Collection\FunctionArmOnbg.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Icon\HomeIcon\sensormegahealth.png" /> + <BundleResource Include="Resources\Phone\LogicIcon\selectlocation.png" /> + <BundleResource Include="Resources\Phone\LogicIcon\ganjiedian.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\FunctionBg\VideoDoorLockFunctionBg.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Icon\sensorlight.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Light\LightScene\gp_all_off_home_click.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Light\LightScene\gp_all_off_home.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Light\LightScene\gp_all_off.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Light\LightScene\gp_all_on_home_click.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Light\LightScene\gp_all_on_home.png" /> + <BundleResource Include="Resources\Phone\FunctionIcon\Light\LightScene\gp_all_on.png" /> </ItemGroup> <ItemGroup> <ITunesArtwork Include="iTunesArtwork" /> diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist index c3eadee..dd41d60 100644 --- a/HDL-ON_iOS/Info.plist +++ b/HDL-ON_iOS/Info.plist @@ -11,7 +11,7 @@ <key>CFBundleName</key> <string>On Pro</string> <key>CFBundleShortVersionString</key> - <string>2.1.3</string> + <string>2.3.0</string> <key>CFBundleURLTypes</key> <array> <dict> @@ -36,7 +36,7 @@ </dict> </array> <key>CFBundleVersion</key> - <string>2.1.3</string> + <string>2.3.0</string> <key>LSApplicationQueriesSchemes</key> <array> <string>weixinULAPI</string> diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini index 9d76f34..e4f7f4b 100644 --- a/HDL-ON_iOS/Resources/Language.ini +++ b/HDL-ON_iOS/Resources/Language.ini @@ -682,7 +682,7 @@ 695=Daily data of the past month 696=Monthly data of the past year 697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. - +698=Break @@ -2078,6 +2078,7 @@ 695=杩囧幓涓�涓湀鐨勬瘡鏃ユ暟鎹� 696=杩囧幓涓�骞寸殑姣忔湀鏁版嵁 697=鎻愮ず锛氳捣濮嬮鑹查�夋嫨瓒婇潬杩戣壊鐜竟缂橈紝鐐僵鏁堟灉瓒婃槑鏄俱�傝秺闈犺繎鐧借壊涓績锛岀偒褰╂晥鏋滆秺涓嶆槑鏄俱�� +698=鏂紑 @@ -3470,6 +3471,7 @@ 695=Daily data of the past month 696=Monthly data of the past year 697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. +698=Break @@ -4858,6 +4860,7 @@ 695=Daily data of the past month 696=Monthly data of the past year 697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. +698=Break @@ -6231,6 +6234,7 @@ 695=Daily data of the past month 696=Monthly data of the past year 697=prompt: The closer the starting color selection is to the edge of the color ring, the more obvious the dazzling effect. The closer to the white center, the less noticeable the dazzling effect. +698=Break diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_blue.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_blue.png new file mode 100644 index 0000000..a428a90 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_blue.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_white.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_white.png new file mode 100644 index 0000000..8981bc3 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensordryContact_white.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_blue.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_blue.png new file mode 100644 index 0000000..bcae4f4 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_blue.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_white.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_white.png new file mode 100644 index 0000000..98c78b4 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/HomeIcon/sensorpir_hold_white.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensordryContact.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensordryContact.png new file mode 100644 index 0000000..1f2a6bc --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensordryContact.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorlight.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorlight.png new file mode 100644 index 0000000..4ac2186 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorlight.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorpir_hold.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorpir_hold.png new file mode 100644 index 0000000..4f7a978 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Icon/sensorpir_hold.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.png new file mode 100644 index 0000000..55fe174 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off_home.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off_home.png new file mode 100644 index 0000000..96a1303 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off_home.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off_home_click.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off_home_click.png new file mode 100644 index 0000000..0b2d8e7 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off_home_click.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.png new file mode 100644 index 0000000..4dd5fff --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on_home.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on_home.png new file mode 100644 index 0000000..4496b78 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on_home.png Binary files differ diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on_home_click.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on_home_click.png new file mode 100644 index 0000000..15aa556 --- /dev/null +++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on_home_click.png Binary files differ diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs index ca5fa2d..19b54db 100644 --- a/HDL_ON/Common/R.cs +++ b/HDL_ON/Common/R.cs @@ -5,6 +5,10 @@ public static class StringId { /// <summary> + /// 鏂紑锛堝共鎺ョ偣锛� + /// </summary> + public const int DryBreak = 698; + /// <summary> /// 鎻愮ず锛氳捣濮嬮鑹查�夋嫨瓒婇潬杩戣壊鐜竟缂橈紝鐐僵鏁堟灉瓒婃槑鏄俱�傝秺闈犺繎鐧借壊涓績锛岀偒褰╂晥鏋滆秺涓嶆槑鏄俱�� /// </summary> public const int ColorfulSetTip = 697; diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index 6955fab..5b31d17 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -1137,6 +1137,7 @@ receiveObj.Topic.Contains(CommunicationTopic.ct.GatewayUpSortTopic)) { //TODO 鏆傛椂涓嶄紶姝g‘鐨勬暟鎹笂鍘伙紝濡傛灉鍚庨潰瑕佷紭鍖栧墠闈㈣繖浜涗唬鐮� + //Console.WriteLine($"{receiveObj.Topic}\r\n{receiveObj.BodyDataString}"); UpdataFunctionStatus(receiveObj.BodyDataString, null); } else if (receiveObj.Topic == CommunicationTopic.ct.ControlSeurity + "_reply" @@ -1246,7 +1247,7 @@ { continue; } - MainPage.Log($"鏀跺埌鏁版嵁:{revString}"); + MainPage.Log($"鏀跺埌缇ゆ帶鏁版嵁:{revString}"); foreach (var attr in updateTemp.status) { localFunction.time_stamp = temp.time_stamp; @@ -1496,6 +1497,7 @@ case SPK.SensorTemperature: case SPK.SensorHumidity: case SPK.SensorHcho: + case SPK.SensorLight: if (localFunction.spk == SPK.SensorTemperature) { HomePage.LoadEvent_RefreshEnvirIndoorTemp(); @@ -1536,7 +1538,6 @@ case SPK.ElectricTuyaWeepRobot2: case SPK.ElectricTuyaWaterValve: case SPK.ElectricTuyaWaterValve2: - case SPK.SensorPir: case SPK.SensorDoorWindow: case SPK.SensorSmoke: case SPK.SensorWater: @@ -1551,6 +1552,22 @@ //鐘舵�佹洿鏂� Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status); break; + case SPK.SensorPir: + case SPK.SensorPirHold: + var tempPirStatus = localFunction.attributes.Find((sta) => sta.key == "people_status"); + if (tempPirStatus != null) + { + if(tempPirStatus.state == "true") + { + localFunction.lastState = Language.StringByID(StringId.Someone); + } + else + { + localFunction.lastState = Language.StringByID(StringId.wuren); + } + } + Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status); + break; case SPK.SenesorMegahealth: case SPK.SenesorMegahealth2: case SPK.SensorMmvPose: @@ -1562,7 +1579,7 @@ switch (tempStatus.state) {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔� case "0": - localFunction.lastState = Language.StringByID(StringId.SensorNormalState); + localFunction.lastState = Language.StringByID(StringId.wuren); break; case "1": localFunction.lastState = Language.StringByID(StringId.SomeoneIn); diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index 9c11563..51866d6 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -111,7 +111,7 @@ { MqttInfoConfig.Current.IfGetMqttInfoSuccess = false; } - Control.Ins.GatewayOnline_Cloud = Control.Ins.GatewayOnline_Local = false; + //Control.Ins.GatewayOnline_Cloud = Control.Ins.GatewayOnline_Local = false; await DisConnectRemoteMqttClient(s); } diff --git a/HDL_ON/DAL/Server/HttpServerRequest.cs b/HDL_ON/DAL/Server/HttpServerRequest.cs index a3038f6..fca8e58 100644 --- a/HDL_ON/DAL/Server/HttpServerRequest.cs +++ b/HDL_ON/DAL/Server/HttpServerRequest.cs @@ -698,7 +698,7 @@ { if (mHomeGatewayRes.Count > 0) { - DB_ResidenceData.Instance.HomeGateway = mHomeGatewayRes[0]; + DB_ResidenceData.Instance.HomeGateway = mHomeGatewayRes[0];//缃戝叧鐘舵�� DriverLayer.Control.Ins.GatewayOnline_Cloud = mHomeGatewayRes[0].gatewayStatus; DB_ResidenceData.Instance.SaveResidenceData(); return revertObj.Code; diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index e07df39..011c185 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -173,6 +173,13 @@ string iconPath = spk.Replace(".", ""); switch (spk) { + case SPK.SensorDryContact2: + case SPK.OtherCommon: + iconPath = "sensordryContact"; + break; + //case SPK.SensorLight: + // iconPath = "lightswitch"; + // break; case SPK.AirSwitchP3: iconPath = "electricalbreaker"; break; @@ -1487,6 +1494,10 @@ public const string Temperature = "temperature"; public const string Hcho = "hcho"; public const string Humidity = "humidity"; + /// <summary> + /// 鐓у害 + /// </summary> + public const string Illuminance = "illuminance"; public const string Pm25 = "pm25"; public const string Tvoc = "tvoc"; /// <summary> diff --git a/HDL_ON/Entity/Function/Sensor.cs b/HDL_ON/Entity/Function/Sensor.cs index b232cab..b363c9f 100644 --- a/HDL_ON/Entity/Function/Sensor.cs +++ b/HDL_ON/Entity/Function/Sensor.cs @@ -90,10 +90,10 @@ /// </summary> public List<string> GetIntervalValue(string spk) { - if(_intervalValue.Count != 0) - { - return _intervalValue; - } + //if (_intervalValue.Count != 0) + //{ + // return _intervalValue; + //} _intervalValue = new List<string>(); switch (spk) { diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index d5e3084..6f0454c 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -26,7 +26,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string VersionString = "2.1.4"; + public static string VersionString = "2.3.0"; ///// <summary> ///// 瀹㈡埛绔被鍨� ///// </summary> @@ -124,7 +124,9 @@ SPK.GroupControl, SPK.AvMusic, SPK.MusicStandard, - SPK.ElectricalTvHisense + SPK.ElectricalTvHisense, + SPK.OtherCommon, + }; @@ -635,7 +637,7 @@ || msg.Contains("鎺ユ敹鍒版帹閫�") || msg.Contains("api") || msg.Contains("璇诲彇鍔熻兘鐘舵��") - //|| true + || true ) Console.WriteLine(msg); #endif diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs index a62f728..d4ba44d 100644 --- a/HDL_ON/UI/UI1-Login/LoginPage.cs +++ b/HDL_ON/UI/UI1-Login/LoginPage.cs @@ -327,8 +327,10 @@ etAccount.Text = "18316672920"; etAccount.Text = "18244942707"; etAccount.Text = "1272061968@qq.com";//涓囩鍩庡競涔嬪厜E鍖�8鏍�206 - etAccount.Text = "18933160333"; - etAccount.Text = "18402017839";//wjc + etAccount.Text = "13533335801"; + etAccount.Text = "13682244600"; + etAccount.Text = "marketing@australindo.co.id"; + etAccount.Text = "dcai.assist@gmail.com"; } else @@ -364,9 +366,9 @@ { etPassword.Text = "hdl123"; } - else if(etAccount.Text == "13143792049") + else if(etAccount.Text == "18600200915") { - etPassword.Text = "BVVBQATD"; + etPassword.Text = "ZJtiaoshi"; }else if(etAccount.Text == "13288623489") { etPassword.Text = "luoxiaodong"; @@ -380,9 +382,9 @@ else if (etAccount.Text == "18100573477") { etPassword.Text = "huang12345"; - }else if(etAccount.Text == "1272061968@qq.com") + }else if(etAccount.Text == "dcai.assist@gmail.com") { - etPassword.Text = "a123456"; + etPassword.Text = "GraniteTileS57"; } //etPassword.Text = "Hdl85521566"; btnLogin.IsSelected = true; @@ -476,6 +478,9 @@ PlaceholderText = Language.StringByID(StringId.PlsEntryPhoneNumber), TextAlignment = TextAlignment.CenterLeft, }; +#if __IOS__ + etAccount.MyTextContentType = UIKit.UITextContentType.Name; +#endif accountView.AddChidren(etAccount); if (userInfo != null && userInfo.ID != "1234567890") @@ -947,7 +952,7 @@ { sid = "airSwitchP3000000000001", deviceId = "airSwitchP3000000000001", - name = "娴嬭瘯-涓夌浉鏅鸿兘绌哄紑", + name = "娴嬭瘯-涓夌浉鏅鸿兘绌哄紑", spk = SPK.AirSwitchP3, roomIds = new List<string>() { "1405771024583090178" }, attributes = new List<FunctionAttributes>() @@ -973,7 +978,7 @@ new FunctionAttributes() { key = FunctionAttributeKey.ElectricityC,value =new List<string>(){ "" }, curValue="26",state = "26" ,max = 1000,min = 0 }, new FunctionAttributes() { key = FunctionAttributeKey.TotalElectricity,value =new List<string>(){ "" }, curValue="26",state = "26" ,max = 1000,min = 0 }, }, - collect=true, + //collect = true, }; airSwitchP3.SaveFunctionFile(); @@ -1077,7 +1082,7 @@ { name = "娴嬭瘯-绌鸿皟绉戞妧绯荤粺鎬绘帶", spk = SPK.AcstParent, - collect = true, + //collect = true, attributes = new List<FunctionAttributes>() { new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" }, @@ -1202,7 +1207,7 @@ 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 = "target_status",curValue = "1",state = "1" },//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 = "" }, @@ -1279,15 +1284,69 @@ // } //}); - //FunctionList.List.Functions.Add(new Function() - //{ - // spk = SPK.SensorDryContact, - // name = "骞叉帴鐐�", - // attributes = new List<FunctionAttributes>() - // { - // new FunctionAttributes(){ key = "status",curValue= "on",state = "on" }, - // }, - //}); + FunctionList.List.Functions.Add(new Function() + { + spk = SPK.SensorDryContact, + name = "骞叉帴鐐�", + //collect = true, + sid = "sss000001", + attributes = new List<FunctionAttributes>() + { + new FunctionAttributes(){ key = "contact_status",curValue= "open",state = "open" }, + }, + }); + + FunctionList.List.Functions.Add(new Function() + { + spk = SPK.SensorLight, + name = "鍏夌収浼犳劅鍣�", + //collect = true, + sid = "SensorLightsss000001", + attributes = new List<FunctionAttributes>() + { + new FunctionAttributes(){ key = "illuminance",curValue= "100",state = "100" }, + }, + }); + + + FunctionList.List.Functions.Add(new Function() + { + spk = SPK.OtherCommon, + name = "閫氱敤寮�鍏�", + //collect = true, + sid = "sssCommon000001", + attributes = new List<FunctionAttributes>() + { + new FunctionAttributes(){ key = "on_off",curValue= "on",state = "off" }, + }, + }); + + + + FunctionList.List.Functions.Add(new Function() + { + spk = SPK.SensorPir, + name = "浜轰綋瀛樺湪浼犳劅鍣�1", + collect = true, + sid = "sss000001111", + attributes = new List<FunctionAttributes>() + { + new FunctionAttributes(){ key = "people_status",curValue= "false",state = "false" }, + }, + }); + + + FunctionList.List.Functions.Add(new Function() + { + spk = SPK.SensorPirHold, + name = "浜轰綋瀛樺湪浼犳劅鍣�2", + collect = true, + sid = "sss0000011112", + attributes = new List<FunctionAttributes>() + { + new FunctionAttributes(){ key = "people_status",curValue= "true",state = "true" }, + }, + }); //FunctionList.List.Functions.Add(new Function() //{ @@ -1312,19 +1371,19 @@ // }, //}); - //FunctionList.List.Functions.Add(new Function() - //{ - // spk = SPK.SensorHelp, - // name = "娴嬭瘯绱ф�ユ眰鍔╂寜閽�", - // attributes = new List<FunctionAttributes>() - // { - // new FunctionAttributes(){ key = "status",curValue= "on",state = "on" }, - // new FunctionAttributes(){ key = "alarm_status",curValue= "alarm",state = "alarm" }, - // new FunctionAttributes(){ key = "battery_value",curValue= "200",state = "200" }, - // new FunctionAttributes(){ key = "battery_percentage",curValue= "10",state = "10" }, - // new FunctionAttributes(){ key = "battery_state",curValue= "low",state = "low" }, - // }, - //}); + FunctionList.List.Functions.Add(new Function() + { + spk = SPK.SensorHelp, + name = "娴嬭瘯绱ф�ユ眰鍔╂寜閽�", + attributes = new List<FunctionAttributes>() + { + new FunctionAttributes(){ key = "status",curValue= "on",state = "on" }, + new FunctionAttributes(){ key = "alarm_status",curValue= "alarm",state = "alarm" }, + new FunctionAttributes(){ key = "battery_value",curValue= "200",state = "200" }, + new FunctionAttributes(){ key = "battery_percentage",curValue= "10",state = "10" }, + new FunctionAttributes(){ key = "battery_state",curValue= "low",state = "low" }, + }, + }); //FunctionList.List.Functions.Add(new Function() //{ @@ -1366,16 +1425,16 @@ // }, //}); - //FunctionList.List.Functions.Add(new Function() - //{ - // spk = SPK.SensorGas, - // name = "鐕冩皵浼犳劅鍣�", - // attributes = new List<FunctionAttributes>() - // { - // new FunctionAttributes(){ key = "enable",curValue= "true",state = "true" ,value = new List<string>(){ "true", "false" } }, - // new FunctionAttributes(){ key = "status",curValue= "normal",state = "normal" ,value = new List<string>(){ "alarm", "normal" } }, - // }, - //}); + FunctionList.List.Functions.Add(new Function() + { + spk = SPK.SensorGas, + name = "鐕冩皵浼犳劅鍣�", + attributes = new List<FunctionAttributes>() + { + new FunctionAttributes(){ key = "enable",curValue= "true",state = "true" ,value = new List<string>(){ "true", "false" } }, + new FunctionAttributes(){ key = "status",curValue= "normal",state = "normal" ,value = new List<string>(){ "alarm", "normal" } }, + }, + }); //FunctionList.List.Functions.Add(new Function() { spk = SPK.PjtIr, name = "娴嬭瘯鎶曞奖浠�", // attributes = new List<FunctionAttributes>() { diff --git a/HDL_ON/UI/UI1-Login/RegisterPage.cs b/HDL_ON/UI/UI1-Login/RegisterPage.cs index e6225f9..a52fe5e 100644 --- a/HDL_ON/UI/UI1-Login/RegisterPage.cs +++ b/HDL_ON/UI/UI1-Login/RegisterPage.cs @@ -238,6 +238,7 @@ }; pm = new HttpServerRequest(); + } //public RegisterPage(Action action) diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs index 2eb8498..d3a4868 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs @@ -1279,7 +1279,8 @@ }; - if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) + if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose || + function.spk == SPK.SensorPir || function.spk == SPK.SensorPirHold) { btnIcon.UnSelectedImagePath = "FunctionIcon/Icon/HomeIcon/sensormegahealth.png"; btnIcon.SelectedImagePath = "FunctionIcon/Icon/HomeIcon/sensormegahealth.png"; @@ -1293,7 +1294,7 @@ switch (tempStatus.state) {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔� case "0": - function.lastState = Language.StringByID(StringId.SensorNormalState); + function.lastState = Language.StringByID(StringId.wuren); break; case "1": function.lastState = Language.StringByID(StringId.SomeoneIn); @@ -1334,8 +1335,49 @@ } btnState.Text = function.lastState; } + else + { + tempStatus = function.attributes.Find((sta) => sta.key == "people_status"); + if (tempStatus != null) + { + switch (tempStatus.state) + { + case "true": + function.lastState = Language.StringByID(StringId.Someone); + break; + case "false": + function.lastState = Language.StringByID(StringId.wuren); + break; + } + btnState.Text = function.lastState; + } + } + } - + + else if(function.spk == SPK.SensorDryContact || function.spk == SPK.SensorDryContact2) + { + btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; + btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.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.ContactStatus); + if (tempStatus != null) + { + switch (tempStatus.state) + { + case "open": + function.lastState = Language.StringByID(StringId.DryBreak); + break; + case "close": + function.lastState = Language.StringByID(StringId.Shut); + break; + } + btnState.Text = function.lastState; + } + } + else { btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; @@ -1369,7 +1411,8 @@ if (//SPK.CurtainSpkList().Contains(function.spk)) function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainDream || - function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex) + function.spk == SPK.CurtainSwitch || function.spk == SPK.CurtainTrietex + ) { btnIcon.UnSelectedImagePath = "FunctionIcon/Curtain/CurtainIcon.png"; btnIcon.SelectedImagePath = "FunctionIcon/Curtain/CurtainOnIcon.png"; @@ -1384,6 +1427,7 @@ SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseWhiteIcon_Shadow.png", }; view.AddChidren(btnCurtainClose); + Button btnCurtainOpen; btnCurtainOpen = new Button() @@ -1434,7 +1478,7 @@ view.AddChidren(btnPower); btnState.Text = function.GetAttrState("song_name"); - + btnState.Width = Application.GetRealWidth(90); btnState.SelectedTextColor = CSS_Color.MainBackgroundColor; btnState.TextColor = CSS_Color.MainBackgroundColor;//PromptingColor1 @@ -1494,13 +1538,13 @@ } - else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) + //else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) + else if (SPK.ArmSensorSpkList().Contains(function.spk)) { - //btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}.png"; - //btnIcon.SelectedImagePath = "FunctionIcon/Icon/HomeIcon/sensormegahealth.png"; - //btnIcon.IsSelected = true; + btnName.TextColor = CSS_Color.MainBackgroundColor; + btnZone.TextColor = CSS_Color.MainBackgroundColor; btnState.SelectedTextColor = CSS_Color.MainBackgroundColor; - btnState.TextColor = CSS_Color.MainColor;//PromptingColor1 + btnState.TextColor = CSS_Color.MainBackgroundColor; } //绱ф�ユ眰鍔� @@ -1526,11 +1570,67 @@ //涓轰簡鍘绘帀寮�鍏虫寜閽� btnIcon.UnSelectedImagePath = "AksIcon/yingyinzhongkong1.png"; } - //else if (function.spk == SPK.GroupControl) - //{ - // btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_blue.png"; - // btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/lightswitch_white.png"; - //} + else if (function.spk == SPK.GroupControl) + { + btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_blue.png"; + btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png"; + if (function.spk == SPK.GroupControl) + { + Button btnClose; + Button btnOpen; + btnOpen = new Button() + { + X = Application.GetRealWidth(84), + Y = Application.GetRealWidth(89), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_on_home.png", + SelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_on_home_click.png", + }; + view.AddChidren(btnOpen); + + + btnClose = new Button() + { + X = btnOpen.Right, + Y = Application.GetRealWidth(89), + Width = Application.GetRealWidth(40), + Height = Application.GetRealWidth(40), + UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_off_home.png", + SelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_off_home_click.png", + }; + view.AddChidren(btnClose); + + + btnClose.MouseDownEventHandler = (sender, e) => { + btnClose.IsSelected = true; + }; + + btnClose.MouseUpEventHandler = (sender, e) => { + btnClose.IsSelected = false; + if (function.spk == SPK.GroupControl) + { + var d = new Dictionary<string, string>(); + d.Add("on_off", "off"); + (function as GroupControl).Control(d); + } + }; + btnOpen.MouseDownEventHandler = (sender, e) => { + btnOpen.IsSelected = true; + }; + btnOpen.MouseUpEventHandler = (sender, e) => { + btnOpen.IsSelected = false; + if (function.spk == SPK.GroupControl) + { + var d = new Dictionary<string, string>(); + d.Add("on_off", "on"); + (function as GroupControl).Control(d); + } + }; + + + } + } else if (function.spk == SPK.ElectricEnergy || function.spk == SPK.AirSwitch || function.spk == SPK.AirSwitchP3) { diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs index 34599ea..d47510b 100644 --- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs +++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs @@ -430,12 +430,28 @@ } } } - else if(function.spk == SPK.SensorHelp) + else if (function.spk == SPK.SensorHelp) { var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus); - if(tempStatus != null) + if (tempStatus != null) { state = tempStatus.curValue.ToString() == "alarm"; + } + } + else if (function.spk == SPK.SensorPir || function.spk == SPK.SensorPirHold) + { + var tempStatus = function.attributes.Find((sta) => sta.key == "people_status"); + if (tempStatus != null) + { + state = tempStatus.curValue.ToString() == "true"; + } + } + else if (function.spk == SPK.SensorDryContact || function.spk == SPK.SensorDryContact2) + { + var tempStatus = function.attributes.Find((sta) => sta.key == "contact_status"); + if (tempStatus != null) + { + state = tempStatus.curValue.ToString() == "open"; } } else @@ -682,7 +698,6 @@ d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString()); Control.Ins.SendWriteCommand(curtain, d); }; - btnOpen.MouseUpEventHandler = (sender, e) => { //if (!curtain.isOnline())//绂荤嚎涓嶅厑璁告搷浣� @@ -696,9 +711,10 @@ // return; //} btnOpen.IsSelected = true; + Dictionary<string, string> d = new Dictionary<string, string>(); + curtain.trait_on_off.curValue = "on"; curtain.SetAttrState(FunctionAttributeKey.Percent, 100); - Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString()); Control.Ins.SendWriteCommand(curtain, d); }; diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs index 934f962..25b3591 100644 --- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs +++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs @@ -193,7 +193,7 @@ switch (tempStatus.state) {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔� case "0": - btnStatus.TextID = StringId.SensorNormalState; + btnStatus.TextID = StringId.wuren; btnStatus.TextColor = CSS_Color.MainColor; break; case "1": @@ -248,6 +248,70 @@ } } } + + else if (SPK.ArmSensorSpkList().Contains(updataFunction.spk)) + { + if (cTag == updataFunction.sid + "_Sensor_Status") + { + Button btnStatus = (fcView.GetChildren(j) as Button); + + var alarm_status = updataFunction.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus); + if (alarm_status != null) + { + if (alarm_status.curValue.ToString() == "normal") + { + btnStatus.TextID = StringId.SensorNormalState; + btnStatus.TextColor = CSS_Color.MainColor; + } + else + { + btnStatus.TextID = StringId.InAlarm; + btnStatus.TextColor = CSS_Color.WarningColor; + } + } + else + { + alarm_status = updataFunction.attributes.Find((sta) => sta.key == "contact_status"); + if (alarm_status != null) + { + if (alarm_status.curValue.ToString() == "close") + { + btnStatus.TextID = StringId.Shut; + btnStatus.TextColor = CSS_Color.MainColor; + } + else + { + if (updataFunction.spk == SPK.SensorDryContact || updataFunction.spk == SPK.SensorDryContact2) + { + btnStatus.TextID = StringId.DryBreak; + } + else + { + btnStatus.TextID = StringId.Open; + } + btnStatus.TextColor = CSS_Color.WarningColor; + } + } + else + { + alarm_status = updataFunction.attributes.Find((sta) => sta.key == "people_status"); + if (alarm_status != null) + { + if (alarm_status.curValue.ToString() == "false") + { + btnStatus.TextID = StringId.wuren; + btnStatus.TextColor = CSS_Color.MainColor; + } + else + { + btnStatus.TextID = StringId.youren; + btnStatus.TextColor = CSS_Color.WarningColor; + } + } + } + } + } + } //鏇存柊娓╂帶鍣ㄧ姸鎬� else if(SPK.HvacCac == updataFunction.spk) { diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs index 99e296c..80844c1 100644 --- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs +++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs @@ -101,7 +101,7 @@ Button btnTipPowerLow = new Button() { X = Application.GetRealWidth(307), - Y = Application.GetRealHeight(25), + Y = Application.GetRealHeight(45), Width = Application.GetRealWidth(24), Height = Application.GetRealWidth(24), UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png", @@ -137,7 +137,7 @@ switch (tempStatus.state) {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔� case "0": - btnStatus.TextID = StringId.SensorNormalState; + btnStatus.TextID = StringId.wuren; btnStatus.TextColor = CSS_Color.MainColor; break; case "1": @@ -187,6 +187,79 @@ } + } + + } + + else if (SPK.ArmSensorSpkList().Contains(function.spk)) + { + 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 + "_Sensor_Status" + }; + bodyDiv.AddChidren(btnStatus); + + var alarm_status = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus); + if(alarm_status!= null) + { + if (alarm_status.curValue.ToString() == "normal") + { + btnStatus.TextID = StringId.SensorNormalState; + btnStatus.TextColor = CSS_Color.MainColor; + } + else + { + btnStatus.TextID = StringId.InAlarm; + btnStatus.TextColor = CSS_Color.WarningColor; + } + } + else + { + alarm_status = function.attributes.Find((sta) => sta.key == "contact_status"); + if (alarm_status != null) + { + if (alarm_status.curValue.ToString() == "close") + { + btnStatus.TextID = StringId.Shut; + btnStatus.TextColor = CSS_Color.MainColor; + } + else + { + if (function.spk == SPK.SensorDryContact || function.spk == SPK.SensorDryContact2) + { + btnStatus.TextID = StringId.DryBreak; + } + else + { + btnStatus.TextID = StringId.Open; + } + btnStatus.TextColor = CSS_Color.WarningColor; + } + } + else + { + alarm_status = function.attributes.Find((sta) => sta.key == "people_status"); + if (alarm_status != null) + { + if (alarm_status.curValue.ToString() == "false") + { + btnStatus.TextID = StringId.wuren; + btnStatus.TextColor = CSS_Color.MainColor; + } + else + { + btnStatus.TextID = StringId.youren; + btnStatus.TextColor = CSS_Color.WarningColor; + } + } + } } } @@ -449,15 +522,15 @@ UnSelectedImagePath = "Collection/CollectionGrayIcon.png", IsSelected = function.collect }; - if ( !SPK.ArmSensorSpkList().Contains(function.spk) - && function.spk != SPK.DoorLock + if ( !SPK.ArmSensorSpkList().Contains(function.spk)&& + function.spk != SPK.DoorLock && function.spk != SPK.GroupControl - && !SPK.EnvironDeviceSpkList().Contains( function.spk))//!DB_ResidenceData.Instance.CurrentRegion.isOtherShare && + && !SPK.EnvironDeviceSpkList().Contains( function.spk)) { bodyDiv.AddChidren(btnCollectionIcon); } - if(function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) + if(function.spk == SPK.SensorPir || function.spk == SPK.SensorPirHold || function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose) { bodyDiv.AddChidren(btnCollectionIcon); } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs index 80db2e3..e7e28b8 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -2292,7 +2292,7 @@ foreach (var dic in dicList) { string value = dic["value"]; - if (value == "open") + if (value == "on" || value == "open") { button1.Text = Language.StringByID(StringId.onLogic); } diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs index fd883fb..e2e9a5d 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs @@ -370,13 +370,13 @@ { return "FunctionIcon/DoorLock/DoorLock.png"; } - else if (SPK.SensorDryContact == device.spk - || SPK.SensorDryContact2 == device.spk - || SPK.OtherCommon == device.spk - ) - { - return "LogicIcon/ganjiedian.png"; - } + //else if (SPK.SensorDryContact == device.spk + // || SPK.SensorDryContact2 == device.spk + // || SPK.OtherCommon == device.spk + // ) + //{ + // return "LogicIcon/ganjiedian.png"; + //} else if (SPK.SensorLight == device.spk) { return "LogicIcon/lightloguc.png"; diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs index 11bd0d2..f4f0ede 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/AddFunction/BrandListPage.cs @@ -110,6 +110,12 @@ if(brand.productPlatform == "HaiLin")//瀛愭櫞闇�瑕侀殣钘忚繖涓叆鍙o紝鐢辫皟璇曡蒋浠朵笂浼犳暟鎹� 2023-03-09 17:20:33 { continue; + }else if(brand.productPlatform == "TUYA") { + if(DB_ResidenceData.Instance.CurrentRegion.regionUrl != "https://test-gz.hdlcontrol.com" && + DB_ResidenceData.Instance.CurrentRegion.regionUrl != "https://china-gateway.hdlcontrol.com") + { + continue; + } } var row = new RowLayout() { diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs index 26b7215..2866fb5 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PersonalDataPageBLL.cs @@ -368,6 +368,7 @@ { EventHandler<MouseEventArgs> eventHandler = (sender, e) => { + Action<string> callBack = (str) => { if (string.IsNullOrEmpty(str)) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs index dc72414..8b430ad 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/RoomListManage/ResidentialManagePage.cs @@ -652,8 +652,6 @@ #endregion - - } LoadEventList(); } diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs index ddbe6d8..a692dae 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/ArmCenterPage.cs @@ -512,14 +512,23 @@ } else { - //鎾ら槻 - if (bodyView.InDefenseMode.sid == updataTemp.sid) + try { - bodyView.InDefenseMode.status = updataTemp.status; - foreach (var tempView in bodyView.armDiyViewList) + //鎾ら槻 + if (bodyView.InDefenseMode != null) { - tempView.LightingView(false); + if (bodyView.InDefenseMode.sid == updataTemp.sid) + { + bodyView.InDefenseMode.status = updataTemp.status; + foreach (var tempView in bodyView.armDiyViewList) + { + tempView.LightingView(false); + } + } } + }catch(Exception ex) + { + MainPage.Log($"鎾ら槻寮傚父:{ex.Message}"); } } @@ -546,7 +555,10 @@ bodyView.btnArmTipIcon.IsSelected = true; bodyView.btnDefenseName.Text = bodyView.InDefenseMode.name; } - bodyView.InitAlarmStatus(bodyView.InDefenseMode.alarm); + if (bodyView.InDefenseMode != null) + { + bodyView.InitAlarmStatus(bodyView.InDefenseMode.alarm); + } } } catch (Exception ex) diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs index 1c21b73..6f57788 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs @@ -244,7 +244,7 @@ else if (temp.state == "uninhabited")//鏃犱汉 { btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/UnderProtectionBgIcon.png"; - btnSuctionView.TextID = StringId.SensorNormalState; + btnSuctionView.TextID = StringId.wuren; btnSuctionView.IsSelected = false; } else//鏈変汉 @@ -271,7 +271,7 @@ else { btnIcon.IsSelected = false; - btnSuctionView.TextID = StringId.SensorNormalState; + btnSuctionView.TextID = StringId.wuren; btnSuctionView.IsSelected = false; } //澧炲姞瀹為獙瀹ゆā寮忓弽棣� @@ -285,7 +285,7 @@ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/UnderProtectionBgIcon.png"; btnIcon.IsSelected = true; btnIcon.IsSelected = false; - btnSuctionView.TextID = StringId.SensorNormalState; + btnSuctionView.TextID = StringId.wuren; btnSuctionView.IsSelected = false; break; case "1": diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs index 546e051..9655256 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs @@ -129,7 +129,7 @@ else { btnIcon.IsSelected = false; - btnSuctionView.TextID = StringId.SensorNormalState; + btnSuctionView.TextID = StringId.wuren; btnSuctionView.IsSelected = false; } } @@ -147,7 +147,7 @@ else { btnIcon.IsSelected = false; - btnSuctionView.TextID = StringId.SensorNormalState; + btnSuctionView.TextID = StringId.wuren; btnSuctionView.IsSelected = false; } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs index e6f5b27..0309210 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs @@ -91,7 +91,7 @@ TextAlignment = TextAlignment.CenterLeft, TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel, TextColor = CSS_Color.FirstLevelTitleColor, - Text = MainPage.cityInfo.location, + Text = MainPage.cityInfo.city, }; topWeatherView.AddChidren(btnLocationText); @@ -903,6 +903,7 @@ } } + Console.WriteLine(updateTemp.spk); for (int i = 0; i < bodyView.sensorListView.ChildrenCount; i++) { var sensorTag = updateTemp.spk + updateTemp.sid + updateTemp.deviceId; @@ -921,9 +922,9 @@ if (btn.Tag != null) { FunctionAttributes attr = updateTemp.GetAttribute(FunctionAttributeKey.Value); - if(attr == null) + if (attr == null) { - switch(updateTemp.spk) + switch (updateTemp.spk) { case SPK.SensorCO2: attr = updateTemp.GetAttribute(FunctionAttributeKey.Co2); @@ -943,6 +944,10 @@ case SPK.SensorHumidity: attr = updateTemp.GetAttribute(FunctionAttributeKey.Humidity); break; + case SPK.SensorLight: + attr = updateTemp.GetAttribute(FunctionAttributeKey.Illuminance); + break; + } } @@ -953,8 +958,11 @@ } else if (tag == "SensorLevel") { - (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; - (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; + if (updateTemp.spk != SPK.SensorLight) + { + (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; + (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; + } } } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs index c9d675a..ecb9937 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorTureLampPageBLL.cs @@ -7,98 +7,61 @@ { public partial class ColorTureLampPage { - /// <summary> - /// 閫氱煡鏇存柊鐣岄潰鐨勬椂闂� - /// </summary> - DateTime notiyUpdateTime = DateTime.MinValue; - System.Threading.Thread updateUiThread; - object lockObj = new object(); + /// <summary> /// 鏇存柊鍔熻兘鐘舵�� /// </summary> public static void UpdataStatus(Function updataTemp) - { - if(bodyView == null) + { + if (bodyView == null) { return; } - lock (bodyView.lockObj) + + Application.RunOnMainThread(() => { - MainPage.Log($"鏀跺埌鏇存柊" + DateTime.Now.Ticks); - bodyView.notiyUpdateTime = DateTime.Now; - if (bodyView.updateUiThread == null) + try { - bodyView.updateUiThread = new System.Threading.Thread(() => + if (bodyView == null) + return; + if (updataTemp.spk == bodyView.function.spk && updataTemp.sid == bodyView.function.sid) { - while (true) + if (updataTemp.trait_on_off.curValue.ToString() == "on") { - System.Threading.Thread.Sleep(1500); - if (bodyView == null) + bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1); + if (!bodyView.onDimmerBar) { - return; + bodyView.dimmerBar.Progress = Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness)); } - if (DateTime.Now.AddMilliseconds(-1500) > bodyView.notiyUpdateTime) + if (updataTemp.GetAttrState(FunctionAttributeKey.Brightness) != "0") { - MainPage.Log("娌℃湁鏂版暟鎹紝鏇存柊UI"); - break; - } - else - { - MainPage.Log("鏈夋柊鏁版嵁锛岀户缁瓑寰�"); + bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%"; + bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80); } } - - Application.RunOnMainThread(() => + else { - try - { - if (bodyView == null) - return; - if (updataTemp.spk == bodyView.function.spk && updataTemp.sid == bodyView.function.sid) - { - if (updataTemp.trait_on_off.curValue.ToString() == "on") - { - bodyView.dimmerBar.SetProgressBarColors(CSS_Color.AuxiliaryColor1, CSS_Color.AuxiliaryColor1); - if (!bodyView.onDimmerBar) - { - bodyView.dimmerBar.Progress = Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness)); - } - if (updataTemp.GetAttrState(FunctionAttributeKey.Brightness) != "0") - { - bodyView.btnBrightnessText.Text = updataTemp.GetAttrState(FunctionAttributeKey.Brightness) + "%"; - bodyView.btnBrightnessText.Y = ((100 - Convert.ToInt32(updataTemp.GetAttrState(FunctionAttributeKey.Brightness))) * Application.GetRealHeight(222 - 16) / 100) + Application.GetRealWidth(80); - } - } - else - { - bodyView.dimmerBar.SetProgressBarColors(CSS_Color.DividingLineColor, CSS_Color.DividingLineColor); - } - bodyView.btnSwitch.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on"; - bodyView.barColorTemplatrue.Enable = updataTemp.trait_on_off.curValue.ToString() == "on"; - var cct = 27; - int.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.CCT), out cct); - bodyView.barColorTemplatrue.Progress = cct / 100; - //璁剧疆鍒濆鍊� - bodyView.barColorTemplatrue.SetCustomText(bodyView.barColorTemplatrue.Progress * 100 + "K"); + bodyView.dimmerBar.SetProgressBarColors(CSS_Color.DividingLineColor, CSS_Color.DividingLineColor); + } + bodyView.btnSwitch.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on"; + bodyView.barColorTemplatrue.Enable = updataTemp.trait_on_off.curValue.ToString() == "on"; + var cct = 27; + int.TryParse(updataTemp.GetAttrState(FunctionAttributeKey.CCT), out cct); + bodyView.barColorTemplatrue.Progress = cct / 100; + //璁剧疆鍒濆鍊� + bodyView.barColorTemplatrue.SetCustomText(bodyView.barColorTemplatrue.Progress * 100 + "K"); - } - } - catch (Exception ex) - { - MainPage.Log($"{bodyView.GetType().Name} UpdataStates error : {ex.Message}"); - } - finally - { - bodyView.updateUiThread = null; - } - - }); - - bodyView.updateUiThread.IsBackground = true; - bodyView.updateUiThread.Start(); - }); + } } - } + catch (Exception ex) + { + MainPage.Log($"{bodyView.GetType().Name} UpdataStates error : {ex.Message}"); + } + finally + { + } + + }); } void LoadEventList() diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs index fe9d187..ea2dd01 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/ColorfulInfoPage.cs @@ -292,18 +292,18 @@ { LoadEditDialog(() => { - if(hour == 0 && minute == 0 && second == 0) + if( second == 0) { new PublicAssmebly().TipMsg(StringId.Tip, StringId.TimeInvalid); return; } //btnWorkHours.Text = hour + "鏃�"; - btnWorkHours.Text = minute + "鍒�"; - btnWorkHours.Text += second + "绉�"; + btnWorkHours.Text = second/60 + "鍒�"; + btnWorkHours.Text += second%60 + "绉�"; new System.Threading.Thread(() => { var d = new Dictionary<string, string>(); - function.SetAttrState(FunctionAttributeKey.ColorfulTime, (hour * 360 + minute * 60 + second).ToString()); - d.Add(FunctionAttributeKey.ColorfulTime, (hour * 360 + minute * 60 + second).ToString()); + function.SetAttrState(FunctionAttributeKey.ColorfulTime, ( minute * 60 + second).ToString()); + d.Add(FunctionAttributeKey.ColorfulTime, ( minute * 60 + second).ToString()); Control.Ins.SendWriteCommand(function, d); }) { IsBackground = true }.Start(); }); @@ -402,7 +402,7 @@ { item1.Add(i+Language.StringByID(StringId.h)); } - for (int i = 1; i <= 119; i += 1) + for (int i = 1; i <= 120; i += 1) { item2.Add(i + Language.StringByID(StringId.m)); item3.Add(i + Language.StringByID(StringId.s)); @@ -421,9 +421,7 @@ dialog.Close(); }; uIPickerView.OnSelectChangeEvent = (int1, int2, int3) => { - hour = int1; - minute = int2; - second = int3; + second = int1+1; }; btnConfrim.MouseUpEventHandler = (sender, e) => { dialog.Close(); diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs index 765396b..11c2daa 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/DimmerPageBLL.cs @@ -7,12 +7,6 @@ { public partial class DimmerPage { - /// <summary> - /// 閫氱煡鏇存柊鐣岄潰鐨勬椂闂� - /// </summary> - DateTime notiyUpdateTime = DateTime.MinValue; - System.Threading.Thread updateUiThread; - object lockObj = new object(); /// <summary> /// 鏇存柊鍔熻兘鐘舵�� @@ -23,31 +17,6 @@ { return; } - lock (bodyView.lockObj) - { - MainPage.Log($"鏀跺埌鏇存柊" + DateTime.Now.Ticks); - bodyView.notiyUpdateTime = DateTime.Now; - if (bodyView.updateUiThread == null) - { - bodyView.updateUiThread = new System.Threading.Thread(() => - { - while (true) - { - System.Threading.Thread.Sleep(1500); - if (bodyView == null) - { - return; - } - if (DateTime.Now.AddMilliseconds(-1500) > bodyView.notiyUpdateTime) - { - MainPage.Log("娌℃湁鏂版暟鎹紝鏇存柊UI"); - break; - } - else - { - MainPage.Log("鏈夋柊鏁版嵁锛岀户缁瓑寰�"); - } - } Application.RunOnMainThread(() =>{ try @@ -79,16 +48,9 @@ } finally { - bodyView.updateUiThread = null; } }); - - bodyView.updateUiThread.IsBackground = true; - bodyView.updateUiThread.Start(); - }); - } - } } void LoadEventList() diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs index c48a8d5..96465f1 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs @@ -213,10 +213,22 @@ Y = Application.GetRealHeight(466), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), - //UnSelectedImagePath = "Public/PowerClose.png", - UnSelectedImagePath = "Public/PowerOpen.png", + UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_on.png", }; controlView.AddChidren(btnOn); + var btnOnText = new Button() + { + X = Application.GetRealWidth(100-9), + Y = Application.GetRealHeight(500), + Width = Application.GetMinRealAverage(50), + Height = Application.GetMinRealAverage(32), + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.TextFontSize, + TextAlignment = TextAlignment.Center, + TextID = StringId.Open, + }; + controlView.AddChidren(btnOnText); + var btnOff = new Button() { @@ -224,10 +236,24 @@ Y = Application.GetRealHeight(466), Width = Application.GetMinRealAverage(32), Height = Application.GetMinRealAverage(32), - UnSelectedImagePath = "Public/PowerClose.png", - //UnSelectedImagePath = "Public/PowerOpen.png", + UnSelectedImagePath = "FunctionIcon/Light/LightScene/gp_all_off.png", }; controlView.AddChidren(btnOff); + var btnOffText = new Button() + { + X = Application.GetRealWidth(180 - 9), + Y = Application.GetRealHeight(500), + Width = Application.GetMinRealAverage(50), + Height = Application.GetMinRealAverage(32), + TextColor = CSS_Color.TextualColor, + TextSize = CSS_FontSize.TextFontSize, + TextAlignment = TextAlignment.Center, + TextID = StringId.Close, + }; + controlView.AddChidren(btnOffText); + + + btnOn.MouseUpEventHandler = (sender, e) => { var d = new Dictionary<string, string>(); @@ -241,6 +267,19 @@ d.Add(FunctionAttributeKey.OnOff, "off"); function.Control(d); }; + btnOnText.MouseUpEventHandler = (sender, e) => + { + var d = new Dictionary<string, string>(); + d.Add(FunctionAttributeKey.OnOff, "on"); + function.Control(d); + }; + + btnOffText.MouseUpEventHandler = (sender, e) => + { + var d = new Dictionary<string, string>(); + d.Add(FunctionAttributeKey.OnOff, "off"); + function.Control(d); + }; if (hadRGB) diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs index e60c686..776e6d0 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBPageBLL.cs @@ -6,12 +6,6 @@ { public partial class RGBPage { - /// <summary> - /// 閫氱煡鏇存柊鐣岄潰鐨勬椂闂� - /// </summary> - DateTime notiyUpdateTime = DateTime.MinValue; - System.Threading.Thread updateUiThread; - object lockObj = new object(); public override void RemoveFromParent() { @@ -27,31 +21,6 @@ { return; } - lock (bodyView.lockObj) - { - MainPage.Log($"鏀跺埌鏇存柊"+ DateTime.Now.Ticks); - bodyView.notiyUpdateTime = DateTime.Now; - if (bodyView.updateUiThread == null) - { - bodyView.updateUiThread = new System.Threading.Thread(() => - { - while (true) - { - System.Threading.Thread.Sleep(1500); - if(bodyView == null) - { - return; - } - if (DateTime.Now.AddMilliseconds(-1500) > bodyView.notiyUpdateTime) - { - MainPage.Log("娌℃湁鏂版暟鎹紝鏇存柊UI"); - break; - } - else - { - MainPage.Log("鏈夋柊鏁版嵁锛岀户缁瓑寰�"); - } - } Application.RunOnMainThread((() => { @@ -123,15 +92,9 @@ } finally { - bodyView.updateUiThread = null; } })); - }); - bodyView.updateUiThread.IsBackground = true; - bodyView.updateUiThread.Start(); - } - } } diff --git a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs index 369d3b9..a895328 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/Light/RGBWPageBLL.cs @@ -7,12 +7,6 @@ public partial class RGBWPage { /// <summary> - /// 閫氱煡鏇存柊鐣岄潰鐨勬椂闂� - /// </summary> - DateTime notiyUpdateTime = DateTime.MinValue; - System.Threading.Thread updateUiThread; - object lockObj = new object(); - /// <summary> /// 鏇存柊鍔熻兘鐘舵�� /// </summary> public static void UpdataStates(Function updateTemp) @@ -21,31 +15,6 @@ { return; } - lock (bodyView.lockObj) - { - MainPage.Log($"鏀跺埌鏇存柊" + DateTime.Now.Ticks); - bodyView.notiyUpdateTime = DateTime.Now; - if (bodyView.updateUiThread == null) - { - bodyView.updateUiThread = new System.Threading.Thread(() => - { - while (true) - { - System.Threading.Thread.Sleep(1500); - if (bodyView == null) - { - return; - } - if (DateTime.Now.AddMilliseconds(-1500) > bodyView.notiyUpdateTime) - { - MainPage.Log("娌℃湁鏂版暟鎹紝鏇存柊UI"); - break; - } - else - { - MainPage.Log("鏈夋柊鏁版嵁锛岀户缁瓑寰�"); - } - } Application.RunOnMainThread(() => { try @@ -101,16 +70,9 @@ } finally { - bodyView.updateUiThread = null; } }); - - bodyView.updateUiThread.IsBackground = true; - bodyView.updateUiThread.Start(); - }); - } - } } diff --git a/SiriIntents/Server/HttpUtil.cs b/SiriIntents/Server/HttpUtil.cs index dc7aca0..8d4483c 100644 --- a/SiriIntents/Server/HttpUtil.cs +++ b/SiriIntents/Server/HttpUtil.cs @@ -16,8 +16,8 @@ /// 鍥哄畾鍩熷悕,姝e紡鐜 /// 鍏叡鍩熷悕灏辫繎瑙f瀽 /// </summary> - //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; - public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; + public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; + //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; const string APP_KEY = "HDL-HOME-APP-TEST"; const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm -- Gitblit v1.8.0