| | |
| | | //目前不知道郭雪城的这个具体放在哪个的位置
|
| | | this.functionSceneAutoBodyView = new FrameLayout();
|
| | | functionSceneAutoBodyView.Y = frameSwitchBack.Bottom;
|
| | | functionSceneAutoBodyView.Height = Application.GetRealHeight(1423);
|
| | | functionSceneAutoBodyView.Height = bodyFrameLayout.Height - frameSwitchBack.Bottom;
|
| | | bodyFrameLayout.AddChidren(functionSceneAutoBodyView);
|
| | |
|
| | | //场景,功能,自动化的切换控件
|
| | |
| | | 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 ■ 初始化设备列表控件_________________
|
| | |
| | | // PM2.5
|
| | | else if (device.Type == DeviceType.PMSensor)
|
| | | { |
| | | cardContr = new Controls.DevicePmSensorRowControl();
|
| | | } |
| | | //彩灯(调光器) |
| | | else if (device.Type == DeviceType.DimmableLight)
|
| | |
| | | }
|
| | | 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
|
| | |
|
| | |
| | | LocalDevice.Current.GetDeviceObjectIcon(typeInfo.ConcreteType, ref path1, ref path2);
|
| | | dic[typeInfo.BeloneTextId].IconPath = path1;
|
| | | dic[typeInfo.BeloneTextId].IconPathSelected = path2;
|
| | | dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId; |
| | | if (device.Type == DeviceType.FreshAir)
|
| | | {
|
| | | dic[typeInfo.BeloneTextId].IconPath = "Device/FreshAirEpoint.png";
|
| | | dic[typeInfo.BeloneTextId].IconPathSelected = "Device/FreshAirEpointSelected.png";
|
| | | }
|
| | | dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId;
|
| | | if (device.Type == DeviceType.PMSensor)
|
| | | { |
| | | // PM2.5 |
| | | dic[typeInfo.BeloneTextId].IconPath = "Device/AirQualitySensorEpoint.png";
|
| | | dic[typeInfo.BeloneTextId].IconPathSelected = "Device/AirQualitySensorEpointSelected.png";
|
| | | dic[typeInfo.BeloneTextId].TextId = R.MyInternationalizationString.AirQualitySensor;
|
| | | }
|
| | | }
|
| | | dic[typeInfo.BeloneTextId].listDeviceKeys.Add(LocalDevice.Current.GetDeviceMainKeys(device));
|
| | | }
|