Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.H2V
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.H2V
Commits
f911ad15
Commit
f911ad15
authored
Nov 10, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 添加目标框丢失指示灯
2. 部分样式调整
parent
d57b0cc6
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
144 additions
and
48 deletions
+144
-48
VIZ.H2V.Module.Resource/Style/Button/Button_Setting.xaml
+1
-3
VIZ.H2V.Module.Resource/Style/CheckBox/CheckBox_NdiView.xaml
+27
-0
VIZ.H2V.Module.Resource/Style/RadioButton/RadioButton_NdiView.xaml
+2
-1
VIZ.H2V.Module/NDIMainView/Controller/Loop/ILoopSupport.cs
+2
-2
VIZ.H2V.Module/NDIMainView/Controller/Loop/LoopController.cs
+36
-16
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
+11
-8
VIZ.H2V.Module/NDIMainView/ViewModel/NDIMainViewModel.cs
+5
-5
VIZ.H2V.Module/NDIView/Service/INDIViewService.cs
+5
-0
VIZ.H2V.Module/NDIView/View/NDIView.xaml
+18
-9
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Command.cs
+1
-1
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Message.cs
+3
-0
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Property.cs
+16
-0
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
+12
-1
VIZ.H2V.Module/VIZ.H2V.Module.csproj
+2
-2
VIZ.H2V/MainWindow.xaml
+3
-0
No files found.
VIZ.H2V.Module.Resource/Style/Button/Button_Setting.xaml
View file @
f911ad15
...
@@ -72,9 +72,7 @@
...
@@ -72,9 +72,7 @@
</Border>
</Border>
<ControlTemplate.Triggers>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="#11ffffff"></Setter>
<Setter TargetName="bd" Property="Background" Value="#66ff0000"></Setter>
<Setter TargetName="rect1" Property="Fill" Value="#ffff0000"></Setter>
<Setter TargetName="rect2" Property="Fill" Value="#ffff0000"></Setter>
</Trigger>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate.Triggers>
</ControlTemplate>
</ControlTemplate>
...
...
VIZ.H2V.Module.Resource/Style/CheckBox/CheckBox_NdiView.xaml
View file @
f911ad15
...
@@ -174,4 +174,30 @@
...
@@ -174,4 +174,30 @@
</Setter>
</Setter>
</Style>
</Style>
<Style x:Key="CheckBox_IsAlgorithmTargetBoxExists" TargetType="CheckBox">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Width" Value="32"></Setter>
<Setter Property="Height" Value="32"></Setter>
<Setter Property="IsHitTestVisible" Value="False"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="CheckBox">
<Grid x:Name="border" Background="Transparent" UseLayoutRounding="True">
<Ellipse Width="20" Height="20" x:Name="e_false" Visibility="Visible" Fill="Red"
HorizontalAlignment="Center" VerticalAlignment="Center">
</Ellipse>
<Ellipse Width="20" Height="20" x:Name="e_true" Visibility="Collapsed" Fill="Green"
HorizontalAlignment="Center" VerticalAlignment="Center"></Ellipse>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="e_false" Property="Visibility" Value="Collapsed"></Setter>
<Setter TargetName="e_true" Property="Visibility" Value="Visible"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</ResourceDictionary>
\ No newline at end of file
VIZ.H2V.Module.Resource/Style/RadioButton/RadioButton_NdiView.xaml
View file @
f911ad15
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="FontSize" Value="16"></Setter>
<Setter Property="FontSize" Value="16"></Setter>
<Setter Property="Padding" Value="10,0,0,0"></Setter>
<Setter Property="Template">
<Setter Property="Template">
<Setter.Value>
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<ControlTemplate TargetType="RadioButton">
...
@@ -19,7 +20,7 @@
...
@@ -19,7 +20,7 @@
<Ellipse x:Name="ellipse_inner" Width="12" Height="12" Fill="#00f79b00"></Ellipse>
<Ellipse x:Name="ellipse_inner" Width="12" Height="12" Fill="#00f79b00"></Ellipse>
</Grid>
</Grid>
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1"
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1"
Margin="
10,0,0,0
"></ContentPresenter>
Margin="
{TemplateBinding Padding}
"></ContentPresenter>
</Grid>
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<ControlTemplate.Triggers>
...
...
VIZ.H2V.Module/NDIMainView/Controller/
Navigation3DCheck/INavigation3DCheck
Support.cs
→
VIZ.H2V.Module/NDIMainView/Controller/
Loop/ILoop
Support.cs
View file @
f911ad15
...
@@ -7,9 +7,9 @@ using System.Threading.Tasks;
...
@@ -7,9 +7,9 @@ using System.Threading.Tasks;
namespace
VIZ.H2V.Module
namespace
VIZ.H2V.Module
{
{
/// <summary>
/// <summary>
///
3D鼠标
支持
///
循环
支持
/// </summary>
/// </summary>
public
interface
I
Navigation3DCheck
Support
public
interface
I
Loop
Support
{
{
}
}
}
}
VIZ.H2V.Module/NDIMainView/Controller/
Navigation3DCheck/Navigation3DCheck
Controller.cs
→
VIZ.H2V.Module/NDIMainView/Controller/
Loop/Loop
Controller.cs
View file @
f911ad15
...
@@ -11,45 +11,47 @@ using VIZ.H2V.Storage;
...
@@ -11,45 +11,47 @@ using VIZ.H2V.Storage;
namespace
VIZ.H2V.Module
namespace
VIZ.H2V.Module
{
{
/// <summary>
/// <summary>
/// 3D鼠标检测控制器
/// 循环控制器
/// 1. 3D鼠标触碰检测
/// 2. 更新目标框丢失指示灯
/// </summary>
/// </summary>
public
class
Navigation3DCheck
Controller
:
IDisposable
public
class
Loop
Controller
:
IDisposable
{
{
/// <summary>
/// <summary>
/// 日志
/// 日志
/// </summary>
/// </summary>
private
readonly
static
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
Navigation3DCheck
Controller
));
private
readonly
static
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
Loop
Controller
));
/// <summary>
/// <summary>
///
3D鼠标检测
控制器
///
循环
控制器
/// </summary>
/// </summary>
/// <param name="support">支持</param>
/// <param name="support">支持</param>
public
Navigation3DCheckController
(
INavigation3DCheck
Support
support
)
public
LoopController
(
ILoop
Support
support
)
{
{
// 注册到对象池
// 注册到对象池
ApplicationDomainEx
.
ObjectPoolManager
.
Add
(
"
Navigation3DCheck
Controller"
,
this
);
ApplicationDomainEx
.
ObjectPoolManager
.
Add
(
"
Loop
Controller"
,
this
);
SystemConfig
systemConfig
=
ApplicationDomainEx
.
LiteDbContext
.
SystemConfig
.
FindAll
().
FirstOrDefault
();
SystemConfig
systemConfig
=
ApplicationDomainEx
.
LiteDbContext
.
SystemConfig
.
FindAll
().
FirstOrDefault
();
if
(
systemConfig
!=
null
)
if
(
systemConfig
!=
null
)
{
{
this
.
IsEnabled
=
systemConfig
.
IsWhenNavigationTouchedChangeToManualMode
;
this
.
Is
3DNavigationCheck
Enabled
=
systemConfig
.
IsWhenNavigationTouchedChangeToManualMode
;
}
}
this
.
Support
=
support
;
this
.
Support
=
support
;
this
.
taskInfo
=
new
TaskInfo
();
this
.
taskInfo
=
new
TaskInfo
();
this
.
executeTask
=
Task
.
Run
(
this
.
Execute
Check
);
this
.
executeTask
=
Task
.
Run
(
this
.
Execute
Loop
);
}
}
/// <summary>
/// <summary>
/// 支持
/// 支持
/// </summary>
/// </summary>
public
I
Navigation3DCheck
Support
Support
{
get
;
private
set
;
}
public
I
Loop
Support
Support
{
get
;
private
set
;
}
/// <summary>
/// <summary>
/// 是否启用
/// 是否启用
3D鼠标检测
/// </summary>
/// </summary>
public
bool
IsEnabled
{
get
;
set
;
}
public
bool
Is
3DNavigationCheck
Enabled
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 任务信息
/// 任务信息
...
@@ -64,7 +66,7 @@ namespace VIZ.H2V.Module
...
@@ -64,7 +66,7 @@ namespace VIZ.H2V.Module
/// <summary>
/// <summary>
/// 执行检测
/// 执行检测
/// </summary>
/// </summary>
private
void
Execute
Check
()
private
void
Execute
Loop
()
{
{
TaskInfo
info
=
this
.
taskInfo
;
TaskInfo
info
=
this
.
taskInfo
;
...
@@ -72,8 +74,13 @@ namespace VIZ.H2V.Module
...
@@ -72,8 +74,13 @@ namespace VIZ.H2V.Module
{
{
try
try
{
{
this
.
_executeCheck
();
// 检测3D鼠标值
this
.
Check3DNavigation
();
// 更新算法是否拥有目标框
this
.
UpdateIsAlgorithmTargetBoxExists
();
// 等待
Task
.
Delay
(
100
).
Wait
();
Task
.
Delay
(
100
).
Wait
();
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
...
@@ -84,12 +91,12 @@ namespace VIZ.H2V.Module
...
@@ -84,12 +91,12 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
///
执行检测
///
检测3D鼠标
/// </summary>
/// </summary>
private
void
_executeCheck
()
private
void
Check3DNavigation
()
{
{
// 如果未启用,那么不处理
// 如果未启用,那么不处理
if
(!
this
.
IsEnabled
)
if
(!
this
.
Is
3DNavigationCheck
Enabled
)
return
;
return
;
List
<
Navigation3DMapping
>
mappingList
=
ApplicationDomainEx
.
Navigation3DMapping
.
Mappings
;
List
<
Navigation3DMapping
>
mappingList
=
ApplicationDomainEx
.
Navigation3DMapping
.
Mappings
;
...
@@ -118,6 +125,7 @@ namespace VIZ.H2V.Module
...
@@ -118,6 +125,7 @@ namespace VIZ.H2V.Module
if
(
service
.
ViewStatus
!=
NDIViewStatus
.
CropRoi
&&
service
.
ViewStatus
!=
NDIViewStatus
.
Detect
)
if
(
service
.
ViewStatus
!=
NDIViewStatus
.
CropRoi
&&
service
.
ViewStatus
!=
NDIViewStatus
.
Detect
)
return
;
return
;
// 切换手动模式
WPFHelper
.
BeginInvoke
(()
=>
WPFHelper
.
BeginInvoke
(()
=>
{
{
ChangeStrategyContext
context
=
new
ChangeStrategyContext
();
ChangeStrategyContext
context
=
new
ChangeStrategyContext
();
...
@@ -130,6 +138,18 @@ namespace VIZ.H2V.Module
...
@@ -130,6 +138,18 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 更新算法是否拥有目标框
/// </summary>
private
void
UpdateIsAlgorithmTargetBoxExists
()
{
List
<
INDIViewService
>
services
=
ApplicationDomainEx
.
ServiceManager
.
GetServiceList
<
INDIViewService
>();
if
(
services
==
null
)
return
;
services
.
ForEach
(
p
=>
p
.
UpdateIsAlgorithmTargetBoxExists
());
}
/// <summary>
/// 销毁
/// 销毁
/// </summary>
/// </summary>
public
void
Dispose
()
public
void
Dispose
()
...
...
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
View file @
f911ad15
...
@@ -49,12 +49,12 @@
...
@@ -49,12 +49,12 @@
<StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top">
<CheckBox Height="30" Style="{StaticResource ResourceKey=CheckBox_Eye}"
<CheckBox Height="30" Style="{StaticResource ResourceKey=CheckBox_Eye}"
IsChecked="{Binding Path=IsShowAlgorithmTargetBox,Mode=TwoWay}"></CheckBox>
IsChecked="{Binding Path=IsShowAlgorithmTargetBox,Mode=TwoWay}"></CheckBox>
<Rectangle Width="2" Fill="#
EE
FFFFFF" Height="18" Margin="20,0,20,0"></Rectangle>
<Rectangle Width="2" Fill="#
88
FFFFFF" Height="18" Margin="20,0,20,0"></Rectangle>
<Button Command="{Binding Path=InitTallyCommand}" ToolTip="初始Tally"
<Button Command="{Binding Path=InitTallyCommand}" ToolTip="初始Tally"
Style="{StaticResource Button_Tally}" Height="30"></Button>
Style="{StaticResource Button_Tally}" Height="30"></Button>
<Button Command="{Binding Path=InitNavigation3DCommand}" ToolTip="初始化摇杆"
<Button Command="{Binding Path=InitNavigation3DCommand}" ToolTip="初始化摇杆"
Style="{StaticResource Button_Navigation3D}" Height="30"></Button>
Style="{StaticResource Button_Navigation3D}" Height="30"></Button>
<Rectangle Width="2" Fill="#
EE
FFFFFF" Height="18" Margin="20,0,20,0"></Rectangle>
<Rectangle Width="2" Fill="#
88
FFFFFF" Height="18" Margin="20,0,20,0"></Rectangle>
<Button Command="{Binding Path=SettingCommand}" ToolTip="系统设置"
<Button Command="{Binding Path=SettingCommand}" ToolTip="系统设置"
Style="{StaticResource Button_Setting}" Height="30"></Button>
Style="{StaticResource Button_Setting}" Height="30"></Button>
<Button Command="{Binding Path=MinCommand}" ToolTip="最小化"
<Button Command="{Binding Path=MinCommand}" ToolTip="最小化"
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
</StackPanel>
</StackPanel>
</Grid>
</Grid>
<!-- 主体 -->
<!-- 主体 -->
<Grid Grid.Row="1" Margin="
0,0,20,
0">
<Grid Grid.Row="1" Margin="
25,10,25,1
0">
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
...
@@ -73,10 +73,10 @@
...
@@ -73,10 +73,10 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<local:NDIView x:Name="view_CAM_1" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_1}" Grid.Row="0" Grid.Column="0" Margin="
30
"></local:NDIView>
<local:NDIView x:Name="view_CAM_1" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_1}" Grid.Row="0" Grid.Column="0" Margin="
5,5,20,5
"></local:NDIView>
<local:NDIView x:Name="view_CAM_2" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_3}" Grid.Row="1" Grid.Column="0" Margin="
30
"></local:NDIView>
<local:NDIView x:Name="view_CAM_2" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_3}" Grid.Row="1" Grid.Column="0" Margin="
5,5,20,5
"></local:NDIView>
<local:NDIView x:Name="view_CAM_3" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_4}" Grid.Row="1" Grid.Column="1" Margin="
30
"></local:NDIView>
<local:NDIView x:Name="view_CAM_3" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_4}" Grid.Row="1" Grid.Column="1" Margin="
20,5,5,5
"></local:NDIView>
<local:NDIView x:Name="view_CAM_4" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_2}" Grid.Row="0" Grid.Column="1" Margin="
30
"></local:NDIView>
<local:NDIView x:Name="view_CAM_4" NDIKey="{x:Static Member=domain:NDIViewKeys.CAM_2}" Grid.Row="0" Grid.Column="1" Margin="
20,5,5,5
"></local:NDIView>
</Grid>
</Grid>
<!-- 底部 -->
<!-- 底部 -->
<Border Grid.Row="2" Background="#ff12202d">
<Border Grid.Row="2" Background="#ff12202d">
...
@@ -89,6 +89,7 @@
...
@@ -89,6 +89,7 @@
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<!-- 算法服务监控 -->
<!-- 算法服务监控 -->
<StackPanel Orientation="Horizontal" Background="Transparent"
<StackPanel Orientation="Horizontal" Background="Transparent"
Visibility="{Binding Path=IsShowAlgorithmTargetBox,Converter={StaticResource Bool2VisibilityConverter}}"
ToolTipService.Placement="Top" ToolTipService.HasDropShadow="True"
ToolTipService.Placement="Top" ToolTipService.HasDropShadow="True"
ToolTipService.HorizontalOffset="-65">
ToolTipService.HorizontalOffset="-65">
<StackPanel.ToolTip>
<StackPanel.ToolTip>
...
@@ -133,6 +134,7 @@
...
@@ -133,6 +134,7 @@
</StackPanel>
</StackPanel>
<!-- 剪切服务监控 -->
<!-- 剪切服务监控 -->
<StackPanel Orientation="Horizontal" Background="Transparent" Grid.Column="1"
<StackPanel Orientation="Horizontal" Background="Transparent" Grid.Column="1"
Visibility="{Binding Path=IsShowAlgorithmTargetBox,Converter={StaticResource Bool2VisibilityConverter}}"
ToolTipService.Placement="Top" ToolTipService.HasDropShadow="True"
ToolTipService.Placement="Top" ToolTipService.HasDropShadow="True"
ToolTipService.HorizontalOffset="-65">
ToolTipService.HorizontalOffset="-65">
<StackPanel.ToolTip>
<StackPanel.ToolTip>
...
@@ -176,7 +178,8 @@
...
@@ -176,7 +178,8 @@
<TextBlock Text="界面" VerticalAlignment="Center" Foreground="White" FontSize="12" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="界面" VerticalAlignment="Center" Foreground="White" FontSize="12" Margin="10,0,0,0"></TextBlock>
</StackPanel>
</StackPanel>
<!-- 计算机监控 -->
<!-- 计算机监控 -->
<StackPanel Orientation="Horizontal" Grid.Column="2">
<StackPanel Orientation="Horizontal" Grid.Column="2"
Visibility="{Binding Path=IsShowAlgorithmTargetBox,Converter={StaticResource Bool2VisibilityConverter}}">
<!-- CPU -->
<!-- CPU -->
<TextBlock Text="CPU:" VerticalAlignment="Center" Foreground="White" FontSize="12" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="CPU:" VerticalAlignment="Center" Foreground="White" FontSize="12" Margin="10,0,0,0"></TextBlock>
<TextBlock Text="{Binding Path=SystemMonitorModel.CpuUsedPercentage,StringFormat=P}" VerticalAlignment="Center" Foreground="White" FontSize="12" Margin="10,0,0,0"
<TextBlock Text="{Binding Path=SystemMonitorModel.CpuUsedPercentage,StringFormat=P}" VerticalAlignment="Center" Foreground="White" FontSize="12" Margin="10,0,0,0"
...
...
VIZ.H2V.Module/NDIMainView/ViewModel/NDIMainViewModel.cs
View file @
f911ad15
...
@@ -21,7 +21,7 @@ namespace VIZ.H2V.Module
...
@@ -21,7 +21,7 @@ namespace VIZ.H2V.Module
/// <summary>
/// <summary>
/// NDI主视图模型
/// NDI主视图模型
/// </summary>
/// </summary>
public
class
NDIMainViewModel
:
ViewModelBase
,
INDIMainViewService
,
IHotkeySupport
,
IGpioSupport
,
I
Navigation3DCheck
Support
public
class
NDIMainViewModel
:
ViewModelBase
,
INDIMainViewService
,
IHotkeySupport
,
IGpioSupport
,
I
Loop
Support
{
{
/// <summary>
/// <summary>
/// 日志
/// 日志
...
@@ -91,7 +91,7 @@ namespace VIZ.H2V.Module
...
@@ -91,7 +91,7 @@ namespace VIZ.H2V.Module
{
{
this
.
hotkeyController
=
new
HotkeyController
(
this
);
this
.
hotkeyController
=
new
HotkeyController
(
this
);
this
.
gpioController
=
new
GpioController
(
this
);
this
.
gpioController
=
new
GpioController
(
this
);
this
.
navigation3DCheckController
=
new
Navigation3DCheck
Controller
(
this
);
this
.
loopController
=
new
Loop
Controller
(
this
);
}
}
/// <summary>
/// <summary>
...
@@ -129,9 +129,9 @@ namespace VIZ.H2V.Module
...
@@ -129,9 +129,9 @@ namespace VIZ.H2V.Module
private
GpioController
gpioController
;
private
GpioController
gpioController
;
/// <summary>
/// <summary>
///
3D鼠标检测
控制器
///
循环
控制器
/// </summary>
/// </summary>
private
Navigation3DCheckController
navigation3DCheck
Controller
;
private
LoopController
loop
Controller
;
// ======================================================================================
// ======================================================================================
// === Property ===
// === Property ===
...
@@ -376,7 +376,7 @@ namespace VIZ.H2V.Module
...
@@ -376,7 +376,7 @@ namespace VIZ.H2V.Module
/// <param name="isEnabled">是否生效</param>
/// <param name="isEnabled">是否生效</param>
public
void
SetNavigation3DCheckEnabled
(
bool
isEnabled
)
public
void
SetNavigation3DCheckEnabled
(
bool
isEnabled
)
{
{
this
.
navigation3DCheckController
.
Is
Enabled
=
isEnabled
;
this
.
loopController
.
Is3DNavigationCheck
Enabled
=
isEnabled
;
}
}
// ======================================================================================
// ======================================================================================
...
...
VIZ.H2V.Module/NDIView/Service/INDIViewService.cs
View file @
f911ad15
...
@@ -117,6 +117,11 @@ namespace VIZ.H2V.Module
...
@@ -117,6 +117,11 @@ namespace VIZ.H2V.Module
void
UpdateIsShowAlgorithmTargetBox
(
bool
isShow
);
void
UpdateIsShowAlgorithmTargetBox
(
bool
isShow
);
/// <summary>
/// <summary>
/// 更新算法是否拥有目标框
/// </summary>
void
UpdateIsAlgorithmTargetBoxExists
();
/// <summary>
/// 停止算法
/// 停止算法
/// </summary>
/// </summary>
void
StopAlgorithm
();
void
StopAlgorithm
();
...
...
VIZ.H2V.Module/NDIView/View/NDIView.xaml
View file @
f911ad15
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="
20
0"></ColumnDefinition>
<ColumnDefinition Width="
12
0"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="40"></ColumnDefinition>
<ColumnDefinition Width="40"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
...
@@ -135,11 +135,11 @@
...
@@ -135,11 +135,11 @@
<Grid IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}">
<Grid IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}">
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="
18
0"></RowDefinition>
<RowDefinition Height="
24
0"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- ************************************************************ -->
<!-- ************************************************************ -->
<!-- 该
参
无意义,暂时注释 -->
<!-- 该
项
无意义,暂时注释 -->
<!--<CheckBox FontSize="16" Content="裁切策略:" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"
<!--<CheckBox FontSize="16" Content="裁切策略:" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"
IsChecked="{Binding Path=IsUseClip,Mode=TwoWay}"
IsChecked="{Binding Path=IsUseClip,Mode=TwoWay}"
Style="{StaticResource CheckBox_NdiView}"></CheckBox>-->
Style="{StaticResource CheckBox_NdiView}"></CheckBox>-->
...
@@ -151,19 +151,28 @@
...
@@ -151,19 +151,28 @@
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- 算法目标丢失指示灯, 不可点击 -->
<CheckBox Style="{StaticResource CheckBox_IsAlgorithmTargetBoxExists}"
IsHitTestVisible="False"
HorizontalAlignment="Left" VerticalAlignment="Center" Margin="25,0,0,0"
IsChecked="{Binding Path=IsAlgorithmTargetBoxExists,Mode=OneWay}"></CheckBox>
<!-- 算法模式 -->
<RadioButton Content="A" FontSize="16" Foreground="White"
<RadioButton Content="A" FontSize="16" Foreground="White"
ToolTip="A" Grid.Row="0"
ToolTip="A" Grid.Row="
1" Padding="12,0,0,
0"
Style="{StaticResource RadioButton_NdiView}"
Style="{StaticResource RadioButton_NdiView}"
IsChecked="{Binding IsAutoModeChecked,Mode=TwoWay}">
IsChecked="{Binding IsAutoModeChecked,Mode=TwoWay}">
</RadioButton>
</RadioButton>
<RadioButton Content="M" FontSize="16" Foreground="White"
<!-- 居中模式 -->
ToolTip="M" Grid.Row="1"
<RadioButton Content="C" FontSize="16" Foreground="White"
ToolTip="C" Grid.Row="2" Padding="12,0,0,0"
Style="{StaticResource RadioButton_NdiView}"
Style="{StaticResource RadioButton_NdiView}"
IsChecked="{Binding IsCenterModeChecked,Mode=TwoWay}">
IsChecked="{Binding IsCenterModeChecked,Mode=TwoWay}">
</RadioButton>
</RadioButton>
<RadioButton Content="H" FontSize="16" Foreground="White"
<!-- 手动模式 -->
ToolTip="H" Grid.Row="2"
<RadioButton Content="M" FontSize="16" Foreground="White"
ToolTip="M" Grid.Row="3"
IsChecked="{Binding Path=IsManualModeChecked,Mode=TwoWay}"
IsChecked="{Binding Path=IsManualModeChecked,Mode=TwoWay}"
Style="{StaticResource RadioButton_NdiView}">
Style="{StaticResource RadioButton_NdiView}">
</RadioButton>
</RadioButton>
...
@@ -175,7 +184,7 @@
...
@@ -175,7 +184,7 @@
<Grid Grid.Row="1">
<Grid Grid.Row="1">
<!-- 单人机位 ===== 目标检测按钮 -->
<!-- 单人机位 ===== 目标检测按钮 -->
<Button Grid.Row="1" VerticalAlignment="Bottom" Style="{StaticResource Button_Setting}"
<Button Grid.Row="1" VerticalAlignment="Bottom" Style="{StaticResource Button_Setting}"
Height="40" Width="1
2
0" HorizontalAlignment="Right" Margin="0,0,10,0"
Height="40" Width="1
0
0" HorizontalAlignment="Right" Margin="0,0,10,0"
Command="{Binding Path=DetectCommand}">
Command="{Binding Path=DetectCommand}">
<Button.IsEnabled>
<Button.IsEnabled>
<MultiBinding Converter="{StaticResource NDIViewProperty2BoolConverter_DetectButton}">
<MultiBinding Converter="{StaticResource NDIViewProperty2BoolConverter_DetectButton}">
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Command.cs
View file @
f911ad15
...
@@ -286,7 +286,7 @@ namespace VIZ.H2V.Module
...
@@ -286,7 +286,7 @@ namespace VIZ.H2V.Module
private
void
Setting
(
string
key
)
private
void
Setting
(
string
key
)
{
{
NDISettingView
view
=
new
NDISettingView
(
key
,
this
.
ID
);
NDISettingView
view
=
new
NDISettingView
(
key
,
this
.
ID
);
NoneWindow
window
=
new
NoneWindow
(
1200
,
1
1
50
,
view
);
NoneWindow
window
=
new
NoneWindow
(
1200
,
1
0
50
,
view
);
window
.
Owner
=
this
.
GetWindow
();
window
.
Owner
=
this
.
GetWindow
();
window
.
ShowDialog
();
window
.
ShowDialog
();
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Message.cs
View file @
f911ad15
...
@@ -221,6 +221,9 @@ namespace VIZ.H2V.Module
...
@@ -221,6 +221,9 @@ namespace VIZ.H2V.Module
/// <param name="view">视图</param>
/// <param name="view">视图</param>
private
void
OnAlgorithmMessage__crop_roi__target_bbox
(
AlgorithmMessage__crop_roi
msg
,
VideoRenderInfo
renderInfo
,
NDIView
view
)
private
void
OnAlgorithmMessage__crop_roi__target_bbox
(
AlgorithmMessage__crop_roi
msg
,
VideoRenderInfo
renderInfo
,
NDIView
view
)
{
{
// 当前是否拥有目标框
this
.
isAlgorithmTargetBoxExists_cache
=
msg
.
target_bbox
!=
null
;
// 没有目标框 || 配置是否显示目标框
// 没有目标框 || 配置是否显示目标框
if
(
msg
.
target_bbox
==
null
||
!
this
.
IsShowAlgorithmTargetBox
)
if
(
msg
.
target_bbox
==
null
||
!
this
.
IsShowAlgorithmTargetBox
)
{
{
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Property.cs
View file @
f911ad15
...
@@ -380,6 +380,22 @@ namespace VIZ.H2V.Module
...
@@ -380,6 +380,22 @@ namespace VIZ.H2V.Module
#
endregion
#
endregion
#
region
IsAlgorithmTargetBoxExists
--
算法目标框是否存在
private
bool
isAlgorithmTargetBoxExists_cache
;
private
bool
isAlgorithmTargetBoxExists
;
/// <summary>
/// 算法目标框是否存在
/// </summary>
public
bool
IsAlgorithmTargetBoxExists
{
get
{
return
isAlgorithmTargetBoxExists
;
}
set
{
isAlgorithmTargetBoxExists
=
value
;
this
.
RaisePropertySaveChanged
(
nameof
(
IsAlgorithmTargetBoxExists
));
}
}
#
endregion
// --------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------
#
region
IsUseClip
--
是否使用裁切
#
region
IsUseClip
--
是否使用裁切
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
View file @
f911ad15
...
@@ -23,6 +23,7 @@ namespace VIZ.H2V.Module
...
@@ -23,6 +23,7 @@ namespace VIZ.H2V.Module
/// IAlgorithmSupport -- 算法支持
/// IAlgorithmSupport -- 算法支持
/// IManualSupport -- 手动控制支持
/// IManualSupport -- 手动控制支持
/// IRecordingSupport -- 录制支持
/// IRecordingSupport -- 录制支持
/// ILoopSupport -- 循环支持
/// </remarks>
/// </remarks>
public
partial
class
NDIViewModel
:
ViewModelBase
,
INDIViewService
,
IAlgorithmSupport
,
IManualSupport
,
IRecordingSupport
public
partial
class
NDIViewModel
:
ViewModelBase
,
INDIViewService
,
IAlgorithmSupport
,
IManualSupport
,
IRecordingSupport
{
{
...
@@ -96,7 +97,6 @@ namespace VIZ.H2V.Module
...
@@ -96,7 +97,6 @@ namespace VIZ.H2V.Module
this
.
AlgorithmControllerDic
.
Add
(
AlgorithmStrategyType
.
Cableway
,
new
AlgorithmController_Cableway
(
this
));
this
.
AlgorithmControllerDic
.
Add
(
AlgorithmStrategyType
.
Cableway
,
new
AlgorithmController_Cableway
(
this
));
this
.
ManualController
=
new
ManualController
(
this
);
this
.
ManualController
=
new
ManualController
(
this
);
}
}
/// <summary>
/// <summary>
...
@@ -397,6 +397,17 @@ namespace VIZ.H2V.Module
...
@@ -397,6 +397,17 @@ namespace VIZ.H2V.Module
}
}
/// <summary>
/// <summary>
/// 更新算法是否拥有目标框
/// </summary>
public
void
UpdateIsAlgorithmTargetBoxExists
()
{
if
(
this
.
IsAlgorithmTargetBoxExists
==
this
.
isAlgorithmTargetBoxExists_cache
)
return
;
this
.
IsAlgorithmTargetBoxExists
=
this
.
isAlgorithmTargetBoxExists_cache
;
}
/// <summary>
/// 停止算法
/// 停止算法
/// </summary>
/// </summary>
public
void
StopAlgorithm
()
public
void
StopAlgorithm
()
...
...
VIZ.H2V.Module/VIZ.H2V.Module.csproj
View file @
f911ad15
...
@@ -202,8 +202,8 @@
...
@@ -202,8 +202,8 @@
<Compile Include="NDIMainView\Controller\Gpio\IGpioSupport.cs" />
<Compile Include="NDIMainView\Controller\Gpio\IGpioSupport.cs" />
<Compile Include="NDIMainView\Controller\Hotkey\HotkeyController.cs" />
<Compile Include="NDIMainView\Controller\Hotkey\HotkeyController.cs" />
<Compile Include="NDIMainView\Controller\Hotkey\IHotkeySupport.cs" />
<Compile Include="NDIMainView\Controller\Hotkey\IHotkeySupport.cs" />
<Compile Include="NDIMainView\Controller\
Navigation3DCheck\INavigation3DCheck
Support.cs" />
<Compile Include="NDIMainView\Controller\
Loop\ILoop
Support.cs" />
<Compile Include="NDIMainView\Controller\
Navigation3DCheck\Navigation3DCheck
Controller.cs" />
<Compile Include="NDIMainView\Controller\
Loop\Loop
Controller.cs" />
<Compile Include="NDIMainView\Service\INDIMainViewService.cs" />
<Compile Include="NDIMainView\Service\INDIMainViewService.cs" />
<Compile Include="NDISettingView\ViewModel\Algorithm\AlgorithmCablewayPanelViewModel.cs" />
<Compile Include="NDISettingView\ViewModel\Algorithm\AlgorithmCablewayPanelViewModel.cs" />
<Compile Include="NDISettingView\ViewModel\Algorithm\AlgorithmTacticsPanelViewModel.cs" />
<Compile Include="NDISettingView\ViewModel\Algorithm\AlgorithmTacticsPanelViewModel.cs" />
...
...
VIZ.H2V/MainWindow.xaml
View file @
f911ad15
...
@@ -10,6 +10,9 @@
...
@@ -10,6 +10,9 @@
Icon="logo.ico"
Icon="logo.ico"
Title="AI横转竖智能裁切系统" Height="450" Width="800">
Title="AI横转竖智能裁切系统" Height="450" Width="800">
<Grid>
<Grid>
<!--<Viewbox>
<module:NDIMainView Width="2560" Height="1440"></module:NDIMainView>
</Viewbox>-->
<module:NDIMainView></module:NDIMainView>
<module:NDIMainView></module:NDIMainView>
</Grid>
</Grid>
</Window>
</Window>
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