From 52005ed57f3f7bc796fdd1a878e4f298a126f1e8 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 29 十月 2019 16:48:47 +0800
Subject: [PATCH] 2019.10.29-3
---
ZigbeeApp/Shared/Phone/UserView/UserPage.cs | 93 ++++++++++++++++++++++++++++++----------------
1 files changed, 60 insertions(+), 33 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
old mode 100755
new mode 100644
index 3849b40..a051bd3
--- a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using Shared.Common;
using ZigBee.Device;
+using Shared.Phone.Device.AC;
namespace Shared.Phone.UserView
{
@@ -20,25 +21,25 @@
/// </summary>
private static readonly int tabBarEnum_Width = CommonPage.AppRealWidth / 3;
/// <summary>
- /// 搴曢儴鎸夐挳鍥剧墖鐨勯珮搴�-110
+ /// 搴曢儴鎸夐挳鍥剧墖鐨勯珮搴�
/// </summary>
- private static readonly int tabBarEnumIMG_Height = 110;
+ private static readonly int tabBarEnumIMG_Height = 98;
/// <summary>
- /// 搴曢儴鎸夐挳鍥剧墖鐨勫搴�-110
+ /// 搴曢儴鎸夐挳鍥剧墖鐨勫搴�
/// </summary>
- private static readonly int tabBarEnumIMG_Width = 110;
+ private static readonly int tabBarEnumIMG_Width = 138;
/// <summary>
- /// 搴曢儴鎸夐挳鍥剧墖鐨刌鍊� -5
+ /// 搴曢儴鎸夐挳鍥剧墖鐨刌鍊�
/// </summary>
- private static readonly int tabBarEnumIMG_Y = 5;
+ private static readonly int tabBarEnumIMG_Y = 3;
/// <summary>
- /// 搴曢儴鎸夐挳鏂囧瓧鐨勯珮搴� -50
+ /// 搴曢儴鎸夐挳鏂囧瓧鐨勯珮搴�
/// </summary>
- private static readonly int tabBarEnumName_Height = 50;
+ private static readonly int tabBarEnumName_Height = 40;
/// <summary>
- /// 搴曢儴鎸夐挳鏂囧瓧鐨刌鍊� 100
+ /// 搴曢儴鎸夐挳鏂囧瓧鐨刌鍊�
/// </summary>
- private static readonly int tabBarEnumName_Y = tabBarEnumIMG_Height - 10;
+ private static readonly int tabBarEnumName_Y = 104;
#endregion
#region 鈼� 鎺ュ彛____________________________
@@ -66,6 +67,7 @@
/// <param name="typeTag">Type tag.</param>
public void DeviceInfoChange(CommonDevice common, string typeTag)
{
+ ///
//璁惧涓婃姤鐘舵�佷腑 褰揅luterID=3,灏辫瘉鏄庤璁惧鍦ㄧ嚎锛岀洿鎺ユ爣璁�
if (typeTag == "DeviceStatusReport")
{
@@ -138,6 +140,23 @@
break;
case DeviceType.WindowCoveringDevice:
+ if ((common as ZigBee.Device.Rollershade).DeviceStatusReport.CluterID == 258)
+ {
+ var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade;
+ rollershade.DeviceStatusReport = (common as ZigBee.Device.Rollershade).DeviceStatusReport;
+ var attriButeList = rollershade.DeviceStatusReport.AttriBute;
+ if (attriButeList == null || attriButeList.Count == 0)
+ {
+ continue;
+ }
+ switch (attriButeList[0].AttributeId)
+ {
+ case 0:
+ rollershade.WcdType = attriButeList[0].AttriButeData;
+ rollershade.LastDateTime = DateTime.Now;
+ break;
+ }
+ }
if ((common as ZigBee.Device.Rollershade).DeviceStatusReport.CluterID == 3)
{
var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade;
@@ -175,6 +194,12 @@
case 18:
//姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鐑俯搴︼紝瀹為檯娓╁害涓衡�淗eatingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
ac.currentHeatingSetpoint = attriButeList[0].AttriButeData / 100;
+ ac.LastDateTime = DateTime.Now;
+ break;
+
+ case 4096:
+ //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勮嚜鍔ㄦ俯搴︼紝瀹為檯娓╁害涓衡�淎utoSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
+ ac.currentAutoSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
ac.LastDateTime = DateTime.Now;
break;
@@ -368,8 +393,18 @@
{
Y = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.TabbarHeight),
Height = Application.GetRealHeight(CommonPage.TabbarHeight),
- BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor,
+ BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCBottomColor,
};
+
+ #region 鍒嗗壊绾�
+
+ private Button bottomLine = new Button
+ {
+ Height = 1,
+ BackgroundColor = ZigbeeColor.Current.GXCBottomLineColor
+ };
+
+ #endregion
#region 搴曢儴-涓婚〉鎸夐挳
/// <summary>
@@ -402,10 +437,11 @@
Y = Application.GetRealHeight(tabBarEnumName_Y),
Height = Application.GetRealHeight(tabBarEnumName_Height),
TextID = R.MyInternationalizationString.HomePage,
- TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor,
- SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlueColor,
+ TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor,
+ SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
IsSelected = true,
- Gravity = Gravity.CenterHorizontal
+ Gravity = Gravity.CenterHorizontal,
+ TextSize = 10
};
#endregion
@@ -439,10 +475,11 @@
Y = Application.GetRealHeight(tabBarEnumName_Y),
Height = Application.GetRealHeight(tabBarEnumName_Height),
TextID = R.MyInternationalizationString.Category,
- TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor,
- SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlueColor,
+ TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor,
+ SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
IsSelected = false,
- Gravity = Gravity.CenterHorizontal
+ Gravity = Gravity.CenterHorizontal,
+ TextSize=10
};
#endregion
@@ -476,27 +513,17 @@
Y = Application.GetRealHeight(tabBarEnumName_Y),
Height = Application.GetRealHeight(tabBarEnumName_Height),
TextID = R.MyInternationalizationString.Me,
- TextColor = ZigbeeColor.Current.GXCTextBlackColor,
- SelectedTextColor = ZigbeeColor.Current.GXCTextBlueColor,
+ TextColor = Shared.Common.ZigbeeColor.Current.GXCTextBottomUnSelectedColor,
+ SelectedTextColor = Shared.Common.ZigbeeColor.Current.GXCTextBlackColor2,
IsSelected = false,
- Gravity = Gravity.CenterHorizontal
+ Gravity = Gravity.CenterHorizontal,
+ TextSize = 10
};
#endregion
- #region 鍒嗗壊绾�
-
- private FrameLayout bottomLine = new FrameLayout
- {
- Height = 3,
- BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
- };
-
- #endregion
EventHandler<MouseEventArgs> BottomEventHandler = (sender, e) =>
{
- Room.GetAllRoomDeviceUIList();
-
Instance.homePageName.IsSelected = false;
Instance.homePageIMG.IsSelected = false;
@@ -557,6 +584,8 @@
AddChidren(BodyView);
AddChidren(BottomMenuView);
+ BottomMenuView.AddChidren(Instance.bottomLine);
+
Instance.homePageFL.AddChidren(Instance.homePageIMG);
Instance.homePageFL.AddChidren(Instance.homePageName);
BottomMenuView.AddChidren(Instance.homePageFL);
@@ -568,8 +597,6 @@
Instance.settingFL.AddChidren(Instance.settingIMG);
Instance.settingFL.AddChidren(Instance.settingName);
BottomMenuView.AddChidren(Instance.settingFL);
-
- BottomMenuView.AddChidren(Instance.bottomLine);
homePageIMG.MouseUpEventHandler += BottomEventHandler;
homePageName.MouseUpEventHandler += BottomEventHandler;
--
Gitblit v1.8.0