| | |
| | | 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 ◆ 接口____________________________ |
| | |
| | | /// <param name="typeTag">Type tag.</param> |
| | | public void DeviceInfoChange(CommonDevice common, string typeTag) |
| | | { |
| | | var myDevice = LocalDevice.Current.GetDevice(common.DeviceAddr, common.DeviceEpoint); |
| | | if (myDevice == null)
|
| | | {
|
| | | return;
|
| | | } |
| | | //设备上报状态中 当CluterID=3,就证明该设备在线,直接标记 |
| | | if (typeTag == "DeviceStatusReport") |
| | | { |
| | | try |
| | | { |
| | | for (int i = 0; i < Room.AllRoomDeviceUIList.Count; i++) |
| | | { |
| | | var deviceUI = Room.AllRoomDeviceUIList[i]; |
| | | if (deviceUI.CommonDevice == null) |
| | | { |
| | | //设备为空 |
| | | continue; |
| | | } |
| | | if (common.DeviceAddr != deviceUI.CommonDevice.DeviceAddr || common.DeviceEpoint != deviceUI.CommonDevice.DeviceEpoint) |
| | | { |
| | | //判断是否为当前设备 |
| | | continue; |
| | | } |
| | | switch (deviceUI.CommonDevice.Type) |
| | | { |
| | | case DeviceType.OnOffOutput: |
| | | //开关功能 |
| | | if ((common as ZigBee.Device.ToggleLight).DeviceStatusReport.CluterID == 6) |
| | | { |
| | | var onOffOutputLight = deviceUI.CommonDevice as ZigBee.Device.ToggleLight; |
| | | onOffOutputLight.DeviceStatusReport = (common as ZigBee.Device.ToggleLight).DeviceStatusReport; |
| | | //记录、更新状态 |
| | | if (onOffOutputLight.DeviceStatusReport.AttriBute == null || onOffOutputLight.DeviceStatusReport.AttriBute.Count == 0) |
| | | { |
| | | continue; |
| | | } |
| | | onOffOutputLight.OnOffStatus = onOffOutputLight.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | //记录回复时间 |
| | | onOffOutputLight.LastDateTime = DateTime.Now; |
| | | {
|
| | | switch (myDevice.Type)
|
| | | {
|
| | | case DeviceType.OnOffOutput:
|
| | | //开关功能
|
| | | if (common.DeviceStatusReport.CluterID == 6)
|
| | | {
|
| | | var onOffOutputLight = (ToggleLight)myDevice;
|
| | | onOffOutputLight.DeviceStatusReport = common.DeviceStatusReport;
|
| | | //记录、更新状态
|
| | | if (onOffOutputLight.DeviceStatusReport.AttriBute == null || onOffOutputLight.DeviceStatusReport.AttriBute.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | onOffOutputLight.OnOffStatus = onOffOutputLight.DeviceStatusReport.AttriBute[0].AttriButeData;
|
| | | onOffOutputLight.LastDateTime = DateTime.Now;
|
| | | }
|
| | | //当CluterID=3,就证明该设备在线,直接标记
|
| | | if (common.DeviceStatusReport.CluterID == 3)
|
| | | {
|
| | | myDevice.IsOnline = 1;
|
| | | myDevice.LastDateTime = DateTime.Now;
|
| | | }
|
| | | break;
|
| | |
|
| | | case DeviceType.AirSwitch:
|
| | | //开关功能
|
| | | if (common.DeviceStatusReport.CluterID == 6)
|
| | | {
|
| | | var airSwitch = (AirSwitch)myDevice;
|
| | | airSwitch.DeviceStatusReport = common.DeviceStatusReport;
|
| | | if (airSwitch.DeviceStatusReport.AttriBute == null || airSwitch.DeviceStatusReport.AttriBute.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | airSwitch.OnOffStatus = airSwitch.DeviceStatusReport.AttriBute[0].AttriButeData;
|
| | | airSwitch.LastDateTime = DateTime.Now;
|
| | |
|
| | | }
|
| | | //当CluterID=3,就证明该设备在线,直接标记
|
| | | if (common.DeviceStatusReport.CluterID == 3)
|
| | | {
|
| | | myDevice.IsOnline = 1;
|
| | | myDevice.LastDateTime = DateTime.Now;
|
| | | }
|
| | | break;
|
| | |
|
| | | case DeviceType.WindowCoveringDevice:
|
| | | if (common.DeviceStatusReport.CluterID == 258)
|
| | | {
|
| | | var rollershade = (Rollershade)myDevice;
|
| | | rollershade.DeviceStatusReport = common.DeviceStatusReport;
|
| | | var attriButeList = rollershade.DeviceStatusReport.AttriBute;
|
| | | if (attriButeList == null || attriButeList.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | switch (attriButeList[0].AttributeId)
|
| | | {
|
| | | case 0:
|
| | | rollershade.WcdType = attriButeList[0].AttriButeData;
|
| | | rollershade.LastDateTime = DateTime.Now;
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (common.DeviceStatusReport.CluterID == 3)
|
| | | {
|
| | | myDevice.IsOnline = 1;
|
| | | myDevice.LastDateTime = DateTime.Now;
|
| | | }
|
| | | break;
|
| | |
|
| | | case DeviceType.Thermostat:
|
| | | //AC功能
|
| | | if (common.DeviceStatusReport.CluterID == 513)
|
| | | {
|
| | | var ac = (AC)myDevice;
|
| | | ac.DeviceStatusReport = common.DeviceStatusReport;
|
| | | var attriButeList = ac.DeviceStatusReport.AttriBute;
|
| | | if (attriButeList == null || attriButeList.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | //此属性表明室内当前的温度 * 100,实际温度为“LocalTemperature / 100”,单位:℃ |
| | | var curTemp = (attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default; |
| | | switch (attriButeList[0].AttributeId)
|
| | | {
|
| | | case 0:
|
| | | ac.currentLocalTemperature = curTemp;
|
| | | ac.LastDateTime = DateTime.Now;
|
| | | break;
|
| | |
|
| | | case 17:
|
| | | ac.currentCoolingSetpoint = curTemp;
|
| | | ac.LastDateTime = DateTime.Now;
|
| | | break;
|
| | |
|
| | | case 18:
|
| | | ac.currentHeatingSetpoint = curTemp;
|
| | | ac.LastDateTime = DateTime.Now;
|
| | | break;
|
| | |
|
| | | case 4096:
|
| | | ac.currentAutoSetpoint = curTemp;
|
| | | ac.LastDateTime = DateTime.Now;
|
| | | break;
|
| | |
|
| | | case 28:
|
| | | ac.currentSystemMode = attriButeList[0].AttriButeData;
|
| | | ac.LastDateTime = DateTime.Now;
|
| | | break;
|
| | | } |
| | | //当CluterID=3,就证明该设备在线,直接标记 |
| | | if ((common as ZigBee.Device.ToggleLight).DeviceStatusReport.CluterID == 3) |
| | | } |
| | |
|
| | | if (common.DeviceStatusReport.CluterID == 514) |
| | | { |
| | | var ac = (AC)myDevice; |
| | | var attriButeList = common.DeviceStatusReport.AttriBute; |
| | | if (attriButeList == null || attriButeList.Count == 0) |
| | | { |
| | | var onOffOutputLight = deviceUI.CommonDevice as ToggleLight; |
| | | onOffOutputLight.IsOnline = 1; |
| | | //记录回复时间 |
| | | onOffOutputLight.LastDateTime = DateTime.Now; |
| | | return; |
| | | }
|
| | | ac.DeviceStatusReport = common.DeviceStatusReport; |
| | | switch (attriButeList[0].AttributeId) |
| | | {
|
| | | case 0: |
| | | ac.currentFanMode = attriButeList[0].AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | case 4096: |
| | | ac.currentFanSwingMode = attriButeList[0].AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | } |
| | | break; |
| | | }
|
| | | |
| | | case DeviceType.AirSwitch: |
| | | //开关功能 |
| | | if ((common as ZigBee.Device.AirSwitch).DeviceStatusReport.CluterID == 6) |
| | | { |
| | | var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch; |
| | | airSwitch.DeviceStatusReport = (common as ZigBee.Device.AirSwitch).DeviceStatusReport; |
| | | //记录、更新状态 |
| | | if (airSwitch.DeviceStatusReport.AttriBute == null || airSwitch.DeviceStatusReport.AttriBute.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | airSwitch.OnOffStatus = airSwitch.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | //记录回复时间 |
| | | airSwitch.LastDateTime = DateTime.Now; |
| | | |
| | | } |
| | | //当CluterID=3,就证明该设备在线,直接标记 |
| | | if ((common as ZigBee.Device.AirSwitch).DeviceStatusReport.CluterID == 3) |
| | | { |
| | | var airSwitch = deviceUI.CommonDevice as AirSwitch; |
| | | airSwitch.IsOnline = 1; |
| | | //记录回复时间 |
| | | airSwitch.LastDateTime = DateTime.Now; |
| | | } |
| | | break; |
| | | |
| | | case DeviceType.WindowCoveringDevice: |
| | | if ((common as ZigBee.Device.Rollershade).DeviceStatusReport.CluterID == 3) |
| | | { |
| | | var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade; |
| | | rollershade.IsOnline = 1; |
| | | //记录回复时间 |
| | | rollershade.LastDateTime = DateTime.Now; |
| | | } |
| | | break; |
| | | |
| | | case DeviceType.Thermostat: |
| | | //AC功能 |
| | | if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 513) |
| | | { |
| | | var ac = deviceUI.CommonDevice as ZigBee.Device.AC; |
| | | ac.DeviceStatusReport = (common as ZigBee.Device.AC).DeviceStatusReport; |
| | | var attriButeList = ac.DeviceStatusReport.AttriBute; |
| | | if (attriButeList == null || attriButeList.Count == 0) |
| | | { |
| | | continue; |
| | | } |
| | | switch (attriButeList[0].AttributeId) |
| | | { |
| | | case 0: |
| | | //此属性表明室内当前的温度 * 100,实际温度为“LocalTemperature / 100”,单位:℃ |
| | | ac.currentLocalTemperature = attriButeList[0].AttriButeData / 100; |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | |
| | | case 17: |
| | | //此属性表明此设备当前的制冷温度,实际温度为“CoolingSetpoint / 100”,单位:℃。 |
| | | ac.currentCoolingSetpoint = attriButeList[0].AttriButeData / 100; |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | |
| | | case 18: |
| | | //此属性表明此设备当前的制热温度,实际温度为“HeatingSetpoint / 100”,单位:℃。 |
| | | ac.currentHeatingSetpoint = attriButeList[0].AttriButeData / 100; |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | |
| | | case 28: |
| | | //此属性描述恒温设备正处于哪种模式 |
| | | //Off = 0 Auto = 1 Cool = 3 Heat = 4 FanOnly = 7 Dry = 8 |
| | | ac.currentSystemMode = attriButeList[0].AttriButeData; |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | |
| | | } |
| | | |
| | | } |
| | | //当CluterID=3,就证明该设备在线,直接标记 |
| | | if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 3) |
| | | { |
| | | var ac = deviceUI.CommonDevice as AC; |
| | | ac.IsOnline = 1; |
| | | //记录回复时间 |
| | | ac.LastDateTime = DateTime.Now; |
| | | |
| | | } |
| | | break; |
| | | |
| | | case DeviceType.DimmableLight: |
| | | //调光灯功能 |
| | | //开关功能 |
| | | if ((common as ZigBee.Device.DimmableLight).DeviceStatusReport.CluterID == 6) |
| | | { |
| | | var dimmableLight = deviceUI.CommonDevice as ZigBee.Device.DimmableLight; |
| | | dimmableLight.DeviceStatusReport = (common as ZigBee.Device.DimmableLight).DeviceStatusReport; |
| | | //记录、更新状态 |
| | | if (dimmableLight.DeviceStatusReport.AttriBute == null || dimmableLight.DeviceStatusReport.AttriBute.Count == 0) |
| | | { |
| | | return; |
| | | } |
| | | dimmableLight.OnOffStatus = dimmableLight.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | //记录回复时间 |
| | | dimmableLight.LastDateTime = DateTime.Now; |
| | | } |
| | | //亮度 |
| | | if ((common as ZigBee.Device.DimmableLight).DeviceStatusReport.CluterID == 8) |
| | | { |
| | | var dimmableLight = deviceUI.CommonDevice as ZigBee.Device.DimmableLight; |
| | | dimmableLight.DeviceStatusReport = (common as ZigBee.Device.DimmableLight).DeviceStatusReport; |
| | | var attriButeList = dimmableLight.DeviceStatusReport.AttriBute; |
| | | if (attriButeList == null || attriButeList.Count == 0) |
| | | { |
| | | continue; |
| | | } |
| | | switch (attriButeList[0].AttributeId) |
| | | { |
| | | case 0: |
| | | //此属性表明当前亮度程度 |
| | | dimmableLight.Level = attriButeList[0].AttriButeData; |
| | | dimmableLight.LastDateTime = DateTime.Now; |
| | | break; |
| | | } |
| | | } |
| | | //当CluterID=3,就证明该设备在线,直接标记 |
| | | if ((common as ZigBee.Device.DimmableLight).DeviceStatusReport.CluterID == 3) |
| | | { |
| | | var dimmableLight = deviceUI.CommonDevice as DimmableLight; |
| | | dimmableLight.IsOnline = 1; |
| | | //记录回复时间 |
| | | dimmableLight.LastDateTime = DateTime.Now; |
| | | } |
| | | break; |
| | | } |
| | | //当CluterID=3,就证明该设备在线,直接标记
|
| | | if (common.DeviceStatusReport.CluterID == 3)
|
| | | {
|
| | | myDevice.IsOnline = 1;
|
| | | myDevice.LastDateTime = DateTime.Now;
|
| | | }
|
| | | break;
|
| | |
|
| | | case DeviceType.DimmableLight:
|
| | | //调光灯功能
|
| | | //开关功能
|
| | | if (common.DeviceStatusReport.CluterID == 6)
|
| | | {
|
| | | var dimmableLight = (DimmableLight)myDevice;
|
| | | dimmableLight.DeviceStatusReport = common.DeviceStatusReport;
|
| | | //记录、更新状态
|
| | | if (dimmableLight.DeviceStatusReport.AttriBute == null || dimmableLight.DeviceStatusReport.AttriBute.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | dimmableLight.OnOffStatus = dimmableLight.DeviceStatusReport.AttriBute[0].AttriButeData;
|
| | | dimmableLight.LastDateTime = DateTime.Now;
|
| | | }
|
| | | //亮度
|
| | | if (common.DeviceStatusReport.CluterID == 8)
|
| | | {
|
| | | var dimmableLight = (DimmableLight)myDevice;
|
| | | dimmableLight.DeviceStatusReport = common.DeviceStatusReport;
|
| | | var attriButeList = dimmableLight.DeviceStatusReport.AttriBute;
|
| | | if (attriButeList == null || attriButeList.Count == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | switch (attriButeList[0].AttributeId)
|
| | | {
|
| | | case 0:
|
| | | dimmableLight.Level = attriButeList[0].AttriButeData;
|
| | | dimmableLight.LastDateTime = DateTime.Now;
|
| | | break;
|
| | | }
|
| | | }
|
| | | //当CluterID=3,就证明该设备在线,直接标记
|
| | | if (common.DeviceStatusReport.CluterID == 3)
|
| | | {
|
| | | myDevice.IsOnline = 1;
|
| | | myDevice.LastDateTime = DateTime.Now;
|
| | | }
|
| | | break;
|
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | } |
| | | //设备在线状态上报 |
| | | else if (typeTag == "OnlineStatusChange") |
| | | { |
| | | try |
| | | { |
| | | for (int i = 0; i < Room.AllRoomDeviceUIList.Count; i++) |
| | | { |
| | | var deviceUI = Room.AllRoomDeviceUIList[i]; |
| | | if (deviceUI.CommonDevice == null) |
| | | { |
| | | //设备为空或者控件为空 |
| | | continue; |
| | | } |
| | | if (common.DeviceAddr != deviceUI.CommonDevice.DeviceAddr || common.DeviceEpoint != deviceUI.CommonDevice.DeviceEpoint) |
| | | { |
| | | //判断是否为当前设备 |
| | | continue; |
| | | } |
| | | switch (deviceUI.CommonDevice.Type) |
| | | { |
| | | case DeviceType.OnOffOutput: |
| | | var onOffOutputLight = deviceUI.CommonDevice as ToggleLight; |
| | | onOffOutputLight.IsOnline = (common as ToggleLight).IsOnline; |
| | | //记录回复时间 |
| | | onOffOutputLight.LastDateTime = DateTime.Now; |
| | | break; |
| | | case DeviceType.AirSwitch: |
| | | var airSwitch = deviceUI.CommonDevice as AirSwitch; |
| | | airSwitch.IsOnline = (common as AirSwitch).IsOnline; |
| | | //记录回复时间 |
| | | airSwitch.LastDateTime = DateTime.Now; |
| | | break; |
| | | case DeviceType.WindowCoveringDevice: |
| | | var rollershade = deviceUI.CommonDevice as ZigBee.Device.Rollershade; |
| | | rollershade.IsOnline = (common as Rollershade).IsOnline; |
| | | //记录回复时间 |
| | | rollershade.LastDateTime = DateTime.Now; |
| | | break; |
| | | case DeviceType.Thermostat: |
| | | var ac = deviceUI.CommonDevice as ZigBee.Device.AC; |
| | | ac.IsOnline = (common as ZigBee.Device.AC).IsOnline; |
| | | //记录回复时间 |
| | | ac.LastDateTime = DateTime.Now; |
| | | break; |
| | | case DeviceType.DimmableLight: |
| | | var dimmableLight = deviceUI.CommonDevice as ZigBee.Device.DimmableLight; |
| | | dimmableLight.IsOnline = (common as ZigBee.Device.DimmableLight).IsOnline; |
| | | //记录回复时间 |
| | | dimmableLight.LastDateTime = DateTime.Now; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | System.Console.WriteLine($"userpage功能刷新-Error:{ex.Message}"); |
| | | } |
| | | {
|
| | | myDevice.IsOnline = common.IsOnline;
|
| | | //记录回复时间
|
| | | myDevice.LastDateTime = DateTime.Now; |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | { |
| | | 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) => |
| | | { |
| | | Room.GetAllRoomDeviceUIList(); |
| | | |
| | | Instance.homePageName.IsSelected = false; |
| | | Instance.homePageIMG.IsSelected = false; |
| | | |
| | |
| | | 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; |