| | |
| | | using System.Collections.Generic; |
| | | using Shared.Common; |
| | | using ZigBee.Device; |
| | | using Shared.Phone.Device.AC; |
| | | |
| | | namespace Shared.Phone.UserView |
| | | { |
| | |
| | | /// </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 ◆ 接口____________________________ |
| | |
| | | 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; |
| | |
| | | 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; |
| | | |
| | |
| | | { |
| | | 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> |
| | |
| | | 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 |
| | | |
| | |
| | | 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 |
| | | |
| | |
| | | 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) => |
| | | { |
| | |
| | | AddChidren(BodyView); |
| | | AddChidren(BottomMenuView); |
| | | |
| | | BottomMenuView.AddChidren(Instance.bottomLine); |
| | | |
| | | Instance.homePageFL.AddChidren(Instance.homePageIMG); |
| | | Instance.homePageFL.AddChidren(Instance.homePageName); |
| | | BottomMenuView.AddChidren(Instance.homePageFL); |
| | |
| | | Instance.settingFL.AddChidren(Instance.settingIMG); |
| | | Instance.settingFL.AddChidren(Instance.settingName); |
| | | BottomMenuView.AddChidren(Instance.settingFL); |
| | | |
| | | BottomMenuView.AddChidren(Instance.bottomLine); |
| | | |
| | | homePageIMG.MouseUpEventHandler += BottomEventHandler; |
| | | homePageName.MouseUpEventHandler += BottomEventHandler; |