From 1a2061079e97a738ec7b8959bfd9a6e6c6997403 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 31 十月 2019 09:59:29 +0800 Subject: [PATCH] 2019.10.31 --- ZigbeeApp/Shared/Phone/UserView/UserPage.cs | 95 ++++++++++++++++++++++++++++++----------------- 1 files changed, 61 insertions(+), 34 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs old mode 100755 new mode 100644 index 2166285..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; @@ -530,7 +557,7 @@ //涓汉涓績 Instance.settingName.IsSelected = true; Instance.settingIMG.IsSelected = true; - var form = new UserCenter.User.UserMainForm(); + var form = new UserCenter.UserMain.UserMainForm(); Instance.BodyView.AddChidren(form); form.ShowForm(); } @@ -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