黄学彪
2020-04-16 9d3c2727f1cd12f0a29c75f4ddff851d5243ac81
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -611,21 +611,43 @@
            }
            var dicSceneContr = new Dictionary<int, SceneCategoryView>();
            var listview = new VerticalListControl();
            functionSceneBodyView.AddChidren(listview);
            //主人,管理员专用刷新控件
            VerticalListRefreshControl listview1 = null;
            //成员专用不能刷新的控件
            VerticalListControl listview2 = null;
            //if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
            //{
            //    listview1 = new VerticalListRefreshControl();
            //    functionSceneBodyView.AddChidren(listview1);
            //}
            //else
            {
                listview2 = new VerticalListControl();
                functionSceneBodyView.AddChidren(listview2);
            }
            foreach (var scene in listScene)
            {
                //场景卡片控件
                var sceneView = new SceneCategoryView();
                listview.AddChidren(sceneView);
                listview1?.AddChidren(sceneView);
                listview2?.AddChidren(sceneView);
                sceneView.InitControl(scene, room);
                dicSceneContr[scene.Id] = sceneView;
            }
            HdlThreadLogic.Current.RunThread(() =>
            {
                if (listview1 != null)
                {
                //获取全部场景的延时时间
                this.GetAllDelayScene(dicSceneContr, listview);
                    this.GetAllDelayScene(dicSceneContr, listview1);
                }
                else
                {
                    //获取全部场景的延时时间
                    this.GetAllDelayScene(dicSceneContr, listview2);
                }
            }, ShowErrorMode.NO);
        }
@@ -633,7 +655,7 @@
        /// 获取全部场景的延时时间
        /// </summary>
        /// <param name="dicSceneContr"></param>
        private async void GetAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, VerticalListControl listview)
        private async void GetAllDelayScene(Dictionary<int, SceneCategoryView> dicSceneContr, ViewGroup listview)
        {
            //读取全部的延时时间
            var result = await Scene.CatDelaySceneAsync();