| | |
| | | }; |
| | | topView.AddChidren(btnAutomationTitle); |
| | | |
| | | btnAddIcon = new Button() |
| | | var btnAddIconBg = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(29), |
| | | Width = Application.GetMinRealAverage(28), |
| | | Height = Application.GetMinRealAverage(28), |
| | | UnSelectedImagePath = "Public/AddIcon.png", |
| | | }; |
| | | topView.AddChidren(btnAddIconBg); |
| | | |
| | | btnAddIcon = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337-20), |
| | | Width = Application.GetMinRealAverage(28+30), |
| | | Height = Application.GetMinRealAverage(28+29), |
| | | }; |
| | | topView.AddChidren(btnAddIcon); |
| | | #endregion |
| | |
| | | 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) }); |
| | |
| | | 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) => { |