| | |
| | | //应该是body吧
|
| | | this.bodyFrameLayout = new FrameLayout();
|
| | | bodyFrameLayout.Y = topFrameLayout.Bottom;
|
| | | bodyFrameLayout.Height = Application.GetRealHeight(1549);
|
| | | bodyFrameLayout.Height = this.Height - topFrameLayout.Bottom;
|
| | | bodyFrameLayout.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor;
|
| | | this.AddChidren(bodyFrameLayout);
|
| | |
|
| | |
| | | //目前不知道郭雪城的这个具体放在哪个的位置
|
| | | this.functionSceneAutoBodyView = new FrameLayout();
|
| | | functionSceneAutoBodyView.Y = frameSwitchBack.Bottom;
|
| | | functionSceneAutoBodyView.Height = Application.GetRealHeight(1423);
|
| | | functionSceneAutoBodyView.Height = bodyFrameLayout.Height - frameSwitchBack.Bottom;
|
| | | bodyFrameLayout.AddChidren(functionSceneAutoBodyView);
|
| | |
|
| | | //场景,功能,自动化的切换控件
|
| | |
| | | //自动化
|
| | | else if (UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex == 2)
|
| | | {
|
| | | this.ShowAutotion();
|
| | | //自动化功能代码入口
|
| | | Device.Logic.SkipView.ShowAutotionView(functionSceneAutoBodyView);
|
| | | //隐藏楼层
|
| | | floorVisible = false;
|
| | | //显示右上角的加号
|
| | |
| | | var dicGroupDevice = this.GetAllGroupDevice(room);
|
| | | if (dicGroupDevice.Count == 0)
|
| | | {
|
| | | this.ShowNoFunctionTip();
|
| | | //没有功能{0}请在个人中心--设备管理处添加
|
| | | string[] arryMsg = Language.StringByID(R.MyInternationalizationString.NoFunction).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | this.ShowNotDataImage(functionSceneBodyView, arryMsg);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 提示没有功能
|
| | | /// </summary>
|
| | | private void ShowNoFunctionTip()
|
| | | {
|
| | | var noFunction = new Button()
|
| | | {
|
| | | Y = Application.GetRealHeight(320),
|
| | | Width = this.GetPictrueRealSize(757),
|
| | | Height = this.GetPictrueRealSize(435),
|
| | | UnSelectedImagePath = "Item/NoFunction.png",
|
| | | Gravity = Gravity.CenterHorizontal
|
| | | };
|
| | | functionSceneBodyView.AddChidren(noFunction);
|
| | |
|
| | | var noFunctionTip = new Button()
|
| | | {
|
| | | Y = noFunction.Bottom + Application.GetRealHeight(32),
|
| | | Height = Application.GetRealHeight(200),
|
| | | Width = Application.GetRealWidth(700),
|
| | | Gravity = Gravity.CenterHorizontal,
|
| | | Text = Language.StringByID(R.MyInternationalizationString.NoFunction).Replace("{\\r\\n}", "\r\n"),
|
| | | TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
|
| | | TextAlignment = TextAlignment.Center,
|
| | | IsMoreLines = true
|
| | | };
|
| | | functionSceneBodyView.AddChidren(noFunctionTip);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化设备列表控件_________________
|
| | |
| | | //窗帘
|
| | | if (device.Type == DeviceType.WindowCoveringDevice)
|
| | | {
|
| | | cardContr = new Controls.DeviceCurtainRowControl(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceCurtainRowControl();
|
| | | }
|
| | | //继电器
|
| | | else if (device.Type == DeviceType.OnOffOutput)
|
| | | {
|
| | | cardContr = new Controls.DeviceRelayRowControl(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceRelayRowControl();
|
| | | }
|
| | | //空气开关
|
| | | else if (device.Type == DeviceType.AirSwitch)
|
| | | {
|
| | | cardContr = new Controls.DeviceAirSwitchRowControl(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceAirSwitchRowControl();
|
| | | }
|
| | | //空调
|
| | | else if (device.Type == DeviceType.Thermostat)
|
| | | {
|
| | | cardContr = new Controls.DeviceAcRowControl(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceAcRowControl();
|
| | | }
|
| | | // 新风
|
| | | else if (device.Type == DeviceType.FreshAir)
|
| | | {
|
| | | cardContr = new Controls.DeviceFreshAirRowControl(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceFreshAirRowControl();
|
| | | }
|
| | | //彩灯(调光器)
|
| | | else if (device.Type == DeviceType.DimmableLight)
|
| | | {
|
| | | cardContr = new Controls.DeviceColorLightRowControl(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceColorLightRowControl();
|
| | | }
|
| | | //传感器
|
| | | else if (device.Type == DeviceType.IASZone)
|
| | | {
|
| | | cardContr = new Controls.DeviceSensorRowControl(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceSensorRowControl();
|
| | | }
|
| | | //温湿度
|
| | | else if (device.Type == DeviceType.TemperatureSensor)
|
| | | {
|
| | | cardContr = new Controls.DeviceTemperatureRowControl(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceTemperatureRowControl();
|
| | | }
|
| | | //门锁
|
| | | else if (device.Type == DeviceType.DoorLock)
|
| | | {
|
| | | cardContr = new Controls.DeviceDoorLockRowControl(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceDoorLockRowControl();
|
| | | }
|
| | | //无法识别
|
| | | else
|
| | | {
|
| | | cardContr = new Controls.DeviceRowCommon(listView.rowSpace / 2);
|
| | | cardContr = new Controls.DeviceRowCommon();
|
| | | //没有状态功能
|
| | | cardContr.hadStatuFunction = false;
|
| | | }
|
| | |
|
| | | cardContr.chidrenYaxis = listView.rowSpace / 2;
|
| | | //初始化卡片
|
| | | listView.AddChidren(cardContr);
|
| | | cardContr.InitControl(device);
|
| | |
| | | }
|
| | | if (listScene.Count == 0)
|
| | | {
|
| | | this.ShowNoSceneTip();
|
| | | //没有场景{0}请点击右上角添加
|
| | | string[] arryMsg = Language.StringByID(R.MyInternationalizationString.NoScene).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
|
| | | this.ShowNotDataImage(functionSceneBodyView, arryMsg);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 显示没有场景
|
| | | /// </summary>
|
| | | private void ShowNoSceneTip()
|
| | | {
|
| | | var noFunction = new Button()
|
| | | {
|
| | | Y = Application.GetRealHeight(320),
|
| | | Width = this.GetPictrueRealSize(757),
|
| | | Height = this.GetPictrueRealSize(435),
|
| | | UnSelectedImagePath = "Item/NoFunction.png",
|
| | | Gravity = Gravity.CenterHorizontal
|
| | | };
|
| | | functionSceneBodyView.AddChidren(noFunction);
|
| | |
|
| | | var noScenceTip = new Button()
|
| | | {
|
| | | Y = noFunction.Bottom + Application.GetRealHeight(32),
|
| | | Height = Application.GetRealHeight(200),
|
| | | Width = Application.GetRealWidth(700),
|
| | | Gravity = Gravity.CenterHorizontal,
|
| | | Text = Language.StringByID(R.MyInternationalizationString.NoScene).Replace("{\\r\\n}", "\r\n"),
|
| | | TextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor,
|
| | | TextAlignment = TextAlignment.Center,
|
| | | IsMoreLines = true
|
| | | };
|
| | | functionSceneBodyView.AddChidren(noScenceTip);
|
| | | }
|
| | |
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 一般设备状态上报___________________
|
| | |
| | | if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true)
|
| | | {
|
| | | //刷新卡片状态
|
| | | this.dicDeviceRowControl[mainKeys].SetRowOnlineStatu(report.IsOnline == 1);
|
| | | bool bolOnline = LocalDevice.Current.CheckDeviceIsOnline(report);
|
| | | this.dicDeviceRowControl[mainKeys].SetRowOnlineStatu(bolOnline);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | /// 设备回路主键
|
| | | /// </summary>
|
| | | public List<string> listDeviceKeys = new List<string>();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ◆ 自动化__________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 自动化功能代码入口
|
| | | /// </summary>
|
| | | private void ShowAutotion()
|
| | | {
|
| | | Shared.Phone.Device.Logic.SkipView.ShowAutotionView(functionSceneAutoBodyView);
|
| | | }
|
| | |
|
| | | #endregion
|