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
404f3805
Commit
404f3805
authored
Sep 28, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 时间控件
2. Tally开发
parent
5398752d
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
486 additions
and
206 deletions
+486
-206
VIZ.H2V.Module.Resource/Icons/ai_close_24x24.png
+0
-0
VIZ.H2V.Module.Resource/Icons/ai_refresh_24x24.png
+0
-0
VIZ.H2V.Module.Resource/Style/Button/Button_NdiView.xaml
+5
-7
VIZ.H2V.Module.Resource/Style/Button/Button_Setting.xaml
+1
-1
VIZ.H2V.Module.Resource/Style/CheckBox/CheckBox_NdiView.xaml
+4
-4
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
+5
-0
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
+8
-1
VIZ.H2V.Module/NDIView/View/NDIView.xaml
+117
-82
VIZ.H2V.Module/SystemSetting/Model/TallyCamSignalModel.cs
+72
-0
VIZ.H2V.Module/SystemSetting/View/SystemSettingView.xaml
+4
-4
VIZ.H2V.Module/SystemSetting/View/TallySettingPanelView.xaml
+132
-54
VIZ.H2V.Module/SystemSetting/ViewModel/TallySettingPanelViewModel.cs
+93
-43
VIZ.H2V.Module/VIZ.H2V.Module.csproj
+1
-0
VIZ.H2V.Storage/LiteDB/System/Info/TallyInfo.cs
+34
-0
VIZ.H2V.Storage/LiteDB/System/SystemConfig.cs
+8
-9
VIZ.H2V.Storage/VIZ.H2V.Storage.csproj
+1
-0
VIZ.H2V/config/config.ini
+1
-1
No files found.
VIZ.H2V.Module.Resource/Icons/ai_close_24x24.png
0 → 100644
View file @
404f3805
643 Bytes
VIZ.H2V.Module.Resource/Icons/ai_refresh_24x24.png
0 → 100644
View file @
404f3805
609 Bytes
VIZ.H2V.Module.Resource/Style/Button/Button_NdiView.xaml
View file @
404f3805
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="Button_Restart" TargetType="Button">
<!-- 功能按钮 -->
<Style x:Key="Button_Function" TargetType="Button">
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="Foreground" Value="#88ffc000"></Setter>
<Setter Property="FontSize" Value="14"></Setter>
<Setter Property="Template">
<Setter Property="Template">
<Setter.Value>
<Setter.Value>
<ControlTemplate TargetType="Button">
<ControlTemplate TargetType="Button">
<Border x:Name="border" B
orderBrush="#88ffc000" BorderThickness="2" B
ackground="Transparent">
<Border x:Name="border" Background="Transparent">
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"></ContentPresenter>
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"></ContentPresenter>
</Border>
</Border>
<ControlTemplate.Triggers>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#ccffc000"></Setter>
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
<Setter TargetName="border" Property="Background" Value="#11ffffff"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.
7
"></Setter>
<Setter Property="Opacity" Value="0.
35
"></Setter>
</Trigger>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate.Triggers>
</ControlTemplate>
</ControlTemplate>
...
...
VIZ.H2V.Module.Resource/Style/Button/Button_Setting.xaml
View file @
404f3805
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.
7
"></Setter>
<Setter Property="Opacity" Value="0.
35
"></Setter>
</Trigger>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate.Triggers>
</ControlTemplate>
</ControlTemplate>
...
...
VIZ.H2V.Module.Resource/Style/CheckBox/CheckBox_NdiView.xaml
View file @
404f3805
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Opacity" Value="0.
7
"></Setter>
<Setter TargetName="border" Property="Opacity" Value="0.
35
"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Opacity" Value="0.
7
"></Setter>
<Setter TargetName="border" Property="Opacity" Value="0.
35
"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
...
@@ -131,7 +131,7 @@
...
@@ -131,7 +131,7 @@
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Opacity" Value="0.
7
"></Setter>
<Setter TargetName="border" Property="Opacity" Value="0.
35
"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
...
@@ -163,7 +163,7 @@
...
@@ -163,7 +163,7 @@
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="border" Property="Opacity" Value="0.
7
"></Setter>
<Setter TargetName="border" Property="Opacity" Value="0.
35
"></Setter>
</Trigger>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
...
...
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
View file @
404f3805
...
@@ -208,5 +208,9 @@
...
@@ -208,5 +208,9 @@
<ItemGroup>
<ItemGroup>
<Resource Include="Icons\navigation3d_24x24.png" />
<Resource Include="Icons\navigation3d_24x24.png" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\ai_close_24x24.png" />
<Resource Include="Icons\ai_refresh_24x24.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
</Project>
\ No newline at end of file
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
View file @
404f3805
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
xmlns:local="clr-namespace:VIZ.H2V.Module"
xmlns:local="clr-namespace:VIZ.H2V.Module"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:domain="clr-namespace:VIZ.H2V.Domain;assembly=VIZ.H2V.Domain"
xmlns:domain="clr-namespace:VIZ.H2V.Domain;assembly=VIZ.H2V.Domain"
d:DataContext="{d:DesignInstance Type=local:NDIMainViewModel}" Background="Transparent"
d:DataContext="{d:DesignInstance Type=local:NDIMainViewModel}" Background="Transparent"
mc:Ignorable="d"
mc:Ignorable="d"
...
@@ -40,6 +41,7 @@
...
@@ -40,6 +41,7 @@
<StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top">
<StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top">
<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="#EEFFFFFF" Height="18"></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="最小化"
...
@@ -65,11 +67,12 @@
...
@@ -65,11 +67,12 @@
</Grid>
</Grid>
<!-- 底部 -->
<!-- 底部 -->
<Border Grid.Row="2" Background="#ff12202d">
<Border Grid.Row="2" Background="#ff12202d">
<Grid Margin="110,0,0,0">
<Grid Margin="110,0,
11
0,0">
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<!-- 算法服务监控 -->
<!-- 算法服务监控 -->
<StackPanel Orientation="Horizontal" Background="Transparent">
<StackPanel Orientation="Horizontal" Background="Transparent">
...
@@ -128,6 +131,10 @@
...
@@ -128,6 +131,10 @@
</ListBox.ItemTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ListBox>
</StackPanel>
</StackPanel>
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
<fcommon:TimeDisplayControl FontSize="12" Foreground="#AAFFFFFF"></fcommon:TimeDisplayControl>
</StackPanel>
</Grid>
</Grid>
</Border>
</Border>
</Grid>
</Grid>
...
...
VIZ.H2V.Module/NDIView/View/NDIView.xaml
View file @
404f3805
...
@@ -110,12 +110,13 @@
...
@@ -110,12 +110,13 @@
<!-- =================================================================================================== -->
<!-- =================================================================================================== -->
<!-- 标题 -->
<!-- 标题 -->
<
Border
HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1">
<
Grid
HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Column="1">
<RadioButton Content="{Binding Path=DisplayName,Mode=OneWay}" Foreground="White" FontSize="20" FontWeight="Black"
<RadioButton Content="{Binding Path=DisplayName,Mode=OneWay}" Foreground="White" FontSize="20" FontWeight="Black"
HorizontalAlignment="Center"
Width="200" Height="30" GroupName="NDIView_Title_Group"
Width="200" Height="30" GroupName="NDIView_Title_Group"
IsChecked="{Binding Path=IsActive,Mode=TwoWay}"
IsChecked="{Binding Path=IsActive,Mode=TwoWay}"
Style="{StaticResource RadioButton_NdiView_Title}"></RadioButton>
Style="{StaticResource RadioButton_NdiView_Title}"></RadioButton>
</
Border
>
</
Grid
>
<!-- 算法 -->
<!-- 算法 -->
<Grid Grid.RowSpan="2" Margin="0,20,0,0"
<Grid Grid.RowSpan="2" Margin="0,20,0,0"
IsEnabled="{Binding Path=IsFocus,Converter={StaticResource Bool2BoolConverter}}">
IsEnabled="{Binding Path=IsFocus,Converter={StaticResource Bool2BoolConverter}}">
...
@@ -151,14 +152,6 @@
...
@@ -151,14 +152,6 @@
</Border>
</Border>
</Grid>
</Grid>
</Grid>
</Grid>
<StackPanel Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0,20,0,0" Orientation="Horizontal">
<Button Width="80" Height="30" Content="重启算法" Style="{StaticResource Button_Restart}"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter_SettingButton}}"
Command="{Binding RestartCommand}"></Button>
<Button Width="80" Height="30" Content="关闭算法" Style="{StaticResource Button_Restart}" Margin="15,0,0,0"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter_StopButton}}"
Command="{Binding StopCommand}"></Button>
</StackPanel>
<!-- 机位对应特殊面板区域 -->
<!-- 机位对应特殊面板区域 -->
<Grid Grid.Row="1">
<Grid Grid.Row="1">
<!-- 单人机位 ===== 目标检测按钮 -->
<!-- 单人机位 ===== 目标检测按钮 -->
...
@@ -244,81 +237,123 @@
...
@@ -244,81 +237,123 @@
<fcommon:VideoControl x:Name="video"></fcommon:VideoControl>
<fcommon:VideoControl x:Name="video"></fcommon:VideoControl>
</Border>
</Border>
<!--
显示组
-->
<!--
Tally
-->
<StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,5" Orientation="Horizontal">
<StackPanel Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,5" Orientation="Horizontal">
<!-- 手动模式显示中轴线 -->
<CheckBox Style="{StaticResource CheckBox_IsShowCenterAxis}" Width="32" Height="32" Margin="0,0,10,0"
ToolTip="手动模式显示中轴线"
IsChecked="{Binding Path=AlgorithmConfig.IsShowCenterAxis,Mode=TwoWay}">
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding SaveAlgorithmConfigCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding SaveAlgorithmConfigCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</CheckBox>
<!-- 启用面积百分比校准 -->
<Ellipse Width="24" Height="24" Fill="#DDFF0000" Margin="0,0,0,0"></Ellipse>
<!-- 仅单人机位可用 -->
<CheckBox Style="{StaticResource CheckBox_IsAreaCorrectionEnabled}" Width="32" Height="32" Margin="0,0,10,0"
ToolTip="启用面积百分比校准"
IsChecked="{Binding Path=AlgorithmConfig.IsAreaCorrectionEnabled,Mode=TwoWay}">
<CheckBox.IsEnabled>
<MultiBinding Converter="{StaticResource NDIViewProperty2BoolConverter_IsAreaCorrectionEnabled}">
<Binding Path="ViewStatus"></Binding>
<Binding Path="StrategyMode"></Binding>
<Binding Path="StrategyType"></Binding>
</MultiBinding>
</CheckBox.IsEnabled>
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding IsAreaCorrectionEnabledChangedCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding IsAreaCorrectionEnabledChangedCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</CheckBox>
<!-- 启用边线过滤 -->
<CheckBox Style="{StaticResource CheckBox_IsBorderEnabled}" Width="32" Height="32" Margin="0,0,10,0"
ToolTip="启用边线过滤"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}"
IsChecked="{Binding Path=AlgorithmConfig.IsBorderEnabled,Mode=TwoWay}">
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderEnabledChangedCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderEnabledChangedCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</CheckBox>
<!-- 显示边线 -->
<CheckBox Style="{StaticResource CheckBox_IsBorderShow}" Width="32" Height="32"
x:Name="cb_showBorder"
ToolTip="显示边线"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}"
IsChecked="{Binding Path=AlgorithmConfig.IsShowBorder,Mode=TwoWay}">
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderShowChangedCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderShowChangedCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</CheckBox>
</StackPanel>
<!-- 设置 -->
<StackPanel Orientation="Vertical" VerticalAlignment="Top" Grid.Column="2" Grid.Row="1" >
<Button Height="40" Width="40" HorizontalAlignment="Center"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter_SettingButton}}"
Style="{StaticResource Button_Setting_Open}"
Command="{Binding Path=SettingCommand,Mode=OneWay}"
CommandParameter="{Binding ElementName=uc,Path=NDIKey,Mode=OneWay}"></Button>
</StackPanel>
</StackPanel>
<!-- 功能区 -->
<Grid Grid.Row="1" Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 功能区 -->
<StackPanel Orientation="Vertical" VerticalAlignment="Top">
<Border ToolTip="设置" Background="Transparent">
<Button Height="32" Width="32" HorizontalAlignment="Center"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter_SettingButton}}"
Style="{StaticResource Button_Setting_Open}"
Command="{Binding Path=SettingCommand,Mode=OneWay}"
CommandParameter="{Binding ElementName=uc,Path=NDIKey,Mode=OneWay}"></Button>
</Border>
<Rectangle Height="2" Fill="#AAFFFFFF" Width="30" Margin="0,10,0,0"></Rectangle>
<!-- 显示边线 -->
<Border ToolTip="显示边线" Background="Transparent" Margin="0,10,0,0">
<CheckBox Style="{StaticResource CheckBox_IsBorderShow}" Width="32" Height="32"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}"
IsChecked="{Binding Path=AlgorithmConfig.IsShowBorder,Mode=TwoWay}">
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderShowChangedCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderShowChangedCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</CheckBox>
</Border>
<!-- 启用边线过滤 -->
<Border ToolTip="启用边线过滤" Background="Transparent" Margin="0,10,0,0">
<CheckBox Style="{StaticResource CheckBox_IsBorderEnabled}" Width="32" Height="32"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter}}"
IsChecked="{Binding Path=AlgorithmConfig.IsBorderEnabled,Mode=TwoWay}">
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderEnabledChangedCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding IsBorderEnabledChangedCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</CheckBox>
</Border>
<!-- 启用面积百分比校准 ## 仅单人机位可用 -->
<Border ToolTip="启用面积百分比校准" Background="Transparent" Margin="0,10,0,0">
<CheckBox Style="{StaticResource CheckBox_IsAreaCorrectionEnabled}" Width="32" Height="32"
IsChecked="{Binding Path=AlgorithmConfig.IsAreaCorrectionEnabled,Mode=TwoWay}">
<CheckBox.IsEnabled>
<MultiBinding Converter="{StaticResource NDIViewProperty2BoolConverter_IsAreaCorrectionEnabled}">
<Binding Path="ViewStatus"></Binding>
<Binding Path="StrategyMode"></Binding>
<Binding Path="StrategyType"></Binding>
</MultiBinding>
</CheckBox.IsEnabled>
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding IsAreaCorrectionEnabledChangedCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding IsAreaCorrectionEnabledChangedCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</CheckBox>
</Border>
<!-- 手动模式显示中轴线 -->
<Border ToolTip="手动模式显示中轴线" Background="Transparent" Margin="0,10,0,0">
<CheckBox Style="{StaticResource CheckBox_IsShowCenterAxis}" Width="32" Height="32"
ToolTip="手动模式显示中轴线"
IsChecked="{Binding Path=AlgorithmConfig.IsShowCenterAxis,Mode=TwoWay}">
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Checked">
<behaviors:InvokeCommandAction Command="{Binding SaveAlgorithmConfigCommand}" />
</behaviors:EventTrigger>
<behaviors:EventTrigger EventName="Unchecked">
<behaviors:InvokeCommandAction Command="{Binding SaveAlgorithmConfigCommand}" />
</behaviors:EventTrigger>
</behaviors:Interaction.Triggers>
</CheckBox>
</Border>
</StackPanel>
<!-- AI功能区 -->
<StackPanel Orientation="Vertical" VerticalAlignment="Bottom" Grid.Row="1">
<TextBlock Text="AI" Foreground="#AAFFFFFF" HorizontalAlignment="Center"></TextBlock>
<Rectangle Height="2" Fill="#AAFFFFFF" Margin="0,2,0,0"></Rectangle>
<Border Margin="0,10,0,0" ToolTip="重启算法" Background="Transparent">
<Button Width="32" Height="32"
Style="{StaticResource Button_Function}"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter_SettingButton}}"
Command="{Binding RestartCommand}">
<Image Width="24" Height="24" Source="/VIZ.H2V.Module.Resource;component/Icons/ai_refresh_24x24.png"></Image>
</Button>
</Border>
<Border Margin="0,10,0,0" ToolTip="关闭算法" Background="Transparent">
<Button Width="32" Height="32"
Style="{StaticResource Button_Function}"
IsEnabled="{Binding Path=ViewStatus,Converter={StaticResource NDIViewStatus2IsEnabledConverter_StopButton}}"
Command="{Binding StopCommand}">
<Image Width="24" Height="24" Source="/VIZ.H2V.Module.Resource;component/Icons/ai_close_24x24.png"></Image>
</Button>
</Border>
</StackPanel>
</Grid>
</Grid>
</Grid>
</UserControl>
</UserControl>
VIZ.H2V.Module/SystemSetting/Model/TallyCamSignalModel.cs
0 → 100644
View file @
404f3805
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Media
;
using
VIZ.Framework.Core
;
namespace
VIZ.H2V.Module
{
/// <summary>
/// Tally窗口信号模型
/// </summary>
public
class
TallyCamSignalModel
:
ModelBase
{
#
region
PinIndex1
--
信号
1
引脚索引
private
int
?
pinIndex1
;
/// <summary>
/// 信号1引脚索引
/// </summary>
public
int
?
PinIndex1
{
get
{
return
pinIndex1
;
}
set
{
pinIndex1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PinIndex1
));
}
}
#
endregion
#
region
PinIndex2
--
信号
2
引脚索引
private
int
?
pinIndex2
;
/// <summary>
/// 信号2引脚索引
/// </summary>
public
int
?
PinIndex2
{
get
{
return
pinIndex2
;
}
set
{
pinIndex2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
PinIndex2
));
}
}
#
endregion
#
region
Color1
--
信号
1
颜色
private
Color
color1
;
/// <summary>
/// 信号1颜色
/// </summary>
public
Color
Color1
{
get
{
return
color1
;
}
set
{
color1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Color1
));
}
}
#
endregion
#
region
Color2
--
信号
2
颜色
private
Color
color2
;
/// <summary>
/// 信号2颜色
/// </summary>
public
Color
Color2
{
get
{
return
color2
;
}
set
{
color2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Color2
));
}
}
#
endregion
}
}
VIZ.H2V.Module/SystemSetting/View/SystemSettingView.xaml
View file @
404f3805
...
@@ -45,8 +45,8 @@
...
@@ -45,8 +45,8 @@
x:Name="rbStyle" Style="{StaticResource RadioButton_Setting}" IsChecked="True"></RadioButton>
x:Name="rbStyle" Style="{StaticResource RadioButton_Setting}" IsChecked="True"></RadioButton>
<RadioButton Content="快捷键" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
<RadioButton Content="快捷键" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
x:Name="rbHotkey" Style="{StaticResource RadioButton_Setting}"></RadioButton>
x:Name="rbHotkey" Style="{StaticResource RadioButton_Setting}"></RadioButton>
<
!--<
RadioButton Content="Tally" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
<RadioButton Content="Tally" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
x:Name="rbTally" Style="{StaticResource RadioButton_Setting}"></RadioButton>
-->
x:Name="rbTally" Style="{StaticResource RadioButton_Setting}"></RadioButton>
<RadioButton Content="关于" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
<RadioButton Content="关于" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
x:Name="rbAbout" Style="{StaticResource RadioButton_Setting}"></RadioButton>
x:Name="rbAbout" Style="{StaticResource RadioButton_Setting}"></RadioButton>
</StackPanel>
</StackPanel>
...
@@ -59,8 +59,8 @@
...
@@ -59,8 +59,8 @@
IsSelected="{Binding ElementName=rbStyle,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rbStyle,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl ViewType="{x:Type local:HotkeySettingPanelView}"
<fcommon:NavigationItemControl ViewType="{x:Type local:HotkeySettingPanelView}"
IsSelected="{Binding ElementName=rbHotkey,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rbHotkey,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<
!--<
fcommon:NavigationItemControl ViewType="{x:Type local:TallySettingPanelView}"
<fcommon:NavigationItemControl ViewType="{x:Type local:TallySettingPanelView}"
IsSelected="{Binding ElementName=rbTally,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
-->
IsSelected="{Binding ElementName=rbTally,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl ViewType="{x:Type local:AboutPanelView}"
<fcommon:NavigationItemControl ViewType="{x:Type local:AboutPanelView}"
IsSelected="{Binding ElementName=rbAbout,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
IsSelected="{Binding ElementName=rbAbout,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
</fcommon:NavigationControl>
</fcommon:NavigationControl>
...
...
VIZ.H2V.Module/SystemSetting/View/TallySettingPanelView.xaml
View file @
404f3805
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
<Grid Margin="45,60,40,0">
<Grid Margin="45,60,40,0">
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="
12
0"></RowDefinition>
<RowDefinition Height="
24
0"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="60"></RowDefinition>
<RowDefinition Height="200"></RowDefinition>
<RowDefinition Height="200"></RowDefinition>
...
@@ -38,69 +38,147 @@
...
@@ -38,69 +38,147 @@
<!-- Tally USB设备 -->
<!-- Tally USB设备 -->
<TextBlock Text="Tally信号GPIO引脚绑定" Foreground="White" FontSize="20" VerticalAlignment="Center"></TextBlock>
<TextBlock Text="Tally信号GPIO引脚绑定" Foreground="White" FontSize="20" VerticalAlignment="Center"></TextBlock>
<Rectangle Height="1" VerticalAlignment="Bottom" Fill="#ff3d4758"></Rectangle>
<Rectangle Height="1" VerticalAlignment="Bottom" Fill="#ff3d4758"></Rectangle>
<Grid Grid.Row="1">
<Grid Grid.Row="1"
Margin="0,10,0,0"
>
<Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="
60
"></RowDefinition>
<RowDefinition Height="
*
"></RowDefinition>
<RowDefinition Height="
60
"></RowDefinition>
<RowDefinition Height="
*
"></RowDefinition>
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<!-- CAM 1 -->
<!-- CAM 1 -->
<TextBlock Text="CAM 1" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="0"></TextBlock>
<Border BorderBrush="#ff3d4758" BorderThickness="1,1,0,0" Grid.Row="0" Grid.Column="0">
<ComboBox Style="{StaticResource ComboBox_Setting}" Grid.Column="1" Height="40" Margin="0,0,20,0"
<Grid>
ItemsSource="{Binding Path=Tally_GPIO_Pin_List,Mode=OneWay}"
<Grid.RowDefinitions>
SelectedValue="{Binding Path=Tally_GPIO_Cam_1,Mode=TwoWay}">
<RowDefinition Height="*"></RowDefinition>
<ComboBox.ItemTemplate>
<RowDefinition Height="*"></RowDefinition>
<DataTemplate>
</Grid.RowDefinitions>
<Border Background="Transparent" IsHitTestVisible="False">
<Grid.ColumnDefinitions>
<TextBlock Text="{Binding .}" Foreground="White" FontSize="16"></TextBlock>
<ColumnDefinition Width="120"></ColumnDefinition>
</Border>
<ColumnDefinition Width="80"></ColumnDefinition>
</DataTemplate>
<ColumnDefinition Width="*"></ColumnDefinition>
</ComboBox.ItemTemplate>
<ColumnDefinition Width="80"></ColumnDefinition>
</ComboBox>
</Grid.ColumnDefinitions>
<TextBlock Text="CAM 1" Foreground="#AAFFFFFF" FontSize="28" Grid.RowSpan="2"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Text="信号1" Foreground="#AAFFFFFF" FontSize="14" Grid.Column="1"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Text="信号2" Foreground="#AAFFFFFF" FontSize="14" Grid.Column="1" Grid.Row="1"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<ComboBox Grid.Row="0" Grid.Column="2" Style="{StaticResource ComboBox_Setting}"
Margin="10,0,10,0" Height="30"
ItemsSource="{Binding Path=GPIO_Pin_List}"
SelectedValue="{Binding Path=TallyInfo1.PinIndex1,Mode=TwoWay}"></ComboBox>
<ComboBox Grid.Row="1" Grid.Column="2" Style="{StaticResource ComboBox_Setting}"
Margin="10,0,10,0" Height="30"
ItemsSource="{Binding Path=GPIO_Pin_List}"
SelectedValue="{Binding Path=TallyInfo1.PinIndex2,Mode=TwoWay}"></ComboBox>
<fcommon:ColorPickButton Grid.Row="0" Grid.Column="4" Height="30" Width="60"
Color="{Binding Path=TallyInfo1.Color1,Mode=TwoWay}"></fcommon:ColorPickButton>
<fcommon:ColorPickButton Grid.Row="1" Grid.Column="4" Height="30" Width="60"
Color="{Binding Path=TallyInfo1.Color2,Mode=TwoWay}"></fcommon:ColorPickButton>
</Grid>
</Border>
<!-- CAM 2 -->
<!-- CAM 2 -->
<TextBlock Text="CAM 2" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="0" Grid.Column="2"></TextBlock>
<Border BorderBrush="#ff3d4758" BorderThickness="1,1,1,0" Grid.Row="0" Grid.Column="1">
<ComboBox Style="{StaticResource ComboBox_Setting}" Grid.Column="3" Height="40" Margin="0,0,20,0"
<Grid>
ItemsSource="{Binding Path=Tally_GPIO_Pin_List,Mode=OneWay}"
<Grid.RowDefinitions>
SelectedValue="{Binding Path=Tally_GPIO_Cam_2,Mode=TwoWay}">
<RowDefinition Height="*"></RowDefinition>
<ComboBox.ItemTemplate>
<RowDefinition Height="*"></RowDefinition>
<DataTemplate>
</Grid.RowDefinitions>
<Border Background="Transparent" IsHitTestVisible="False">
<Grid.ColumnDefinitions>
<TextBlock Text="{Binding .}" Foreground="White" FontSize="16"></TextBlock>
<ColumnDefinition Width="120"></ColumnDefinition>
</Border>
<ColumnDefinition Width="80"></ColumnDefinition>
</DataTemplate>
<ColumnDefinition Width="*"></ColumnDefinition>
</ComboBox.ItemTemplate>
<ColumnDefinition Width="80"></ColumnDefinition>
</ComboBox>
</Grid.ColumnDefinitions>
<TextBlock Text="CAM 2" Foreground="#AAFFFFFF" FontSize="28" Grid.RowSpan="2"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Text="信号1" Foreground="#AAFFFFFF" FontSize="14" Grid.Column="1"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Text="信号2" Foreground="#AAFFFFFF" FontSize="14" Grid.Column="1" Grid.Row="1"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<ComboBox Grid.Row="0" Grid.Column="2" Style="{StaticResource ComboBox_Setting}"
Margin="10,0,10,0" Height="30"
ItemsSource="{Binding Path=GPIO_Pin_List}"
SelectedValue="{Binding Path=TallyInfo2.PinIndex1,Mode=TwoWay}"></ComboBox>
<ComboBox Grid.Row="1" Grid.Column="2" Style="{StaticResource ComboBox_Setting}"
Margin="10,0,10,0" Height="30"
ItemsSource="{Binding Path=GPIO_Pin_List}"
SelectedValue="{Binding Path=TallyInfo2.PinIndex2,Mode=TwoWay}"></ComboBox>
<fcommon:ColorPickButton Grid.Row="0" Grid.Column="4" Height="30" Width="60"
Color="{Binding Path=TallyInfo2.Color1,Mode=TwoWay}"></fcommon:ColorPickButton>
<fcommon:ColorPickButton Grid.Row="1" Grid.Column="4" Height="30" Width="60"
Color="{Binding Path=TallyInfo2.Color2,Mode=TwoWay}"></fcommon:ColorPickButton>
</Grid>
</Border>
<!-- CAM 3 -->
<!-- CAM 3 -->
<TextBlock Text="CAM 3" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="1"></TextBlock>
<Border BorderBrush="#ff3d4758" BorderThickness="1,1,0,1" Grid.Row="1" Grid.Column="0">
<ComboBox Style="{StaticResource ComboBox_Setting}" Grid.Row="1" Grid.Column="1" Height="40" Margin="0,0,20,0"
<Grid>
ItemsSource="{Binding Path=Tally_GPIO_Pin_List,Mode=OneWay}"
<Grid.RowDefinitions>
SelectedValue="{Binding Path=Tally_GPIO_Cam_3,Mode=TwoWay}">
<RowDefinition Height="*"></RowDefinition>
<ComboBox.ItemTemplate>
<RowDefinition Height="*"></RowDefinition>
<DataTemplate>
</Grid.RowDefinitions>
<Border Background="Transparent" IsHitTestVisible="False">
<Grid.ColumnDefinitions>
<TextBlock Text="{Binding .}" Foreground="White" FontSize="16"></TextBlock>
<ColumnDefinition Width="120"></ColumnDefinition>
</Border>
<ColumnDefinition Width="80"></ColumnDefinition>
</DataTemplate>
<ColumnDefinition Width="*"></ColumnDefinition>
</ComboBox.ItemTemplate>
<ColumnDefinition Width="80"></ColumnDefinition>
</ComboBox>
</Grid.ColumnDefinitions>
<TextBlock Text="CAM 3" Foreground="#AAFFFFFF" FontSize="28" Grid.RowSpan="2"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Text="信号1" Foreground="#AAFFFFFF" FontSize="14" Grid.Column="1"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Text="信号2" Foreground="#AAFFFFFF" FontSize="14" Grid.Column="1" Grid.Row="1"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<ComboBox Grid.Row="0" Grid.Column="2" Style="{StaticResource ComboBox_Setting}"
Margin="10,0,10,0" Height="30"
ItemsSource="{Binding Path=GPIO_Pin_List}"
SelectedValue="{Binding Path=TallyInfo3.PinIndex1,Mode=TwoWay}"></ComboBox>
<ComboBox Grid.Row="1" Grid.Column="2" Style="{StaticResource ComboBox_Setting}"
Margin="10,0,10,0" Height="30"
ItemsSource="{Binding Path=GPIO_Pin_List}"
SelectedValue="{Binding Path=TallyInfo3.PinIndex2,Mode=TwoWay}"></ComboBox>
<fcommon:ColorPickButton Grid.Row="0" Grid.Column="4" Height="30" Width="60"
Color="{Binding Path=TallyInfo3.Color1,Mode=TwoWay}"></fcommon:ColorPickButton>
<fcommon:ColorPickButton Grid.Row="1" Grid.Column="4" Height="30" Width="60"
Color="{Binding Path=TallyInfo3.Color2,Mode=TwoWay}"></fcommon:ColorPickButton>
</Grid>
</Border>
<!-- CAM 4 -->
<!-- CAM 4 -->
<TextBlock Text="CAM 4" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="1" Grid.Column="2"></TextBlock>
<Border BorderBrush="#ff3d4758" BorderThickness="1,1,1,1" Grid.Row="1" Grid.Column="1">
<ComboBox Style="{StaticResource ComboBox_Setting}" Grid.Row="1" Grid.Column="3" Height="40" Margin="0,0,20,0"
<Grid>
ItemsSource="{Binding Path=Tally_GPIO_Pin_List,Mode=OneWay}"
<Grid.RowDefinitions>
SelectedValue="{Binding Path=Tally_GPIO_Cam_4,Mode=TwoWay}">
<RowDefinition Height="*"></RowDefinition>
<ComboBox.ItemTemplate>
<RowDefinition Height="*"></RowDefinition>
<DataTemplate>
</Grid.RowDefinitions>
<Border Background="Transparent" IsHitTestVisible="False">
<Grid.ColumnDefinitions>
<TextBlock Text="{Binding .}" Foreground="White" FontSize="16"></TextBlock>
<ColumnDefinition Width="120"></ColumnDefinition>
</Border>
<ColumnDefinition Width="80"></ColumnDefinition>
</DataTemplate>
<ColumnDefinition Width="*"></ColumnDefinition>
</ComboBox.ItemTemplate>
<ColumnDefinition Width="80"></ColumnDefinition>
</ComboBox>
</Grid.ColumnDefinitions>
<TextBlock Text="CAM 4" Foreground="#AAFFFFFF" FontSize="28" Grid.RowSpan="2"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Text="信号1" Foreground="#AAFFFFFF" FontSize="14" Grid.Column="1"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<TextBlock Text="信号2" Foreground="#AAFFFFFF" FontSize="14" Grid.Column="1" Grid.Row="1"
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
<ComboBox Grid.Row="0" Grid.Column="2" Style="{StaticResource ComboBox_Setting}"
Margin="10,0,10,0" Height="30"
ItemsSource="{Binding Path=GPIO_Pin_List}"
SelectedValue="{Binding Path=TallyInfo4.PinIndex1,Mode=TwoWay}"></ComboBox>
<ComboBox Grid.Row="1" Grid.Column="2" Style="{StaticResource ComboBox_Setting}"
Margin="10,0,10,0" Height="30"
ItemsSource="{Binding Path=GPIO_Pin_List}"
SelectedValue="{Binding Path=TallyInfo4.PinIndex2,Mode=TwoWay}"></ComboBox>
<fcommon:ColorPickButton Grid.Row="0" Grid.Column="4" Height="30" Width="60"
Color="{Binding Path=TallyInfo4.Color1,Mode=TwoWay}"></fcommon:ColorPickButton>
<fcommon:ColorPickButton Grid.Row="1" Grid.Column="4" Height="30" Width="60"
Color="{Binding Path=TallyInfo4.Color2,Mode=TwoWay}"></fcommon:ColorPickButton>
</Grid>
</Border>
</Grid>
</Grid>
<!-- 引脚状态 -->
<!-- 引脚状态 -->
<TextBlock Text="GPIO引脚状态" Grid.Row="2" Foreground="White" FontSize="20" VerticalAlignment="Center"></TextBlock>
<TextBlock Text="GPIO引脚状态" Grid.Row="2" Foreground="White" FontSize="20" VerticalAlignment="Center"></TextBlock>
...
...
VIZ.H2V.Module/SystemSetting/ViewModel/TallySettingPanelViewModel.cs
View file @
404f3805
...
@@ -34,58 +34,58 @@ namespace VIZ.H2V.Module
...
@@ -34,58 +34,58 @@ namespace VIZ.H2V.Module
// === Property ===
// === Property ===
// ======================================================================================
// ======================================================================================
#
region
Tally
_GPIO_Cam_1
--
窗口
1
信号引脚
#
region
Tally
Info1
--
Tally
信号
--
窗口
1
private
int
tally_gpio_cam_1
;
private
TallyCamSignalModel
tallyInfo1
=
new
TallyCamSignalModel
()
;
/// <summary>
/// <summary>
///
信号引脚
///
Tally信号 -- 窗口1
/// </summary>
/// </summary>
public
int
Tally_GPIO_Cam_
1
public
TallyCamSignalModel
TallyInfo
1
{
{
get
{
return
tally
_gpio_cam_
1
;
}
get
{
return
tally
Info
1
;
}
set
{
tally
_gpio_cam_1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_GPIO_Cam_
1
));
}
set
{
tally
Info1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TallyInfo
1
));
}
}
}
#
endregion
#
endregion
#
region
Tally
_GPIO_Cam_2
--
窗口
2
信号引脚
#
region
Tally
Info2
--
Tally
信号
--
窗口
2
private
int
tally_gpio_cam_2
;
private
TallyCamSignalModel
tallyInfo2
=
new
TallyCamSignalModel
()
;
/// <summary>
/// <summary>
///
信号引脚
///
Tally信号 -- 窗口2
/// </summary>
/// </summary>
public
int
Tally_GPIO_Cam_
2
public
TallyCamSignalModel
TallyInfo
2
{
{
get
{
return
tally
_gpio_cam_
2
;
}
get
{
return
tally
Info
2
;
}
set
{
tally
_gpio_cam_2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_GPIO_Cam_
2
));
}
set
{
tally
Info2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TallyInfo
2
));
}
}
}
#
endregion
#
endregion
#
region
Tally
_GPIO_Cam_3
--
窗口
3
信号引脚
#
region
Tally
Info3
--
Tally
信号
--
窗口
3
private
int
tally_gpio_cam_3
;
private
TallyCamSignalModel
tallyInfo3
=
new
TallyCamSignalModel
()
;
/// <summary>
/// <summary>
///
信号引脚
///
Tally信号 -- 窗口3
/// </summary>
/// </summary>
public
int
Tally_GPIO_Cam_
3
public
TallyCamSignalModel
TallyInfo
3
{
{
get
{
return
tally
_gpio_cam_
3
;
}
get
{
return
tally
Info
3
;
}
set
{
tally
_gpio_cam_3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_GPIO_Cam_
3
));
}
set
{
tally
Info3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TallyInfo
3
));
}
}
}
#
endregion
#
endregion
#
region
Tally
_GPIO_Cam_4
--
窗口
4
信号引脚
#
region
Tally
Info4
--
Tally
信号
--
窗口
4
private
int
tally_gpio_cam_4
;
private
TallyCamSignalModel
tallyInfo4
=
new
TallyCamSignalModel
()
;
/// <summary>
/// <summary>
///
信号引脚
///
Tally信号 -- 窗口4
/// </summary>
/// </summary>
public
int
Tally_GPIO_Cam_
4
public
TallyCamSignalModel
TallyInfo
4
{
{
get
{
return
tally
_gpio_cam_
4
;
}
get
{
return
tally
Info
4
;
}
set
{
tally
_gpio_cam_4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_GPIO_Cam_
4
));
}
set
{
tally
Info4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TallyInfo
4
));
}
}
}
#
endregion
#
endregion
...
@@ -118,16 +118,16 @@ namespace VIZ.H2V.Module
...
@@ -118,16 +118,16 @@ namespace VIZ.H2V.Module
#
endregion
#
endregion
#
region
Tally_
GPIO_Pin_List
--
GPIO
引脚列表
#
region
GPIO_Pin_List
--
GPIO
引脚列表
private
List
<
int
>
tally_
gpio_pin_list
;
private
List
<
int
?>
gpio_pin_list
;
/// <summary>
/// <summary>
/// GPIO引脚列表
/// GPIO引脚列表
/// </summary>
/// </summary>
public
List
<
int
>
Tally_
GPIO_Pin_List
public
List
<
int
?>
GPIO_Pin_List
{
{
get
{
return
tally_
gpio_pin_list
;
}
get
{
return
gpio_pin_list
;
}
set
{
tally_gpio_pin_list
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_
GPIO_Pin_List
));
}
set
{
gpio_pin_list
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
GPIO_Pin_List
));
}
}
}
#
endregion
#
endregion
...
@@ -153,19 +153,21 @@ namespace VIZ.H2V.Module
...
@@ -153,19 +153,21 @@ namespace VIZ.H2V.Module
vm
.
Settings
.
Add
(
this
);
vm
.
Settings
.
Add
(
this
);
this
.
SystemConfig
=
vm
.
SystemConfig
;
this
.
SystemConfig
=
vm
.
SystemConfig
;
List
<
int
>
pin_list
=
new
List
<
int
>();
List
<
int
?>
pin_list
=
new
List
<
int
?>();
pin_list
.
Add
(
null
);
for
(
int
i
=
0
;
i
<=
15
;
i
++)
for
(
int
i
=
0
;
i
<=
15
;
i
++)
{
{
pin_list
.
Add
(
i
);
pin_list
.
Add
(
i
);
}
}
this
.
Tally_
GPIO_Pin_List
=
pin_list
;
this
.
GPIO_Pin_List
=
pin_list
;
this
.
Tally_GPIO_Cam_1
=
this
.
SystemConfig
.
Tally_GPIO_CAM_1
;
this
.
loadTallyInfo
(
this
.
TallyInfo1
,
this
.
SystemConfig
.
TallyInfo1
)
;
this
.
Tally_GPIO_Cam_2
=
this
.
SystemConfig
.
Tally_GPIO_CAM_2
;
this
.
loadTallyInfo
(
this
.
TallyInfo2
,
this
.
SystemConfig
.
TallyInfo2
)
;
this
.
Tally_GPIO_Cam_3
=
this
.
SystemConfig
.
Tally_GPIO_CAM_3
;
this
.
loadTallyInfo
(
this
.
TallyInfo3
,
this
.
SystemConfig
.
TallyInfo3
)
;
this
.
Tally_GPIO_Cam_4
=
this
.
SystemConfig
.
Tally_GPIO_CAM_4
;
this
.
loadTallyInfo
(
this
.
TallyInfo4
,
this
.
SystemConfig
.
TallyInfo4
)
;
// GPIO模型
this
.
GPIOModels
=
GPIOManager
.
Models
;
this
.
GPIOModels
=
GPIOManager
.
Models
;
this
.
SelectedGPIOModel
=
this
.
GPIOModels
?.
FirstOrDefault
();
this
.
SelectedGPIOModel
=
this
.
GPIOModels
?.
FirstOrDefault
();
}
}
...
@@ -182,13 +184,13 @@ namespace VIZ.H2V.Module
...
@@ -182,13 +184,13 @@ namespace VIZ.H2V.Module
/// <returns>是否需要保存</returns>
/// <returns>是否需要保存</returns>
public
bool
IsNeedSave
()
public
bool
IsNeedSave
()
{
{
if
(
this
.
Tally_GPIO_Cam_1
!=
this
.
SystemConfig
.
Tally_GPIO_CAM_1
)
if
(
this
.
isTallyInfoNeedSave
(
this
.
TallyInfo1
,
this
.
SystemConfig
.
TallyInfo1
)
)
return
true
;
return
true
;
if
(
this
.
Tally_GPIO_Cam_2
!=
this
.
SystemConfig
.
Tally_GPIO_CAM_2
)
if
(
this
.
isTallyInfoNeedSave
(
this
.
TallyInfo2
,
this
.
SystemConfig
.
TallyInfo2
)
)
return
true
;
return
true
;
if
(
this
.
Tally_GPIO_Cam_3
!=
this
.
SystemConfig
.
Tally_GPIO_CAM_3
)
if
(
this
.
isTallyInfoNeedSave
(
this
.
TallyInfo3
,
this
.
SystemConfig
.
TallyInfo3
)
)
return
true
;
return
true
;
if
(
this
.
Tally_GPIO_Cam_4
!=
this
.
SystemConfig
.
Tally_GPIO_CAM_4
)
if
(
this
.
isTallyInfoNeedSave
(
this
.
TallyInfo4
,
this
.
SystemConfig
.
TallyInfo4
)
)
return
true
;
return
true
;
return
false
;
return
false
;
...
@@ -201,10 +203,10 @@ namespace VIZ.H2V.Module
...
@@ -201,10 +203,10 @@ namespace VIZ.H2V.Module
public
bool
Save
()
public
bool
Save
()
{
{
// 保存
// 保存
this
.
SystemConfig
.
Tally_GPIO_CAM_1
=
this
.
Tally_GPIO_Cam_1
;
this
.
saveTallyInfo
(
this
.
TallyInfo1
,
this
.
SystemConfig
.
TallyInfo1
)
;
this
.
SystemConfig
.
Tally_GPIO_CAM_2
=
this
.
Tally_GPIO_Cam_2
;
this
.
saveTallyInfo
(
this
.
TallyInfo2
,
this
.
SystemConfig
.
TallyInfo2
)
;
this
.
SystemConfig
.
Tally_GPIO_CAM_3
=
this
.
Tally_GPIO_Cam_3
;
this
.
saveTallyInfo
(
this
.
TallyInfo3
,
this
.
SystemConfig
.
TallyInfo3
)
;
this
.
SystemConfig
.
Tally_GPIO_CAM_4
=
this
.
Tally_GPIO_Cam_4
;
this
.
saveTallyInfo
(
this
.
TallyInfo4
,
this
.
SystemConfig
.
TallyInfo4
)
;
ApplicationDomainEx
.
LiteDbContext
.
SystemConfig
.
Update
(
this
.
SystemConfig
);
ApplicationDomainEx
.
LiteDbContext
.
SystemConfig
.
Update
(
this
.
SystemConfig
);
...
@@ -218,5 +220,52 @@ namespace VIZ.H2V.Module
...
@@ -218,5 +220,52 @@ namespace VIZ.H2V.Module
// 返回
// 返回
return
true
;
return
true
;
}
}
/// <summary>
/// 加载Tally信息
/// </summary>
/// <param name="model">模型</param>
/// <param name="entity">实体</param>
private
void
loadTallyInfo
(
TallyCamSignalModel
model
,
TallyInfo
entity
)
{
// CAM 2
model
.
PinIndex1
=
entity
.
PinIndex1
;
model
.
PinIndex2
=
entity
.
PinIndex2
;
model
.
Color1
=
(
Color
)
ColorConverter
.
ConvertFromString
(
entity
.
Color1
);
model
.
Color2
=
(
Color
)
ColorConverter
.
ConvertFromString
(
entity
.
Color2
);
}
/// <summary>
/// 是否需要保存TallyInfo信息
/// </summary>
/// <param name="model">模型</param>
/// <param name="entity">实体</param>
/// <returns>是否需要保存TallyInfo信息</returns>
private
bool
isTallyInfoNeedSave
(
TallyCamSignalModel
model
,
TallyInfo
entity
)
{
if
(
model
.
PinIndex1
!=
entity
.
PinIndex1
)
return
true
;
if
(
model
.
PinIndex2
!=
entity
.
PinIndex2
)
return
true
;
if
(
model
.
Color1
.
ToString
()
!=
entity
.
Color1
)
return
true
;
if
(
model
.
Color2
.
ToString
()
!=
entity
.
Color2
)
return
true
;
return
false
;
}
/// <summary>
/// 保存Tally信息
/// </summary>
/// <param name="model">模型</param>
/// <param name="entity">实体</param>
private
void
saveTallyInfo
(
TallyCamSignalModel
model
,
TallyInfo
entity
)
{
entity
.
PinIndex1
=
model
.
PinIndex1
;
entity
.
PinIndex2
=
model
.
PinIndex2
;
entity
.
Color1
=
model
.
Color1
.
ToString
();
entity
.
Color2
=
model
.
Color2
.
ToString
();
}
}
}
}
}
\ No newline at end of file
VIZ.H2V.Module/VIZ.H2V.Module.csproj
View file @
404f3805
...
@@ -258,6 +258,7 @@
...
@@ -258,6 +258,7 @@
<Compile Include="Setup\Provider\AppSetup_Recording.cs" />
<Compile Include="Setup\Provider\AppSetup_Recording.cs" />
<Compile Include="Setup\Provider\AppSetup_InitUDP.cs" />
<Compile Include="Setup\Provider\AppSetup_InitUDP.cs" />
<Compile Include="Setup\Provider\AppSetup_SaveCenterClipBox.cs" />
<Compile Include="Setup\Provider\AppSetup_SaveCenterClipBox.cs" />
<Compile Include="SystemSetting\Model\TallyCamSignalModel.cs" />
<Compile Include="SystemSetting\ViewModel\HotkeySettingPanelViewModel.cs" />
<Compile Include="SystemSetting\ViewModel\HotkeySettingPanelViewModel.cs" />
<Compile Include="SystemSetting\ViewModel\AboutPanelViewModel.cs" />
<Compile Include="SystemSetting\ViewModel\AboutPanelViewModel.cs" />
<Compile Include="SystemSetting\ViewModel\ISystemSetting.cs" />
<Compile Include="SystemSetting\ViewModel\ISystemSetting.cs" />
...
...
VIZ.H2V.Storage/LiteDB/System/Info/TallyInfo.cs
0 → 100644
View file @
404f3805
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.H2V.Storage
{
/// <summary>
/// Tally信息
/// </summary>
public
class
TallyInfo
{
/// <summary>
/// 引脚位序 信号1
/// </summary>
public
int
?
PinIndex1
{
get
;
set
;
}
=
0
;
/// <summary>
/// 引脚位序 信号2
/// </summary>
public
int
?
PinIndex2
{
get
;
set
;
}
=
1
;
/// <summary>
/// 颜色 信号1
/// </summary>
public
string
Color1
{
get
;
set
;
}
=
"#FFFF0000"
;
/// <summary>
/// 颜色 信号2
/// </summary>
public
string
Color2
{
get
;
set
;
}
=
"#FF00FF00"
;
}
}
VIZ.H2V.Storage/LiteDB/System/SystemConfig.cs
View file @
404f3805
...
@@ -66,24 +66,23 @@ namespace VIZ.H2V.Storage
...
@@ -66,24 +66,23 @@ namespace VIZ.H2V.Storage
public
double
ManualNavigation3DMappingMultiple
{
get
;
set
;
}
=
1d
;
public
double
ManualNavigation3DMappingMultiple
{
get
;
set
;
}
=
1d
;
/// <summary>
/// <summary>
/// Tally信
号GPIO引角 -- CAM
1
/// Tally信
息 -- 窗口
1
/// </summary>
/// </summary>
public
int
Tally_GPIO_CAM_1
{
get
;
set
;
}
=
0
;
public
TallyInfo
TallyInfo1
{
get
;
set
;
}
=
new
TallyInfo
()
;
/// <summary>
/// <summary>
/// Tally信
号GPIO引角 -- CAM
2
/// Tally信
息 -- 窗口
2
/// </summary>
/// </summary>
public
int
Tally_GPIO_CAM_2
{
get
;
set
;
}
=
1
;
public
TallyInfo
TallyInfo2
{
get
;
set
;
}
=
new
TallyInfo
()
;
/// <summary>
/// <summary>
/// Tally信
号GPIO引角 -- CAM
3
/// Tally信
息 -- 窗口
3
/// </summary>
/// </summary>
public
int
Tally_GPIO_CAM_3
{
get
;
set
;
}
=
2
;
public
TallyInfo
TallyInfo3
{
get
;
set
;
}
=
new
TallyInfo
();
/// <summary>
/// <summary>
/// Tally信
号GPIO引角 -- CAM
4
/// Tally信
息 -- 窗口
4
/// </summary>
/// </summary>
public
int
Tally_GPIO_CAM_4
{
get
;
set
;
}
=
3
;
public
TallyInfo
TallyInfo4
{
get
;
set
;
}
=
new
TallyInfo
()
;
}
}
}
}
VIZ.H2V.Storage/VIZ.H2V.Storage.csproj
View file @
404f3805
...
@@ -130,6 +130,7 @@
...
@@ -130,6 +130,7 @@
<Compile Include="LiteDB\LiteDbContext.cs" />
<Compile Include="LiteDB\LiteDbContext.cs" />
<Compile Include="LiteDB\NdiView\NdiViewConfig.cs" />
<Compile Include="LiteDB\NdiView\NdiViewConfig.cs" />
<Compile Include="LiteDB\System\HotkeyConfig.cs" />
<Compile Include="LiteDB\System\HotkeyConfig.cs" />
<Compile Include="LiteDB\System\Info\TallyInfo.cs" />
<Compile Include="LiteDB\System\SystemConfig.cs" />
<Compile Include="LiteDB\System\SystemConfig.cs" />
<Compile Include="LiteDB\Video\VideoEntity.cs" />
<Compile Include="LiteDB\Video\VideoEntity.cs" />
<Compile Include="LiteDB\Video\VideoGroupEntity.cs" />
<Compile Include="LiteDB\Video\VideoGroupEntity.cs" />
...
...
VIZ.H2V/config/config.ini
View file @
404f3805
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
; ============================================================
; ============================================================
[Application]
[Application]
;是否是调试模式
;是否是调试模式
APPLICATION_IS_DEBUG
=
tru
e
APPLICATION_IS_DEBUG
=
fals
e
;3D鼠标平滑系数
;3D鼠标平滑系数
APPLICATION_3D_MOUSE_SMOOTH_COEFFICIENT
=
0.015
APPLICATION_3D_MOUSE_SMOOTH_COEFFICIENT
=
0.015
; ============================================================
; ============================================================
...
...
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