Commit f874f846 by liulongfei

场景层添加

parent f3befbca
...@@ -141,7 +141,7 @@ namespace VIZ.Package.Connection ...@@ -141,7 +141,7 @@ namespace VIZ.Package.Connection
string errorMessage = null; string errorMessage = null;
VizImage img = this.vizEnginePool.RequestImage(message, IMAGE_GET_TIME_OUT, ref errorMessage); VizImage img = this.vizEnginePool.RequestImage(message, IMAGE_GET_TIME_OUT, ref errorMessage);
if (!string.IsNullOrWhiteSpace(errorMessage)) if (img == null || !string.IsNullOrWhiteSpace(errorMessage))
return null; return null;
return img.Image; return img.Image;
......
...@@ -3,6 +3,7 @@ using System.Collections.Generic; ...@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using VIZ.Package.Storage;
namespace VIZ.Package.Domain namespace VIZ.Package.Domain
{ {
...@@ -39,7 +40,7 @@ namespace VIZ.Package.Domain ...@@ -39,7 +40,7 @@ namespace VIZ.Package.Domain
/// <returns>场景父级</returns> /// <returns>场景父级</returns>
public static string GetSceneParent(this PageModelBase pageBase) public static string GetSceneParent(this PageModelBase pageBase)
{ {
string parent = ApplicationDomainEx.CurrentPage.ScenePath.Substring(0, ApplicationDomainEx.CurrentPage.ScenePath.LastIndexOf('/')); string parent = pageBase.ScenePath.Substring(0, pageBase.ScenePath.LastIndexOf('/'));
return parent; return parent;
} }
...@@ -58,5 +59,24 @@ namespace VIZ.Package.Domain ...@@ -58,5 +59,24 @@ namespace VIZ.Package.Domain
return Guid.Empty; return Guid.Empty;
} }
/// <summary>
/// 获取Viz场景层
/// </summary>
/// <param name="pageBase">页模型基类</param>
/// <returns>Viz场景层</returns>
public static VizScene GetVizScene(this PageModelBase pageBase)
{
if (pageBase == null)
return VizScene.MAIN_SCENE;
switch (pageBase.Layer)
{
case VizLayer.FRONT_LAYER: return VizScene.FRONT_SCENE;
case VizLayer.MAIN_LAYER: return VizScene.MAIN_SCENE;
case VizLayer.BACK_LAYER: return VizScene.BACK_SCENE;
default: return VizScene.MAIN_SCENE;
}
}
} }
} }
...@@ -50,7 +50,7 @@ namespace VIZ.Package.Module ...@@ -50,7 +50,7 @@ namespace VIZ.Package.Module
this.vizCommandService.SetObject(conn, ApplicationDomainEx.CurrentPage.ScenePath, ApplicationDomainEx.CurrentPage.Layer); this.vizCommandService.SetObject(conn, ApplicationDomainEx.CurrentPage.ScenePath, ApplicationDomainEx.CurrentPage.Layer);
if (obj != null) if (obj != null)
{ {
this.vizCommandControlObjectService.SetControlObject(conn, obj); this.vizCommandControlObjectService.SetControlObject(conn, obj, newPageBase.GetVizScene());
this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes); this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes);
} }
if (view != null) if (view != null)
...@@ -350,7 +350,7 @@ namespace VIZ.Package.Module ...@@ -350,7 +350,7 @@ namespace VIZ.Package.Module
{ {
if (obj != null) if (obj != null)
{ {
this.vizCommandControlObjectService.SetControlObject(conn, obj); this.vizCommandControlObjectService.SetControlObject(conn, obj, newPageBase.GetVizScene());
this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes); this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes);
} }
view?.TakeUpdate(conn); view?.TakeUpdate(conn);
......
...@@ -128,6 +128,7 @@ namespace VIZ.Package.Module ...@@ -128,6 +128,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -170,6 +170,7 @@ namespace VIZ.Package.Module ...@@ -170,6 +170,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -266,6 +266,7 @@ namespace VIZ.Package.Module ...@@ -266,6 +266,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -115,6 +115,7 @@ namespace VIZ.Package.Module ...@@ -115,6 +115,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -122,6 +122,7 @@ namespace VIZ.Package.Module ...@@ -122,6 +122,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -171,6 +171,7 @@ namespace VIZ.Package.Module ...@@ -171,6 +171,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -115,6 +115,7 @@ namespace VIZ.Package.Module ...@@ -115,6 +115,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -71,6 +71,7 @@ namespace VIZ.Package.Module ...@@ -71,6 +71,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -81,6 +81,7 @@ namespace VIZ.Package.Module ...@@ -81,6 +81,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module ...@@ -69,6 +69,7 @@ namespace VIZ.Package.Module
// 向Viz发送指令 // 向Viz发送指令
this.VizCommandControlObjectService.SetControlObjectListValue( this.VizCommandControlObjectService.SetControlObjectListValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
columnDefinition.ControlObject.TreeNodePath, columnDefinition.ControlObject.TreeNodePath,
columnDefinition.ControlField.FieldIdentifier, columnDefinition.ControlField.FieldIdentifier,
cellData.RowData.RowHandle.Value, cellData.RowData.RowHandle.Value,
......
...@@ -155,6 +155,7 @@ namespace VIZ.Package.Module ...@@ -155,6 +155,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -128,6 +128,7 @@ namespace VIZ.Package.Module ...@@ -128,6 +128,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -437,7 +437,10 @@ namespace VIZ.Package.Module ...@@ -437,7 +437,10 @@ namespace VIZ.Package.Module
this.TryUpdateScrollElementPackage(); this.TryUpdateScrollElementPackage();
IPageTemplateService service = ApplicationDomainEx.ServiceManager.GetService<IPageTemplateService>(ViewServiceKeys.PAGE_TEMPLATE_SERVICE); IPageTemplateService service = ApplicationDomainEx.ServiceManager.GetService<IPageTemplateService>(ViewServiceKeys.PAGE_TEMPLATE_SERVICE);
this.SceneTemplateModels = service.SceneTemplateModels.Where(p => p.ScenePath != ApplicationDomainEx.CurrentPage?.ScenePath).ToObservableCollection();
this.SceneTemplateModels = service.SceneTemplateModels.Where(p => p.ScenePath != ApplicationDomainEx.CurrentPage?.ScenePath &&
p.GetSceneParent() == ApplicationDomainEx.CurrentPage.GetSceneParent()).ToObservableCollection();
if (this.ScrollElementPackage != null) if (this.ScrollElementPackage != null)
{ {
this.SelectedSceneTemplateModel = this.SceneTemplateModels.FirstOrDefault(p => p.ScenePath == this.ScrollElementPackage.TemplateScenePath); this.SelectedSceneTemplateModel = this.SceneTemplateModels.FirstOrDefault(p => p.ScenePath == this.ScrollElementPackage.TemplateScenePath);
......
...@@ -117,6 +117,7 @@ namespace VIZ.Package.Module ...@@ -117,6 +117,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -292,6 +292,7 @@ namespace VIZ.Package.Module ...@@ -292,6 +292,7 @@ namespace VIZ.Package.Module
{ {
this.VizCommandControlObjectService.SetControlObjectValue( this.VizCommandControlObjectService.SetControlObjectValue(
ApplicationDomainEx.PreviewConn, ApplicationDomainEx.PreviewConn,
ApplicationDomainEx.CurrentPage.GetVizScene(),
this.ControlObject.TreeNodePath, this.ControlObject.TreeNodePath,
this.ControlField.FieldIdentifier, this.ControlField.FieldIdentifier,
this.ControlField.Value); this.ControlField.Value);
......
...@@ -174,7 +174,7 @@ namespace VIZ.Package.Module ...@@ -174,7 +174,7 @@ namespace VIZ.Package.Module
}); });
// 将当前值上至预览 // 将当前值上至预览
this.vizCommandControlObjectService.SetControlObject(ApplicationDomainEx.PreviewConn, this.ControlObject); this.vizCommandControlObjectService.SetControlObject(ApplicationDomainEx.PreviewConn, this.ControlObject, ApplicationDomainEx.CurrentPage.GetVizScene());
// 插件处理 // 插件处理
PageModel pageModel = msg.Page as PageModel; PageModel pageModel = msg.Page as PageModel;
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<!-- 系统版本 --> <!-- 系统版本 -->
<TextBlock Text="系统版本:" VerticalAlignment="Center" HorizontalAlignment="Right" <TextBlock Text="系统版本:" VerticalAlignment="Center" HorizontalAlignment="Right"
Grid.Row="1" Grid.Column="0" Margin="0,0,10,0"></TextBlock> Grid.Row="1" Grid.Column="0" Margin="0,0,10,0"></TextBlock>
<TextBlock Text="V1.1.0.03171405_beta" VerticalAlignment="Center" HorizontalAlignment="Left" <TextBlock Text="V1.2.0.03231400_beta" VerticalAlignment="Center" HorizontalAlignment="Left"
Grid.Row="1" Grid.Column="1"></TextBlock> Grid.Row="1" Grid.Column="1"></TextBlock>
</Grid> </Grid>
</dx:ThemedWindow> </dx:ThemedWindow>
...@@ -268,7 +268,7 @@ namespace VIZ.Package.Module ...@@ -268,7 +268,7 @@ namespace VIZ.Package.Module
if (vm == null) if (vm == null)
return; return;
ApplicationDomainEx.ProjectDbContext.Dispose(); ApplicationDomainEx.ProjectDbContext?.Dispose();
this.OpenProject(vm.SelectedFileModel.Path); this.OpenProject(vm.SelectedFileModel.Path);
} }
......
...@@ -356,7 +356,7 @@ namespace VIZ.Package.Module ...@@ -356,7 +356,7 @@ namespace VIZ.Package.Module
{ {
if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene) if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene)
{ {
this.vizCommandService.Start(conn, null, VizLayer.MAIN_LAYER); this.vizCommandService.Start(conn, null, ApplicationDomainEx.CurrentPage.Layer);
view?.PreviewIn(conn); view?.PreviewIn(conn);
} }
...@@ -391,7 +391,7 @@ namespace VIZ.Package.Module ...@@ -391,7 +391,7 @@ namespace VIZ.Package.Module
{ {
if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene) if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene)
{ {
this.vizCommandService.Continue(conn, null, VizLayer.MAIN_LAYER); this.vizCommandService.Continue(conn, null, ApplicationDomainEx.CurrentPage.Layer);
view?.PreviewContinue(conn); view?.PreviewContinue(conn);
} }
...@@ -420,7 +420,7 @@ namespace VIZ.Package.Module ...@@ -420,7 +420,7 @@ namespace VIZ.Package.Module
{ {
if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene) if (ApplicationDomainEx.CurrentPage.PageType == PageType.Scene)
{ {
this.vizCommandService.Stop(conn, null, VizLayer.MAIN_LAYER); this.vizCommandService.Stop(conn, null, ApplicationDomainEx.CurrentPage.Layer);
view?.PreviewOut(conn); view?.PreviewOut(conn);
} }
...@@ -464,7 +464,7 @@ namespace VIZ.Package.Module ...@@ -464,7 +464,7 @@ namespace VIZ.Package.Module
{ {
if (obj != null) if (obj != null)
{ {
this.vizCommandControlObjectService.SetControlObject(conn, obj); this.vizCommandControlObjectService.SetControlObject(conn, obj, ApplicationDomainEx.CurrentPage.GetVizScene());
this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes); this.vizCommandControlObjectService.SetCustomControlFieldValue(conn, obj.AllFiledNodes);
} }
view?.PreviewUpdate(conn); view?.PreviewUpdate(conn);
...@@ -575,7 +575,14 @@ namespace VIZ.Package.Module ...@@ -575,7 +575,14 @@ namespace VIZ.Package.Module
{ {
if (msg.Page.PageType == PageType.Scene) if (msg.Page.PageType == PageType.Scene)
{ {
this.vizCommandService.SetObject(ApplicationDomainEx.PreviewConn, msg.Page.ScenePath, VizLayer.MAIN_LAYER); List<VizLayer> layers = new List<VizLayer> { VizLayer.FRONT_LAYER, VizLayer.MAIN_LAYER, VizLayer.BACK_LAYER };
layers.Remove(msg.Page.Layer);
foreach (VizLayer layer in layers)
{
this.vizCommandService.SetObjectEmpty(ApplicationDomainEx.PreviewConn, layer);
}
this.vizCommandService.SetObject(ApplicationDomainEx.PreviewConn, msg.Page.ScenePath, msg.Page.Layer);
} }
// 发送节目单项初始化完成消息 // 发送节目单项初始化完成消息
......
...@@ -31,6 +31,19 @@ namespace VIZ.Package.Service ...@@ -31,6 +31,19 @@ namespace VIZ.Package.Service
} }
/// <summary> /// <summary>
/// 设置空场景
/// </summary>
/// <param name="conn">连接</param>
/// <param name="layer">图层</param>
public void SetObjectEmpty(ConnModel conn, VizLayer layer)
{
if (conn == null)
throw new ArgumentNullException(nameof(conn));
conn.EndpointManager.Request($"RENDERER*{layer} SET_OBJECT");
}
/// <summary>
/// 重新加载场景 /// 重新加载场景
/// </summary> /// </summary>
/// <param name="conn">连接</param> /// <param name="conn">连接</param>
......
...@@ -110,7 +110,7 @@ namespace VIZ.Package.Service ...@@ -110,7 +110,7 @@ namespace VIZ.Package.Service
ConnModel conn = ApplicationDomainEx.PreviewConn; ConnModel conn = ApplicationDomainEx.PreviewConn;
// 获取控制对象ID // 获取控制对象ID
List<string> ids = this.vizCommandControlObjectService.GetControlObjectIds(conn); List<string> ids = this.vizCommandControlObjectService.GetControlObjectIds(conn, VizScene.MAIN_SCENE);
string objectId = ids.FirstOrDefault(); string objectId = ids.FirstOrDefault();
if (string.IsNullOrWhiteSpace(objectId)) if (string.IsNullOrWhiteSpace(objectId))
...@@ -122,7 +122,7 @@ namespace VIZ.Package.Service ...@@ -122,7 +122,7 @@ namespace VIZ.Package.Service
string groupPath = this.vizCommandService.GroupAdd(conn, pageBase.ScenePath, objectId, VizGroupMoveDirection.BOTTOM); string groupPath = this.vizCommandService.GroupAdd(conn, pageBase.ScenePath, objectId, VizGroupMoveDirection.BOTTOM);
// SCENE*TITLES/2022/YC/YC_CUP2*TREE GET // SCENE*TITLES/2022/YC/YC_CUP2*TREE GET
List<VizTreeNodeInfo> treeNodeList = this.vizCommandControlObjectService.GetTreeNodeList(conn); List<VizTreeNodeInfo> treeNodeList = this.vizCommandControlObjectService.GetTreeNodeList(conn, VizScene.MAIN_SCENE);
VizTreeNodeInfo groupNode = treeNodeList.FirstOrDefault(p => p.Path == groupPath); VizTreeNodeInfo groupNode = treeNodeList.FirstOrDefault(p => p.Path == groupPath);
if (groupNode == null) if (groupNode == null)
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment