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
d0350da0
Commit
d0350da0
authored
Jan 06, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上版下绊控制
parent
a9a2bb83
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
142 additions
and
47 deletions
+142
-47
VIZ.Package.Domain/Plugin/IPluginView.cs
+20
-2
VIZ.Package.Module/Control/View/ControlView.xaml
+4
-4
VIZ.Package.Module/Control/ViewModel/ControlViewModel.cs
+2
-2
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/ListEditPanel.xaml
+1
-0
VIZ.Package.Module/ControlObject/FieldTree/View/FieldTreeView.xaml
+1
-0
VIZ.Package.Module/Page/Group/View/PageAddWindow.xaml
+1
-1
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
+1
-0
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
+2
-0
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
+87
-16
VIZ.Package.Module/Setting/Conn/View/ConnSettingView.xaml
+23
-18
VIZ.Package.WpfTest/VIZ.Package.WpfTest.csproj
+0
-4
No files found.
VIZ.Package.Domain/Plugin/IPluginView.cs
View file @
d0350da0
...
@@ -21,7 +21,7 @@ namespace VIZ.Package.Domain
...
@@ -21,7 +21,7 @@ namespace VIZ.Package.Domain
/// 继续
/// 继续
/// </summary>
/// </summary>
/// <param name="conn">连接</param>
/// <param name="conn">连接</param>
void
Continue
(
ConnModel
conn
);
void
Take
Continue
(
ConnModel
conn
);
/// <summary>
/// <summary>
/// 下版子
/// 下版子
...
@@ -33,6 +33,24 @@ namespace VIZ.Package.Domain
...
@@ -33,6 +33,24 @@ namespace VIZ.Package.Domain
/// 更新
/// 更新
/// </summary>
/// </summary>
/// <param name="conn">连接</param>
/// <param name="conn">连接</param>
void
Update
(
ConnModel
conn
);
void
TakeUpdate
(
ConnModel
conn
);
/// <summary>
/// 预览上版子
/// </summary>
/// <param name="conn">连接</param>
void
PreviewIn
(
ConnModel
conn
);
/// <summary>
/// 预览继续
/// </summary>
/// <param name="conn">连接</param>
void
PreviewContinue
(
ConnModel
conn
);
/// <summary>
/// 预览下版
/// </summary>
/// <param name="conn">连接</param>
void
PreviewOut
(
ConnModel
conn
);
}
}
}
}
VIZ.Package.Module/Control/View/ControlView.xaml
View file @
d0350da0
...
@@ -16,13 +16,13 @@
...
@@ -16,13 +16,13 @@
d:DesignHeight="35" d:DesignWidth="800">
d:DesignHeight="35" d:DesignWidth="800">
<Grid>
<Grid>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<Button Height="
3
0" Width="80" Content="Take" Margin="10,0,10,0"
<Button Height="
2
0" Width="80" Content="Take" Margin="10,0,10,0"
Command="{Binding TakeCommand}"></Button>
Command="{Binding TakeCommand}"></Button>
<Button Height="
3
0" Width="80" Content="Continue" Margin="10,0,10,0"
<Button Height="
2
0" Width="80" Content="Continue" Margin="10,0,10,0"
Command="{Binding ContinueCommand}"></Button>
Command="{Binding ContinueCommand}"></Button>
<Button Height="
3
0" Width="80" Content="Take Out" Margin="10,0,10,0"
<Button Height="
2
0" Width="80" Content="Take Out" Margin="10,0,10,0"
Command="{Binding TakeOutCommand}"></Button>
Command="{Binding TakeOutCommand}"></Button>
<Button Height="
3
0" Width="80" Content="Update" Margin="10,0,10,0"
<Button Height="
2
0" Width="80" Content="Update" Margin="10,0,10,0"
Command="{Binding UpdateCommand}"></Button>
Command="{Binding UpdateCommand}"></Button>
</StackPanel>
</StackPanel>
</Grid>
</Grid>
...
...
VIZ.Package.Module/Control/ViewModel/ControlViewModel.cs
View file @
d0350da0
...
@@ -104,7 +104,7 @@ namespace VIZ.Package.Module
...
@@ -104,7 +104,7 @@ namespace VIZ.Package.Module
},
},
pluginAction
:
(
view
,
conn
)
=>
pluginAction
:
(
view
,
conn
)
=>
{
{
view
.
Continue
(
conn
);
view
.
Take
Continue
(
conn
);
});
});
}
}
...
@@ -154,7 +154,7 @@ namespace VIZ.Package.Module
...
@@ -154,7 +154,7 @@ namespace VIZ.Package.Module
},
},
pluginAction
:
(
view
,
conn
)
=>
pluginAction
:
(
view
,
conn
)
=>
{
{
view
.
Update
(
conn
);
view
.
Take
Update
(
conn
);
});
});
}
}
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/ListEditPanel.xaml
View file @
d0350da0
...
@@ -107,6 +107,7 @@
...
@@ -107,6 +107,7 @@
</dxg:GridControl.ContextMenu>
</dxg:GridControl.ContextMenu>
<dxg:GridControl.View>
<dxg:GridControl.View>
<dxg:TableView AllowEditing="True" ShowIndicator="True"
<dxg:TableView AllowEditing="True" ShowIndicator="True"
IsColumnMenuEnabled="False"
NavigationStyle="Cell" EditorShowMode="MouseDown"
NavigationStyle="Cell" EditorShowMode="MouseDown"
ShowGroupPanel="False"
ShowGroupPanel="False"
AllowDrop="True"
AllowDrop="True"
...
...
VIZ.Package.Module/ControlObject/FieldTree/View/FieldTreeView.xaml
View file @
d0350da0
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
</dxg:GridControl.Columns>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:GridControl.View>
<dxg:TreeListView AllowEditing="False" ShowIndicator="True"
<dxg:TreeListView AllowEditing="False" ShowIndicator="True"
IsColumnMenuEnabled="False"
NavigationStyle="Row"
NavigationStyle="Row"
ShowBandsPanel="False"
ShowBandsPanel="False"
ShowTotalSummary="False"
ShowTotalSummary="False"
...
...
VIZ.Package.Module/Page/Group/View/PageAddWindow.xaml
View file @
d0350da0
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
xmlns:local="clr-namespace:VIZ.Package.Module"
xmlns:local="clr-namespace:VIZ.Package.Module"
d:DataContext="{d:DesignInstance Type=local:PageAddViewModel}"
d:DataContext="{d:DesignInstance Type=local:PageAddViewModel}"
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
Title="添加页" Height="3
0
0" Width="600">
Title="添加页" Height="3
3
0" Width="600">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
<dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
...
...
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
View file @
d0350da0
...
@@ -97,6 +97,7 @@
...
@@ -97,6 +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"
IsColumnMenuEnabled="False"
NavigationStyle="Cell" EditorShowMode="MouseDown"
NavigationStyle="Cell" EditorShowMode="MouseDown"
ShowGroupPanel="False"
ShowGroupPanel="False"
AllowDragDrop="True"
AllowDragDrop="True"
...
...
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
View file @
d0350da0
...
@@ -70,6 +70,7 @@
...
@@ -70,6 +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"
IsColumnMenuEnabled="False"
NavigationStyle="Cell" EditorShowMode="MouseDown"
NavigationStyle="Cell" EditorShowMode="MouseDown"
ShowGroupPanel="False"
ShowGroupPanel="False"
AllowDragDrop="True"
AllowDragDrop="True"
...
@@ -116,6 +117,7 @@
...
@@ -116,6 +117,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"
IsColumnMenuEnabled="False"
NavigationStyle="Cell" EditorShowMode="MouseDown"
NavigationStyle="Cell" EditorShowMode="MouseDown"
ShowGroupPanel="False"
ShowGroupPanel="False"
AllowDragDrop="True"
AllowDragDrop="True"
...
...
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
View file @
d0350da0
using
System
;
using
log4net
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
@@ -16,6 +17,11 @@ namespace VIZ.Package.Module
...
@@ -16,6 +17,11 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
public
class
VizPreviewViewModel
:
ViewModelBase
public
class
VizPreviewViewModel
:
ViewModelBase
{
{
/// <summary>
/// 日志
/// </summary>
private
readonly
static
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
VizPreviewViewModel
));
public
VizPreviewViewModel
()
public
VizPreviewViewModel
()
{
{
// 初始化控制器
// 初始化控制器
...
@@ -192,11 +198,15 @@ namespace VIZ.Package.Module
...
@@ -192,11 +198,15 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
Play
()
private
void
Play
()
{
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
this
.
Execute
(
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
action
:
(
conn
)
=>
return
;
{
this
.
vizCommandService
.
Start
(
conn
,
null
,
VizLayer
.
MAIN_LAYER
);
this
.
vizCommandService
.
Start
(
ApplicationDomainEx
.
PreviewConn
,
null
,
VizLayer
.
MAIN_LAYER
);
},
pluginAction
:
(
view
,
conn
)
=>
{
view
.
PreviewIn
(
conn
);
});
}
}
#
endregion
#
endregion
...
@@ -213,11 +223,15 @@ namespace VIZ.Package.Module
...
@@ -213,11 +223,15 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
Continue
()
private
void
Continue
()
{
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
this
.
Execute
(
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
action
:
(
conn
)
=>
return
;
{
this
.
vizCommandService
.
Continue
(
conn
,
null
,
VizLayer
.
MAIN_LAYER
);
this
.
vizCommandService
.
Continue
(
ApplicationDomainEx
.
PreviewConn
,
null
,
VizLayer
.
MAIN_LAYER
);
},
pluginAction
:
(
view
,
conn
)
=>
{
view
.
PreviewContinue
(
conn
);
});
}
}
#
endregion
#
endregion
...
@@ -234,11 +248,15 @@ namespace VIZ.Package.Module
...
@@ -234,11 +248,15 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
Stop
()
private
void
Stop
()
{
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
this
.
Execute
(
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
action
:
(
conn
)
=>
return
;
{
this
.
vizCommandService
.
Stop
(
conn
,
null
,
VizLayer
.
MAIN_LAYER
);
this
.
vizCommandService
.
Stop
(
ApplicationDomainEx
.
PreviewConn
,
null
,
VizLayer
.
MAIN_LAYER
);
},
pluginAction
:
(
view
,
conn
)
=>
{
view
.
PreviewOut
(
conn
);
});
}
}
#
endregion
#
endregion
...
@@ -509,5 +527,58 @@ namespace VIZ.Package.Module
...
@@ -509,5 +527,58 @@ namespace VIZ.Package.Module
this
.
vizPreviewController
.
StartVizEngine
(
view
,
path
,
conn
);
this
.
vizPreviewController
.
StartVizEngine
(
view
,
path
,
conn
);
}
}
// ================================================================================
// Private Function
// ================================================================================
/// <summary>
/// 执行
/// </summary>
/// <param name="action">播放行为</param>
/// <param name="pluginAction">插件行为</param>
private
void
Execute
(
Action
<
ConnModel
>
action
,
Action
<
IPluginView
,
ConnModel
>
pluginAction
)
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
// 预览连接为准备好
if
(
ApplicationDomainEx
.
PreviewConn
==
null
||
!
ApplicationDomainEx
.
PreviewConn
.
IsConnected
)
return
;
// Step 1. 播放行为
try
{
action
(
ApplicationDomainEx
.
PreviewConn
);
}
catch
(
Exception
ex
)
{
log
.
Error
(
ex
);
}
// Step 2. 插件行为
if
(!(
ApplicationDomainEx
.
CurrentPage
is
PageModel
page
))
return
;
if
(
string
.
IsNullOrWhiteSpace
(
page
.
PluginID
))
return
;
IPluginService
pluginService
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IPluginService
>(
ViewServiceKeys
.
PLUGIN_SERVICE
);
if
(
pluginService
==
null
)
return
;
IPluginView
view
=
pluginService
.
GetCurrentPluginView
()
as
IPluginView
;
if
(
view
==
null
)
return
;
try
{
pluginAction
(
view
,
ApplicationDomainEx
.
PreviewConn
);
}
catch
(
Exception
ex
)
{
log
.
Error
(
ex
);
}
}
}
}
}
}
VIZ.Package.Module/Setting/Conn/View/ConnSettingView.xaml
View file @
d0350da0
...
@@ -62,19 +62,23 @@
...
@@ -62,19 +62,23 @@
HorizontalContentAlignment="Left"></dxe:TextEditSettings>
HorizontalContentAlignment="Left"></dxe:TextEditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
</dxg:GridColumn>
<dxg:GridColumn Header="是否启用" Width="80" Binding="{Binding IsEnabled,Converter={StaticResource Bool2StringConverter}}" AllowSorting="False" AllowColumnFiltering="False"></dxg:GridColumn>
<dxg:GridColumn Header="是否启用" Width="80" Binding="{Binding IsEnabled,Converter={StaticResource Bool2StringConverter}}"
<dxg:GridColumn Header="引擎类型" FieldName="EngineType" AllowSorting="False" AllowColumnFiltering="False"></dxg:GridColumn>
AllowSorting="False" AllowColumnFiltering="False" ReadOnly="True"></dxg:GridColumn>
<dxg:GridColumn Header="引擎类型" FieldName="EngineType" AllowSorting="False" AllowColumnFiltering="False"
ReadOnly="True"></dxg:GridColumn>
</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"
IsColumnMenuEnabled="False"
ShowGroupPanel="False"
ShowGroupPanelsForUngroupedDetails="False"
AllowDragDrop="False"
NavigationStyle="Cell"
ShowBandsPanel="False"
ShowGroupPanel="False"
ShowTotalSummary="False"
AllowDragDrop="False"
ShowFixedTotalSummary="False"
ShowBandsPanel="False"
ShowDragDropHint="False"
ShowTotalSummary="False"
ShowTargetInfoInDragDropHint="false">
ShowFixedTotalSummary="False"
ShowDragDropHint="False"
ShowTargetInfoInDragDropHint="false">
</dxg:TableView>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl.View>
</dxg:GridControl>
</dxg:GridControl>
...
@@ -126,14 +130,15 @@
...
@@ -126,14 +130,15 @@
</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"
IsColumnMenuEnabled="False"
ShowGroupPanel="False"
NavigationStyle="Cell"
AllowDragDrop="False"
ShowGroupPanel="False"
ShowBandsPanel="False"
AllowDragDrop="False"
ShowTotalSummary="False"
ShowBandsPanel="False"
ShowFixedTotalSummary="False"
ShowTotalSummary="False"
ShowDragDropHint="False"
ShowFixedTotalSummary="False"
ShowTargetInfoInDragDropHint="false">
ShowDragDropHint="False"
ShowTargetInfoInDragDropHint="false">
</dxg:TableView>
</dxg:TableView>
</dxg:GridControl.View>
</dxg:GridControl.View>
</dxg:GridControl>
</dxg:GridControl>
...
...
VIZ.Package.WpfTest/VIZ.Package.WpfTest.csproj
View file @
d0350da0
...
@@ -170,10 +170,6 @@
...
@@ -170,10 +170,6 @@
<Project>{327ea1f4-f23c-418a-a2ef-da4f1039b333}</Project>
<Project>{327ea1f4-f23c-418a-a2ef-da4f1039b333}</Project>
<Name>VIZ.Package.Module.Resource</Name>
<Name>VIZ.Package.Module.Resource</Name>
</ProjectReference>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Module\VIZ.Package.Module.csproj">
<Project>{6fd4c0f0-8a00-4db8-924b-a3cd9a45297f}</Project>
<Name>VIZ.Package.Module</Name>
</ProjectReference>
<ProjectReference Include="..\VIZ.Package.Plugin\VIZ.Package.Plugin.csproj">
<ProjectReference Include="..\VIZ.Package.Plugin\VIZ.Package.Plugin.csproj">
<Project>{9c7d3994-340a-480f-8d06-92c562137810}</Project>
<Project>{9c7d3994-340a-480f-8d06-92c562137810}</Project>
<Name>VIZ.Package.Plugin</Name>
<Name>VIZ.Package.Plugin</Name>
...
...
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