Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.Package
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.Package
Commits
143b88fa
Commit
143b88fa
authored
Jan 02, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
场景打开消息
parent
56635f17
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
70 additions
and
19 deletions
+70
-19
VIZ.Package.Domain/Message/Page/PageOpenMessage.cs
+2
-2
VIZ.Package.Domain/VIZ.Package.Domain.csproj
+1
-1
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
+6
-1
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
+25
-9
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
+7
-2
VIZ.Package.Module/Page/Templage/ViewModel/PageTemplateViewModel.cs
+25
-1
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
+3
-3
VIZ.Package.Service/Viz/VizCommandService.cs
+1
-0
No files found.
VIZ.Package.Domain/Message/Page/Page
Changed
Message.cs
→
VIZ.Package.Domain/Message/Page/Page
Open
Message.cs
View file @
143b88fa
...
@@ -7,9 +7,9 @@ using System.Threading.Tasks;
...
@@ -7,9 +7,9 @@ using System.Threading.Tasks;
namespace
VIZ.Package.Domain
namespace
VIZ.Package.Domain
{
{
/// <summary>
/// <summary>
/// 页
切换命令
/// 页
打开消息
/// </summary>
/// </summary>
public
class
Page
Changed
Message
public
class
Page
Open
Message
{
{
/// <summary>
/// <summary>
/// 页
/// 页
...
...
VIZ.Package.Domain/VIZ.Package.Domain.csproj
View file @
143b88fa
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
<Compile Include="ApplicationDomainEx.cs" />
<Compile Include="ApplicationDomainEx.cs" />
<Compile Include="Enum\ModulePluginIds.cs" />
<Compile Include="Enum\ModulePluginIds.cs" />
<Compile Include="Enum\ViewServiceKeys.cs" />
<Compile Include="Enum\ViewServiceKeys.cs" />
<Compile Include="Message\Page\Page
Changed
Message.cs" />
<Compile Include="Message\Page\Page
Open
Message.cs" />
<Compile Include="Message\Page\PageInitedMessage.cs" />
<Compile Include="Message\Page\PageInitedMessage.cs" />
<Compile Include="Message\Project\ProjectSaveMessage.cs" />
<Compile Include="Message\Project\ProjectSaveMessage.cs" />
<Compile Include="Message\Project\ProjectCloseMessage.cs" />
<Compile Include="Message\Project\ProjectCloseMessage.cs" />
...
...
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
View file @
143b88fa
...
@@ -32,6 +32,8 @@
...
@@ -32,6 +32,8 @@
SelectedItem="{Binding Path=SelectedPageGroupModel,Mode=TwoWay}">
SelectedItem="{Binding Path=SelectedPageGroupModel,Mode=TwoWay}">
<dx:DXTabControl.ContextMenu>
<dx:DXTabControl.ContextMenu>
<ContextMenu>
<ContextMenu>
<MenuItem Header="打开" Command="{Binding Path=PlacementTarget.DataContext.OpenPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator>
<MenuItem Header="新建分组" Command="{Binding Path=PlacementTarget.DataContext.AddGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="新建分组" Command="{Binding Path=PlacementTarget.DataContext.AddGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="重命名分组" Command="{Binding Path=PlacementTarget.DataContext.RenameGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="重命名分组" Command="{Binding Path=PlacementTarget.DataContext.RenameGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator>
<Separator></Separator>
...
@@ -95,7 +97,7 @@
...
@@ -95,7 +97,7 @@
</dxg:GridControl.Columns>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:GridControl.View>
<dxg:TableView AllowEditing="True" ShowIndicator="True"
<dxg:TableView AllowEditing="True" ShowIndicator="True"
NavigationStyle="Cell"
NavigationStyle="Cell"
EditorShowMode="MouseDown"
ShowGroupPanel="False"
ShowGroupPanel="False"
AllowDragDrop="True"
AllowDragDrop="True"
ShowFilterPanelMode="Never"
ShowFilterPanelMode="Never"
...
@@ -104,6 +106,9 @@
...
@@ -104,6 +106,9 @@
ShowFixedTotalSummary="False"
ShowFixedTotalSummary="False"
ShowDragDropHint="False"
ShowDragDropHint="False"
ShowTargetInfoInDragDropHint="False">
ShowTargetInfoInDragDropHint="False">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="RowDoubleClick" Command="{Binding ElementName=uc, Path=DataContext.OpenPageCommand,Mode=TwoWay}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</dxg:TableView>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl.View>
</dxg:GridControl>
</dxg:GridControl>
...
...
VIZ.Package.Module/Page/Group/ViewModel/PageGroupViewModel.cs
View file @
143b88fa
...
@@ -43,6 +43,7 @@ namespace VIZ.Package.Module
...
@@ -43,6 +43,7 @@ namespace VIZ.Package.Module
this
.
AddGroupCommand
=
new
VCommand
(
this
.
AddGroup
);
this
.
AddGroupCommand
=
new
VCommand
(
this
.
AddGroup
);
this
.
RenameGroupCommand
=
new
VCommand
(
this
.
RenameGroup
);
this
.
RenameGroupCommand
=
new
VCommand
(
this
.
RenameGroup
);
this
.
DeleteGroupCommand
=
new
VCommand
(
this
.
DeleteGroup
);
this
.
DeleteGroupCommand
=
new
VCommand
(
this
.
DeleteGroup
);
this
.
OpenPageCommand
=
new
VCommand
(
this
.
OpenPage
);
}
}
/// <summary>
/// <summary>
...
@@ -145,15 +146,7 @@ namespace VIZ.Package.Module
...
@@ -145,15 +146,7 @@ namespace VIZ.Package.Module
public
PageModel
SelectedPageModel
public
PageModel
SelectedPageModel
{
{
get
{
return
selectedPageModel
;
}
get
{
return
selectedPageModel
;
}
set
set
{
selectedPageModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedPageModel
));
}
{
selectedPageModel
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedPageModel
));
PageChangedMessage
msg
=
new
PageChangedMessage
();
msg
.
Page
=
value
;
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
}
}
}
#
endregion
#
endregion
...
@@ -246,6 +239,29 @@ namespace VIZ.Package.Module
...
@@ -246,6 +239,29 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
#
region
OpenPageCommand
--
打开页命令
/// <summary>
/// 打开场景页命令
/// </summary>
public
VCommand
OpenPageCommand
{
get
;
set
;
}
/// <summary>
/// 打开场景页
/// </summary>
private
void
OpenPage
()
{
if
(
this
.
SelectedPageModel
==
null
)
return
;
ApplicationDomainEx
.
CurrentPage
=
this
.
SelectedPageModel
;
PageOpenMessage
msg
=
new
PageOpenMessage
();
msg
.
Page
=
this
.
SelectedPageModel
;
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
}
#
endregion
// ======================================================================================
// ======================================================================================
// Message
// Message
// ======================================================================================
// ======================================================================================
...
...
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
View file @
143b88fa
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
SelectedItem="{Binding Path=SelectedSceneTemplateModel,Mode=TwoWay}">
SelectedItem="{Binding Path=SelectedSceneTemplateModel,Mode=TwoWay}">
<dxg:GridControl.ContextMenu>
<dxg:GridControl.ContextMenu>
<ContextMenu>
<ContextMenu>
<MenuItem Header="打开" Command="{Binding Path=PlacementTarget.DataContext.OpenScenePageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator>
<MenuItem Header="添加至节目单" Command="{Binding Path=PlacementTarget.DataContext.SceneTemplateAddToPageGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="添加至节目单" Command="{Binding Path=PlacementTarget.DataContext.SceneTemplateAddToPageGroupCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="更新模板" Command="{Binding Path=PlacementTarget.DataContext.SceneTemplateUpdateCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="更新模板" Command="{Binding Path=PlacementTarget.DataContext.SceneTemplateUpdateCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<Separator></Separator>
<Separator></Separator>
...
@@ -68,7 +70,7 @@
...
@@ -68,7 +70,7 @@
</dxg:GridControl.Columns>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:GridControl.View>
<dxg:TableView AllowEditing="True" ShowIndicator="True"
<dxg:TableView AllowEditing="True" ShowIndicator="True"
NavigationStyle="Cell"
NavigationStyle="Cell"
EditorShowMode="MouseDown"
ShowGroupPanel="False"
ShowGroupPanel="False"
AllowDragDrop="True"
AllowDragDrop="True"
ShowBandsPanel="False"
ShowBandsPanel="False"
...
@@ -76,6 +78,9 @@
...
@@ -76,6 +78,9 @@
ShowFixedTotalSummary="False"
ShowFixedTotalSummary="False"
ShowDragDropHint="False"
ShowDragDropHint="False"
ShowTargetInfoInDragDropHint="false">
ShowTargetInfoInDragDropHint="false">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="RowDoubleClick" Command="{Binding Path=OpenScenePageCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</dxg:TableView>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl.View>
</dxg:GridControl>
</dxg:GridControl>
...
@@ -111,7 +116,7 @@
...
@@ -111,7 +116,7 @@
</dxg:GridControl.Columns>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:GridControl.View>
<dxg:TableView AllowEditing="True" ShowIndicator="True"
<dxg:TableView AllowEditing="True" ShowIndicator="True"
NavigationStyle="Cell"
NavigationStyle="Cell"
EditorShowMode="MouseDown"
ShowGroupPanel="False"
ShowGroupPanel="False"
AllowDragDrop="True"
AllowDragDrop="True"
ShowBandsPanel="False"
ShowBandsPanel="False"
...
...
VIZ.Package.Module/Page/Templage/ViewModel/PageTemplateViewModel.cs
View file @
143b88fa
...
@@ -41,7 +41,7 @@ namespace VIZ.Package.Module
...
@@ -41,7 +41,7 @@ namespace VIZ.Package.Module
private
void
initCommand
()
private
void
initCommand
()
{
{
this
.
SceneTemplateAddToPageGroupCommand
=
new
VCommand
(
this
.
SceneTemplateAddToPageGroup
);
this
.
SceneTemplateAddToPageGroupCommand
=
new
VCommand
(
this
.
SceneTemplateAddToPageGroup
);
this
.
OpenScenePageCommand
=
new
VCommand
(
this
.
OpenScenePage
);
}
}
/// <summary>
/// <summary>
...
@@ -184,6 +184,30 @@ namespace VIZ.Package.Module
...
@@ -184,6 +184,30 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
#
region
OpenScenePageCommand
--
打开场景页命令
/// <summary>
/// 打开场景页命令
/// </summary>
public
VCommand
OpenScenePageCommand
{
get
;
set
;
}
/// <summary>
/// 打开场景页
/// </summary>
private
void
OpenScenePage
()
{
if
(
this
.
SelectedSceneTemplateModel
==
null
)
return
;
ApplicationDomainEx
.
CurrentPage
=
this
.
SelectedSceneTemplateModel
;
PageOpenMessage
msg
=
new
PageOpenMessage
();
msg
.
Page
=
this
.
SelectedSceneTemplateModel
;
ApplicationDomainEx
.
MessageManager
.
Send
(
msg
);
}
#
endregion
// ======================================================================================
// ======================================================================================
// Message
// Message
// ======================================================================================
// ======================================================================================
...
...
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
View file @
143b88fa
...
@@ -62,7 +62,7 @@ namespace VIZ.Package.Module
...
@@ -62,7 +62,7 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
initMessage
()
private
void
initMessage
()
{
{
ApplicationDomainEx
.
MessageManager
.
Register
<
Page
ChangedMessage
>(
this
,
this
.
OnPageChanged
Message
);
ApplicationDomainEx
.
MessageManager
.
Register
<
Page
OpenMessage
>(
this
,
this
.
OnPageOpen
Message
);
}
}
// ================================================================================
// ================================================================================
...
@@ -449,10 +449,10 @@ namespace VIZ.Package.Module
...
@@ -449,10 +449,10 @@ namespace VIZ.Package.Module
// ================================================================================
// ================================================================================
/// <summary>
/// <summary>
/// 页
切换
消息
/// 页
打开
消息
/// </summary>
/// </summary>
/// <param name="msg">消息</param>
/// <param name="msg">消息</param>
private
void
OnPage
ChangedMessage
(
PageChanged
Message
msg
)
private
void
OnPage
OpenMessage
(
PageOpen
Message
msg
)
{
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
...
...
VIZ.Package.Service/Viz/VizCommandService.cs
View file @
143b88fa
...
@@ -24,6 +24,7 @@ namespace VIZ.Package.Service
...
@@ -24,6 +24,7 @@ namespace VIZ.Package.Service
if
(
conn
==
null
)
if
(
conn
==
null
)
throw
new
ArgumentNullException
(
nameof
(
conn
));
throw
new
ArgumentNullException
(
nameof
(
conn
));
// 需要等待结果
conn
.
EndpointManager
.
Send
(
$"RENDERER*
{
layer
}
SET_OBJECT SCENE*
{
scene
}
"
);
conn
.
EndpointManager
.
Send
(
$"RENDERER*
{
layer
}
SET_OBJECT SCENE*
{
scene
}
"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment