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
d92fbea6
Commit
d92fbea6
authored
Jan 12, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加控制字段聚焦
parent
60ee21fa
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
159 additions
and
160 deletions
+159
-160
VIZ.Package.Module.Resource/Icons/checked_36x36.png
+0
-0
VIZ.Package.Module.Resource/Icons/image_20x20.png
+0
-0
VIZ.Package.Module.Resource/VIZ.Package.Module.Resource.csproj
+4
-0
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
+5
-2
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
+5
-2
VIZ.Package.Module/Preview/VizPreview/View/VizPreviewView.xaml
+6
-15
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
+116
-141
VIZ.Package.Service/Viz/VizCommandControlObjectService.cs
+23
-0
No files found.
VIZ.Package.Module.Resource/Icons/checked_36x36.png
View file @
d92fbea6
3.21 KB
|
W:
|
H:
3.08 KB
|
W:
|
H:
2-up
Swipe
Onion skin
VIZ.Package.Module.Resource/Icons/image_20x20.png
0 → 100644
View file @
d92fbea6
309 Bytes
VIZ.Package.Module.Resource/VIZ.Package.Module.Resource.csproj
View file @
d92fbea6
...
...
@@ -182,5 +182,8 @@
<ItemGroup>
<Resource Include="Icons\checked_36x36.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\image_20x20.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
VIZ.Package.Module/Page/Group/View/PageGroupView.xaml
View file @
d92fbea6
...
...
@@ -9,6 +9,7 @@
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
...
...
@@ -70,10 +71,12 @@
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="缩略图" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="120"
AllowResizing="Fals
e">
<dxg:GridColumn Header="缩略图" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="120"
MinWidth="20" MaxWidth="300" AllowResizing="Tru
e">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Image Width="120" Source="{Binding Path=Row.ThumbnailBitmap,Converter={StaticResource Bitmap2ImageSourceConverter}}"></Image>
<fcommon:ResizeImageControl ImageSource="{Binding Path=Row.ThumbnailBitmap,Converter={StaticResource Bitmap2ImageSourceConverter}}"
IconSource="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"
ShowImageMinWidth="30" ShowImageMinHeight="30"></fcommon:ResizeImageControl>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
...
...
VIZ.Package.Module/Page/Templage/View/PageTemplateView.xaml
View file @
d92fbea6
...
...
@@ -9,6 +9,7 @@
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:storage="clr-namespace:VIZ.Package.Storage;assembly=VIZ.Package.Storage"
xmlns:resource="clr-namespace:VIZ.Package.Module.Resource;assembly=VIZ.Package.Module.Resource"
xmlns:local="clr-namespace:VIZ.Package.Module"
...
...
@@ -47,10 +48,12 @@
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="缩略图" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="120"
AllowResizing="Fals
e">
<dxg:GridColumn Header="缩略图" ReadOnly="True" AllowSorting="False" AllowColumnFiltering="False" Width="120"
MinWidth="20" MaxWidth="300" AllowResizing="Tru
e">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Image Source="{Binding Path=Row.ThumbnailBitmap,Converter={StaticResource Bitmap2ImageSourceConverter}}"></Image>
<fcommon:ResizeImageControl ImageSource="{Binding Path=Row.ThumbnailBitmap,Converter={StaticResource Bitmap2ImageSourceConverter}}"
IconSource="/VIZ.Package.Module.Resource;component/Icons/image_20x20.png"
ShowImageMinWidth="30" ShowImageMinHeight="30"></fcommon:ResizeImageControl>
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
...
...
VIZ.Package.Module/Preview/VizPreview/View/VizPreviewView.xaml
View file @
d92fbea6
...
...
@@ -52,23 +52,14 @@
</StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center">
<CheckBox Content="TA" Style="{StaticResource CheckBox_Preview_TA}" Margin="5,0,0,0">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=ShowTSCommand}"></dxmvvm:EventToCommand>
<dxmvvm:EventToCommand EventName="Unchecked" Command="{Binding Path=HideTSCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<CheckBox Content="TA" Style="{StaticResource CheckBox_Preview_TA}" Margin="5,0,0,0"
IsChecked="{Binding Path=IsShowTS,Mode=TwoWay}">
</CheckBox>
<CheckBox Content="SA" Style="{StaticResource CheckBox_Preview_SA}" Margin="5,0,0,0">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=ShowSACommand}"></dxmvvm:EventToCommand>
<dxmvvm:EventToCommand EventName="Unchecked" Command="{Binding Path=HideSACommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<CheckBox Content="SA" Style="{StaticResource CheckBox_Preview_SA}" Margin="5,0,0,0"
IsChecked="{Binding Path=IsShowSA,Mode=TwoWay}">
</CheckBox>
<CheckBox Content="BB" Style="{StaticResource CheckBox_Preview_BB}" Margin="5,0,0,0">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="Checked" Command="{Binding Path=ShowBBCommand}"></dxmvvm:EventToCommand>
<dxmvvm:EventToCommand EventName="Unchecked" Command="{Binding Path=HideBBCommand}"></dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
<CheckBox Content="BB" Style="{StaticResource CheckBox_Preview_BB}" Margin="5,0,0,0"
IsChecked="{Binding Path=IsShowBB,Mode=TwoWay}">
</CheckBox>
<RadioButton Content="RGB" Style="{StaticResource RadioButton_Preview_RGB}"
...
...
VIZ.Package.Module/Preview/VizPreview/ViewModel/VizPreviewViewModel.cs
View file @
d92fbea6
...
...
@@ -46,12 +46,6 @@ namespace VIZ.Package.Module
this
.
PlayCommand
=
new
VCommand
(
this
.
Play
);
this
.
ContinueCommand
=
new
VCommand
(
this
.
Continue
);
this
.
StopCommand
=
new
VCommand
(
this
.
Stop
);
this
.
ShowTSCommand
=
new
VCommand
(
this
.
ShowTS
);
this
.
HideTSCommand
=
new
VCommand
(
this
.
HideTS
);
this
.
ShowSACommand
=
new
VCommand
(
this
.
ShowSA
);
this
.
HideSACommand
=
new
VCommand
(
this
.
HideSA
);
this
.
ShowBBCommand
=
new
VCommand
(
this
.
ShowBB
);
this
.
HideBBCommand
=
new
VCommand
(
this
.
HideBB
);
this
.
ShowRGBCommand
=
new
VCommand
(
this
.
ShowRGB
);
this
.
ShowKeyCommand
=
new
VCommand
(
this
.
ShowKey
);
this
.
ShowKeyPreviewCommand
=
new
VCommand
(
this
.
ShowKeyPreview
);
...
...
@@ -72,6 +66,7 @@ namespace VIZ.Package.Module
{
ApplicationDomainEx
.
MessageManager
.
Register
<
PageOpenMessage
>(
this
,
this
.
OnPageOpenMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ApplicationCloseMessage
>(
this
,
this
.
OnApplicationCloseMessage
);
ApplicationDomainEx
.
MessageManager
.
Register
<
ControlFieldChangedMessage
>(
this
,
this
.
OnControlFieldChangedMessage
);
}
// ================================================================================
...
...
@@ -92,6 +87,63 @@ namespace VIZ.Package.Module
#
endregion
#
region
IsShowTS
--
是否显示安全框
private
bool
isShowTS
;
/// <summary>
/// 是否显示安全框
/// </summary>
public
bool
IsShowTS
{
get
{
return
isShowTS
;
}
set
{
isShowTS
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsShowTS
));
this
.
IsShowTSChanged
();
}
}
#
endregion
#
region
IsShowSA
--
是否显示安全区域
private
bool
isShowSA
;
/// <summary>
/// 是否显示安全区域
/// </summary>
public
bool
IsShowSA
{
get
{
return
isShowSA
;
}
set
{
isShowSA
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsShowSA
));
this
.
IsShowSAChanged
();
}
}
#
endregion
#
region
IsShowBB
--
是否显示安全框区域
private
bool
isShowBB
;
/// <summary>
/// 是否显示安全框区域
/// </summary>
public
bool
IsShowBB
{
get
{
return
isShowBB
;
}
set
{
isShowBB
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsShowBB
));
this
.
IsShowBBChanged
();
}
}
#
endregion
// ================================================================================
// Controller & Service
// ================================================================================
...
...
@@ -106,6 +158,11 @@ namespace VIZ.Package.Module
/// </summary>
private
VizCommandService
vizCommandService
=
new
VizCommandService
();
/// <summary>
/// VIZ控制对象命令
/// </summary>
private
VizCommandControlObjectService
vizCommandControlObjectService
=
new
VizCommandControlObjectService
();
// ================================================================================
// Command
// ================================================================================
...
...
@@ -265,141 +322,6 @@ namespace VIZ.Package.Module
#
endregion
// --------------------------------
// 安全框
#
region
ShowTSCommand
--
显示安全框命令
/// <summary>
/// 显示安全框命令
/// </summary>
public
VCommand
ShowTSCommand
{
get
;
set
;
}
/// <summary>
/// 显示安全框
/// </summary>
private
void
ShowTS
()
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
this
.
vizCommandService
.
ShowTS
(
ApplicationDomainEx
.
PreviewConn
,
true
);
}
#
endregion
#
region
HideTSCommand
--
隐藏安全框命令
/// <summary>
/// 隐藏安全框命令
/// </summary>
public
VCommand
HideTSCommand
{
get
;
set
;
}
/// <summary>
/// 隐藏安全框
/// </summary>
private
void
HideTS
()
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
this
.
vizCommandService
.
ShowTS
(
ApplicationDomainEx
.
PreviewConn
,
false
);
}
#
endregion
// --------------------------------
// 安全区域
#
region
ShowSACommand
--
显示安全区域命令
/// <summary>
/// 显示安全区域命令
/// </summary>
public
VCommand
ShowSACommand
{
get
;
set
;
}
/// <summary>
/// 显示安全区域
/// </summary>
private
void
ShowSA
()
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
this
.
vizCommandService
.
ShowSA
(
ApplicationDomainEx
.
PreviewConn
,
true
);
}
#
endregion
#
region
HideSACommand
--
隐藏安全区域命令
/// <summary>
/// 隐藏安全区域命令
/// </summary>
public
VCommand
HideSACommand
{
get
;
set
;
}
/// <summary>
/// 隐藏安全区域
/// </summary>
private
void
HideSA
()
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
this
.
vizCommandService
.
ShowSA
(
ApplicationDomainEx
.
PreviewConn
,
false
);
}
#
endregion
// --------------------------------
// 边界框
#
region
ShowBBCommand
--
显示边界框命令
/// <summary>
/// 显示边界框命令
/// </summary>
public
VCommand
ShowBBCommand
{
get
;
set
;
}
/// <summary>
/// 显示边界框
/// </summary>
private
void
ShowBB
()
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
this
.
vizCommandService
.
ShowBB
(
ApplicationDomainEx
.
PreviewConn
,
true
);
}
#
endregion
#
region
HideBBCommand
--
隐藏边界框命令
/// <summary>
/// 隐藏边界框命令
/// </summary>
public
VCommand
HideBBCommand
{
get
;
set
;
}
/// <summary>
/// 隐藏边界框
/// </summary>
private
void
HideBB
()
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
this
.
vizCommandService
.
ShowBB
(
ApplicationDomainEx
.
PreviewConn
,
false
);
}
#
endregion
// --------------------------------
// 其他
#
region
ShowRGBCommand
--
显示
RGB
命令
...
...
@@ -510,6 +432,23 @@ namespace VIZ.Package.Module
}
}
/// <summary>
/// 控制字段改变时触发
/// </summary>
/// <param name="msg">消息</param>
private
void
OnControlFieldChangedMessage
(
ControlFieldChangedMessage
msg
)
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
// 不需要显示区域
if
(!
this
.
IsShowBB
)
return
;
this
.
vizCommandControlObjectService
.
ShowFocus
(
ApplicationDomainEx
.
PreviewConn
,
msg
.
ControlObject
,
msg
.
ControlField
);
}
// ================================================================================
// Public Function
// ================================================================================
...
...
@@ -602,5 +541,41 @@ namespace VIZ.Package.Module
log
.
Error
(
ex
);
}
}
/// <summary>
/// 是否显示安全框改变
/// </summary>
private
void
IsShowTSChanged
()
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
this
.
vizCommandService
.
ShowTS
(
ApplicationDomainEx
.
PreviewConn
,
this
.
IsShowTS
);
}
/// <summary>
/// 是否显示安全区域改变
/// </summary>
private
void
IsShowSAChanged
()
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
this
.
vizCommandService
.
ShowSA
(
ApplicationDomainEx
.
PreviewConn
,
this
.
IsShowSA
);
}
/// <summary>
/// 是否显示边框改变
/// </summary>
private
void
IsShowBBChanged
()
{
// 引擎未准备好 || 当前没有选中的节目单项目 则不处理
if
(!
this
.
IsEngineReady
||
ApplicationDomainEx
.
CurrentPage
==
null
)
return
;
this
.
vizCommandService
.
ShowBB
(
ApplicationDomainEx
.
PreviewConn
,
this
.
IsShowBB
);
}
}
}
VIZ.Package.Service/Viz/VizCommandControlObjectService.cs
View file @
d92fbea6
...
...
@@ -356,6 +356,29 @@ namespace VIZ.Package.Service
}
/// <summary>
/// 设置控制字段聚焦
/// </summary>
/// <param name="conn">连接</param>
/// <param name="obj">控制对象</param>
/// <param name="field">控制字段</param>
public
void
ShowFocus
(
ConnModel
conn
,
ControlObjectModel
obj
,
ControlFieldNodeModel
field
)
{
if
(
conn
==
null
)
throw
new
ArgumentNullException
(
nameof
(
conn
));
VizConfigEntity
config
=
ApplicationDomainEx
.
VizConfig
;
if
(
config
.
EngineFullType
==
EngineFullType
.
VIZ_Eng3
)
{
conn
.
EndpointManager
.
Send
(
$"RENDERER*TREE*
{
obj
.
TreeNodePath
}
*FUNCTION*ControlObject*in SET FOCUS
{
field
.
FieldIdentifier
}
"
);
}
else
if
(
config
.
EngineFullType
==
EngineFullType
.
VIZ_Eng4
)
{
conn
.
EndpointManager
.
Send
(
$"
{
ApplicationDomainEx
.
VizPreviewRenderer
}
*TREE*
{
obj
.
TreeNodePath
}
*FUNCTION*ControlObject*in SET FOCUS
{
field
.
FieldIdentifier
}
"
);
}
}
/// <summary>
/// 获取控制字段类型
/// </summary>
/// <param name="type">字段类型</param>
...
...
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