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
c6959f2a
Commit
c6959f2a
authored
Sep 30, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tally信号
parent
9fe41017
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
7 deletions
+52
-7
VIZ.H2V.Module.Resource/Converter/TallyColor2RadialGradientBrushConverter.cs
+44
-0
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
+1
-0
VIZ.H2V.Module/NDIView/View/NDIView.xaml
+5
-5
VIZ.H2V.Storage/LiteDB/System/Info/TallyInfo.cs
+2
-2
No files found.
VIZ.H2V.Module.Resource/Converter/TallyColor2RadialGradientBrushConverter.cs
0 → 100644
View file @
c6959f2a
using
System
;
using
System.Collections.Generic
;
using
System.Globalization
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Windows.Data
;
using
System.Windows.Media
;
namespace
VIZ.H2V.Module.Resource
{
/// <summary>
/// Tally信号颜色转化径向渐变画刷
/// </summary>
public
class
TallyColor2RadialGradientBrushConverter
:
IValueConverter
{
public
object
Convert
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
if
(!(
value
is
Color
))
return
null
;
Color
color
=
(
Color
)
value
;
Color
color1
=
color
;
color1
.
A
=
0xFF
;
Color
color2
=
color
;
color2
.
A
=
0xAA
;
Color
color3
=
color
;
color3
.
A
=
0x22
;
RadialGradientBrush
brush
=
new
RadialGradientBrush
();
brush
.
GradientStops
.
Add
(
new
GradientStop
(
color1
,
0
));
brush
.
GradientStops
.
Add
(
new
GradientStop
(
color2
,
0.6
));
brush
.
GradientStops
.
Add
(
new
GradientStop
(
color3
,
1
));
return
brush
;
}
public
object
ConvertBack
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
throw
new
NotImplementedException
();
}
}
}
VIZ.H2V.Module.Resource/VIZ.H2V.Module.Resource.csproj
View file @
c6959f2a
...
@@ -126,6 +126,7 @@
...
@@ -126,6 +126,7 @@
<ItemGroup>
<ItemGroup>
<Compile Include="Converter\AlgorithmStrategyType2FootballFieldHeightConverter.cs" />
<Compile Include="Converter\AlgorithmStrategyType2FootballFieldHeightConverter.cs" />
<Compile Include="Converter\AlgorithmStrategyType2FootballFieldOrientationConverter.cs" />
<Compile Include="Converter\AlgorithmStrategyType2FootballFieldOrientationConverter.cs" />
<Compile Include="Converter\TallyColor2RadialGradientBrushConverter.cs" />
<Compile Include="Converter\NDIViewProperty2VisibilityConverter.cs" />
<Compile Include="Converter\NDIViewProperty2VisibilityConverter.cs" />
<Compile Include="Converter\NDIViewProperty2BoolConverter.cs" />
<Compile Include="Converter\NDIViewProperty2BoolConverter.cs" />
<Compile Include="Converter\NDIViewStatus2BoolConverter.cs" />
<Compile Include="Converter\NDIViewStatus2BoolConverter.cs" />
...
...
VIZ.H2V.Module/NDIView/View/NDIView.xaml
View file @
c6959f2a
...
@@ -24,9 +24,9 @@
...
@@ -24,9 +24,9 @@
<ResourceDictionary Source="/VIZ.H2V.Module.Resource;component/Style/RadioButton/RadioButton_NdiView.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.H2V.Module.Resource;component/Style/RadioButton/RadioButton_NdiView.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary.MergedDictionaries>
<fcore:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter"></fcore:Bool2VisibilityConverter>
<fcore:Bool2VisibilityConverter x:Key="Bool2VisibilityConverter"></fcore:Bool2VisibilityConverter>
<fcore:Color2SolidColorBrushConverter x:Key="Color2SolidColorBrushConverter"></fcore:Color2SolidColorBrushConverter>
<fcore:Bool2BoolConverter x:Key="Bool2BoolConverter"></fcore:Bool2BoolConverter>
<fcore:Bool2BoolConverter x:Key="Bool2BoolConverter"></fcore:Bool2BoolConverter>
<fcore:StringAppendConverter x:Key="StringAppendConverter"></fcore:StringAppendConverter>
<fcore:StringAppendConverter x:Key="StringAppendConverter"></fcore:StringAppendConverter>
<resource:TallyColor2RadialGradientBrushConverter x:Key="TallyColor2RadialGradientBrushConverter"></resource:TallyColor2RadialGradientBrushConverter>
<resource:NDIViewStatus2BoolConverter x:Key="NDIViewStatus2IsEnabledConverter" TrueListString="Detect,CropRoi"></resource:NDIViewStatus2BoolConverter>
<resource:NDIViewStatus2BoolConverter x:Key="NDIViewStatus2IsEnabledConverter" TrueListString="Detect,CropRoi"></resource:NDIViewStatus2BoolConverter>
<resource:NDIViewStatus2BoolConverter x:Key="NDIViewStatus2IsEnabledConverter_SettingButton" TrueListString="Stop,Detect,CropRoi"></resource:NDIViewStatus2BoolConverter>
<resource:NDIViewStatus2BoolConverter x:Key="NDIViewStatus2IsEnabledConverter_SettingButton" TrueListString="Stop,Detect,CropRoi"></resource:NDIViewStatus2BoolConverter>
<resource:NDIViewStatus2BoolConverter x:Key="NDIViewStatus2IsEnabledConverter_StopButton" TrueListString="WaitSetup,WaitCheckOK,Detect,CropRoi"></resource:NDIViewStatus2BoolConverter>
<resource:NDIViewStatus2BoolConverter x:Key="NDIViewStatus2IsEnabledConverter_StopButton" TrueListString="WaitSetup,WaitCheckOK,Detect,CropRoi"></resource:NDIViewStatus2BoolConverter>
...
@@ -242,13 +242,13 @@
...
@@ -242,13 +242,13 @@
<!-- Tally -->
<!-- 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">
<!-- 信号2 -->
<!-- 信号2 -->
<Ellipse Width="
24" Height="24
" Margin="0,0,15,0"
<Ellipse Width="
32" Height="32
" Margin="0,0,15,0"
Visibility="{Binding Path=TallyPartViewModel.Tally2.PinValue,Converter={StaticResource Bool2VisibilityConverter}}"
Visibility="{Binding Path=TallyPartViewModel.Tally2.PinValue,Converter={StaticResource Bool2VisibilityConverter}}"
Fill="{Binding Path=TallyPartViewModel.Color2,Converter={StaticResource
Color2SolidColor
BrushConverter}}"></Ellipse>
Fill="{Binding Path=TallyPartViewModel.Color2,Converter={StaticResource
TallyColor2RadialGradient
BrushConverter}}"></Ellipse>
<!-- 信号1 -->
<!-- 信号1 -->
<Ellipse Width="
24" Height="24
" Margin="0,0,0,0"
<Ellipse Width="
32" Height="32
" Margin="0,0,0,0"
Visibility="{Binding Path=TallyPartViewModel.Tally1.PinValue,Converter={StaticResource Bool2VisibilityConverter}}"
Visibility="{Binding Path=TallyPartViewModel.Tally1.PinValue,Converter={StaticResource Bool2VisibilityConverter}}"
Fill="{Binding Path=TallyPartViewModel.Color1,Converter={StaticResource
Color2SolidColor
BrushConverter}}"></Ellipse>
Fill="{Binding Path=TallyPartViewModel.Color1,Converter={StaticResource
TallyColor2RadialGradient
BrushConverter}}"></Ellipse>
</StackPanel>
</StackPanel>
<!-- 功能区 -->
<!-- 功能区 -->
...
...
VIZ.H2V.Storage/LiteDB/System/Info/TallyInfo.cs
View file @
c6959f2a
...
@@ -14,12 +14,12 @@ namespace VIZ.H2V.Storage
...
@@ -14,12 +14,12 @@ namespace VIZ.H2V.Storage
/// <summary>
/// <summary>
/// 引脚位序 信号1
/// 引脚位序 信号1
/// </summary>
/// </summary>
public
int
?
PinIndex1
{
get
;
set
;
}
=
0
;
public
int
?
PinIndex1
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 引脚位序 信号2
/// 引脚位序 信号2
/// </summary>
/// </summary>
public
int
?
PinIndex2
{
get
;
set
;
}
=
1
;
public
int
?
PinIndex2
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 颜色 信号1
/// 颜色 信号1
...
...
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