xm
2020-05-13 da3634e011bbda29cf4e1c168997b780fe795b20
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -182,7 +182,7 @@
            //目前不知道郭雪城的这个具体放在哪个的位置
            this.functionSceneAutoBodyView = new FrameLayout();
            functionSceneAutoBodyView.Y = frameSwitchBack.Bottom;
            functionSceneAutoBodyView.Height = Application.GetRealHeight(1423);
            functionSceneAutoBodyView.Height = bodyFrameLayout.Height - frameSwitchBack.Bottom;
            bodyFrameLayout.AddChidren(functionSceneAutoBodyView);
            //场景,功能,自动化的切换控件
@@ -334,7 +334,9 @@
            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;
            }
@@ -431,35 +433,6 @@
            }
        }
        /// <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 ■ 初始化设备列表控件_________________
@@ -532,6 +505,7 @@
                    // PM2.5
                    else if (device.Type == DeviceType.PMSensor)
                    {
                        cardContr = new Controls.DevicePmSensorRowControl();
                    }
                    //彩灯(调光器)
                    else if (device.Type == DeviceType.DimmableLight)
@@ -625,7 +599,9 @@
            }
            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;
            }
@@ -762,36 +738,6 @@
                });
            });
        }
        /// <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
@@ -930,12 +876,19 @@
                    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));
            }