黄学彪
2019-10-10 2ed75b8b337048e5d75e6d9ec8307633134f02fd
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>
        /// 底部按钮图片的Y值 -5
        /// 底部按钮图片的Y值
        /// </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>
        /// 底部按钮文字的Y值 100
        /// 底部按钮文字的Y值
        /// </summary>
        private static readonly int tabBarEnumName_Y = tabBarEnumIMG_Height - 10;
        private static readonly int tabBarEnumName_Y = 104;
        #endregion
        #region ◆ 接口____________________________
@@ -138,6 +139,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 +193,12 @@
                                        case 18:
                                            //此属性表明此设备当前的制热温度,实际温度为“HeatingSetpoint / 100”,单位:℃。
                                            ac.currentHeatingSetpoint = attriButeList[0].AttriButeData / 100;
                                            ac.LastDateTime = DateTime.Now;
                                            break;
                                        case 4096:
                                            //此属性表明此设备当前的自动温度,实际温度为“AutoSetpoint / 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 +392,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 +436,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 +474,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,22 +512,14 @@
            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) =>
        {
@@ -557,6 +585,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 +598,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;