| | |
| | | int index = 0; |
| | | foreach (var scene in DB_ResidenceData.functionList.scenes) |
| | | { |
| | | if (scene.roomIds.Count == 0)//如何在房间已经移除了这个功能,则收藏界面也不会再显示 |
| | | { |
| | | scene.collect = false; |
| | | continue; |
| | | } |
| | | //if (scene.roomIds.Count == 0)//如何在房间已经移除了这个功能,则收藏界面也不会再显示 |
| | | //{ |
| | | // scene.collect = false; |
| | | // continue; |
| | | //} |
| | | if (index % 2 == 0) |
| | | { |
| | | sceneFunctionView.AddChidren(new Button() { Height = Application.GetRealHeight(7) }); |
| | |
| | | Width = Application.GetRealWidth(164), |
| | | Height = Application.GetRealWidth(122), |
| | | Tag = scene.sid, |
| | | BackgroundImagePath = (scene as Scene).ImagePath, |
| | | //BackgroundImagePath = (scene as Scene).ImagePath, |
| | | }; |
| | | rowView.AddChidren(functionView); |
| | | //2020-12-03 修改图片加载方法 |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, functionView); |
| | | |
| | | LoadSceneFunctionDiv(functionView, scene); |
| | | index++; |
| | |
| | | view.AddChidren(btnCollection); |
| | | btnCollection.MouseUpEventHandler = (sender, e) => { |
| | | scene.collect = btnCollection.IsSelected = !btnCollection.IsSelected; |
| | | scene.SaveSceneData(); |
| | | scene.SaveSceneData(true); |
| | | }; |
| | | LoadEvent_ControlScene(btnCoverd,btnName,btnZone, scene); |
| | | btnSettingIcon.MouseUpEventHandler = (sender, e) => { |
| | |
| | | Action refreshAction = () => { |
| | | btnName.Text = scene.name; |
| | | btnZone.Text = scene.GetRoomListName(); |
| | | view.BackgroundImagePath = scene.ImagePath; |
| | | //view.BackgroundImagePath = scene.ImagePath; |
| | | //2020-12-03 修改图片加载方法 |
| | | ImageUtlis.Current.LoadLocalOrNetworkImages((scene as Scene).ImagePath, view); |
| | | }; |
| | | var aep = new SceneEditPage(scene, backAction); |
| | | MainPage.BasePageView.AddChidren(aep); |