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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
237 additions
and
70 deletions
+237
-70
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
+0
-0
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
+0
-0
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"
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="Foreground" Value="#88ffc000"></Setter>
<Setter Property="FontSize" Value="14"></Setter>
<Setter Property="Template">
<Setter.Value>
<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>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="BorderBrush" Value="#ccffc000"></Setter>
<Setter TargetName="border" Property="Background" Value="#11ffffff"></Setter>
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.
7
"></Setter>
<Setter Property="Opacity" Value="0.
35
"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
...
...
VIZ.H2V.Module.Resource/Style/Button/Button_Setting.xaml
View file @
404f3805
...
...
@@ -41,7 +41,7 @@
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value="0.
7
"></Setter>
<Setter Property="Opacity" Value="0.
35
"></Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
...
...
VIZ.H2V.Module.Resource/Style/CheckBox/CheckBox_NdiView.xaml
View file @
404f3805
...
...
@@ -67,7 +67,7 @@
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
</Trigger>
<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 Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
...
...
@@ -99,7 +99,7 @@
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
</Trigger>
<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 Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
...
...
@@ -131,7 +131,7 @@
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
</Trigger>
<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 Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
...
...
@@ -163,7 +163,7 @@
<Setter TargetName="img_over" Property="Visibility" Value="Visible"></Setter>
</Trigger>
<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 Property="IsMouseOver" Value="True">
<Setter TargetName="border" Property="Background" Value="#22ffffff"></Setter>
...
...
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
View file @
404f3805
...
...
@@ -208,5 +208,9 @@
<ItemGroup>
<Resource Include="Icons\navigation3d_24x24.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Icons\ai_close_24x24.png" />
<Resource Include="Icons\ai_refresh_24x24.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
VIZ.H2V.Module/NDIMainView/View/NDIMainView.xaml
View file @
404f3805
...
...
@@ -6,6 +6,7 @@
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
xmlns:fcore="clr-namespace:VIZ.Framework.Core;assembly=VIZ.Framework.Core"
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"
d:DataContext="{d:DesignInstance Type=local:NDIMainViewModel}" Background="Transparent"
mc:Ignorable="d"
...
...
@@ -40,6 +41,7 @@
<StackPanel Orientation="Horizontal" Grid.Column="2" HorizontalAlignment="Right" VerticalAlignment="Top">
<Button Command="{Binding Path=InitNavigation3DCommand}" ToolTip="初始化摇杆"
Style="{StaticResource Button_Navigation3D}" Height="30"></Button>
<Rectangle Width="2" Fill="#EEFFFFFF" Height="18"></Rectangle>
<Button Command="{Binding Path=SettingCommand}" ToolTip="系统设置"
Style="{StaticResource Button_Setting}" Height="30"></Button>
<Button Command="{Binding Path=MinCommand}" ToolTip="最小化"
...
...
@@ -65,11 +67,12 @@
</Grid>
<!-- 底部 -->
<Border Grid.Row="2" Background="#ff12202d">
<Grid Margin="110,0,0,0">
<Grid Margin="110,0,
11
0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- 算法服务监控 -->
<StackPanel Orientation="Horizontal" Background="Transparent">
...
...
@@ -128,6 +131,10 @@
</ListBox.ItemTemplate>
</ListBox>
</StackPanel>
<StackPanel Grid.Column="3" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
<fcommon:TimeDisplayControl FontSize="12" Foreground="#AAFFFFFF"></fcommon:TimeDisplayControl>
</StackPanel>
</Grid>
</Border>
</Grid>
...
...
VIZ.H2V.Module/NDIView/View/NDIView.xaml
View file @
404f3805
This diff is collapsed.
Click to expand it.
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 @@
x:Name="rbStyle" Style="{StaticResource RadioButton_Setting}" IsChecked="True"></RadioButton>
<RadioButton Content="快捷键" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
x:Name="rbHotkey" Style="{StaticResource RadioButton_Setting}"></RadioButton>
<
!--<
RadioButton Content="Tally" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
x:Name="rbTally" Style="{StaticResource RadioButton_Setting}"></RadioButton>
-->
<RadioButton Content="Tally" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
x:Name="rbTally" Style="{StaticResource RadioButton_Setting}"></RadioButton>
<RadioButton Content="关于" Height="50" Foreground="White" FontSize="22" VerticalContentAlignment="Center"
x:Name="rbAbout" Style="{StaticResource RadioButton_Setting}"></RadioButton>
</StackPanel>
...
...
@@ -59,8 +59,8 @@
IsSelected="{Binding ElementName=rbStyle,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl ViewType="{x:Type local:HotkeySettingPanelView}"
IsSelected="{Binding ElementName=rbHotkey,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<
!--<
fcommon:NavigationItemControl ViewType="{x:Type local:TallySettingPanelView}"
IsSelected="{Binding ElementName=rbTally,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
-->
<fcommon:NavigationItemControl ViewType="{x:Type local:TallySettingPanelView}"
IsSelected="{Binding ElementName=rbTally,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
<fcommon:NavigationItemControl ViewType="{x:Type local:AboutPanelView}"
IsSelected="{Binding ElementName=rbAbout,Path=IsChecked,Mode=OneWay}"></fcommon:NavigationItemControl>
</fcommon:NavigationControl>
...
...
VIZ.H2V.Module/SystemSetting/View/TallySettingPanelView.xaml
View file @
404f3805
This diff is collapsed.
Click to expand it.
VIZ.H2V.Module/SystemSetting/ViewModel/TallySettingPanelViewModel.cs
View file @
404f3805
...
...
@@ -34,58 +34,58 @@ namespace VIZ.H2V.Module
// === Property ===
// ======================================================================================
#
region
Tally
_GPIO_Cam_1
--
窗口
1
信号引脚
#
region
Tally
Info1
--
Tally
信号
--
窗口
1
private
int
tally_gpio_cam_1
;
private
TallyCamSignalModel
tallyInfo1
=
new
TallyCamSignalModel
()
;
/// <summary>
///
信号引脚
///
Tally信号 -- 窗口1
/// </summary>
public
int
Tally_GPIO_Cam_
1
public
TallyCamSignalModel
TallyInfo
1
{
get
{
return
tally
_gpio_cam_
1
;
}
set
{
tally
_gpio_cam_1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_GPIO_Cam_
1
));
}
get
{
return
tally
Info
1
;
}
set
{
tally
Info1
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TallyInfo
1
));
}
}
#
endregion
#
region
Tally
_GPIO_Cam_2
--
窗口
2
信号引脚
#
region
Tally
Info2
--
Tally
信号
--
窗口
2
private
int
tally_gpio_cam_2
;
private
TallyCamSignalModel
tallyInfo2
=
new
TallyCamSignalModel
()
;
/// <summary>
///
信号引脚
///
Tally信号 -- 窗口2
/// </summary>
public
int
Tally_GPIO_Cam_
2
public
TallyCamSignalModel
TallyInfo
2
{
get
{
return
tally
_gpio_cam_
2
;
}
set
{
tally
_gpio_cam_2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_GPIO_Cam_
2
));
}
get
{
return
tally
Info
2
;
}
set
{
tally
Info2
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TallyInfo
2
));
}
}
#
endregion
#
region
Tally
_GPIO_Cam_3
--
窗口
3
信号引脚
#
region
Tally
Info3
--
Tally
信号
--
窗口
3
private
int
tally_gpio_cam_3
;
private
TallyCamSignalModel
tallyInfo3
=
new
TallyCamSignalModel
()
;
/// <summary>
///
信号引脚
///
Tally信号 -- 窗口3
/// </summary>
public
int
Tally_GPIO_Cam_
3
public
TallyCamSignalModel
TallyInfo
3
{
get
{
return
tally
_gpio_cam_
3
;
}
set
{
tally
_gpio_cam_3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_GPIO_Cam_
3
));
}
get
{
return
tally
Info
3
;
}
set
{
tally
Info3
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TallyInfo
3
));
}
}
#
endregion
#
region
Tally
_GPIO_Cam_4
--
窗口
4
信号引脚
#
region
Tally
Info4
--
Tally
信号
--
窗口
4
private
int
tally_gpio_cam_4
;
private
TallyCamSignalModel
tallyInfo4
=
new
TallyCamSignalModel
()
;
/// <summary>
///
信号引脚
///
Tally信号 -- 窗口4
/// </summary>
public
int
Tally_GPIO_Cam_
4
public
TallyCamSignalModel
TallyInfo
4
{
get
{
return
tally
_gpio_cam_
4
;
}
set
{
tally
_gpio_cam_4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_GPIO_Cam_
4
));
}
get
{
return
tally
Info
4
;
}
set
{
tally
Info4
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
TallyInfo
4
));
}
}
#
endregion
...
...
@@ -118,16 +118,16 @@ namespace VIZ.H2V.Module
#
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>
/// GPIO引脚列表
/// </summary>
public
List
<
int
>
Tally_
GPIO_Pin_List
public
List
<
int
?>
GPIO_Pin_List
{
get
{
return
tally_
gpio_pin_list
;
}
set
{
tally_gpio_pin_list
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
Tally_
GPIO_Pin_List
));
}
get
{
return
gpio_pin_list
;
}
set
{
gpio_pin_list
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
GPIO_Pin_List
));
}
}
#
endregion
...
...
@@ -153,19 +153,21 @@ namespace VIZ.H2V.Module
vm
.
Settings
.
Add
(
this
);
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
++)
{
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
.
Tally_GPIO_Cam_2
=
this
.
SystemConfig
.
Tally_GPIO_CAM_2
;
this
.
Tally_GPIO_Cam_3
=
this
.
SystemConfig
.
Tally_GPIO_CAM_3
;
this
.
Tally_GPIO_Cam_4
=
this
.
SystemConfig
.
Tally_GPIO_CAM_4
;
this
.
loadTallyInfo
(
this
.
TallyInfo1
,
this
.
SystemConfig
.
TallyInfo1
)
;
this
.
loadTallyInfo
(
this
.
TallyInfo2
,
this
.
SystemConfig
.
TallyInfo2
)
;
this
.
loadTallyInfo
(
this
.
TallyInfo3
,
this
.
SystemConfig
.
TallyInfo3
)
;
this
.
loadTallyInfo
(
this
.
TallyInfo4
,
this
.
SystemConfig
.
TallyInfo4
)
;
// GPIO模型
this
.
GPIOModels
=
GPIOManager
.
Models
;
this
.
SelectedGPIOModel
=
this
.
GPIOModels
?.
FirstOrDefault
();
}
...
...
@@ -182,13 +184,13 @@ namespace VIZ.H2V.Module
/// <returns>是否需要保存</returns>
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
;
if
(
this
.
Tally_GPIO_Cam_2
!=
this
.
SystemConfig
.
Tally_GPIO_CAM_2
)
if
(
this
.
isTallyInfoNeedSave
(
this
.
TallyInfo2
,
this
.
SystemConfig
.
TallyInfo2
)
)
return
true
;
if
(
this
.
Tally_GPIO_Cam_3
!=
this
.
SystemConfig
.
Tally_GPIO_CAM_3
)
if
(
this
.
isTallyInfoNeedSave
(
this
.
TallyInfo3
,
this
.
SystemConfig
.
TallyInfo3
)
)
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
false
;
...
...
@@ -201,10 +203,10 @@ namespace VIZ.H2V.Module
public
bool
Save
()
{
// 保存
this
.
SystemConfig
.
Tally_GPIO_CAM_1
=
this
.
Tally_GPIO_Cam_1
;
this
.
SystemConfig
.
Tally_GPIO_CAM_2
=
this
.
Tally_GPIO_Cam_2
;
this
.
SystemConfig
.
Tally_GPIO_CAM_3
=
this
.
Tally_GPIO_Cam_3
;
this
.
SystemConfig
.
Tally_GPIO_CAM_4
=
this
.
Tally_GPIO_Cam_4
;
this
.
saveTallyInfo
(
this
.
TallyInfo1
,
this
.
SystemConfig
.
TallyInfo1
)
;
this
.
saveTallyInfo
(
this
.
TallyInfo2
,
this
.
SystemConfig
.
TallyInfo2
)
;
this
.
saveTallyInfo
(
this
.
TallyInfo3
,
this
.
SystemConfig
.
TallyInfo3
)
;
this
.
saveTallyInfo
(
this
.
TallyInfo4
,
this
.
SystemConfig
.
TallyInfo4
)
;
ApplicationDomainEx
.
LiteDbContext
.
SystemConfig
.
Update
(
this
.
SystemConfig
);
...
...
@@ -218,5 +220,52 @@ namespace VIZ.H2V.Module
// 返回
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 @@
<Compile Include="Setup\Provider\AppSetup_Recording.cs" />
<Compile Include="Setup\Provider\AppSetup_InitUDP.cs" />
<Compile Include="Setup\Provider\AppSetup_SaveCenterClipBox.cs" />
<Compile Include="SystemSetting\Model\TallyCamSignalModel.cs" />
<Compile Include="SystemSetting\ViewModel\HotkeySettingPanelViewModel.cs" />
<Compile Include="SystemSetting\ViewModel\AboutPanelViewModel.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
public
double
ManualNavigation3DMappingMultiple
{
get
;
set
;
}
=
1d
;
/// <summary>
/// Tally信
号GPIO引角 -- CAM
1
/// Tally信
息 -- 窗口
1
/// </summary>
public
int
Tally_GPIO_CAM_1
{
get
;
set
;
}
=
0
;
public
TallyInfo
TallyInfo1
{
get
;
set
;
}
=
new
TallyInfo
()
;
/// <summary>
/// Tally信
号GPIO引角 -- CAM
2
/// Tally信
息 -- 窗口
2
/// </summary>
public
int
Tally_GPIO_CAM_2
{
get
;
set
;
}
=
1
;
public
TallyInfo
TallyInfo2
{
get
;
set
;
}
=
new
TallyInfo
()
;
/// <summary>
/// Tally信
号GPIO引角 -- CAM
3
/// Tally信
息 -- 窗口
3
/// </summary>
public
int
Tally_GPIO_CAM_3
{
get
;
set
;
}
=
2
;
public
TallyInfo
TallyInfo3
{
get
;
set
;
}
=
new
TallyInfo
();
/// <summary>
/// Tally信
号GPIO引角 -- CAM
4
/// Tally信
息 -- 窗口
4
/// </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 @@
<Compile Include="LiteDB\LiteDbContext.cs" />
<Compile Include="LiteDB\NdiView\NdiViewConfig.cs" />
<Compile Include="LiteDB\System\HotkeyConfig.cs" />
<Compile Include="LiteDB\System\Info\TallyInfo.cs" />
<Compile Include="LiteDB\System\SystemConfig.cs" />
<Compile Include="LiteDB\Video\VideoEntity.cs" />
<Compile Include="LiteDB\Video\VideoGroupEntity.cs" />
...
...
VIZ.H2V/config/config.ini
View file @
404f3805
...
...
@@ -3,7 +3,7 @@
; ============================================================
[Application]
;是否是调试模式
APPLICATION_IS_DEBUG
=
tru
e
APPLICATION_IS_DEBUG
=
fals
e
;3D鼠标平滑系数
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