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
ed4d37f9
Commit
ed4d37f9
authored
Mar 24, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://49.233.21.66/liulongfei/VIZ.Package
parents
d9f016be
5778ea87
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
57 changed files
with
498 additions
and
58 deletions
+498
-58
VIZ.Package.Connection/Protocol/VIZ/VizEndpointManager.cs
+1
-1
VIZ.Package.Domain/Expand/PageModelExpand.cs
+21
-1
VIZ.Package.Domain/RecordLogConstants.cs
+5
-0
VIZ.Package.Module.Resource/Converter/PageThumbnailMultiConverter.cs
+11
-9
VIZ.Package.Module.Resource/Icons/icon_cmd_32x32.png
+0
-0
VIZ.Package.Module.Resource/VIZ.Package.Module.Resource.csproj
+5
-1
VIZ.Package.Module/Control/Controller/ControlController.cs
+2
-2
VIZ.Package.Module/ControlObject/FieldEdit/Edit/BooleanEdit/BooleanEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/Clock/ClockEditPanelModel.cs
+0
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/CustomVideoEdit/CustomVideoEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/DupletEdit/DupletEditPanel.xaml
+4
-2
VIZ.Package.Module/ControlObject/FieldEdit/Edit/DupletEdit/DupletEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/FloatEdit/FloatEditPanel.xaml
+2
-1
VIZ.Package.Module/ControlObject/FieldEdit/Edit/FloatEdit/FloatEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/FontEdit/FontEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ImageEdit/ImageEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/IntegerEdit/IntegerEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/BooleanListCellEdit.xaml.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/DupletListCellEdit.xaml.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FloatListCellEdit.xaml
+3
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FloatListCellEdit.xaml.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FontListCellEdit.xaml.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/ImageListCellEdit.xaml.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/IntegerListCellEdit.xaml.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/RichTextListCellEdit.xaml.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TextListCellEdit.xaml.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TripletListCellEdit.xaml.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/RadioEdit/RadioEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/RichTextEdit/RichTextEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ScrollElementsEdit/ScrollElementsEditPanel.xaml
+2
-6
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ScrollElementsEdit/ScrollElementsEditPanelModel.cs
+95
-3
VIZ.Package.Module/ControlObject/FieldEdit/Edit/TextEdit/TextEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/TripletEdit/TripletEditPanel.xaml
+6
-3
VIZ.Package.Module/ControlObject/FieldEdit/Edit/TripletEdit/TripletEditPanelModel.cs
+1
-0
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditView.xaml
+1
-1
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditView.xaml.cs
+5
-0
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModel.cs
+0
-2
VIZ.Package.Module/ControlObject/FieldTree/ViewModel/FieldTreeViewModel.cs
+5
-1
VIZ.Package.Module/Help/About/View/AboutPageCommandWindow.xaml
+89
-0
VIZ.Package.Module/Help/About/View/AboutPageCommandWindow.xaml.cs
+30
-0
VIZ.Package.Module/Help/About/View/AboutWindow.xaml
+1
-1
VIZ.Package.Module/Help/About/ViewModel/AboutPageCommandWindowModel.cs
+29
-0
VIZ.Package.Module/Main/View/MainTopView.xaml
+2
-0
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
+21
-1
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
+32
-7
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
+25
-5
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml.cs
+3
-1
VIZ.Package.Module/PageCommand/Controller/PageCommandController.cs
+30
-0
VIZ.Package.Module/PageCommand/PageCommandLifeCycle.cs
+1
-0
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
+12
-5
VIZ.Package.Module/Setting/PluginMapping/View/PluginMappingSettingView.xaml
+1
-1
VIZ.Package.Module/VIZ.Package.Module.csproj
+8
-0
VIZ.Package.Service/DB/Page/PageService.cs
+9
-1
VIZ.Package.Service/Viz/VizCommandControlObjectService.cs
+0
-0
VIZ.Package.Service/Viz/VizCommandElementService.cs
+2
-1
VIZ.Package.Service/Viz/VizCommandService.cs
+13
-0
VIZ.Package.Service/Viz/VizControlObjectDownloadService.cs
+2
-2
No files found.
VIZ.Package.Connection/Protocol/VIZ/VizEndpointManager.cs
View file @
ed4d37f9
...
@@ -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
;
...
...
VIZ.Package.Domain/Expand/PageModelExpand.cs
View file @
ed4d37f9
...
@@ -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
.
CurrentPag
e
.
ScenePath
.
LastIndexOf
(
'/'
));
string
parent
=
pageBase
.
ScenePath
.
Substring
(
0
,
pageBas
e
.
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
;
}
}
}
}
}
}
VIZ.Package.Domain/RecordLogConstants.cs
View file @
ed4d37f9
...
@@ -35,6 +35,11 @@ namespace VIZ.Package.Domain
...
@@ -35,6 +35,11 @@ namespace VIZ.Package.Domain
/// </summary>
/// </summary>
public
const
string
SYSTEM_HOT_KEY
=
"触发快捷键"
;
public
const
string
SYSTEM_HOT_KEY
=
"触发快捷键"
;
/// <summary>
/// 页命令日志
/// </summary>
public
const
string
SYSTEM_PAGE_CMD_LOG
=
"页命令日志"
;
// =============================================================================
// =============================================================================
// Task
// Task
// =============================================================================
// =============================================================================
...
...
VIZ.Package.Module.Resource/Converter/PageThumbnailConverter.cs
→
VIZ.Package.Module.Resource/Converter/PageThumbnail
Multi
Converter.cs
View file @
ed4d37f9
...
@@ -11,13 +11,14 @@ using System.Windows.Data;
...
@@ -11,13 +11,14 @@ using System.Windows.Data;
using
System.Windows.Media
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Media.Imaging
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Storage
;
namespace
VIZ.Package.Module.Resource
namespace
VIZ.Package.Module.Resource
{
{
/// <summary>
/// <summary>
/// 页缩略图转化器
/// 页缩略图转化器
/// </summary>
/// </summary>
public
class
PageThumbnail
Converter
:
I
ValueConverter
public
class
PageThumbnail
MultiConverter
:
IMulti
ValueConverter
{
{
[
DllImport
(
"gdi32.dll"
,
SetLastError
=
true
)]
[
DllImport
(
"gdi32.dll"
,
SetLastError
=
true
)]
private
static
extern
bool
DeleteObject
(
IntPtr
hObject
);
private
static
extern
bool
DeleteObject
(
IntPtr
hObject
);
...
@@ -27,20 +28,21 @@ namespace VIZ.Package.Module.Resource
...
@@ -27,20 +28,21 @@ namespace VIZ.Package.Module.Resource
/// </summary>
/// </summary>
public
ImageSource
CommandThumbnail
{
get
;
set
;
}
public
ImageSource
CommandThumbnail
{
get
;
set
;
}
public
object
Convert
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
public
object
Convert
(
object
[]
values
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
{
PageModelBase
pageBase
=
value
as
PageModelBase
;
if
(
values
==
null
||
values
.
Length
!=
2
)
if
(
pageBase
==
null
)
return
null
;
return
null
;
if
(
pageBase
.
PageType
==
Storage
.
PageType
.
Command
)
if
(!(
values
[
1
]
is
PageType
type
))
return
null
;
if
(
type
==
PageType
.
Command
)
return
this
.
CommandThumbnail
;
return
this
.
CommandThumbnail
;
Bitmap
bitmap
=
pageBase
.
ThumbnailBitmap
;
if
(!(
values
[
0
]
is
Bitmap
bmp
))
if
(
bitmap
==
null
)
return
null
;
return
null
;
IntPtr
hBitmap
=
b
itma
p
.
GetHbitmap
();
IntPtr
hBitmap
=
b
m
p
.
GetHbitmap
();
ImageSource
wpfBitmap
=
System
.
Windows
.
Interop
.
Imaging
.
CreateBitmapSourceFromHBitmap
(
ImageSource
wpfBitmap
=
System
.
Windows
.
Interop
.
Imaging
.
CreateBitmapSourceFromHBitmap
(
hBitmap
,
hBitmap
,
IntPtr
.
Zero
,
IntPtr
.
Zero
,
...
@@ -53,7 +55,7 @@ namespace VIZ.Package.Module.Resource
...
@@ -53,7 +55,7 @@ namespace VIZ.Package.Module.Resource
return
wpfBitmap
;
return
wpfBitmap
;
}
}
public
object
ConvertBack
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
public
object
[]
ConvertBack
(
object
value
,
Type
[]
targetTypes
,
object
parameter
,
CultureInfo
culture
)
{
{
throw
new
NotImplementedException
();
throw
new
NotImplementedException
();
}
}
...
...
VIZ.Package.Module.Resource/Icons/icon_cmd_32x32.png
0 → 100644
View file @
ed4d37f9
392 Bytes
VIZ.Package.Module.Resource/VIZ.Package.Module.Resource.csproj
View file @
ed4d37f9
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="Converter\ConnGroupStatus2BrushConverter.cs" />
<Compile Include="Converter\ConnGroupStatus2BrushConverter.cs" />
<Compile Include="Converter\PageThumbnailConverter.cs" />
<Compile Include="Converter\PageThumbnail
Multi
Converter.cs" />
<Compile Include="Converter\VizControlFieldTypeStringConverter.cs" />
<Compile Include="Converter\VizControlFieldTypeStringConverter.cs" />
<Compile Include="Converter\ResourceFileSelectionModeConverter.cs" />
<Compile Include="Converter\ResourceFileSelectionModeConverter.cs" />
<Compile Include="Converter\RichText2TextConverter.cs" />
<Compile Include="Converter\RichText2TextConverter.cs" />
...
@@ -290,5 +290,8 @@
...
@@ -290,5 +290,8 @@
<ItemGroup>
<ItemGroup>
<Resource Include="Images\cmd_template.png" />
<Resource Include="Images\cmd_template.png" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\icon_cmd_32x32.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
\ No newline at end of file
VIZ.Package.Module/Control/Controller/ControlController.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/BooleanEdit/BooleanEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/Clock/ClockEditPanelModel.cs
View file @
ed4d37f9
This diff is collapsed.
Click to expand it.
VIZ.Package.Module/ControlObject/FieldEdit/Edit/CustomVideoEdit/CustomVideoEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/DupletEdit/DupletEditPanel.xaml
View file @
ed4d37f9
...
@@ -35,14 +35,16 @@
...
@@ -35,14 +35,16 @@
<TextBlock Text="X:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="0"></TextBlock>
<TextBlock Text="X:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="0"></TextBlock>
<common:LeftRightTextEdit Grid.Row="0" Grid.Column="1" Height="30"
<common:LeftRightTextEdit Grid.Row="0" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric"
Mask="##########.###"
MaskType="Numeric"
EditValue="{Binding Path=X,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
EditValue="{Binding Path=X,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<TextBlock Text="Y:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="1"></TextBlock>
<TextBlock Text="Y:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="1"></TextBlock>
<common:LeftRightTextEdit Grid.Row="1" Grid.Column="1" Height="30"
<common:LeftRightTextEdit Grid.Row="1" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric"
Mask="##########.###"
MaskType="Numeric"
EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<!-- 编辑模式 -->
<!-- 编辑模式 -->
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/DupletEdit/DupletEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/FloatEdit/FloatEditPanel.xaml
View file @
ed4d37f9
...
@@ -26,8 +26,9 @@
...
@@ -26,8 +26,9 @@
Width="200" Grid.Column="1"
Width="200" Grid.Column="1"
Margin="20,0,0,0"
Margin="20,0,0,0"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric"
Mask="##########.###"
MaskType="Numeric"
EditValue="{Binding Path=EditValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></dxe:TextEdit>
EditValue="{Binding Path=EditValue,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></dxe:TextEdit>
</Grid>
</Grid>
</UserControl>
</UserControl>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/FloatEdit/FloatEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/FontEdit/FontEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ImageEdit/ImageEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/IntegerEdit/IntegerEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/BooleanListCellEdit.xaml.cs
View file @
ed4d37f9
...
@@ -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
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/DupletListCellEdit.xaml.cs
View file @
ed4d37f9
...
@@ -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
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FloatListCellEdit.xaml
View file @
ed4d37f9
...
@@ -17,6 +17,9 @@
...
@@ -17,6 +17,9 @@
d:DesignHeight="30" d:DesignWidth="200">
d:DesignHeight="30" d:DesignWidth="200">
<Grid>
<Grid>
<dxe:TextEdit x:Name="PART_Text" Margin="1" Background="Transparent" ShowBorder="False"
<dxe:TextEdit x:Name="PART_Text" Margin="1" Background="Transparent" ShowBorder="False"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric" EditValueChanged="EditValueChanged"></dxe:TextEdit>
MaskType="Numeric" EditValueChanged="EditValueChanged"></dxe:TextEdit>
</Grid>
</Grid>
</local:ListCellEditBase>
</local:ListCellEditBase>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FloatListCellEdit.xaml.cs
View file @
ed4d37f9
...
@@ -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
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/FontListCellEdit.xaml.cs
View file @
ed4d37f9
...
@@ -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
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/ImageListCellEdit.xaml.cs
View file @
ed4d37f9
...
@@ -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
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/IntegerListCellEdit.xaml.cs
View file @
ed4d37f9
...
@@ -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
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/RichTextListCellEdit.xaml.cs
View file @
ed4d37f9
...
@@ -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
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TextListCellEdit.xaml.cs
View file @
ed4d37f9
...
@@ -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
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ListEdit/CellEdit/TripletListCellEdit.xaml.cs
View file @
ed4d37f9
...
@@ -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
,
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/RadioEdit/RadioEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/RichTextEdit/RichTextEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ScrollElementsEdit/ScrollElementsEditPanel.xaml
View file @
ed4d37f9
...
@@ -103,14 +103,10 @@
...
@@ -103,14 +103,10 @@
<!-- 数据 -->
<!-- 数据 -->
<dxg:GridControl ItemsSource="{Binding Path=ItemsSource}" ShowBorder="True" Grid.Row="1" AllowDrop="True"
<dxg:GridControl ItemsSource="{Binding Path=ItemsSource}" ShowBorder="True" Grid.Row="1" AllowDrop="True"
ColumnsSource="{Binding Path=Columns}" SelectionMode="
Cell
" Margin="10"
ColumnsSource="{Binding Path=Columns}" SelectionMode="
Row
" Margin="10"
SelectedItem="{Binding Path=SelectedValue}"
SelectedItem="{Binding Path=SelectedValue}"
SelectedItems="{Binding Path=SelectedValues}"
ColumnGeneratorTemplate="{StaticResource ColumnTemplate}">
ColumnGeneratorTemplate="{StaticResource ColumnTemplate}">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="SelectionChanged" PassEventArgsToCommand="True" Command="{Binding Path=SelectionChangedCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<dxg:GridControl.ContextMenu>
<dxg:GridControl.ContextMenu>
<ContextMenu>
<ContextMenu>
<MenuItem Header="添加" Command="{Binding Path=PlacementTarget.DataContext.AddCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="添加" Command="{Binding Path=PlacementTarget.DataContext.AddCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/ScrollElementsEdit/ScrollElementsEditPanelModel.cs
View file @
ed4d37f9
...
@@ -34,6 +34,9 @@ namespace VIZ.Package.Module
...
@@ -34,6 +34,9 @@ namespace VIZ.Package.Module
{
{
// 初始化命令
// 初始化命令
this
.
InitCommand
();
this
.
InitCommand
();
// 初始化消息
this
.
InitMessage
();
}
}
/// <summary>
/// <summary>
...
@@ -51,6 +54,16 @@ namespace VIZ.Package.Module
...
@@ -51,6 +54,16 @@ namespace VIZ.Package.Module
this
.
PreviewSetPosCommand
=
new
VCommand
(
this
.
PreviewSetPos
);
this
.
PreviewSetPosCommand
=
new
VCommand
(
this
.
PreviewSetPos
);
}
}
/// <summary>
/// 初始化消息
/// </summary>
private
void
InitMessage
()
{
ApplicationDomainEx
.
MessageManager
.
Register
<
PageOpenMessage
>(
this
,
this
.
OnPageOpenMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageSaveMessage
>(
this
,
this
.
OnPageSaveMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
PageSaveAsMessage
>(
this
,
this
.
OnPageSaveAsMessage
);
}
// ============================================================
// ============================================================
// Service & Controller
// Service & Controller
// ============================================================
// ============================================================
...
@@ -149,6 +162,20 @@ namespace VIZ.Package.Module
...
@@ -149,6 +162,20 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
#
region
SelectedValues
--
当前选中项的集合
private
ObservableCollection
<
ExpandoObject
>
selectedValues
=
new
ObservableCollection
<
ExpandoObject
>();
/// <summary>
/// 当前选中项的集合
/// </summary>
public
ObservableCollection
<
ExpandoObject
>
SelectedValues
{
get
{
return
selectedValues
;
}
set
{
selectedValues
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
SelectedValues
));
}
}
#
endregion
#
region
ScrollElementPackage
--
底飞数据包
#
region
ScrollElementPackage
--
底飞数据包
private
ScrollElementPackageEntity
scrollElementPackage
;
private
ScrollElementPackageEntity
scrollElementPackage
;
...
@@ -255,10 +282,14 @@ namespace VIZ.Package.Module
...
@@ -255,10 +282,14 @@ namespace VIZ.Package.Module
/// </summary>
/// </summary>
private
void
Remove
()
private
void
Remove
()
{
{
if
(
this
.
SelectedValue
==
null
)
if
(
this
.
SelectedValue
s
==
null
||
this
.
SelectedValues
.
Count
==
0
)
return
;
return
;
this
.
ItemsSource
.
Remove
(
this
.
SelectedValue
);
List
<
ExpandoObject
>
list
=
this
.
SelectedValues
.
ToList
();
foreach
(
ExpandoObject
item
in
list
)
{
this
.
ItemsSource
.
Remove
(
item
);
}
}
}
#
endregion
#
endregion
...
@@ -336,6 +367,57 @@ namespace VIZ.Package.Module
...
@@ -336,6 +367,57 @@ namespace VIZ.Package.Module
// Message
// Message
// ============================================================
// ============================================================
/// <summary>
/// 页打开消息
/// </summary>
/// <param name="msg">消息</param>
private
void
OnPageOpenMessage
(
PageOpenMessage
msg
)
{
this
.
ScrollElementPackage
=
null
;
this
.
SceneTemplateModels
=
null
;
this
.
SelectedSceneTemplateModel
=
null
;
this
.
Columns
=
null
;
this
.
ItemsSource
=
null
;
this
.
SelectedValue
=
null
;
this
.
PreviewPosition
=
0
;
}
/// <summary>
/// 页保存消息
/// </summary>
/// <param name="msg">消息</param>
private
void
OnPageSaveMessage
(
PageSaveMessage
msg
)
{
if
(
this
.
ScrollElementPackage
==
null
||
ApplicationDomainEx
.
CurrentPage
==
null
||
this
.
ControlField
==
null
)
return
;
if
(
this
.
ScrollElementPackage
.
TemplateOrPageID
!=
ApplicationDomainEx
.
CurrentPage
.
GetTemplateIdOrPageId
())
return
;
if
(
this
.
ScrollElementPackage
.
FieldIdentifier
!=
this
.
ControlField
.
FieldIdentifier
)
return
;
this
.
scrollElementService
.
SaveScrollElementPackageToDB
(
this
.
ScrollElementPackage
);
}
/// <summary>
/// 页另存为消息
/// </summary>
/// <param name="msg">消息</param>
private
void
OnPageSaveAsMessage
(
PageSaveAsMessage
msg
)
{
if
(
this
.
ScrollElementPackage
==
null
||
ApplicationDomainEx
.
CurrentPage
==
null
||
this
.
ControlField
==
null
)
return
;
if
(
this
.
ScrollElementPackage
.
TemplateOrPageID
!=
ApplicationDomainEx
.
CurrentPage
.
GetTemplateIdOrPageId
())
return
;
if
(
this
.
ScrollElementPackage
.
FieldIdentifier
!=
this
.
ControlField
.
FieldIdentifier
)
return
;
this
.
scrollElementService
.
SaveScrollElementPackageToDB
(
this
.
ScrollElementPackage
);
}
// ============================================================
// ============================================================
// Public Function
// Public Function
// ============================================================
// ============================================================
...
@@ -355,7 +437,10 @@ namespace VIZ.Package.Module
...
@@ -355,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
);
...
@@ -364,10 +449,14 @@ namespace VIZ.Package.Module
...
@@ -364,10 +449,14 @@ namespace VIZ.Package.Module
// 只处理文本与图片类型
// 只处理文本与图片类型
List
<
ControlFieldNodeModel
>
fields
=
new
List
<
ControlFieldNodeModel
>();
List
<
ControlFieldNodeModel
>
fields
=
new
List
<
ControlFieldNodeModel
>();
if
(
this
.
ScrollElementPackage
!=
null
&&
this
.
ScrollElementPackage
.
TemplateFields
!=
null
)
{
foreach
(
var
field
in
this
.
ScrollElementPackage
.
TemplateFields
)
foreach
(
var
field
in
this
.
ScrollElementPackage
.
TemplateFields
)
{
{
fields
.
Add
(
this
.
vizCommandControlObjectService
.
CreateControlFieldNodeModeFromEntity
(
field
));
fields
.
Add
(
this
.
vizCommandControlObjectService
.
CreateControlFieldNodeModeFromEntity
(
field
));
}
}
}
this
.
Columns
=
this
.
scrollElementService
.
GetDynamicColumns
(
ApplicationDomainEx
.
CurrentPage
,
controlObject
,
fields
).
ToObservableCollection
();
this
.
Columns
=
this
.
scrollElementService
.
GetDynamicColumns
(
ApplicationDomainEx
.
CurrentPage
,
controlObject
,
fields
).
ToObservableCollection
();
this
.
ItemsSource
=
this
.
scrollElementService
.
GetDynamicList
(
fields
,
this
.
ControlField
.
Value
).
ToObservableCollection
();
this
.
ItemsSource
=
this
.
scrollElementService
.
GetDynamicList
(
fields
,
this
.
ControlField
.
Value
).
ToObservableCollection
();
...
@@ -418,6 +507,9 @@ namespace VIZ.Package.Module
...
@@ -418,6 +507,9 @@ namespace VIZ.Package.Module
/// <returns>字段值</returns>
/// <returns>字段值</returns>
public
override
string
GetFieldValue
()
public
override
string
GetFieldValue
()
{
{
if
(
this
.
ScrollElementPackage
==
null
)
return
string
.
Empty
;
string
value
=
this
.
scrollElementService
.
GetScrollElementValue
(
this
.
ScrollElementPackage
.
TemplateScenePath
,
this
.
ScrollElementPackage
.
TemplateFields
,
this
.
ItemsSource
,
VizScrollElementRootTag
.
entry
);
string
value
=
this
.
scrollElementService
.
GetScrollElementValue
(
this
.
ScrollElementPackage
.
TemplateScenePath
,
this
.
ScrollElementPackage
.
TemplateFields
,
this
.
ItemsSource
,
VizScrollElementRootTag
.
entry
);
return
value
;
return
value
;
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/TextEdit/TextEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/TripletEdit/TripletEditPanel.xaml
View file @
ed4d37f9
...
@@ -36,20 +36,23 @@
...
@@ -36,20 +36,23 @@
<TextBlock Text="X:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="0"></TextBlock>
<TextBlock Text="X:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="0"></TextBlock>
<common:LeftRightTextEdit Grid.Row="0" Grid.Column="1" Height="30"
<common:LeftRightTextEdit Grid.Row="0" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric"
Mask="##########.###"
MaskType="Numeric"
EditValue="{Binding Path=X,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
EditValue="{Binding Path=X,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<TextBlock Text="Y:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="1"></TextBlock>
<TextBlock Text="Y:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="1"></TextBlock>
<common:LeftRightTextEdit Grid.Row="1" Grid.Column="1" Height="30"
<common:LeftRightTextEdit Grid.Row="1" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric"
Mask="##########.###"
MaskType="Numeric"
EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
EditValue="{Binding Path=Y,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<TextBlock Text="Z:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="2"></TextBlock>
<TextBlock Text="Z:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,20,0" Grid.Row="2"></TextBlock>
<common:LeftRightTextEdit Grid.Row="2" Grid.Column="1" Height="30"
<common:LeftRightTextEdit Grid.Row="2" Grid.Column="1" Height="30"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.ValueAfterDelete="ZeroThenNull"
dxe:NumericMaskOptions.HideInsignificantZeros="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
MaskType="Numeric"
Mask="##########.###"
MaskType="Numeric"
EditValue="{Binding Path=Z,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
EditValue="{Binding Path=Z,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"></common:LeftRightTextEdit>
<!-- 编辑模式 -->
<!-- 编辑模式 -->
...
...
VIZ.Package.Module/ControlObject/FieldEdit/Edit/TripletEdit/TripletEditPanelModel.cs
View file @
ed4d37f9
...
@@ -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
);
...
...
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditView.xaml
View file @
ed4d37f9
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
</StackPanel>
</StackPanel>
</Border>
</Border>
<!-- 字段编辑 -->
<!-- 字段编辑 -->
<fcommon:NavigationControl ItemsSource="{Binding Path=NavigationConfigs}" Grid.Row="2" Margin="0,5,0,0"
<fcommon:NavigationControl ItemsSource="{Binding Path=NavigationConfigs}" Grid.Row="2" Margin="0,5,0,0"
PreviewMouseLeftButtonDown="NavigationControl_PreviewMouseLeftButtonDown"
SelectedValue="{Binding Path=SelectedNavigationConfig,Mode=OneWay}"></fcommon:NavigationControl>
SelectedValue="{Binding Path=SelectedNavigationConfig,Mode=OneWay}"></fcommon:NavigationControl>
</Grid>
</Grid>
</UserControl>
</UserControl>
VIZ.Package.Module/ControlObject/FieldEdit/View/FieldEditView.xaml.cs
View file @
ed4d37f9
...
@@ -27,5 +27,10 @@ namespace VIZ.Package.Module
...
@@ -27,5 +27,10 @@ namespace VIZ.Package.Module
WPFHelper
.
BindingViewModel
(
this
,
new
FieldEditViewModel
());
WPFHelper
.
BindingViewModel
(
this
,
new
FieldEditViewModel
());
}
}
private
void
NavigationControl_PreviewMouseLeftButtonDown
(
object
sender
,
MouseButtonEventArgs
e
)
{
}
}
}
}
}
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModel.cs
View file @
ed4d37f9
...
@@ -148,9 +148,7 @@ namespace VIZ.Package.Module
...
@@ -148,9 +148,7 @@ namespace VIZ.Package.Module
{
{
// 当前没有打开的页或模板 || 当前没有打开的项目
// 当前没有打开的页或模板 || 当前没有打开的项目
if
(
ApplicationDomainEx
.
CurrentPage
==
null
||
ApplicationDomainEx
.
ProjectDbContext
==
null
)
if
(
ApplicationDomainEx
.
CurrentPage
==
null
||
ApplicationDomainEx
.
ProjectDbContext
==
null
)
{
return
;
return
;
}
// 字段树服务不可用
// 字段树服务不可用
IFieldTreeService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IFieldTreeService
>(
ViewServiceKeys
.
FIELD_TREE_SERVICE
);
IFieldTreeService
service
=
ApplicationDomainEx
.
ServiceManager
.
GetService
<
IFieldTreeService
>(
ViewServiceKeys
.
FIELD_TREE_SERVICE
);
...
...
VIZ.Package.Module/ControlObject/FieldTree/ViewModel/FieldTreeViewModel.cs
View file @
ed4d37f9
...
@@ -153,7 +153,11 @@ namespace VIZ.Package.Module
...
@@ -153,7 +153,11 @@ namespace VIZ.Package.Module
ThreadHelper
.
SafeRun
(
action
:
()
=>
ThreadHelper
.
SafeRun
(
action
:
()
=>
{
{
if
(
msg
.
Page
.
PageType
!=
PageType
.
Scene
)
if
(
msg
.
Page
.
PageType
!=
PageType
.
Scene
)
{
this
.
ControlObject
=
null
;
this
.
SelectedControlField
=
null
;
return
;
return
;
}
// 从本地数据库获取控制对象
// 从本地数据库获取控制对象
ControlObjectEntity
entity
=
this
.
controlObjectService
.
GetControlObject
(
msg
.
Page
)?.
FirstOrDefault
();
ControlObjectEntity
entity
=
this
.
controlObjectService
.
GetControlObject
(
msg
.
Page
)?.
FirstOrDefault
();
...
@@ -170,7 +174,7 @@ namespace VIZ.Package.Module
...
@@ -170,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
;
...
...
VIZ.Package.Module/Help/About/View/AboutPageCommandWindow.xaml
0 → 100644
View file @
ed4d37f9
<dx:ThemedWindow x:Class="VIZ.Package.Module.AboutPageCommandWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:local="clr-namespace:VIZ.Package.Module"
mc:Ignorable="d" d:Background="Black"
d:DataContext="{d:DesignInstance Type=local:AboutCustomControlFieldWindowModel}"
WindowStartupLocation="CenterScreen"
Title="摩羯座播控系统" Height="700" Width="1200">
<Grid>
<RichTextBox IsReadOnly="True" Background="Transparent" Margin="5" Foreground="White">
<FlowDocument>
<!-- 注册字段 -->
<Paragraph FontSize="18" FontWeight="Bold">页命令</Paragraph>
<Table>
<Table.Columns>
<TableColumn Width="100"></TableColumn>
<TableColumn Width="160"></TableColumn>
<TableColumn Width="Auto"></TableColumn>
<TableColumn Width="Auto"></TableColumn>
</Table.Columns>
<TableRowGroup>
<TableRow>
<TableCell>
<Paragraph FontSize="14" FontWeight="Bold">命令</Paragraph>
</TableCell>
<TableCell>
<Paragraph FontSize="14" FontWeight="Bold">参数</Paragraph>
</TableCell>
<TableCell>
<Paragraph FontSize="14" FontWeight="Bold">示例</Paragraph>
</TableCell>
<TableCell>
<Paragraph FontSize="14" FontWeight="Bold">示例描述</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Paragraph Margin="0,10,0,0">delay</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">毫秒</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">delay 5000</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">延时5000毫秒</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Paragraph Margin="0,10,0,0">log</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">日志内容</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">log hello word!</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">在操作日志中记录"hello word!"</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Paragraph Margin="0,10,0,0">send</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">VIZ命令</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">send RENDERER*MAIN_LAYER SET_OBJECT SCENE*TestScene</Paragraph>
</TableCell>
<TableCell>
<Paragraph Margin="0,10,0,0">向Viz引擎发送命令"RENDERER*MAIN_LAYER SET_OBJECT SCENE*TestScene"</Paragraph>
</TableCell>
</TableRow>
</TableRowGroup>
</Table>
</FlowDocument>
</RichTextBox>
</Grid>
</dx:ThemedWindow>
VIZ.Package.Module/Help/About/View/AboutPageCommandWindow.xaml.cs
0 → 100644
View file @
ed4d37f9
using
DevExpress.Xpf.Core
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Windows
;
using
System.Windows.Controls
;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Shapes
;
using
VIZ.Framework.Core
;
namespace
VIZ.Package.Module
{
/// <summary>
/// Interaction logic for AboutPageCommandWindow.xaml
/// </summary>
public
partial
class
AboutPageCommandWindow
:
ThemedWindow
{
public
AboutPageCommandWindow
()
{
InitializeComponent
();
WPFHelper
.
BindingViewModel
(
this
,
new
AboutPageCommandWindowModel
());
}
}
}
VIZ.Package.Module/Help/About/View/AboutWindow.xaml
View file @
ed4d37f9
...
@@ -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>
VIZ.Package.Module/Help/About/ViewModel/AboutPageCommandWindowModel.cs
0 → 100644
View file @
ed4d37f9
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
namespace
VIZ.Package.Module
{
/// <summary>
/// 关于页命令模型
/// </summary>
public
class
AboutPageCommandWindowModel
:
ViewModelBase
{
public
AboutPageCommandWindowModel
()
{
}
// ==========================================================
// 属性
// ==========================================================
// ==========================================================
// 命令
// ==========================================================
}
}
VIZ.Package.Module/Main/View/MainTopView.xaml
View file @
ed4d37f9
...
@@ -87,6 +87,8 @@
...
@@ -87,6 +87,8 @@
Command="{Binding Path=AboutCommand}"/>
Command="{Binding Path=AboutCommand}"/>
<dxb:BarButtonItem Content="关于自定义控制字段" Glyph="/VIZ.Package.Module.Resource;component/Icons/icon_custom_32x32.png"
<dxb:BarButtonItem Content="关于自定义控制字段" Glyph="/VIZ.Package.Module.Resource;component/Icons/icon_custom_32x32.png"
Command="{Binding Path=AboutCustomControlFieldCommand}"/>
Command="{Binding Path=AboutCustomControlFieldCommand}"/>
<dxb:BarButtonItem Content="关于页命令" Glyph="/VIZ.Package.Module.Resource;component/Icons/icon_cmd_32x32.png"
Command="{Binding Path=AboutPageCommandCommand}"/>
</dxb:BarSubItem>
</dxb:BarSubItem>
</dxb:MainMenuControl>
</dxb:MainMenuControl>
</StackPanel>
</StackPanel>
...
...
VIZ.Package.Module/Main/ViewModel/MainTopViewModel.cs
View file @
ed4d37f9
...
@@ -53,6 +53,7 @@ namespace VIZ.Package.Module
...
@@ -53,6 +53,7 @@ namespace VIZ.Package.Module
this
.
ResetLayoutCommand
=
new
VCommand
(
this
.
ResetLayout
);
this
.
ResetLayoutCommand
=
new
VCommand
(
this
.
ResetLayout
);
this
.
AboutCommand
=
new
VCommand
(
this
.
About
);
this
.
AboutCommand
=
new
VCommand
(
this
.
About
);
this
.
AboutCustomControlFieldCommand
=
new
VCommand
(
this
.
AboutCustomControlField
);
this
.
AboutCustomControlFieldCommand
=
new
VCommand
(
this
.
AboutCustomControlField
);
this
.
AboutPageCommandCommand
=
new
VCommand
(
this
.
AboutPageCommand
);
}
}
/// <summary>
/// <summary>
...
@@ -267,7 +268,7 @@ namespace VIZ.Package.Module
...
@@ -267,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
);
}
}
...
@@ -465,6 +466,25 @@ namespace VIZ.Package.Module
...
@@ -465,6 +466,25 @@ namespace VIZ.Package.Module
#
endregion
#
endregion
#
region
AboutPageCommandCommand
--
关于页命令命令
/// <summary>
/// 关于页命令命令
/// </summary>
public
VCommand
AboutPageCommandCommand
{
get
;
set
;
}
/// <summary>
/// 关于页命令
/// </summary>
private
void
AboutPageCommand
()
{
AboutPageCommandWindow
window
=
new
AboutPageCommandWindow
();
window
.
Owner
=
ApplicationDomainEx
.
MainWindow
;
window
.
ShowDialog
();
}
#
endregion
// =====================================================================
// =====================================================================
// Message
// Message
// =====================================================================
// =====================================================================
...
...
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
View file @
ed4d37f9
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
xmlns:common="clr-namespace:VIZ.Package.Common;assembly=VIZ.Package.Common"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
...
@@ -31,8 +32,8 @@
...
@@ -31,8 +32,8 @@
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>
<resource:RowHandleConverter x:Key="RowHandleConverter"></resource:RowHandleConverter>
<resource:RowHandleConverter x:Key="RowHandleConverter"></resource:RowHandleConverter>
<resource:PageThumbnail
Converter x:Key="PageThumbnail
Converter"
<resource:PageThumbnail
MultiConverter x:Key="PageThumbnailMulti
Converter"
CommandThumbnail="/VIZ.Package.Module.Resource;component/Images/cmd_template.png"></resource:PageThumbnail
Converter>
CommandThumbnail="/VIZ.Package.Module.Resource;component/Images/cmd_template.png"></resource:PageThumbnailMulti
Converter>
<fcore:Bitmap2ImageSourceConverter x:Key="Bitmap2ImageSourceConverter"></fcore:Bitmap2ImageSourceConverter>
<fcore:Bitmap2ImageSourceConverter x:Key="Bitmap2ImageSourceConverter"></fcore:Bitmap2ImageSourceConverter>
<fcore:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:PageType}"></fcore:Enum2EnumDescriptionConverter>
<fcore:Enum2EnumDescriptionConverter x:Key="Enum2EnumDescriptionConverter" EnumType="{x:Type storage:PageType}"></fcore:Enum2EnumDescriptionConverter>
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleBgConverter"
<fcore:Bool2SolidColorBrushConverter x:Key="RowHandleBgConverter"
...
@@ -127,9 +128,8 @@
...
@@ -127,9 +128,8 @@
<dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False">
<dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False">
<dxg:GridColumn.CellTemplate>
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<DataTemplate>
<Grid Background="{Binding Path=Row.IsOpen,Converter={StaticResource RowHandleBgConverter}}">
<Grid>
<Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}"
<Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}"></Rectangle>
Width="10" HorizontalAlignment="Left"></Rectangle>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
</Grid>
</Grid>
</DataTemplate>
</DataTemplate>
...
@@ -175,9 +175,14 @@
...
@@ -175,9 +175,14 @@
VisibleIndex="{Binding Path=VisibleIndex,Mode=TwoWay}">
VisibleIndex="{Binding Path=VisibleIndex,Mode=TwoWay}">
<common:GridColumnResizeMinHeight.CellTemplate>
<common:GridColumnResizeMinHeight.CellTemplate>
<DataTemplate>
<DataTemplate>
<fcommon:ResizeImageControl ImageSource="{Binding Path=Row,Converter={StaticResource PageThumbnailConverter}}"
<fcommon:ResizeImageControl IconSource="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"
IconSource="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"
ShowImageMinWidth="50" ShowImageMinHeight="50">
ShowImageMinWidth="50" ShowImageMinHeight="50">
<fcommon:ResizeImageControl.ImageSource>
<MultiBinding Converter="{StaticResource PageThumbnailMultiConverter}">
<Binding Path="Row.ThumbnailBitmap"/>
<Binding Path="Row.PageType"/>
</MultiBinding>
</fcommon:ResizeImageControl.ImageSource>
</fcommon:ResizeImageControl>
</fcommon:ResizeImageControl>
</DataTemplate>
</DataTemplate>
</common:GridColumnResizeMinHeight.CellTemplate>
</common:GridColumnResizeMinHeight.CellTemplate>
...
@@ -398,6 +403,26 @@
...
@@ -398,6 +403,26 @@
SelectedItems="{Binding Path=SelectedPages}"
SelectedItems="{Binding Path=SelectedPages}"
ColumnsSource="{Binding ElementName=uc, Path=DataContext.Columns}"
ColumnsSource="{Binding ElementName=uc, Path=DataContext.Columns}"
ColumnGeneratorTemplateSelector="{StaticResource ResourceKey=ColumnDefintionGeneratorTemplateSelector}">
ColumnGeneratorTemplateSelector="{StaticResource ResourceKey=ColumnDefintionGeneratorTemplateSelector}">
<dxg:GridControl.Resources>
<Style TargetType="{x:Type dxg:RowControl}">
<Style.Triggers>
<DataTrigger Binding="{Binding Row.IsOpen}" Value="True">
<Setter Property="Background" Value="#AA0078D7"></Setter>
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Row.IsOpen}" Value="True"></Condition>
<Condition Binding="{Binding IsActive,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type dxdo:LayoutPanel}}}" Value="True"></Condition>
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter Property="Background" Value="#FF0078D7"></Setter>
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</dxg:GridControl.Resources>
<dxg:GridControl.ContextMenu>
<dxg:GridControl.ContextMenu>
<common:ContextMenuEx BindingTargetType="{x:Type dx:DXTabControl}">
<common:ContextMenuEx BindingTargetType="{x:Type dx:DXTabControl}">
<MenuItem Header="添加命令页" Command="{Binding Path=DataContext.CreateCmdPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type common:ContextMenuEx}}}"/>
<MenuItem Header="添加命令页" Command="{Binding Path=DataContext.CreateCmdPageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type common:ContextMenuEx}}}"/>
...
...
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
View file @
ed4d37f9
...
@@ -4,9 +4,11 @@
...
@@ -4,9 +4,11 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxcn="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
...
@@ -119,9 +121,28 @@
...
@@ -119,9 +121,28 @@
</MultiBinding>
</MultiBinding>
</Grid.IsHitTestVisible>
</Grid.IsHitTestVisible>
<dxg:GridControl ItemsSource="{Binding Path=SceneTemplateModels}" ShowBorder="False" SelectionMode="Row"
<dxg:GridControl
x:Name="grid"
ItemsSource="{Binding Path=SceneTemplateModels}" ShowBorder="False" SelectionMode="Row"
SelectedItem="{Binding Path=SelectedSceneTemplateModel}"
x:Name="t"
SelectedItem="{Binding Path=SelectedSceneTemplateModel}"
SelectedItems="{Binding Path=SelectedSceneTemplateModels}">
SelectedItems="{Binding Path=SelectedSceneTemplateModels}">
<dxg:GridControl.Resources>
<Style TargetType="{x:Type dxg:RowControl}">
<Style.Triggers>
<DataTrigger Binding="{Binding Row.IsOpen}" Value="True">
<Setter Property="Background" Value="#AA0078D7"></Setter>
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding Row.IsOpen}" Value="True"></Condition>
<Condition Binding="{Binding IsActive,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type dxdo:LayoutPanel}}}" Value="True"></Condition>
</MultiDataTrigger.Conditions>
<MultiDataTrigger.Setters>
<Setter Property="Background" Value="#FF0078D7"></Setter>
</MultiDataTrigger.Setters>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</dxg:GridControl.Resources>
<dxg:GridControl.ContextMenu>
<dxg:GridControl.ContextMenu>
<ContextMenu>
<ContextMenu>
<MenuItem Header="打开" Command="{Binding Path=PlacementTarget.DataContext.OpenScenePageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
<MenuItem Header="打开" Command="{Binding Path=PlacementTarget.DataContext.OpenScenePageCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ContextMenu}}"/>
...
@@ -136,9 +157,8 @@
...
@@ -136,9 +157,8 @@
<dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False">
<dxg:GridColumn Header="序号" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="40" AllowResizing="False">
<dxg:GridColumn.CellTemplate>
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<DataTemplate>
<Grid Background="{Binding Path=Row.IsOpen,Converter={StaticResource RowHandleBgConverter}}">
<Grid>
<Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}"
<Rectangle Fill="{Binding Path=Row.IsTake,Converter={StaticResource RowHandleTakeConverter}}"></Rectangle>
Width="10" HorizontalAlignment="Left"></Rectangle>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
<TextBlock Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding RowData.RowHandle,Converter={StaticResource RowHandleConverter}}"></TextBlock>
</Grid>
</Grid>
</DataTemplate>
</DataTemplate>
...
...
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml.cs
View file @
ed4d37f9
using
System
;
using
DevExpress.Xpf.Docking
;
using
DevExpress.Xpf.Grid
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
...
...
VIZ.Package.Module/PageCommand/Controller/PageCommandController.cs
View file @
ed4d37f9
...
@@ -5,6 +5,8 @@ using System.Text;
...
@@ -5,6 +5,8 @@ using System.Text;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Core
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Domain
;
using
VIZ.Package.Service
;
using
VIZ.Package.Storage
;
namespace
VIZ.Package.Module
namespace
VIZ.Package.Module
{
{
...
@@ -14,6 +16,11 @@ namespace VIZ.Package.Module
...
@@ -14,6 +16,11 @@ namespace VIZ.Package.Module
public
class
PageCommandController
public
class
PageCommandController
{
{
/// <summary>
/// <summary>
/// 操作日志服务
/// </summary>
private
RecordLogService
recordLogService
=
new
RecordLogService
();
/// <summary>
/// 延时
/// 延时
/// </summary>
/// </summary>
/// <remarks>
/// <remarks>
...
@@ -32,6 +39,15 @@ namespace VIZ.Package.Module
...
@@ -32,6 +39,15 @@ namespace VIZ.Package.Module
public
const
string
CMD_SEND
=
"send"
;
public
const
string
CMD_SEND
=
"send"
;
/// <summary>
/// <summary>
/// 记录日志
/// </summary>
/// <remarks>
/// 示例:log xxx
/// 描述:记录命令日志
/// </remarks>
public
const
string
CMD_LOG
=
"log"
;
/// <summary>
/// 开始执行命令
/// 开始执行命令
/// </summary>
/// </summary>
/// <param name="pageBase">页</param>
/// <param name="pageBase">页</param>
...
@@ -83,6 +99,7 @@ namespace VIZ.Package.Module
...
@@ -83,6 +99,7 @@ namespace VIZ.Package.Module
{
{
case
CMD_DELAY
:
this
.
ExecuteLine_Delay
(
pageBase
,
conn
,
cmd
,
args
);
break
;
case
CMD_DELAY
:
this
.
ExecuteLine_Delay
(
pageBase
,
conn
,
cmd
,
args
);
break
;
case
CMD_SEND
:
this
.
ExecuteLine_Send
(
pageBase
,
conn
,
cmd
,
args
);
break
;
case
CMD_SEND
:
this
.
ExecuteLine_Send
(
pageBase
,
conn
,
cmd
,
args
);
break
;
case
CMD_LOG
:
this
.
ExecuteLine_Log
(
pageBase
,
conn
,
cmd
,
args
);
break
;
}
}
}
}
...
@@ -117,5 +134,18 @@ namespace VIZ.Package.Module
...
@@ -117,5 +134,18 @@ namespace VIZ.Package.Module
conn
.
EndpointManager
.
Send
(
args
);
conn
.
EndpointManager
.
Send
(
args
);
}
}
/// <summary>
/// 执行 -- 记录命令日志
/// </summary>
/// <param name="pageBase">页</param>
/// <param name="conn">连接</param>
/// <param name="cmd">命令</param>
/// <param name="args">参数</param>
private
void
ExecuteLine_Log
(
PageModelBase
pageBase
,
ConnModel
conn
,
string
cmd
,
string
args
)
{
// 记录操作日志
this
.
recordLogService
.
AppendLog
(
ApplicationConstants
.
APPLICATION_GROUP_NAME
,
RecordLogOperate
.
System
,
RecordLogTrigger
.
System
,
RecordLogConstants
.
SYSTEM_PAGE_CMD_LOG
,
args
);
}
}
}
}
}
VIZ.Package.Module/PageCommand/PageCommandLifeCycle.cs
View file @
ed4d37f9
...
@@ -42,6 +42,7 @@ namespace VIZ.Package.Module
...
@@ -42,6 +42,7 @@ namespace VIZ.Package.Module
info
.
ID
=
PLUGIN_ID
;
info
.
ID
=
PLUGIN_ID
;
info
.
Name
=
PLUGIN_NAME
;
info
.
Name
=
PLUGIN_NAME
;
info
.
ViewType
=
typeof
(
PageCommandView
);
info
.
ViewType
=
typeof
(
PageCommandView
);
info
.
Icon
=
"/VIZ.Package.Module.Resource;component/Icons/icon_cmd_32x32.png"
;
return
info
;
return
info
;
}
}
...
...
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
View file @
ed4d37f9
...
@@ -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
);
}
}
// 发送节目单项初始化完成消息
// 发送节目单项初始化完成消息
...
...
VIZ.Package.Module/Setting/PluginMapping/View/PluginMappingSettingView.xaml
View file @
ed4d37f9
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</ResourceDictionary>
</ResourceDictionary>
</UserControl.Resources>
</UserControl.Resources>
<GroupBox Header="
插件
映射" Padding="10" Margin="10">
<GroupBox Header="
数据模板
映射" Padding="10" Margin="10">
<Grid>
<Grid>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="40"></RowDefinition>
<RowDefinition Height="40"></RowDefinition>
...
...
VIZ.Package.Module/VIZ.Package.Module.csproj
View file @
ed4d37f9
...
@@ -129,7 +129,11 @@
...
@@ -129,7 +129,11 @@
<Compile Include="ControlObject\FieldEdit\Edit\ScrollElementsEdit\ScrollElementsEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\ScrollElementsEdit\ScrollElementsEditPanelModel.cs" />
<Compile Include="Control\Controller\ControlController.cs" />
<Compile Include="Control\Controller\ControlController.cs" />
<Compile Include="Control\Service\IControlService.cs" />
<Compile Include="Control\Service\IControlService.cs" />
<Compile Include="Help\About\ViewModel\AboutPageCommandWindowModel.cs" />
<Compile Include="Help\About\ViewModel\AboutCustomControlFieldWindowModel.cs" />
<Compile Include="Help\About\ViewModel\AboutCustomControlFieldWindowModel.cs" />
<Compile Include="Help\About\View\AboutPageCommandWindow.xaml.cs">
<DependentUpon>AboutPageCommandWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Help\About\View\AboutCustomControlFieldWindow.xaml.cs">
<Compile Include="Help\About\View\AboutCustomControlFieldWindow.xaml.cs">
<DependentUpon>AboutCustomControlFieldWindow.xaml</DependentUpon>
<DependentUpon>AboutCustomControlFieldWindow.xaml</DependentUpon>
</Compile>
</Compile>
...
@@ -474,6 +478,10 @@
...
@@ -474,6 +478,10 @@
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<SubType>Designer</SubType>
</Page>
</Page>
<Page Include="Help\About\View\AboutPageCommandWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Help\About\View\AboutCustomControlFieldWindow.xaml">
<Page Include="Help\About\View\AboutCustomControlFieldWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<SubType>Designer</SubType>
...
...
VIZ.Package.Service/DB/Page/PageService.cs
View file @
ed4d37f9
...
@@ -4,6 +4,7 @@ using log4net.Repository.Hierarchy;
...
@@ -4,6 +4,7 @@ using log4net.Repository.Hierarchy;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Collections.ObjectModel
;
using
System.Drawing
;
using
System.Linq
;
using
System.Linq
;
using
System.Reflection
;
using
System.Reflection
;
using
System.Text
;
using
System.Text
;
...
@@ -290,14 +291,21 @@ namespace VIZ.Package.Service
...
@@ -290,14 +291,21 @@ namespace VIZ.Package.Service
return
;
return
;
}
}
using
(
Bitmap
dest
=
new
Bitmap
(
bmp
.
Width
,
bmp
.
Height
,
bmp
.
PixelFormat
))
using
(
Graphics
g
=
Graphics
.
FromImage
(
dest
))
{
g
.
DrawImage
(
bmp
,
0
,
0
);
using
(
System
.
IO
.
MemoryStream
ms
=
new
System
.
IO
.
MemoryStream
())
using
(
System
.
IO
.
MemoryStream
ms
=
new
System
.
IO
.
MemoryStream
())
{
{
bmp
.
Save
(
ms
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Jpeg
);
dest
.
Save
(
ms
,
System
.
Drawing
.
Imaging
.
ImageFormat
.
Jpeg
);
ms
.
Position
=
0
;
ms
.
Position
=
0
;
ApplicationDomainEx
.
ProjectDbContext
.
SceneThumbnailCache
.
Upload
(
id
,
$"
{
id
}
"
,
ms
);
ApplicationDomainEx
.
ProjectDbContext
.
SceneThumbnailCache
.
Upload
(
id
,
$"
{
id
}
"
,
ms
);
}
}
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
log
.
Error
(
ex
);
log
.
Error
(
ex
);
...
...
VIZ.Package.Service/Viz/VizCommandControlObjectService.cs
View file @
ed4d37f9
This diff is collapsed.
Click to expand it.
VIZ.Package.Service/Viz/VizCommandElementService.cs
View file @
ed4d37f9
...
@@ -71,7 +71,8 @@ namespace VIZ.Package.Service
...
@@ -71,7 +71,8 @@ namespace VIZ.Package.Service
if
(
ApplicationDomainEx
.
PreviewConn
==
null
||
!
ApplicationDomainEx
.
PreviewConn
.
IsConnected
)
if
(
ApplicationDomainEx
.
PreviewConn
==
null
||
!
ApplicationDomainEx
.
PreviewConn
.
IsConnected
)
return
null
;
return
null
;
string
result
=
ApplicationDomainEx
.
PreviewConn
.
EndpointManager
.
Request
(
$"
{
ApplicationDomainEx
.
VizPreviewRenderer
}
*TREE*$object*FUNCTION*ControlObject*in SET ON_CONTAINER
{
scrollElementField
.
FieldIdentifier
}
GEOM*currentPos GET"
);
ApplicationDomainEx
.
PreviewConn
.
EndpointManager
.
Request
(
$"
{
ApplicationDomainEx
.
VizPreviewRenderer
}
*TREE*$object*FUNCTION*ControlObject*in SET ON_CONTAINER
{
scrollElementField
.
FieldIdentifier
}
GEOM*currentPos GET"
);
string
result
=
ApplicationDomainEx
.
PreviewConn
.
EndpointManager
.
Request
(
$"
{
ApplicationDomainEx
.
VizPreviewRenderer
}
*TREE*$object*FUNCTION*ControlObject**result GET"
);
if
(
string
.
IsNullOrWhiteSpace
(
result
)
||
result
.
StartsWith
(
ApplicationConstants
.
VIZ_COMMAND_RESULT_ERROR_PREFIX
))
if
(
string
.
IsNullOrWhiteSpace
(
result
)
||
result
.
StartsWith
(
ApplicationConstants
.
VIZ_COMMAND_RESULT_ERROR_PREFIX
))
return
null
;
return
null
;
...
...
VIZ.Package.Service/Viz/VizCommandService.cs
View file @
ed4d37f9
...
@@ -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>
...
...
VIZ.Package.Service/Viz/VizControlObjectDownloadService.cs
View file @
ed4d37f9
...
@@ -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
;
...
...
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