| | |
| | | this.ShowAddTargetMenu();
|
| | | };
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //从网关获取场景的执行目标
|
| | | var result = await this.GetSceneTargetList();
|
| | | var result = this.GetSceneTargetList();
|
| | | if (result == true)
|
| | | {
|
| | | //添加【执行目标行】
|
| | |
| | | /// 从网关获取场景的执行目标
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | private async System.Threading.Tasks.Task<bool> GetSceneTargetList()
|
| | | private bool GetSceneTargetList()
|
| | | {
|
| | | if (this.editorScene == null || this.listAdjustTarget != null)
|
| | | {
|
| | |
| | | //打开进度条
|
| | | this.ShowProgressBar();
|
| | | //获取执行目标列表
|
| | | var listData = await HdlSceneLogic.Current.GetAdjustTargetList(this.editorScene);
|
| | | var listData = HdlSceneLogic.Current.GetAdjustTargetList(this.editorScene);
|
| | | if (listData == null)
|
| | | {
|
| | | this.CloseProgressBar(ShowReLoadMode.YES);
|
| | |
| | | /// <summary>
|
| | | /// 保存新建的场景
|
| | | /// </summary>
|
| | | private async void SaveSceneDataByNewMode()
|
| | | private void SaveSceneDataByNewMode()
|
| | | {
|
| | | //添加场景
|
| | | this.editorScene = await HdlSceneLogic.Current.AddNewSceneToGateway(this.cloneScene.Name, this.listAdjustTarget);
|
| | | this.editorScene = HdlSceneLogic.Current.AddNewSceneToGateway(this.cloneScene.Name, this.listAdjustTarget);
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | |
|
| | |
| | | if (this.editorScene.IconPathType != 0)
|
| | | {
|
| | | //删除自定义图片
|
| | | Shared.IO.FileUtils.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, this.editorScene.IconPath));
|
| | | HdlFileLogic.Current.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, this.editorScene.IconPath));
|
| | | HdlAutoBackupLogic.DeleteFile(this.editorScene.IconPath);
|
| | | }
|
| | | if (this.cloneScene.IconPathType != 0)
|