| | |
| | | |
| | | public void LoadPage(Action backRefresh) |
| | | { |
| | | //DB_ResidenceData.Instance.sceneChooseRoomId |
| | | new TopViewDiv(bodyView, Language.StringByID(StringId.EditScene)).LoadTopView(backRefresh); |
| | | initPage(); |
| | | } |
| | |
| | | var tempScene = sceneList.Find((obj) => obj.userSceneId == scene.userSceneId); |
| | | if (tempScene != null) |
| | | { |
| | | scene = tempScene; |
| | | scene.name = tempScene.name; |
| | | scene.delay = tempScene.delay; |
| | | scene.roomIds = tempScene.roomIds; |
| | | scene.functions = tempScene.functions; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | |
| | | scene.functions.Remove(scenefunction); |
| | | continue; |
| | | } |
| | | //将spk实体里面的min max值放入场景功能实体里,要不然数据会丢失 2022-06-21 16:06:45 |
| | | foreach (var tt in scenefunction.status) { |
| | | tt.min = scenefunction.localFunction.GetAttribute(tt.key).min; |
| | | tt.max = scenefunction.localFunction.GetAttribute(tt.key).max; |
| | | tt.valueList = scenefunction.localFunction.GetAttribute(tt.key).value; |
| | | } |
| | | |
| | | i++; |
| | | var row = new RowLayout() |
| | | { |
| | |
| | | |
| | | EventHandler<MouseEventArgs> skipEvent = (sender, e) => |
| | | { |
| | | var ssf = new SceneFunctionInfoEditPage(scene, scenefunction, refreshFunctionRowAction); |
| | | var ssf = new SceneFunctionInfoEditPage(scene, scenefunction.localFunction.ConvertSceneFunction(), refreshFunctionRowAction); |
| | | MainPage.BasePageView.AddChidren(ssf); |
| | | ssf.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | UploadImage(selectImagePath, addSceneImageView, scene, uploadSuccessAction); |
| | | } |
| | | |
| | | public override void RemoveFromParent() |
| | | { |
| | | backAction(); |
| | | base.RemoveFromParent(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 完成按钮点击事件 |
| | | /// </summary> |
| | |
| | | } |
| | | scene.EditScene(); |
| | | FunctionList.List.scenes.Add(scene); |
| | | backAction(); |
| | | //backAction(); |
| | | this.RemoveFromParent(); |
| | | } |
| | | if (btnComplete.TextID == StringId.Del) |
| | |
| | | Action action = () => |
| | | { |
| | | FunctionList.List.DeleteScene(scene,true); |
| | | backAction(); |
| | | //backAction(); |
| | | this.RemoveFromParent(); |
| | | }; |
| | | new PublicAssmebly().TipOptionMsg(StringId.Tip, StringId.DeleteSceneTip, action); |