From d7254a523462dbfec1dfabec518fb99d4bcec16d Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 26 二月 2021 16:14:42 +0800
Subject: [PATCH] 20210226-2
---
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png | 0
HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 12 +-
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png | 0
HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs | 209 ++++++++++++++++++++++++++++++++++-------
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png | 0
.vs/HDL_APP_Project/xs/UserPrefs.xml | 37 ++++---
HDL_ON/DAL/DriverLayer/Control.cs | 9 -
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png | 0
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 4
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store | 0
HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png | 0
HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png | 0
26 files changed, 203 insertions(+), 68 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 1e14351..0667848 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,48 +1,47 @@
锘�<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/2-Classification/FunctionControlZone.cs">
+ <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.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="136" Column="21" />
+ <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" />
- <File FileName="HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs" />
- <File FileName="HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.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" />
</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="Enumerative" 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="Form" expanded="True" />
<Node name="Logic" expanded="True" />
</Node>
- <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="FunctionControlZone.cs" selected="True" />
- </Node>
+ <Node name="2-Classification" expanded="True" />
<Node name="FuntionControlView" expanded="True">
- <Node name="Curtain" expanded="True" />
- <Node name="Electrical" expanded="True" />
+ <Node name="ArmSensor" expanded="True" />
+ <Node name="Electrical" expanded="True">
+ <Node name="ClothesHangerPage.cs" selected="True" />
+ </Node>
</Node>
</Node>
</Node>
@@ -51,7 +50,9 @@
<Node name="Assets" expanded="True">
<Node name="Phone" expanded="True">
<Node name="FunctionIcon" expanded="True">
- <Node name="Electrical" expanded="True" />
+ <Node name="Electrical" expanded="True">
+ <Node name="ClothesHanger" expanded="True" />
+ </Node>
</Node>
</Node>
</Node>
@@ -60,7 +61,9 @@
<Node name="Resources" expanded="True">
<Node name="Phone" expanded="True">
<Node name="FunctionIcon" expanded="True">
- <Node name="Electrical" expanded="True" />
+ <Node name="Electrical" expanded="True">
+ <Node name="ClothesHanger" expanded="True" />
+ </Node>
</Node>
</Node>
</Node>
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png
index badcfac..23a07fb 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png
index e43fe46..ef32e24 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png
index b15f8ca..c9229df 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png
index 180f644..d3239be 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png
index 61bc550..5e5412c 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png
index 71ffc32..ed43950 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png
index dd51f06..10b8022 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png
index 5f565ab..d230e80 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png
index d215db7..0cd1b20 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png
Binary files differ
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png
index e998e9c..d907ca3 100644
--- a/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store
new file mode 100644
index 0000000..c84c9d0
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/.DS_Store
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png
index badcfac..23a07fb 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerBlueIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png
index e43fe46..ef32e24 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png
index b15f8ca..c9229df 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon1On.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png
index 180f644..d3239be 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png
index 61bc550..5e5412c 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png
index 71ffc32..ed43950 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png
index dd51f06..10b8022 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png
index 5f565ab..d230e80 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon1On.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png
index d215db7..0cd1b20 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png
index e998e9c..d907ca3 100644
--- a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png
Binary files differ
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index a2f430d..58821fd 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -749,14 +749,6 @@
var localFunction = allLocalFuntion.Find((obj) => obj.sid == updateTemp.sid);
if (localFunction != null)
{
- //var updateInfoString = $"鏇存柊璁惧:{localFunction.name}";
- //foreach (var attr in updateTemp.status)
- //{
- // updateInfoString += $" key:{attr.key};value:{attr.value}";
- //}
- //MainPage.Log(updateInfoString);
-
-
//鏇存柊鐣岄潰鐘舵��
Function localObj = null;
switch (localFunction.spk)
@@ -1033,6 +1025,7 @@
case SPK.SensorDoorWindow:
case SPK.SensorSmoke:
case SPK.SensorWater:
+ case SPK.ClothesHanger:
//璁惧鐘舵�佹帹閫�
var myDevice = Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid,updateTemp.status);
if (myDevice != null)
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index 22cb762..687bc60 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -838,10 +838,10 @@
Button btnUp;
btnUp = new Button()
{
- X = Application.GetRealWidth(84),
+ X = Application.GetRealWidth(84+3),
Y = Application.GetRealWidth(89),
- Width = Application.GetRealWidth(44),
- Height = Application.GetRealWidth(44),
+ Width = Application.GetRealWidth(38),
+ Height = Application.GetRealWidth(38),
UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2.png",
SelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerUpIcon2On.png",
};
@@ -850,10 +850,10 @@
Button btnDown;
btnDown = new Button()
{
- X = btnUp.Right,
+ X = btnUp.Right + Application.GetRealWidth(3),
Y = Application.GetRealWidth(89),
- Width = Application.GetRealWidth(44),
- Height = Application.GetRealWidth(44),
+ Width = Application.GetRealWidth(38),
+ Height = Application.GetRealWidth(38),
UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2.png",
SelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerDownIcon2On.png",
};
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index 9dd0b4b..1a88c32 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -130,7 +130,7 @@
}
else
{
- if (function.spk == SPK.ClothesHanger)
+ if (function.spk == SPK.ClothesHanger)//鏅捐。鏋�
{
btnIcon.UnSelectedImagePath = "FunctionIcon/Electrical/ClothesHanger/ClothesHangerGrayIcon.png";
ClothesHangerFragment();
@@ -411,7 +411,7 @@
#region ClothesHanger
var btnClothesHangerUp = new Button()
{
- X = Application.GetRealWidth(163),
+ X = Application.GetRealWidth(233),
Y = Application.GetRealHeight(58),
Width = Application.GetMinRealAverage(32),
Height = Application.GetMinRealAverage(32),
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
index 945a64c..3e848e6 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/ClothesHangerPage.cs
@@ -3,6 +3,8 @@
using HDL_ON.UI.CSS;
using HDL_ON.Entity;
using System.Collections.Generic;
+using System;
+using HDL_ON.DriverLayer;
namespace HDL_ON.UI
{
@@ -30,9 +32,22 @@
/// </summary>
Button btnDown;
/// <summary>
- /// 鏂囨湰鎺т欢
+ /// 鐑樺共鎺т欢
/// </summary>
- private NormalViewControl btnSuctionView = null;
+ ClothesHangerControl hotDryView;
+ /// <summary>
+ /// 椋庡共鎺т欢
+ /// </summary>
+ ClothesHangerControl windDryView;
+ /// <summary>
+ /// 娑堟瘨鎺т欢
+ /// </summary>
+ ClothesHangerControl disinfectView;
+ /// <summary>
+ /// 鐓ф槑鎺т欢
+ /// </summary>
+ ClothesHangerControl lightingView;
+
#endregion
@@ -56,7 +71,7 @@
//璇诲彇鐘舵��
new System.Threading.Thread(() =>
{
- DriverLayer.Control.Ins.SendReadCommand(device);
+ Control.Ins.SendReadCommand(device);
})
{ IsBackground = true }.Start();
}
@@ -123,77 +138,106 @@
int index = 0;
List<string> attrs = device.GetAttributes();
- ClothesHangerControl hotDryView = new ClothesHangerControl(
+
+ hotDryView = new ClothesHangerControl(
"FunctionIcon/Electrical/ClothesHanger/ClothesHangerHotDryIcon.png",
"FunctionIcon/Electrical/ClothesHanger/ClothesHangerHotDryIconOn.png",
Language.StringByID(StringId.HotDry),
device.GetAttrState(FunctionAttributeKey.HotDryTimeLeft));
hotDryView.X = 0;
- hotDryView.Y = Application.GetRealHeight(288);
+ hotDryView.Y = Application.GetRealHeight(304);
hotDryView.Width = Application.GetRealWidth(96);
hotDryView.Height = Application.GetRealHeight(74);//28 29 14 3
- if (attrs.Contains(menu[0]) || true)
+ if (attrs.Contains(menu[0]))
{
FrameWhiteCentet1.AddChidren(hotDryView);
+
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
+ device.SetAttrState(FunctionAttributeKey.HotDry, "true");
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.HotDry, "true");
+ Control.Ins.SendWriteCommand(device, d);
+ };
+ hotDryView.SetThouchEvent(eventHandler);
+
index++;
}
- ClothesHangerControl windDryView = new ClothesHangerControl(
+ windDryView = new ClothesHangerControl(
"FunctionIcon/Electrical/ClothesHanger/ClothesHangerWindDryIcon.png",
"FunctionIcon/Electrical/ClothesHanger/ClothesHangerWindDryIconOn.png",
Language.StringByID(StringId.WindDry),
device.GetAttrState(FunctionAttributeKey.WindDryTimeLeft));
- windDryView.Y = Application.GetRealHeight(288);
+ windDryView.Y = Application.GetRealHeight(304);
windDryView.Width = Application.GetRealWidth(96);
windDryView.Height = Application.GetRealHeight(74);
- if (attrs.Contains(menu[1]) || true)
+ if (attrs.Contains(menu[1]))
{
if(index == 1)
{
windDryView.Gravity = Gravity.CenterHorizontal;
}
FrameWhiteCentet1.AddChidren(windDryView);
+
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
+ device.SetAttrState(FunctionAttributeKey.WindDry, "true");
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.WindDry, "true");
+ Control.Ins.SendWriteCommand(device, d);
+ };
+ windDryView.SetThouchEvent(eventHandler);
+
index++;
}
- ClothesHangerControl disinfectDryView = new ClothesHangerControl(
+ disinfectView = new ClothesHangerControl(
"FunctionIcon/Electrical/ClothesHanger/ClothesHangerDisinfectIcon.png",
"FunctionIcon/Electrical/ClothesHanger/ClothesHangerDisinfectIconOn.png",
Language.StringByID(StringId.Disinfect),
device.GetAttrState(FunctionAttributeKey.DisinfectTimeLeft));
- disinfectDryView.Y = Application.GetRealHeight(288);
- disinfectDryView.Width = Application.GetRealWidth(96);
- disinfectDryView.Height = Application.GetRealHeight(74);
- if (attrs.Contains(menu[2]) || true)
+ disinfectView.Y = Application.GetRealHeight(304);
+ disinfectView.Width = Application.GetRealWidth(96);
+ disinfectView.Height = Application.GetRealHeight(74);
+ if (attrs.Contains(menu[2]))
{
if(index == 1)
{
- disinfectDryView.Gravity = Gravity.CenterHorizontal;
+ disinfectView.Gravity = Gravity.CenterHorizontal;
}
else if (index == 2)
{
- disinfectDryView.X = Application.GetRealWidth(266 - 33);
+ disinfectView.X = Application.GetRealWidth(266 - 33);
}
- FrameWhiteCentet1.AddChidren(disinfectDryView);
+ FrameWhiteCentet1.AddChidren(disinfectView);
+
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
+ device.SetAttrState(FunctionAttributeKey.Disinfect, "true");
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.Disinfect, "true");
+ Control.Ins.SendWriteCommand(device, d);
+ };
+ disinfectView.SetThouchEvent(eventHandler);
+
index++;
}
- ClothesHangerControl lightingView = new ClothesHangerControl(
+ lightingView = new ClothesHangerControl(
"FunctionIcon/Electrical/ClothesHanger/ClothesHangerLightIcon.png",
"FunctionIcon/Electrical/ClothesHanger/ClothesHangerLightIconOn.png",
Language.StringByID(StringId.Lighting),
"");
lightingView.Width = Application.GetRealWidth(96);
lightingView.Height = Application.GetRealHeight(74);
- if (attrs.Contains(menu[3]) || true)
+ if (attrs.Contains(menu[3]))
{
if(index >2)
{
- lightingView.Y = Application.GetRealHeight(375);
+ lightingView.Y = Application.GetRealHeight(409);
}else
{
+ lightingView.Y = Application.GetRealHeight(304);
if (index == 1)
{
lightingView.Gravity = Gravity.CenterHorizontal;
@@ -204,6 +248,16 @@
}
}
FrameWhiteCentet1.AddChidren(lightingView);
+
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
+ string onoff = lightingView.Lighting ? "off" : "on";
+ device.SetAttrState(FunctionAttributeKey.OnOff, onoff);
+ Dictionary<string, string> d = new Dictionary<string, string>();
+ d.Add(FunctionAttributeKey.OnOff, onoff);
+ Control.Ins.SendWriteCommand(device, d);
+ };
+ lightingView.SetThouchEvent(eventHandler);
+
index++;
}
@@ -242,16 +296,49 @@
private void RefreshFormStatu()
{
Application.RunOnMainThread(() => {
- var temp = device.status.Find((sta) => sta.key == FunctionAttributeKey.Status);
- if (temp != null)
+ btnIcon.IsSelected = true;
+ #region 鐐逛寒鏂囨湰
+ var hotDryTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.HotDry);
+ if (hotDryTemp != null)
{
- if (temp.value == "true")
- {
- }
- else
- {
- }
+ hotDryView.SetViewStatus(hotDryTemp.value == "true");
}
+ var windDryTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.WindDry);
+ if (windDryTemp != null)
+ {
+ windDryView.SetViewStatus(windDryTemp.value == "true");
+ }
+ var disinfectTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.Disinfect);
+ if (disinfectTemp != null)
+ {
+ disinfectView.SetViewStatus(disinfectTemp.value == "true");
+ }
+ var lightTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.OnOff);
+ if (lightTemp != null)
+ {
+ lightingView.SetViewStatus(lightTemp.value == "on");
+ }
+ #endregion
+
+ #region 淇敼鏃堕棿
+ var hotDryTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.HotDryTimeLeft);
+ if (hotDryTimeLeftTemp != null)
+ {
+ hotDryView.ChangeTime(hotDryTimeLeftTemp.value);
+ }
+ var windDryTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.WindDryTimeLeft);
+ if (windDryTimeLeftTemp != null)
+ {
+ windDryView.ChangeTime(windDryTimeLeftTemp.value);
+ }
+ var disinfectTimeLeftTemp = device.status.Find((sta) => sta.key == FunctionAttributeKey.DisinfectTimeLeft);
+ if (disinfectTimeLeftTemp != null)
+ {
+ disinfectView.ChangeTime(disinfectTimeLeftTemp.value);
+ }
+ #endregion
+
+
});
}
@@ -279,11 +366,13 @@
private Button btnIcon;
private Button btnTitle;
private Button btnTime;
+ /// <summary>
+ /// 鎺т欢鏄惁鐐逛寒
+ /// </summary>
+ public bool Lighting = false;
public ClothesHangerControl(string iconPath1, string iconPath2,string title,string time)
{
-
-
btnIcon = new Button()
{
Gravity = Gravity.CenterHorizontal,
@@ -298,6 +387,7 @@
{
Gravity = Gravity.Center,
Text = title,
+ Height = Application.GetRealHeight(42),
TextColor = CSS_Color.TextualColor,
SelectedTextColor = CSS_Color.MainColor,
TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
@@ -307,8 +397,10 @@
btnTime = new Button()
{
Gravity = Gravity.CenterHorizontal,
+ Y = btnTitle.Bottom,
+ Height = Application.GetRealHeight(32),
Text = time,
- TextColor = CSS_Color.TextualColor,
+ TextColor = 0x00000000,
SelectedTextColor = CSS_Color.MainColor,
TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
};
@@ -320,17 +412,64 @@
/// <param name="newTime"></param>
public void ChangeTime (string newTime)
{
- btnTime.Text = newTime;
+ if(newTime == "0")
+ {
+ newTime = "";
+ }
+
+ int time = 0;
+ int.TryParse(newTime, out time);
+ time = time * 60;
+
+ if (countdownThread == null)
+ {
+ countdownThread = new System.Threading.Thread(() => {
+ while(true)
+ {
+ if(time>1)
+ {
+ Application.RunOnMainThread(() =>
+ {
+ btnTime.Text = new TimeSpan(0, 0, time).ToString();
+ });
+ System.Threading.Thread.Sleep(1000);
+ time--;
+ }else
+ {
+ Application.RunOnMainThread(() =>
+ {
+ btnTime.Text = "";
+ });
+ }
+ }
+ }) { IsBackground = true };
+ countdownThread.Start();
+ }
}
- public void ChangeViewStatus(bool state)
+ public void SetViewStatus(bool state)
{
- btnIcon.IsSelected = btnTitle.IsSelected = btnTime.IsSelected = state;
+ btnIcon.IsSelected = btnTitle.IsSelected = btnTime.IsSelected = Lighting = state;
}
public bool GetViewState()
{
- return btnIcon.IsSelected;
+ return Lighting;
}
+
+ /// <summary>
+ /// 璁剧疆鐐瑰嚮浜嬩欢
+ /// </summary>
+ public void SetThouchEvent(EventHandler<MouseEventArgs> eventHandler)
+ {
+ btnIcon.MouseUpEventHandler = eventHandler;
+ btnTime.MouseUpEventHandler = eventHandler;
+ btnTitle.MouseUpEventHandler = eventHandler;
+ }
+
+ /// <summary>
+ /// 鍊掕鏃剁嚎绋�
+ /// </summary>
+ System.Threading.Thread countdownThread;
}
}
--
Gitblit v1.8.0