| | |
| | | SceneBodyTableControl.AddChidren(listSceneView);
|
| | |
|
| | | var listScene = HdlSceneLogic.Current.GetUnalloctedScenes();
|
| | | if (listScene == null || listScene.Count == 0) { return; }
|
| | | if (listScene.Count == 0) { return; }
|
| | |
|
| | | foreach (var data in listScene)
|
| | | {
|
| | | //场景图片
|
| | | var frameContr = new ScenePictrueControl();
|
| | | listSceneView.AddChidrenFrame(frameContr);
|
| | | listSceneView.AddChidren(frameContr);
|
| | | frameContr.InitControl(data);
|
| | |
|
| | | //添加选择控件
|
| | |
| | | frameContr.CollectEvent += (collect) =>
|
| | | {
|
| | | //如果当前是收藏房间,则需要刷新主页
|
| | | if (HdlRoomLogic.Current.CurrentRoom.IsLove == true)
|
| | | if (HdlRoomLogic.Current.NowMainPageRoom.IsLove == true)
|
| | | {
|
| | | this.dataHadChanged = true;
|
| | | }
|
| | |
| | | //促使它超过时,能够往上滑
|
| | | var frameTemp = new FrameLayout();
|
| | | frameTemp.Height = Application.GetRealHeight(202 + 23);
|
| | | listSceneView.AddChidrenFrame(frameTemp);
|
| | | listSceneView.AddChidren(frameTemp);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | btnAdd.TextID = R.MyInternationalizationString.AddTo; |
| | | btnAdd.TextSize = 17; |
| | | btnAdd.Radius = (uint)Application.GetRealHeight(35); |
| | | frameAddBackGroud.AddChidren(btnAdd, ChidrenBindMode.BindEventOnly);
|
| | | frameAddBackGroud.AddChidren(btnAdd, ChidrenBindMode.BindEvent);
|
| | | frameAddBackGroud.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var selectZone = new SelectZone(); |
| | |
| | | selectZone.ZoneAction += (selectRoom) => |
| | | { |
| | | //变更了当前房间的东西,主页需要刷新 |
| | | if (HdlRoomLogic.Current.CurrentRoom.Id == selectRoom.Id)
|
| | | if (HdlRoomLogic.Current.NowMainPageRoom.Id == selectRoom.Id)
|
| | | {
|
| | | this.dataHadChanged = true;
|
| | | } |
| | |
| | | string path1 = string.Empty;
|
| | | string path2 = string.Empty;
|
| | | //获取图片
|
| | | Common.LocalDevice.Current.GetDeviceObjectIcon(typeInfo.ConcreteType, ref path1, ref path2);
|
| | | Common.LocalDevice.Current.GetDeviceFunctionTypeMenuIcon(typeInfo.ConcreteType, ref path1, ref path2);
|
| | | dic[typeInfo.BeloneTextId].IconPath = path1;
|
| | | dic[typeInfo.BeloneTextId].IconPathSelected = path2;
|
| | | dic[typeInfo.BeloneTextId].TextId = typeInfo.BeloneTextId;
|
| | |
| | | HdlThreadLogic.Current.RunMainInThread(() =>
|
| | | {
|
| | | //刷新主页
|
| | | this.LoadFormMethodByName("HomeMainPageForm", "RefreshBodyView");
|
| | | HomeMainPageForm.Instance?.RefreshBodyView();
|
| | | });
|
| | | }
|
| | | base.CloseFormBefore();
|