From 64390bc739286477167e186f1f2b40a27a73a9a5 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 02 三月 2021 17:31:01 +0800
Subject: [PATCH] 20210302-1
---
HDL-ON_Android/Properties/AndroidManifest.xml | 5
HDL-ON_Android/Assets/Language.ini | 77 +--
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 4
HDL-ON_iOS/HDL-ON_iOS.csproj | 2
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs | 262 +++++++++++++++
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs | 2
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs | 67 ++-
HDL_ON/DAL/Mqtt/MqttClient.cs | 4
HDL_ON/HDL_ON.projitems | 2
HDL-ON_Android/HDL-ON_Android.csproj | 1
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 23
HDL-ON_iOS/Info.plist | 4
HDL-ON_iOS/Resources/Language.ini | 20 +
HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs | 74 ++-
HDL-ON_Android/Resources/Resource.designer.cs | 9
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs | 32 -
.vs/HDL_APP_Project/xs/UserPrefs.xml | 71 +--
HDL_ON/DAL/DriverLayer/Control.cs | 31 +
HDL_ON/UI/MainPage.cs | 2
HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs | 8
HDL_ON/UI/UI1-Login/LoginPage.cs | 5
HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs | 5
HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs | 72 ++-
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs | 4
HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs | 78 ++-
HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs | 103 +++++
HDL_ON/DAL/Server/NewAPI.cs | 2
HDL_ON/Entity/Function/Function.cs | 13
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 5
HDL_ON/Common/R.cs | 9
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store | 0
31 files changed, 714 insertions(+), 282 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 0667848..1de7a4f 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,73 +1,54 @@
-锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
- <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs">
+锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
+ <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget" />
+ <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs">
<Files>
- <File FileName="HDL_ON/UI/UI2/2-Classification/RoomPage.cs" Line="80" Column="68" />
- <File FileName="HDL_ON/Entity/Room.cs" />
- <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" Line="417" Column="60" />
- <File FileName="HDL_ON/UI/MainPage.cs" />
- <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs" Line="186" Column="38" />
- <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" Line="148" Column="70" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs" Line="388" Column="54" />
- <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs" />
- <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="863" Column="51" />
- <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs" Line="369" Column="13" />
- <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="750" Column="1" />
- <File FileName="HDL_ON/UI/UI0-Stan/Logic/HdlThreadLogic.cs" Line="97" Column="1" />
+ <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPage.cs" Line="1" Column="1" />
+ <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionPageBLL.cs" Line="13" Column="56" />
+ <File FileName="HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs" Line="78" Column="52" />
+ <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs" Line="340" Column="22" />
+ <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="743" Column="75" />
+ <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="249" Column="69" />
+ <File FileName="HDL_ON/UI/MainPage.cs" Line="29" Column="55" />
+ <File FileName="HDL-ON_iOS/Info.plist" />
+ <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs" Line="340" Column="42" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="HDL_APP_Project" expanded="True">
<Node name="HDL_ON" expanded="True">
+ <Node name="Common" expanded="True" />
<Node name="DAL" expanded="True">
<Node name="DriverLayer" expanded="True" />
<Node name="Mqtt" expanded="True" />
+ <Node name="Server" expanded="True" />
</Node>
<Node name="Entity" expanded="True">
<Node name="Function" expanded="True" />
</Node>
<Node name="UI" expanded="True">
- <Node name="UI0-Public" expanded="True" />
- <Node name="UI0-Stan" expanded="True">
- <Node name="Logic" expanded="True" />
- </Node>
+ <Node name="UI0-Stan" expanded="True" />
+ <Node name="UI1-Login" expanded="True" />
<Node name="UI2" expanded="True">
<Node name="1-HomePage" expanded="True" />
<Node name="2-Classification" expanded="True" />
- <Node name="FuntionControlView" expanded="True">
- <Node name="ArmSensor" expanded="True" />
- <Node name="Electrical" expanded="True">
- <Node name="ClothesHangerPage.cs" selected="True" />
+ <Node name="3-Intelligence" expanded="True">
+ <Node name="Automation" expanded="True">
+ <Node name="ConditionDeviceFunList.cs" selected="True" />
</Node>
</Node>
- </Node>
- </Node>
- </Node>
- <Node name="HDL-ON_Android" expanded="True">
- <Node name="Assets" expanded="True">
- <Node name="Phone" expanded="True">
- <Node name="FunctionIcon" expanded="True">
- <Node name="Electrical" expanded="True">
- <Node name="ClothesHanger" expanded="True" />
- </Node>
+ <Node name="4-PersonalCenter" expanded="True" />
+ <Node name="FuntionControlView" expanded="True">
+ <Node name="Curtain" expanded="True" />
+ <Node name="Electrical" expanded="True" />
</Node>
</Node>
</Node>
</Node>
<Node name="HDL-ON_iOS" expanded="True">
- <Node name="Resources" expanded="True">
- <Node name="Phone" expanded="True">
- <Node name="FunctionIcon" expanded="True">
- <Node name="Electrical" expanded="True">
- <Node name="ClothesHanger" expanded="True" />
- </Node>
- </Node>
- </Node>
- </Node>
+ <Node name="Resources" expanded="True" />
</Node>
+ <Node name="ys" expanded="True" />
</Node>
</State>
</Pad>
@@ -79,7 +60,7 @@
<String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
<String>Shared.IOS/Shared.IOS.csproj</String>
</DisabledProjects>
- <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+ <MonoDevelop.Ide.Workspace ActiveConfiguration="Release|iPhone" />
<MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index a3769fc..1b59f7e 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -399,6 +399,21 @@
414=Controller on
415=Someone
416=Log
+417=Water Leakage
+418=In Alarm
+419=Normal
+420=Hot dry
+421=Air dry
+422=Disinfect
+423=Lighting
+424=Time
+425=Hot dry time
+426=Air dry time
+427=Disinfect time
+428=Anion Time
+
+
+1002=Anion
5000=Music
5001=Group
@@ -1061,7 +1076,20 @@
413=鎺у埗鍣ㄦ湭寮�鍚�
414=鎺у埗鍣ㄥ凡寮�鍚�
415=鏈変汉
-516=鏃ュ織
+416=鏃ュ織
+417=婕忔按
+418=鎶ヨ
+419=姝e父
+420=鐑樺共
+421=椋庡共
+422=娑堟瘨
+423=鐓ф槑
+424=鏃堕棿
+425=鐑樺共鏃堕棿
+426=椋庡共鏃堕棿
+427=娑堟瘨鏃堕棿
+428=璐熺瀛愭椂闂�
+
1000=瀹ゅ唴婀垮害
1001=绔ラ攣
@@ -1164,7 +1192,6 @@
5047=浣犳墜鏈烘殏鏈畨瑁�"QQ闊充箰"{\r\n}璇峰墠寰�鎵嬫満鍟嗗満瀹夎
-
6000=姝e父
6001=璁惧鐘舵��
6002=涓�
@@ -1180,50 +1207,8 @@
6012=绾㈠閬ユ帶
6013=璁惧绠$悊
6014=娣诲姞閬ユ帶鍣�
-6015=鍦ㄧ嚎
-6016=绂荤嚎
-6017=鐗堟湰鍙�
-6018=璇疯緭鍏ラ仴鎺у櫒鍚嶇О
-6019=鎻愮ず锛氶仴鎺у櫒鍒涘缓鍚庡彲鍦ㄥ姛鑳�-鐢靛櫒鍒嗙被{\r\n}鏌ユ壘浣跨敤
-6020=鎺ㄨ崘鎸夐敭
-6021=璇疯緭鍏ユ寜閿悕绉�
-6022=涓嬩竴姝�
-6023=鐢垫簮
-6024=闊抽噺+
-6025=闊抽噺-
-6026=棰戦亾+
-6027=棰戦亾-
-6028=涓�
-6029=涓�
-6030=宸�
-6031=鍙�
-6032=闈欓煶
-6034=纭
-6035=鎾斁
-6037=閫�鍑�
-6038=鑿滃崟
-6039=鏆傚仠
-6040=杩斿洖
-6041=鍋滄
-6042=涓婚〉
-6043=蹇繘
-6044=蹇��
-6045=瀹氭椂
-6046=澶嶅埗閬ユ帶鍔熻兘
-6047=瀵瑰噯閬ユ帶鍣ㄤ腑蹇冩寜涓嬬浉鍚屾寜閿�
-6048=鏅鸿兘閬ユ帶鍣�
-6049=娣诲姞鎸夐敭
-6050=*闀挎寜鍙繘琛岃嚜瀹氫箟鎺掑簭
-6051=瀹屾垚
-6052=娣诲姞鎴愬姛
-6053=鍙埌鍒嗙被-鍔熻兘-鐢靛櫒鎿嶄綔浣跨敤
-6054=鎵�灞炲垎绫�
-6055=閬ユ帶鍣ㄥ悕绉�
-6056=鎵�灞炲尯鍩�
-6057=缁х画娣诲姞
-6058=鐢靛櫒
-6059=娣诲姞澶辫触
-6060=閲嶈瘯
+
+
7000=鏂板缓鑷姩鍖�
7001=缂栬緫鑷姩鍖�
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 56274c5..fd72e13 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -829,6 +829,7 @@
<AndroidAsset Include="Assets\Phone\PirIcon\icon1.png" />
<AndroidAsset Include="Assets\Phone\PirIcon\icon2.png" />
<AndroidAsset Include="Assets\Phone\PirIcon\succeed.png" />
+ <AndroidAsset Include="Assets\Phone\LogicIcon\selected+.png" />
</ItemGroup>
<ItemGroup>
<AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" />
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index cd8dbaa..2677841 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:versionCode="202102252" android:versionName="1.1.202102252" package="com.hdl.onpro">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202103021" android:versionName="1.1.202103021" package="com.hdl.onpro">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="26" />
<!-- 瀹氫綅鏉冮檺-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
@@ -116,8 +116,5 @@
<!-- Required. AppKey copied from Portal -->
<meta-data android:name="JPUSH_APPKEY" android:value="cbd90743ac45cbca06c8118b" />
<!-- 鏋佸厜鎺ㄩ�佺粨鏉� -->
-
-
-
</application>
</manifest>
\ No newline at end of file
diff --git a/HDL-ON_Android/Resources/Resource.designer.cs b/HDL-ON_Android/Resources/Resource.designer.cs
index bef5f94..5d2ca39 100644
--- a/HDL-ON_Android/Resources/Resource.designer.cs
+++ b/HDL-ON_Android/Resources/Resource.designer.cs
@@ -1,11 +1,10 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
-// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
-// 杩愯鏃剁増鏈�:4.0.30319.42000
+// This code was generated by a tool.
//
-// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋�
-// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便��
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
@@ -15,7 +14,7 @@
{
- [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
public partial class Resource
{
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 963e60c..f5a867c 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -885,7 +885,6 @@
<BundleResource Include="Resources\Phone\LogicIcon\-.png" />
<BundleResource Include="Resources\Phone\LogicIcon\+.png" />
<BundleResource Include="Resources\Phone\LogicIcon\point.png" />
- <BundleResource Include="Resources\Phone\LogicIcon\ selected+.png" />
<BundleResource Include="Resources\Phone\LogicIcon\selected-.png" />
<BundleResource Include="Resources\Phone\oRobot.png" />
<BundleResource Include="Resources\Phone\FunctionIcon\Light\ColorWheelGray.png" />
@@ -1057,6 +1056,7 @@
<BundleResource Include="Resources\Phone\PirIcon\online.png" />
<BundleResource Include="Resources\Phone\PirIcon\adddevice.png" />
<BundleResource Include="Resources\Phone\PirIcon\next.png" />
+ <BundleResource Include="Resources\Phone\LogicIcon\selected+.png" />
</ItemGroup>
<ItemGroup>
<ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Info.plist b/HDL-ON_iOS/Info.plist
index 4e55362..1d85f5e 100644
--- a/HDL-ON_iOS/Info.plist
+++ b/HDL-ON_iOS/Info.plist
@@ -102,9 +102,9 @@
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>CFBundleShortVersionString</key>
- <string>1.1.202102242</string>
+ <string>1.1.202103021</string>
<key>CFBundleVersion</key>
- <string>202102242</string>
+ <string>202103021</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 57f0868..b9928d1 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -402,11 +402,20 @@
417=Water Leakage
418=In Alarm
419=Normal
-420=Hot Dry
-421=Air Dry
+420=Hot dry
+421=Air dry
422=Disinfect
423=Lighting
+424=Time
+425=Hot dry time
+426=Air dry time
+427=Disinfect time
+428=Anion Time
+429=h
+430=m
+
+1002=Anion
5000=Music
5001=Group
@@ -1077,6 +1086,13 @@
421=椋庡共
422=娑堟瘨
423=鐓ф槑
+424=鏃堕棿
+425=鐑樺共鏃堕棿
+426=椋庡共鏃堕棿
+427=娑堟瘨鏃堕棿
+428=璐熺瀛愭椂闂�
+429=灏忔椂
+430=鍒嗛挓
1000=瀹ゅ唴婀垮害
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store
index c84c9d0..3f51231 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store
Binary files differ
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 67c89c2..7bd22d5 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -4,7 +4,14 @@
{
public static class StringId
{
- public const int Lightint = 433;
+ public const int MinuteUint = 430;
+ public const int HourUint = 429;
+ public const int AnionTime = 428;
+ public const int DisinfectTime = 427;
+ public const int WindDryTime = 426;
+ public const int HotDryTime = 425;
+ public const int Time = 424;
+ public const int Lightint = 423;
public const int Disinfect = 422;
public const int WindDry = 421;
public const int HotDry = 420;
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 58821fd..1d8c208 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -733,9 +733,17 @@
/// A鍗忚鏁版嵁
/// </summary>
/// <param name="updateBytes"></param>
- public void UpdataFunctionStatus(string revString, byte[] usefulBytes)
+ public void UpdataFunctionStatus(string revString, byte[] usefulBytes,bool isCloudData = false)
{
- MainPage.Log($"A鍗忚鏇存柊鐘舵��:{revString}");
+
+ if (Ins.GatewayOnline_Local && isCloudData)//鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞�
+ {
+ if (FunctionList.List.GetDeviceFunctionList(SPK.BrandType.Tuya).Count == 0)
+ {
+ //MainPage.Log($"A鍗忚鏇存柊鐘舵��:鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞�...");
+ return;
+ }
+ }
var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<AlinkFunctionStatusObj>(revString);
if (temp != null)
{
@@ -745,8 +753,25 @@
{
try
{
- //bool hadChange = false;//鐘舵�佹湁鍙樺寲鍐嶆洿鏂扮晫闈�
var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid);
+ if (Ins.GatewayOnline_Local && isCloudData)//鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞�
+ {
+ if(!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(localFunction.spk))
+ {
+ //MainPage.Log($"A鍗忚鏇存柊鐘舵��:鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞�........");
+ return;
+ }
+ }
+ //MainPage.Log($"A鍗忚鏇存柊鐘舵��:{revString}");
+ foreach (var attr in updateTemp.status)
+ {
+ var attrState = localFunction.status.Find((func) => func.key == attr.key);
+ if(attrState!= null)
+ {
+ attrState.value = attr.value;
+ }
+ }
+
if (localFunction != null)
{
//鏇存柊鐣岄潰鐘舵��
diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 9cded85..2971c64 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -246,7 +246,7 @@
try
{
var topic = e.ApplicationMessage.Topic;
- MainPage.Log($"鏀跺埌mqtt涓婚:{topic}");
+ //MainPage.Log($"鏀跺埌mqtt涓婚:{topic}");
//涓�绔彛涓婚澶勭悊
if (DB_ResidenceData.Instance.GatewayType == 0 && !DB_ResidenceData.Instance.CheckWhetherGatewayIdIsNull())
{
@@ -283,7 +283,7 @@
{
var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
var revString = Encoding.UTF8.GetString(bytes);
- Control.Ins.UpdataFunctionStatus(revString, null);
+ Control.Ins.UpdataFunctionStatus(revString, null,true);
}
//涓�绔彛鏁版嵁瑙f瀽
else
diff --git a/HDL_ON/DAL/Server/NewAPI.cs b/HDL_ON/DAL/Server/NewAPI.cs
index 15e369a..40517bf 100644
--- a/HDL_ON/DAL/Server/NewAPI.cs
+++ b/HDL_ON/DAL/Server/NewAPI.cs
@@ -4,7 +4,7 @@
{
public class NewAPI
{
- #region 鏂板井鏈嶅姟鎺ュ彛
+ //#region 鏂板井鏈嶅姟鎺ュ彛
//***********************************************
//娉ㄦ剰锛氬拰浣忓畢鐩稿叧鐨勬帴鍙h璇锋眰浣忓畢鎵�鍦ㄥ尯鍩熺殑鍩熷悕 regionUrl
//***********************************************
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 35e790f..1737170 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -771,6 +771,19 @@
/// 娑堟瘨鍓╀綑鏃堕棿
/// </summary>
public const string DisinfectTimeLeft = "disinfect_time_surplus";
+ /// <summary>
+ /// 璐熺瀛�
+ /// </summary>
+ public const string Anion = "anion";
+ /// <summary>
+ /// 璐熺瀛愭椂闂�
+ /// </summary>
+ public const string AnionTime = "anion_time";
+ /// <summary>
+ /// 璐熺瀛愬墿浣欐椂闂�
+ /// </summary>
+ public const string AnionTimeLeft = "anion_time_surplus";
+
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index ba8f246..4294acf 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -275,7 +275,6 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\WeatherCondition.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\1-test-\TestDialog.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\ThirdPartyBrandListPage.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\EmptyClass.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\AddFunction\AddThirdPartyBrandListpage.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Entity\Integratedbrand\IntegratedBrand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Entity\Function\AirCleaner.cs" />
@@ -356,6 +355,7 @@
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\Method.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\FailView.cs" />
<Compile Include="$(MSBuildThisFileDirectory)UI\UI2\4-PersonalCenter\PirDevice\View\ReplicationView.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Electrical\ClothesHangerSetTimePage.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)UI\" />
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index dbd6cdf..74cda7f 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "1.1.0225";
+ public static string VersionString = "1.1.0302";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs
index 6794a47..02c68a4 100644
--- a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs
+++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs
@@ -57,7 +57,6 @@
var dialogBody = new NormalFrameLayout();
FrameDialog.AddChidren(dialogBody);
- FrameDialog.Show();
dialogBody.ButtonClickEvent += (sender, e) =>
{
if (ClickBackClose == true && this.btnCancel != null)
@@ -69,7 +68,7 @@
//鐧借壊鑳屾櫙
var frameWhiteBack = new NormalFrameLayout();
frameWhiteBack.Width = Application.GetRealWidth(343);
- frameWhiteBack.Height = RowHeight * (RowCount + 1);
+ frameWhiteBack.Height = RowHeight * (RowCount + 1);
frameWhiteBack.Radius = (uint)Application.GetRealWidth(12);
frameWhiteBack.Gravity = Gravity.CenterHorizontal;
frameWhiteBack.Y = dialogBody.Height - RowHeight * (RowCount + 1) - Application.GetRealHeight(20);
@@ -106,6 +105,8 @@
btnConfirm.TextSize = CSS_FontSize.TextFontSize;
frameWhiteBack.AddChidren(btnConfirm);
+ FrameDialog.Show();
+
return frameWhiteBack;
}
diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs
index 66dcb23..49c40dd 100644
--- a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs
+++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomTimeSelectControl.cs
@@ -17,6 +17,26 @@
/// 缁撴潫浜嬩欢(0:鐐瑰嚮浜嗗彇娑� 1:鐐瑰嚮浜嗙‘瀹�,绗簩,涓夊弬鏁颁负鏃跺拰鍒�)
/// </summary>
public Action<int, int, int> FinishEvent = null;
+ /// <summary>
+ /// 灏忔椂鍙栧�艰寖鍥�
+ /// </summary>
+ List<int> hRange = new List<int>();
+ /// <summary>
+ /// 鍒嗛挓鍙栧�艰寖鍥�
+ /// </summary>
+ List<int> mRange = new List<int>();
+ /// <summary>
+ /// 鏃堕棿鎺т欢
+ /// </summary>
+ UIPickerView pickerView;
+ //閫夋嫨鐨勬椂涓庡垎
+ int selectHour = 0;
+ int selectMinute = 0;
+ //XX鏃�
+ List<string> listHour ;
+ //XX鍒�
+ List<string> listMinute;
+
#endregion
@@ -30,7 +50,35 @@
public BottomTimeSelectControl(string i_title = "", bool clickBackClose = true)
{
base.ClickBackClose = clickBackClose;
+ base.StrTitle = i_title;
+
+
+ for (int i = 0; i <= 23; i++)
+ {
+ hRange.Add(i);
+ }
+ for (int i = 0; i <= 59; i++)
+ {
+ mRange.Add(i);
+ }
+ }
+
+
+ /// <summary>
+ /// 搴曢儴鏃堕棿閫夋嫨鎺т欢
+ /// </summary>
+ /// <param name="i_title">鏍囬</param>
+ /// <param name="clickBackClose">鐐瑰嚮鑳屾櫙鏃�,鏄惁鍏抽棴寮圭獥</param>
+ public BottomTimeSelectControl(List<int> hoursRange,List<int> minuteRange ,int rowCount, string i_title = "", bool clickBackClose = true)
+ {
+ base.ClickBackClose = clickBackClose;
base.StrTitle = i_title;
+
+ hRange = hoursRange;
+ mRange = minuteRange;
+
+ base.RowCount = rowCount;
+
}
/// <summary>
@@ -38,19 +86,16 @@
/// </summary>
/// <param name="i_hour">榛樿閫夋嫨鏃�</param>
/// <param name="i_minute">榛樿閫夋嫨鍒�</param>
- public void InitControl(int i_hour, int i_minute)
+ /// <param name="contentView">閫夋嫨鍖哄煙楂樺害</param>
+ public void InitControl(int i_hour, int i_minute,int contentView = 297)
{
//宸茬粡鍒濆鍖�
if (base.btnCancel != null) { return; }
//鍒濆鍖栧簳灞傛帶浠�
var frameWhiteBack = base.InitBaseControl();
- frameWhiteBack.Height = Application.GetRealHeight(297);
- frameWhiteBack.Y = frameWhiteBack.Parent.Height - Application.GetRealHeight(297 + 20);
-
- //閫夋嫨鐨勬椂涓庡垎
- int selectHour = 0;
- int selectMinute = 0;
+ frameWhiteBack.Height = Application.GetRealHeight(contentView);
+ //frameWhiteBack.Y = frameWhiteBack.Parent.Height - Application.GetRealHeight(297 + 20);
//鍙栨秷
base.btnCancel.ButtonClickEvent += (sender, e) =>
@@ -78,22 +123,24 @@
frameWhiteBack.AddChidren(btnLine);
//鏃堕棿鎺т欢
- var pickerView = new UIPickerView();
+ pickerView = new UIPickerView();
//鏃�
var strhour = Language.StringByID(StringId.h);
//鍒�
var strMinute = Language.StringByID(StringId.m);
//XX鏃�
- var listHour = new List<string> { "00" + strhour };
+ listHour = new List<string>();// { "00" + strhour };
//XX鍒�
- var listMinute = new List<string> { "00" + strMinute };
- for (int i = 1; i <= 23; i++)
+ listMinute = new List<string>();// { "00" + strMinute };
+ //for (int i = 1; i <= 23; i++)
+ foreach(var hItem in hRange)
{
- listHour.Add(i.ToString().PadLeft(2, '0') + strhour);
- }
- for (int i = 1; i <= 59; i++)
+ listHour.Add(hItem.ToString().PadLeft(2, '0') + strhour);
+ }
+ //for (int i = 1; i <= 59; i++)
+ foreach (var mItem in mRange)
{
- listMinute.Add(i.ToString().PadLeft(2, '0') + strMinute);
+ listMinute.Add(mItem.ToString().PadLeft(2, '0') + strMinute);
}
pickerView.Height = frameWhiteBack.Height - btnLine.Bottom;
pickerView.Width = frameWhiteBack.Width - Application.GetRealWidth(8) * 2;
@@ -117,6 +164,32 @@
};
}
+ /// <summary>
+ /// 鐗规畩鐨勯泦鍚堥�夋嫨浜嬩欢锛屽噳闇告椂闂磋缃娇鐢�
+ /// </summary>
+ public void ChangePickerEvent()
+ {
+ pickerView.OnSelectChangeEvent = (value1, value2, value3) =>
+ {
+ if (value1 == 0 && value2 == 0)
+ {
+ value2 = 1;
+ pickerView.setCurrentItems(value1, value2, 0);
+ }
+ else if (value1 == 4 && value2 == 1)
+ {
+ value2 = 0;
+ pickerView.setCurrentItems(value1, value2, 0);
+ }
+ else
+ {
+ //鏇存敼绱㈠紩
+ selectHour = Convert.ToInt32(listHour[value1].Substring(0, 2));
+ selectMinute = Convert.ToInt32(listMinute[value2].Substring(0, 2));
+ }
+ };
+ }
+
#endregion
#region 鈻� 涓�鑸柟娉昣__________________________
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 81d1049..fdfafcd 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -192,11 +192,12 @@
//return;
if (b)
{
- etAccount.Text = "13415629083";// "13415629083"//cf;//tujie"18316120654";// "15622703419";// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
+ etAccount.Text = "18666455392";//"18316120654";//lcg "18316672920";//hzx;// "13415629083"//cf;//tujie"18316120654";
+ // "15622703419";// "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568
}
else
{
- etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374
+ etAccount.Text = "18316672920";//鍑夐湼"18666455392";//13375012446//13602944661//tzy 18778381374
}
b = !b;
etPassword.Text = "123456";
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 2122e54..c527412 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -173,7 +173,16 @@
{
if (view.Tag.ToString() == function.sid)
{
- var state = function.trait_on_off.curValue.ToString() == "on";
+ var state = false;
+ if (function.spk == SPK.CurtainRoller || function.spk == SPK.CurtainShades || function.spk == SPK.CurtainTrietex ||
+ function.spk == SPK.CurtainSwitch)//绐楀笜璁惧鏍规嵁鐧惧垎姣斿垽鏂紑鍏崇姸鎬�
+ {
+ state = function.GetAttrState(FunctionAttributeKey.Percent) != "0";
+ }
+ else
+ {
+ state = function.trait_on_off.curValue.ToString() == "on";
+ }
for (int i = 0; i < view.ChildrenCount; i++)
{
if (view.GetChildren(i).GetType() == typeof(Button))
@@ -325,13 +334,9 @@
/// </summary>
void LoadEvent_ControlCurtain(Curtain curtain, Button btnClose, Button btnOpen)
{
- btnClose.MouseDownEventHandler = (sender, e) =>
- {
- btnClose.IsSelected = true;
- };
btnClose.MouseUpEventHandler = (sender, e) =>
{
- btnClose.IsSelected = false;
+ btnClose.IsSelected = true;
curtain.trait_on_off.curValue = "off";
curtain.percent = 0;
Dictionary<string, string> d = new Dictionary<string, string>();
@@ -339,13 +344,9 @@
Control.Ins.SendWriteCommand(curtain, d);
};
- btnOpen.MouseDownEventHandler = (sender, e) =>
- {
- btnOpen.IsSelected = true;
- };
btnOpen.MouseUpEventHandler = (sender, e) =>
{
- btnOpen.IsSelected = false;
+ btnOpen.IsSelected = true;
curtain.trait_on_off.curValue = "on";
curtain.percent = 100;
Dictionary<string, string> d = new Dictionary<string, string>();
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
index 8c27dc8..279c70d 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -58,6 +58,7 @@
case FunctionCategory.Light:
case FunctionCategory.AC:
case FunctionCategory.FloorHeat:
+ case FunctionCategory.Electric:
#region 鎸夐挳鐘舵�佹洿鏂�
if (cTag == updataFunction.sid + "_Switch")
{
@@ -110,10 +111,14 @@
#endregion
case FunctionCategory.Curtain:
#region 绐楀笜鏇存柊
- var uCurtain = updataFunction as Curtain;
- switch (uCurtain.trait_on_off.curValue.ToString())
+ //var uCurtain = updataFunction as Curtain;
+ var percentString = updataFunction.GetAttrState(FunctionAttributeKey.Percent);
+ if (percentString != null)
{
- case "off":
+ int percent = 0;
+ int.TryParse(percentString, out percent);
+ if (percent == 0)
+ {
if (cTag == updataFunction.sid + "_off")
{
try
@@ -126,8 +131,9 @@
{
(fcView.GetChildren(j) as Button).IsSelected = false;
}
- break;
- case "on":
+ }
+ else
+ {
if (cTag == updataFunction.sid + "_on")
{
try
@@ -140,21 +146,7 @@
{
(fcView.GetChildren(j) as Button).IsSelected = false;
}
- break;
- case "stop":
- if (cTag == updataFunction.sid + "_stop")
- {
- try
- {
- (fcView.GetChildren(j) as Button).IsSelected = true;
- }
- catch { }
- }
- else
- {
- (fcView.GetChildren(j) as Button).IsSelected = false;
- }
- break;
+ }
}
#endregion
break;
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index 1a88c32..ebe9a20 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -370,7 +370,7 @@
Height = Application.GetMinRealAverage(32),
UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
- IsSelected = function.trait_on_off.curValue.ToString() == "off",
+ IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) == "0",
Tag = function.sid + "_off"
};
bodyDiv.AddChidren(btnCurtainClose);
@@ -384,7 +384,6 @@
UnSelectedImagePath = "FunctionIcon/Curtain/CurtainStopIcon.png",
SelectedImagePath = "FunctionIcon/Curtain/CurtainStopOnIcon.png",
Tag = function.sid + "_stop",
- IsSelected = function.trait_on_off.curValue.ToString() == "stop"
};
bodyDiv.AddChidren(btnCurtainStop);
@@ -397,7 +396,7 @@
UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
Tag = function.sid + "_on",
- IsSelected = function.trait_on_off.curValue.ToString() == "on"
+ IsSelected = function.GetAttrState(FunctionAttributeKey.Percent) != "0"
};
bodyDiv.AddChidren(btnCurtainOpen);
LoadEvent_ControlCurtain(btnCurtainStop, btnCurtainOpen, btnCurtainClose, function as Curtain);
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
index e6e56cb..45dc658 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -137,7 +137,7 @@
onDimmerBar = false;
(bodyDiv.Parent as VerticalScrolViewLayout).ScrollEnabled = true;
light.brightness = dimmerControlBar.Progress;
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ Dictionary<string, string> d = new Dictionary<string, string>();
d.Add("brightness", light.brightness.ToString());
Control.Ins.SendWriteCommand(light, d);
};
@@ -192,7 +192,7 @@
btnOpen.IsSelected = false;
curtain.trait_on_off.curValue = "off";
curtain.percent = 0;
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ Dictionary<string, string> d = new Dictionary<string, string>();
d.Add("on_off", curtain.trait_on_off.curValue.ToString());
Control.Ins.SendWriteCommand(curtain, d);
};
@@ -203,7 +203,7 @@
btnClose.IsSelected = false;
btnOpen.IsSelected = false;
curtain.trait_on_off.curValue = "stop";
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ Dictionary<string, string> d = new Dictionary<string, string>();
d.Add("on_off", curtain.trait_on_off.curValue.ToString());
Control.Ins.SendWriteCommand(curtain, d);
};
@@ -215,7 +215,7 @@
btnStop.IsSelected = false;
curtain.trait_on_off.curValue = "on";
curtain.percent = 100;
- System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
+ Dictionary<string, string> d = new Dictionary<string, string>();
d.Add("on_off", curtain.trait_on_off.curValue.ToString());
Control.Ins.SendWriteCommand(curtain, d);
};
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 190ce80..214e0fc 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -244,7 +244,7 @@
{
string value = dic["value"];
- if (value == "true")
+ if (value == "open")
{
inputView.btnState.Text = Language.StringByID(StringId.kaiqi);
@@ -1278,7 +1278,7 @@
foreach (var dic in dicList)
{
string value = dic["value"];
- if (value == "true")
+ if (value == "open")
{
button1.Text = Language.StringByID(StringId.kaiqi);
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
index 848bffa..1579e5b 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/CurtainModulePageBLL.cs
@@ -21,22 +21,22 @@
{
if (uCurtain.trait_on_off.curValue.ToString() == "stop")
{
- bodyView.btnCurtainOpen.IsSelected = false;
- bodyView.btnCurtainClose.IsSelected = false;
- bodyView.btnCurtainStop.IsSelected = true;
+ //bodyView.btnCurtainOpen.IsSelected = false;
+ //bodyView.btnCurtainClose.IsSelected = false;
+ //bodyView.btnCurtainStop.IsSelected = true;
}
else if (uCurtain.trait_on_off.curValue.ToString() == "on")
{
- bodyView.btnCurtainOpen.IsSelected = true;
- bodyView.btnCurtainClose.IsSelected = false;
- bodyView.btnCurtainStop.IsSelected = false;
+ //bodyView.btnCurtainOpen.IsSelected = true;
+ //bodyView.btnCurtainClose.IsSelected = false;
+ //bodyView.btnCurtainStop.IsSelected = false;
bodyView.btnCurtainBgIcon.IsSelected = true;
}
else if (uCurtain.trait_on_off.curValue.ToString() == "off")
{
- bodyView.btnCurtainOpen.IsSelected = false;
- bodyView.btnCurtainClose.IsSelected = true;
- bodyView.btnCurtainStop.IsSelected = false;
+ //bodyView.btnCurtainOpen.IsSelected = false;
+ //bodyView.btnCurtainClose.IsSelected = true;
+ //bodyView.btnCurtainStop.IsSelected = false;
bodyView.btnCurtainBgIcon.IsSelected = false;
}
}
@@ -72,34 +72,40 @@
void LoadEvent_ControlEvent()
{
btnCurtainClose.MouseUpEventHandler = (sender, e) => {
- btnCurtainClose.IsSelected = true;
- btnCurtainStop.IsSelected = false;
- btnCurtainOpen.IsSelected = false;
+ new System.Threading.Thread(() => {
+ System.Threading.Thread.Sleep(2000);
+ Application.RunOnMainThread(() => {
+ btnCurtainClose.IsSelected = false;
+ });
+ }) { IsBackground = true }.Start();
btnCurtainBgIcon.IsSelected = false;
curtain.trait_on_off.curValue = "off";
- //Control.Send(CommandType_A.write,curtain);
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add("on_off", curtain.trait_on_off.curValue.ToString());
Control.Ins.SendWriteCommand(curtain, d);
};
- //btnCurtainStop.MouseDownEventHandler = (sender, e) =>
- //{
- // btnCurtainStop.IsSelected = true;
- // //btnCurtainClose.IsSelected = false;
- // //btnCurtainOpen.IsSelected = false;
- //};
- //btnCurtainOpen.MouseDownEventHandler = (sender, e) => {
- // btnCurtainOpen.IsSelected = true;
- //};
- //btnCurtainClose.MouseDownEventHandler = (sender, e) => {
- // btnCurtainClose.IsSelected = true;
- //};
+ btnCurtainStop.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainStop.IsSelected = true;
+ };
+ btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainOpen.IsSelected = true;
+ };
+ btnCurtainClose.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainClose.IsSelected = true;
+ };
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
- btnCurtainOpen.IsSelected = false;
- btnCurtainClose.IsSelected = false;
- btnCurtainStop.IsSelected = true;
+ new System.Threading.Thread(() => {
+ System.Threading.Thread.Sleep(2000);
+ Application.RunOnMainThread(() => {
+ btnCurtainStop.IsSelected = false;
+ });
+ })
+ { IsBackground = true }.Start();
curtain.trait_on_off.curValue = "stop";
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add("on_off", curtain.trait_on_off.curValue.ToString());
@@ -107,9 +113,13 @@
};
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
- btnCurtainOpen.IsSelected = true;
- btnCurtainClose.IsSelected = false;
- btnCurtainStop.IsSelected = false;
+ new System.Threading.Thread(() => {
+ System.Threading.Thread.Sleep(2000);
+ Application.RunOnMainThread(() => {
+ btnCurtainOpen.IsSelected = false;
+ });
+ })
+ { IsBackground = true }.Start();
btnCurtainBgIcon.IsSelected = true;
curtain.trait_on_off.curValue = "on";
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs
index a119c53..85125ca 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPage.cs
@@ -141,7 +141,7 @@
Height = Application.GetRealWidth(177),
Progress = curtain.percent,
ProgressTextColor =0x00000000,
- IsInvertedProgress = true,
+ //IsInvertedProgress = true,
};
controlView.AddChidren(curtainSeekBar);
@@ -202,6 +202,7 @@
Height = Application.GetMinRealAverage(32),
UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
+ IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) == "0"
};
controlView.AddChidren(btnCurtainClose);
@@ -224,6 +225,7 @@
Height = Application.GetMinRealAverage(32),
UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
+ IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) != "0"
};
controlView.AddChidren(btnCurtainOpen);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
index 533498c..702c4d7 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/MotorCurtainPageBLL.cs
@@ -19,23 +19,13 @@
return;
if (uCurtain.spk == bodyView.curtain.spk && uCurtain.sid == bodyView.curtain.sid)
{
- if (uCurtain.trait_on_off.curValue.ToString() == "stop")
+ var percentString = uCurtain.GetAttrState(FunctionAttributeKey.Percent);
+ if (percentString != null)
{
- bodyView.btnCurtainOpen.IsSelected = false;
- bodyView.btnCurtainClose.IsSelected = false;
- bodyView.btnCurtainStop.IsSelected = true;
- }
- else if (uCurtain.trait_on_off.curValue.ToString() == "on")
- {
- bodyView.btnCurtainOpen.IsSelected = true;
- bodyView.btnCurtainClose.IsSelected = false;
- bodyView.btnCurtainStop.IsSelected = false;
- }
- else if (uCurtain.trait_on_off.curValue.ToString() == "off")
- {
- bodyView.btnCurtainOpen.IsSelected = false;
- bodyView.btnCurtainClose.IsSelected = true;
- bodyView.btnCurtainStop.IsSelected = false;
+ int percent = 0;
+ int.TryParse(percentString, out percent);
+ bodyView.btnCurtainOpen.IsSelected = percent > 0;
+ bodyView.btnCurtainClose.IsSelected = percent == 0;
}
try
{
@@ -146,11 +136,15 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
- btnCurtainClose.IsSelected = true;
- btnCurtainOpen.IsSelected = false;
- btnCurtainStop.IsSelected = false;
+ //new System.Threading.Thread(() => {
+ // System.Threading.Thread.Sleep(2000);
+ // Application.RunOnMainThread(() => {
+ // btnCurtainClose.IsSelected = false;
+ // });
+ //})
+ //{ IsBackground = true }.Start();
curtain.trait_on_off.curValue = "off";
- curtain.percent = 100;
+ curtain.percent = 0;
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
@@ -159,31 +153,55 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
-
- btnCurtainStop.IsSelected = true;
- btnCurtainClose.IsSelected = false;
- btnCurtainOpen.IsSelected = false;
+ onCurtainAnimation = false;
+ new System.Threading.Thread(() =>
+ {
+ System.Threading.Thread.Sleep(2000);
+ Application.RunOnMainThread(() =>
+ {
+ btnCurtainStop.IsSelected = false;
+ });
+ })
+ { IsBackground = true }.Start();
curtain.trait_on_off.curValue = "stop";
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
- onCurtainAnimation = false;
};
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
-
- btnCurtainClose.IsSelected = false;
- btnCurtainStop.IsSelected = false;
- btnCurtainOpen.IsSelected = true;
+ //new System.Threading.Thread(() => {
+ // System.Threading.Thread.Sleep(2000);
+ // Application.RunOnMainThread(() => {
+ // btnCurtainOpen.IsSelected = false;
+ // });
+ //})
+ //{ IsBackground = true }.Start();
curtain.trait_on_off.curValue = "on";
- curtain.percent = 0;
+ curtain.percent = 100;
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
CurtainAnimation(curtain.percent);
};
+
+ btnCurtainStop.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainStop.IsSelected = true;
+ };
+ btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainOpen.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ };
+ btnCurtainClose.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainClose.IsSelected = true;
+ btnCurtainOpen.IsSelected = false;
+ };
+
//btnMinusSignIcon.MouseUpEventHandler = (sender, e) =>
//{
// curtain.percent--;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
index efc37fb..434c27e 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPage.cs
@@ -202,6 +202,7 @@
Height = Application.GetMinRealAverage(32),
UnSelectedImagePath = "FunctionIcon/Curtain/CurtainCloseIcon.png",
SelectedImagePath = "FunctionIcon/Curtain/CurtainCloseOnIcon.png",
+ IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) == "0",
};
controlView.AddChidren(btnCurtainClose);
@@ -224,6 +225,7 @@
Height = Application.GetMinRealAverage(32),
UnSelectedImagePath = "FunctionIcon/Curtain/CurtainOpenIcon.png",
SelectedImagePath = "FunctionIcon/Curtain/CurtainOpenOnIcon.png",
+ IsSelected = curtain.GetAttrState(FunctionAttributeKey.Percent) != "0",
};
controlView.AddChidren(btnCurtainOpen);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
index 44777a1..2fce988 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Curtain/RollingShutterPageBLL.cs
@@ -19,24 +19,11 @@
return;
if (uCurtain.spk == bodyView.curtain.spk && uCurtain.sid == bodyView.curtain.sid)
{
- if (uCurtain.trait_on_off.curValue.ToString() == "stop")
- {
- bodyView.btnCurtainOpen.IsSelected = false;
- bodyView.btnCurtainClose.IsSelected = false;
- bodyView.btnCurtainStop.IsSelected = true;
- }
- else if (uCurtain.trait_on_off.curValue.ToString() == "on")
- {
- bodyView.btnCurtainOpen.IsSelected = true;
- bodyView.btnCurtainClose.IsSelected = false;
- bodyView.btnCurtainStop.IsSelected = false;
- }
- else if (uCurtain.trait_on_off.curValue.ToString() == "off")
- {
- bodyView.btnCurtainOpen.IsSelected = false;
- bodyView.btnCurtainClose.IsSelected = true;
- bodyView.btnCurtainStop.IsSelected = false;
- }
+ var percentString = uCurtain.GetAttrState(FunctionAttributeKey.Percent);
+ int percent = 0;
+ int.TryParse(percentString, out percent);
+ bodyView.btnCurtainOpen.IsSelected = percent > 0;
+ bodyView.btnCurtainClose.IsSelected = percent == 0;
try
{
if (!bodyView.onCurtainAnimation)
@@ -146,11 +133,15 @@
{
btnCurtainClose.MouseUpEventHandler = (sender, e) =>
{
- btnCurtainOpen.IsSelected = false;
- btnCurtainClose.IsSelected = true;
- btnCurtainStop.IsSelected = false;
+ //new System.Threading.Thread(() => {
+ // System.Threading.Thread.Sleep(2000);
+ // Application.RunOnMainThread(() => {
+ // btnCurtainClose.IsSelected = false;
+ // });
+ //})
+ //{ IsBackground = true }.Start();
curtain.trait_on_off.curValue = "off";
- curtain.percent = 100;
+ curtain.percent = 0;
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
@@ -159,9 +150,13 @@
btnCurtainStop.MouseUpEventHandler = (sender, e) =>
{
- btnCurtainStop.IsSelected = true;
- btnCurtainClose.IsSelected = false;
- btnCurtainOpen.IsSelected = false;
+ new System.Threading.Thread(() => {
+ System.Threading.Thread.Sleep(2000);
+ Application.RunOnMainThread(() => {
+ btnCurtainStop.IsSelected = false;
+ });
+ })
+ { IsBackground = true }.Start();
curtain.trait_on_off.curValue = "stop";
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
@@ -171,11 +166,15 @@
btnCurtainOpen.MouseUpEventHandler = (sender, e) =>
{
- btnCurtainClose.IsSelected = false;
- btnCurtainStop.IsSelected = false;
- btnCurtainOpen.IsSelected = true;
+ //new System.Threading.Thread(() => {
+ // System.Threading.Thread.Sleep(2000);
+ // Application.RunOnMainThread(() => {
+ // btnCurtainOpen.IsSelected = false;
+ // });
+ //})
+ //{ IsBackground = true }.Start();
curtain.trait_on_off.curValue = "on";
- curtain.percent = 0;
+ curtain.percent = 100;
System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>();
d.Add(FunctionAttributeKey.OnOff, curtain.trait_on_off.curValue.ToString());
DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
@@ -200,6 +199,23 @@
DriverLayer.Control.Ins.SendWriteCommand(curtain, d);
};
+
+ btnCurtainStop.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainStop.IsSelected = true;
+ };
+ btnCurtainOpen.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainOpen.IsSelected = true;
+ btnCurtainClose.IsSelected = false;
+ };
+ btnCurtainClose.MouseDownEventHandler = (sender, e) =>
+ {
+ btnCurtainClose.IsSelected = true;
+ btnCurtainOpen.IsSelected = false;
+ };
+
+
//curtainSeekBar.OnProgressChangedEvent = (sender, e) =>
//{
// controlBar.Progress = curtainSeekBar.Progress;
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
index 3e848e6..fa00457 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -153,9 +153,10 @@
FrameWhiteCentet1.AddChidren(hotDryView);
EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
- device.SetAttrState(FunctionAttributeKey.HotDry, "true");
+ string onoff = hotDryView.Lighting ? "false" : "true";
+ device.SetAttrState(FunctionAttributeKey.HotDry, onoff);
Dictionary<string, string> d = new Dictionary<string, string>();
- d.Add(FunctionAttributeKey.HotDry, "true");
+ d.Add(FunctionAttributeKey.HotDry, onoff);
Control.Ins.SendWriteCommand(device, d);
};
hotDryView.SetThouchEvent(eventHandler);
@@ -180,9 +181,10 @@
FrameWhiteCentet1.AddChidren(windDryView);
EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
- device.SetAttrState(FunctionAttributeKey.WindDry, "true");
+ string onoff = windDryView.Lighting ? "false" : "true";
+ device.SetAttrState(FunctionAttributeKey.WindDry, onoff);
Dictionary<string, string> d = new Dictionary<string, string>();
- d.Add(FunctionAttributeKey.WindDry, "true");
+ d.Add(FunctionAttributeKey.WindDry, onoff);
Control.Ins.SendWriteCommand(device, d);
};
windDryView.SetThouchEvent(eventHandler);
@@ -213,9 +215,10 @@
FrameWhiteCentet1.AddChidren(disinfectView);
EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
- device.SetAttrState(FunctionAttributeKey.Disinfect, "true");
+ string onoff = disinfectView.Lighting ? "false" : "true";
+ device.SetAttrState(FunctionAttributeKey.Disinfect, onoff);
Dictionary<string, string> d = new Dictionary<string, string>();
- d.Add(FunctionAttributeKey.Disinfect, "true");
+ d.Add(FunctionAttributeKey.Disinfect, onoff);
Control.Ins.SendWriteCommand(device, d);
};
disinfectView.SetThouchEvent(eventHandler);
@@ -260,6 +263,32 @@
index++;
}
+
+ #endregion
+
+
+ #region 鏃堕棿璁剧疆
+ var timeSetView = new ClothesHangerControl(
+ "FunctionIcon/Electrical/ClothesHanger/ClothesHangerTimeIcon.png",
+ "FunctionIcon/Electrical/ClothesHanger/ClothesHangerTimeIconOn.png",
+ Language.StringByID(StringId.Time),
+ "");
+ timeSetView.Width = Application.GetRealWidth(96);
+ timeSetView.Height = Application.GetRealHeight(74);
+ timeSetView.Y = Application.GetRealHeight(409);
+ timeSetView.X = Application.GetRealWidth(266 - 33);
+
+
+ EventHandler<MouseEventArgs> eventHandler_timeSetView = (sender, e) =>
+ {
+ var setTimePage = new ClothesHangerSetTimePage(device);
+ MainPage.BasePageView.AddChidren(setTimePage);
+ setTimePage.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ timeSetView.SetThouchEvent(eventHandler_timeSetView);
+
+ FrameWhiteCentet1.AddChidren(timeSetView);
#endregion
}
@@ -325,16 +354,19 @@
if (hotDryTimeLeftTemp != null)
{
hotDryView.ChangeTime(hotDryTimeLeftTemp.value);
+ MainPage.Log($"鐑樺共鍓╀綑鏃堕棿{hotDryTimeLeftTemp.value}");
}
var windDryTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.WindDryTimeLeft);
if (windDryTimeLeftTemp != null)
{
windDryView.ChangeTime(windDryTimeLeftTemp.value);
+ MainPage.Log($"椋庡共鍓╀綑鏃堕棿{windDryTimeLeftTemp.value}");
}
var disinfectTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.DisinfectTimeLeft);
if (disinfectTimeLeftTemp != null)
{
disinfectView.ChangeTime(disinfectTimeLeftTemp.value);
+ MainPage.Log($"娑堟瘨鍓╀綑鏃堕棿{disinfectTimeLeftTemp.value}");
}
#endregion
@@ -367,9 +399,15 @@
private Button btnTitle;
private Button btnTime;
/// <summary>
+ /// 鍊掕鏃舵椂闂�
+ /// </summary>
+ private int leftTime = 0;
+ /// <summary>
/// 鎺т欢鏄惁鐐逛寒
/// </summary>
public bool Lighting = false;
+
+
public ClothesHangerControl(string iconPath1, string iconPath2,string title,string time)
{
@@ -412,28 +450,21 @@
/// <param name="newTime"></param>
public void ChangeTime (string newTime)
{
- if(newTime == "0")
- {
- newTime = "";
- }
-
- int time = 0;
- int.TryParse(newTime, out time);
- time = time * 60;
-
+ int.TryParse(newTime, out leftTime);
+ leftTime *= 60;
if (countdownThread == null)
{
countdownThread = new System.Threading.Thread(() => {
while(true)
{
- if(time>1)
+ if(leftTime > 1)
{
Application.RunOnMainThread(() =>
{
- btnTime.Text = new TimeSpan(0, 0, time).ToString();
+ btnTime.Text = new TimeSpan(0, 0, leftTime).ToString();
});
System.Threading.Thread.Sleep(1000);
- time--;
+ leftTime--;
}else
{
Application.RunOnMainThread(() =>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs
new file mode 100644
index 0000000..3d4e0fb
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerSetTimePage.cs
@@ -0,0 +1,262 @@
+锘縰sing System;
+using System.Collections.Generic;
+using HDL_ON.DriverLayer;
+using HDL_ON.Entity;
+using HDL_ON.Stan;
+using HDL_ON.UI.CSS;
+using Shared;
+
+namespace HDL_ON.UI
+{
+ public partial class ClothesHangerSetTimePage : FrameLayout
+ {
+ FrameLayout bodyView;
+
+ Function device;
+
+ public ClothesHangerSetTimePage(Function function)
+ {
+ device = function;
+ bodyView = this;
+ }
+
+
+ /// <summary>
+ /// 鍔犺浇鐣岄潰
+ /// </summary>
+ public void LoadPage()
+ {
+ bodyView.BackgroundColor = CSS_Color.BackgroundColor;
+ new TopViewDiv(bodyView, Language.StringByID(StringId.Time)).LoadTopView();
+
+ VerticalScrolViewLayout functionListView = new VerticalScrolViewLayout()
+ {
+ Y = Application.GetRealHeight(64),
+ Height = Application.GetRealHeight(530),
+ BackgroundColor = CSS_Color.BackgroundColor,
+ ScrollEnabled = false,
+ };
+ bodyView.AddChidren(functionListView);
+
+
+ /// <summary>
+ /// 灏忔椂鍙栧�艰寖鍥�
+ /// </summary>
+ List<int> hRange = new List<int> { 0, 1, 2, 3, 4 };
+ /// <summary>
+ /// 鍒嗛挓鍙栧�艰寖鍥�
+ /// </summary>
+ List<int> mRange = new List<int> { 0, 30 };
+
+ var menu = new List<string>() {
+ FunctionAttributeKey.HotDryTime,
+ FunctionAttributeKey.WindDryTime,
+ FunctionAttributeKey.DisinfectTime,
+ FunctionAttributeKey.AnionTime
+ };
+ List<string> attrs = device.GetAttributes();
+
+ #region 鐑樺共鏃堕棿
+ ListCellView hotDryTimeCell;
+ hotDryTimeCell = new ListCellView()
+ {
+ Height = Application.GetRealHeight(50),
+ };
+ hotDryTimeCell.BtnTilte.TextID = StringId.HotDryTime;
+
+ if (attrs.Contains(menu[0]))
+ {
+
+ var hotDryTime = 0;
+ int.TryParse(device.GetAttrState(FunctionAttributeKey.HotDryTime), out hotDryTime);
+ hotDryTimeCell.BtnSubtitle.Text = hotDryTime / 60 + Language.StringByID(StringId.HourUint) + hotDryTime % 60 + Language.StringByID(StringId.MinuteUint);
+
+ functionListView.AddChidren(hotDryTimeCell);
+ hotDryTimeCell.GoAction = () =>
+ {
+ BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3, Language.StringByID(StringId.HotDryTime));
+ timeControl.RowHeight = Application.GetRealHeight(50);
+ timeControl.InitControl(0, 1, 162);
+ timeControl.ChangePickerEvent();
+ timeControl.FinishEvent = (type, hours, min) =>
+ {
+ if (type == 1)//0:鍙栨秷锛�1:纭畾
+ {
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ var time = hours * 60 + min;
+ var dic = new Dictionary<string, string>();
+ dic.Add(FunctionAttributeKey.HotDryTime, time.ToString());
+ Control.Ins.SendWriteCommand(this.device, dic);
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ hotDryTimeCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint);
+ });
+ });
+ }
+ };
+ };
+ }
+
+
+ #endregion
+
+ #region 椋庡共鏃堕棿
+ ListCellView windDryCell;
+ windDryCell = new ListCellView()
+ {
+ Height = Application.GetRealHeight(50),
+ };
+ windDryCell.BtnTilte.TextID = StringId.WindDryTime;
+
+ windDryCell.BtnSubtitle.Text = device.GetAttrState(FunctionAttributeKey.WindDryTime);
+
+ if (attrs.Contains(menu[1]))
+ {
+ var windDryTime = 0;
+ int.TryParse(device.GetAttrState(FunctionAttributeKey.WindDryTime), out windDryTime);
+ windDryCell.BtnSubtitle.Text = windDryTime / 60 + Language.StringByID(StringId.HourUint) + windDryTime % 60 + Language.StringByID(StringId.MinuteUint);
+
+ functionListView.AddChidren(windDryCell);
+ windDryCell.GoAction = () =>
+ {
+ BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3,Language.StringByID(StringId.WindDryTime));
+ timeControl.RowHeight = Application.GetRealHeight(50);
+ timeControl.InitControl(0, 1, 162);
+ timeControl.ChangePickerEvent();
+ timeControl.FinishEvent = (type, hours, min) =>
+ {
+ if (type == 1)//0:鍙栨秷锛�1:纭畾
+ {
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ var time = hours * 60 + min;
+ var dic = new Dictionary<string, string>();
+ dic.Add(FunctionAttributeKey.WindDryTime, time.ToString());
+ Control.Ins.SendWriteCommand(this.device, dic);
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ windDryCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint);
+ });
+ });
+ }
+ };
+ };
+ }
+ else
+ {
+ hotDryTimeCell.LineView.RemoveFromParent();
+ }
+ #endregion
+
+ #region 娑堟瘨鏃堕棿
+ ListCellView disinfectTimeCell;
+ disinfectTimeCell = new ListCellView()
+ {
+ Height = Application.GetRealHeight(50),
+ };
+ disinfectTimeCell.BtnTilte.TextID = StringId.DisinfectTime;
+
+ disinfectTimeCell.BtnSubtitle.Text = device.GetAttrState(FunctionAttributeKey.DisinfectTime);
+
+ if (attrs.Contains(menu[2]))
+ {
+ var disinfectTime = 0;
+ int.TryParse(device.GetAttrState(FunctionAttributeKey.DisinfectTime), out disinfectTime);
+ disinfectTimeCell.BtnSubtitle.Text = disinfectTime / 60 + Language.StringByID(StringId.HourUint) + disinfectTime % 60 + Language.StringByID(StringId.MinuteUint);
+
+ functionListView.AddChidren(disinfectTimeCell);
+ disinfectTimeCell.GoAction = () => {
+ BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3, Language.StringByID(StringId.DisinfectTime));
+ timeControl.RowHeight = Application.GetRealHeight(50);
+ timeControl.InitControl(0, 1, 162);
+ timeControl.ChangePickerEvent();
+ timeControl.FinishEvent = (type, hours, min) => {
+ if (type == 1)//0:鍙栨秷锛�1:纭畾
+ {
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ var time = hours * 60 + min;
+ var dic = new Dictionary<string, string>();
+ dic.Add(FunctionAttributeKey.DisinfectTime, time.ToString());
+ Control.Ins.SendWriteCommand(this.device, dic);
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ disinfectTimeCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint);
+ });
+ });
+ }
+ };
+ };
+ }
+ else
+ {
+ windDryCell.LineView.RemoveFromParent();
+ }
+ #endregion
+
+ #region 璐熺瀛愭椂闂�
+ ListCellView anionTimeCell;
+ anionTimeCell = new ListCellView()
+ {
+ Height = Application.GetRealHeight(50),
+ };
+ anionTimeCell.BtnTilte.TextID = StringId.AnionTime;
+
+ anionTimeCell.BtnSubtitle.Text = device.GetAttrState(FunctionAttributeKey.AnionTime);
+
+ if (attrs.Contains(menu[3]))
+ {
+ var anionTime = 0;
+ int.TryParse(device.GetAttrState(FunctionAttributeKey.HotDryTime), out anionTime);
+ anionTimeCell.BtnSubtitle.Text = anionTime / 60 + Language.StringByID(StringId.HourUint) + anionTime % 60 + Language.StringByID(StringId.MinuteUint);
+
+ functionListView.AddChidren(anionTimeCell);
+ anionTimeCell.LineView.RemoveFromParent();
+
+ anionTimeCell.GoAction = () => {
+ BottomTimeSelectControl timeControl = new BottomTimeSelectControl(hRange, mRange,3,Language.StringByID(StringId.AnionTime));
+
+
+ timeControl.RowHeight = Application.GetRealHeight(50);
+ timeControl.InitControl(0, 1, 162);
+
+ timeControl.ChangePickerEvent();
+
+ timeControl.FinishEvent = (type, hours, min) => {
+ if (type == 1)//0:鍙栨秷锛�1:纭畾
+ {
+ HdlThreadLogic.Current.RunThread(() =>
+ {
+ var time = hours * 60 + min;
+ var dic = new Dictionary<string, string>();
+ dic.Add(FunctionAttributeKey.AnionTime, time.ToString());
+ Control.Ins.SendWriteCommand(this.device, dic);
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ anionTimeCell.BtnSubtitle.Text = time / 60 + Language.StringByID(StringId.HourUint) + time % 60 + Language.StringByID(StringId.MinuteUint);
+ });
+ });
+ }
+ };
+ };
+ }
+ else
+ {
+ disinfectTimeCell.LineView.RemoveFromParent();
+ }
+ #endregion
+
+ }
+ }
+
+ //---------------------------------------
+ public partial class ClothesHangerSetTimePage
+ {
+
+ }
+
+ //========================================
+
+
+}
\ No newline at end of file
--
Gitblit v1.8.0