wxr
2023-06-06 592974441a4df95fffd9167c90192da1a390b1c2
HDL_ON/UI/UI2/FuntionControlView/Light/LightScene/AddLightScene.cs
@@ -194,7 +194,7 @@
        /// <summary>
        /// 显示的设备的总数
        /// </summary>
        int showCount = 0;
        int showCount = -1;
        /// <summary>
        /// 加载功能row
@@ -214,18 +214,19 @@
                    {
                        if (!isAppend)
                        {
                            showCount = 0;
                            showCount = -1;
                            functionListView.RemoveAll();
                        }
                        int i = 0;
                        foreach (var function in functions)
                        for(var i =0;i<100;i++)
                        //foreach (var function in functions)
                        {
                            i++;
                            if (i > 100)
                            showCount++;
                            if (showCount >= functions.Count)
                            {
                                break;
                            }
                            showCount++;
                            var function = functions[showCount];
                            var functionDiv = new LightRow(function)
                            {
                                Gravity = Gravity.CenterHorizontal,
@@ -415,7 +416,8 @@
                Height = Application.GetRealWidth(32),
                UnSelectedImagePath = "FunctionIcon/Light/LightScene/CheckIcon.png",
                SelectedImagePath = "FunctionIcon/Light/LightScene/CheckOnIcon.png",
                IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null
                IsSelected = functions.Find((obj) => obj.deviceId == function.deviceId) != null,
                Tag = "ChooseIcon"
            };
            if (DB_ResidenceData.Instance.HomeGateway.isSupportGroupControl)
            {
@@ -436,17 +438,17 @@
                }
                else
                {
                    var removeTemp = functions.Find((obj) => obj.sid == function.deviceId);
                    var removeTemp = functions.Find((obj) => obj.sid == function.sid);
                    if (removeTemp != null)
                    {
                        functions.Remove(removeTemp);
                    }
                }
                ///刷新界面
                if (functions.Count == 0 || functions.Count == 1)
                {
                //if (functions.Count == 0 || functions.Count == 1)
                //{
                    action();
                }
                //}
            };
        }