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
Show 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 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="bd" Property="Background" Value="#11ffffff"></Setter>
<Setter TargetName="rect1" Property="Fill" Value="#ffff0000"></Setter>
<Setter TargetName="rect2" Property="Fill" Value="#ffff0000"></Setter>
<Setter TargetName="bd" Property="Background" Value="#66ff0000"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
...
...
VIZ.H2V.Module.Resource/Style/CheckBox/CheckBox_NdiView.xaml
View file @
f911ad15
...
...
@@ -174,4 +174,30 @@
</Setter>
</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>
\ No newline at end of file
VIZ.H2V.Module.Resource/Style/RadioButton/RadioButton_NdiView.xaml
View file @
f911ad15
...
...
@@ -5,6 +5,7 @@
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="FontSize" Value="16"></Setter>
<Setter Property="Padding" Value="10,0,0,0"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
...
...
@@ -19,7 +20,7 @@
<Ellipse x:Name="ellipse_inner" Width="12" Height="12" Fill="#00f79b00"></Ellipse>
</Grid>
<ContentPresenter HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Column="1"
Margin="
10,0,0,0
"></ContentPresenter>
Margin="
{TemplateBinding Padding}
"></ContentPresenter>
</Grid>
</Border>
<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;
namespace
VIZ.H2V.Module
{
/// <summary>
///
3D鼠标
支持
///
循环
支持
/// </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;
namespace
VIZ.H2V.Module
{
/// <summary>
/// 3D鼠标检测控制器
/// 循环控制器
/// 1. 3D鼠标触碰检测
/// 2. 更新目标框丢失指示灯
/// </summary>
public
class
Navigation3DCheck
Controller
:
IDisposable
public
class
Loop
Controller
:
IDisposable
{
/// <summary>
/// 日志
/// </summary>
private
readonly
static
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
Navigation3DCheck
Controller
));
private
readonly
static
ILog
log
=
LogManager
.
GetLogger
(
typeof
(
Loop
Controller
));
/// <summary>
///
3D鼠标检测
控制器
///
循环
控制器
/// </summary>
/// <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
();
if
(
systemConfig
!=
null
)
{
this
.
IsEnabled
=
systemConfig
.
IsWhenNavigationTouchedChangeToManualMode
;
this
.
Is
3DNavigationCheck
Enabled
=
systemConfig
.
IsWhenNavigationTouchedChangeToManualMode
;
}
this
.
Support
=
support
;
this
.
taskInfo
=
new
TaskInfo
();
this
.
executeTask
=
Task
.
Run
(
this
.
Execute
Check
);
this
.
executeTask
=
Task
.
Run
(
this
.
Execute
Loop
);
}
/// <summary>
/// 支持
/// </summary>
public
I
Navigation3DCheck
Support
Support
{
get
;
private
set
;
}
public
I
Loop
Support
Support
{
get
;
private
set
;
}
/// <summary>
/// 是否启用
/// 是否启用
3D鼠标检测
/// </summary>
public
bool
IsEnabled
{
get
;
set
;
}
public
bool
Is
3DNavigationCheck
Enabled
{
get
;
set
;
}
/// <summary>
/// 任务信息
...
...
@@ -64,7 +66,7 @@ namespace VIZ.H2V.Module
/// <summary>
/// 执行检测
/// </summary>
private
void
Execute
Check
()
private
void
Execute
Loop
()
{
TaskInfo
info
=
this
.
taskInfo
;
...
...
@@ -72,8 +74,13 @@ namespace VIZ.H2V.Module
{
try
{
this
.
_executeCheck
();
// 检测3D鼠标值
this
.
Check3DNavigation
();
// 更新算法是否拥有目标框
this
.
UpdateIsAlgorithmTargetBoxExists
();
// 等待
Task
.
Delay
(
100
).
Wait
();
}
catch
(
Exception
ex
)
...
...
@@ -84,12 +91,12 @@ namespace VIZ.H2V.Module
}
/// <summary>
///
执行检测
///
检测3D鼠标
/// </summary>
private
void
_executeCheck
()
private
void
Check3DNavigation
()
{
// 如果未启用,那么不处理
if
(!
this
.
IsEnabled
)
if
(!
this
.
Is
3DNavigationCheck
Enabled
)
return
;
List
<
Navigation3DMapping
>
mappingList
=
ApplicationDomainEx
.
Navigation3DMapping
.
Mappings
;
...
...
@@ -118,6 +125,7 @@ namespace VIZ.H2V.Module
if
(
service
.
ViewStatus
!=
NDIViewStatus
.
CropRoi
&&
service
.
ViewStatus
!=
NDIViewStatus
.
Detect
)
return
;
// 切换手动模式
WPFHelper
.
BeginInvoke
(()
=>
{
ChangeStrategyContext
context
=
new
ChangeStrategyContext
();
...
...
@@ -130,6 +138,18 @@ namespace VIZ.H2V.Module
}
/// <summary>
/// 更新算法是否拥有目标框
/// </summary>
private
void
UpdateIsAlgorithmTargetBoxExists
()
{
List
<
INDIViewService
>
services
=
ApplicationDomainEx
.
ServiceManager
.
GetServiceList
<
INDIViewService
>();
if
(
services
==
null
)
return
;
services
.
ForEach
(
p
=>
p
.
UpdateIsAlgorithmTargetBoxExists
());
}
/// <summary>
/// 销毁
/// </summary>
public
void
Dispose
()
...
...
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
View file @
f911ad15
...
...
@@ -49,12 +49,12 @@
<StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top">
<CheckBox Height="30" Style="{StaticResource ResourceKey=CheckBox_Eye}"
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"
Style="{StaticResource Button_Tally}" Height="30"></Button>
<Button Command="{Binding Path=InitNavigation3DCommand}" ToolTip="初始化摇杆"
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="系统设置"
Style="{StaticResource Button_Setting}" Height="30"></Button>
<Button Command="{Binding Path=MinCommand}" ToolTip="最小化"
...
...
@@ -64,7 +64,7 @@
</StackPanel>
</Grid>
<!-- 主体 -->
<Grid Grid.Row="1" Margin="
0,0,20,
0">
<Grid Grid.Row="1" Margin="
25,10,25,1
0">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
...
...
@@ -73,10 +73,10 @@
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</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_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_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_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_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="
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="
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="
20,5,5,5
"></local:NDIView>
</Grid>
<!-- 底部 -->
<Border Grid.Row="2" Background="#ff12202d">
...
...
@@ -89,6 +89,7 @@
</Grid.ColumnDefinitions>
<!-- 算法服务监控 -->
<StackPanel Orientation="Horizontal" Background="Transparent"
Visibility="{Binding Path=IsShowAlgorithmTargetBox,Converter={StaticResource Bool2VisibilityConverter}}"
ToolTipService.Placement="Top" ToolTipService.HasDropShadow="True"
ToolTipService.HorizontalOffset="-65">
<StackPanel.ToolTip>
...
...
@@ -133,6 +134,7 @@
</StackPanel>
<!-- 剪切服务监控 -->
<StackPanel Orientation="Horizontal" Background="Transparent" Grid.Column="1"
Visibility="{Binding Path=IsShowAlgorithmTargetBox,Converter={StaticResource Bool2VisibilityConverter}}"
ToolTipService.Placement="Top" ToolTipService.HasDropShadow="True"
ToolTipService.HorizontalOffset="-65">
<StackPanel.ToolTip>
...
...
@@ -176,7 +178,8 @@
<TextBlock Text="界面" VerticalAlignment="Center" Foreground="White" FontSize="12" Margin="10,0,0,0"></TextBlock>
</StackPanel>
<!-- 计算机监控 -->
<StackPanel Orientation="Horizontal" Grid.Column="2">
<StackPanel Orientation="Horizontal" Grid.Column="2"
Visibility="{Binding Path=IsShowAlgorithmTargetBox,Converter={StaticResource Bool2VisibilityConverter}}">
<!-- CPU -->
<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"
...
...
VIZ.H2V.Module/NDIMainView/ViewModel/NDIMainViewModel.cs
View file @
f911ad15
...
...
@@ -21,7 +21,7 @@ namespace VIZ.H2V.Module
/// <summary>
/// NDI主视图模型
/// </summary>
public
class
NDIMainViewModel
:
ViewModelBase
,
INDIMainViewService
,
IHotkeySupport
,
IGpioSupport
,
I
Navigation3DCheck
Support
public
class
NDIMainViewModel
:
ViewModelBase
,
INDIMainViewService
,
IHotkeySupport
,
IGpioSupport
,
I
Loop
Support
{
/// <summary>
/// 日志
...
...
@@ -91,7 +91,7 @@ namespace VIZ.H2V.Module
{
this
.
hotkeyController
=
new
HotkeyController
(
this
);
this
.
gpioController
=
new
GpioController
(
this
);
this
.
navigation3DCheckController
=
new
Navigation3DCheck
Controller
(
this
);
this
.
loopController
=
new
Loop
Controller
(
this
);
}
/// <summary>
...
...
@@ -129,9 +129,9 @@ namespace VIZ.H2V.Module
private
GpioController
gpioController
;
/// <summary>
///
3D鼠标检测
控制器
///
循环
控制器
/// </summary>
private
Navigation3DCheckController
navigation3DCheck
Controller
;
private
LoopController
loop
Controller
;
// ======================================================================================
// === Property ===
...
...
@@ -376,7 +376,7 @@ namespace VIZ.H2V.Module
/// <param name="isEnabled">是否生效</param>
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
void
UpdateIsShowAlgorithmTargetBox
(
bool
isShow
);
/// <summary>
/// 更新算法是否拥有目标框
/// </summary>
void
UpdateIsAlgorithmTargetBoxExists
();
/// <summary>
/// 停止算法
/// </summary>
void
StopAlgorithm
();
...
...
VIZ.H2V.Module/NDIView/View/NDIView.xaml
View file @
f911ad15
...
...
@@ -85,7 +85,7 @@
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="
20
0"></ColumnDefinition>
<ColumnDefinition Width="
12
0"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="40"></ColumnDefinition>
</Grid.ColumnDefinitions>
...
...
@@ -135,11 +135,11 @@
<Grid IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}">
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="
18
0"></RowDefinition>
<RowDefinition Height="
24
0"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
</Grid.RowDefinitions>
<!-- ************************************************************ -->
<!-- 该
参
无意义,暂时注释 -->
<!-- 该
项
无意义,暂时注释 -->
<!--<CheckBox FontSize="16" Content="裁切策略:" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center"
IsChecked="{Binding Path=IsUseClip,Mode=TwoWay}"
Style="{StaticResource CheckBox_NdiView}"></CheckBox>-->
...
...
@@ -151,19 +151,28 @@
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
</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"
ToolTip="A" Grid.Row="0"
ToolTip="A" Grid.Row="
1" Padding="12,0,0,
0"
Style="{StaticResource RadioButton_NdiView}"
IsChecked="{Binding IsAutoModeChecked,Mode=TwoWay}">
</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}"
IsChecked="{Binding IsCenterModeChecked,Mode=TwoWay}">
</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}"
Style="{StaticResource RadioButton_NdiView}">
</RadioButton>
...
...
@@ -175,7 +184,7 @@
<Grid Grid.Row="1">
<!-- 单人机位 ===== 目标检测按钮 -->
<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}">
<Button.IsEnabled>
<MultiBinding Converter="{StaticResource NDIViewProperty2BoolConverter_DetectButton}">
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Command.cs
View file @
f911ad15
...
...
@@ -286,7 +286,7 @@ namespace VIZ.H2V.Module
private
void
Setting
(
string
key
)
{
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
.
ShowDialog
();
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Message.cs
View file @
f911ad15
...
...
@@ -221,6 +221,9 @@ namespace VIZ.H2V.Module
/// <param name="view">视图</param>
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
)
{
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.Property.cs
View file @
f911ad15
...
...
@@ -380,6 +380,22 @@ namespace VIZ.H2V.Module
#
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
--
是否使用裁切
...
...
VIZ.H2V.Module/NDIView/VieweModel/NDIViewModel.cs
View file @
f911ad15
...
...
@@ -23,6 +23,7 @@ namespace VIZ.H2V.Module
/// IAlgorithmSupport -- 算法支持
/// IManualSupport -- 手动控制支持
/// IRecordingSupport -- 录制支持
/// ILoopSupport -- 循环支持
/// </remarks>
public
partial
class
NDIViewModel
:
ViewModelBase
,
INDIViewService
,
IAlgorithmSupport
,
IManualSupport
,
IRecordingSupport
{
...
...
@@ -96,7 +97,6 @@ namespace VIZ.H2V.Module
this
.
AlgorithmControllerDic
.
Add
(
AlgorithmStrategyType
.
Cableway
,
new
AlgorithmController_Cableway
(
this
));
this
.
ManualController
=
new
ManualController
(
this
);
}
/// <summary>
...
...
@@ -397,6 +397,17 @@ namespace VIZ.H2V.Module
}
/// <summary>
/// 更新算法是否拥有目标框
/// </summary>
public
void
UpdateIsAlgorithmTargetBoxExists
()
{
if
(
this
.
IsAlgorithmTargetBoxExists
==
this
.
isAlgorithmTargetBoxExists_cache
)
return
;
this
.
IsAlgorithmTargetBoxExists
=
this
.
isAlgorithmTargetBoxExists_cache
;
}
/// <summary>
/// 停止算法
/// </summary>
public
void
StopAlgorithm
()
...
...
VIZ.H2V.Module/VIZ.H2V.Module.csproj
View file @
f911ad15
...
...
@@ -202,8 +202,8 @@
<Compile Include="NDIMainView\Controller\Gpio\IGpioSupport.cs" />
<Compile Include="NDIMainView\Controller\Hotkey\HotkeyController.cs" />
<Compile Include="NDIMainView\Controller\Hotkey\IHotkeySupport.cs" />
<Compile Include="NDIMainView\Controller\
Navigation3DCheck\INavigation3DCheck
Support.cs" />
<Compile Include="NDIMainView\Controller\
Navigation3DCheck\Navigation3DCheck
Controller.cs" />
<Compile Include="NDIMainView\Controller\
Loop\ILoop
Support.cs" />
<Compile Include="NDIMainView\Controller\
Loop\Loop
Controller.cs" />
<Compile Include="NDIMainView\Service\INDIMainViewService.cs" />
<Compile Include="NDISettingView\ViewModel\Algorithm\AlgorithmCablewayPanelViewModel.cs" />
<Compile Include="NDISettingView\ViewModel\Algorithm\AlgorithmTacticsPanelViewModel.cs" />
...
...
VIZ.H2V/MainWindow.xaml
View file @
f911ad15
...
...
@@ -10,6 +10,9 @@
Icon="logo.ico"
Title="AI横转竖智能裁切系统" Height="450" Width="800">
<Grid>
<!--<Viewbox>
<module:NDIMainView Width="2560" Height="1440"></module:NDIMainView>
</Viewbox>-->
<module:NDIMainView></module:NDIMainView>
</Grid>
</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