| | |
| | | }
|
| | |
|
| | | 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(() =>
|
| | | {
|
| | | //获取全部场景的延时时间
|
| | | this.GetAllDelayScene(dicSceneContr, listview);
|
| | | if (listview1 != null)
|
| | | {
|
| | | //获取全部场景的延时时间
|
| | | this.GetAllDelayScene(dicSceneContr, listview1);
|
| | | }
|
| | | else
|
| | | {
|
| | | //获取全部场景的延时时间
|
| | | this.GetAllDelayScene(dicSceneContr, listview2);
|
| | | }
|
| | | }, ShowErrorMode.NO);
|
| | | }
|
| | |
|
| | |
| | | /// 获取全部场景的延时时间
|
| | | /// </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();
|