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
3f2501e4
Commit
3f2501e4
authored
Oct 20, 2022
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加NDI本地源筛选
parent
8a97931a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
1 deletions
+61
-1
VIZ.H2V.Module/NDISettingView/View/NDISettingPanelView.xaml
+7
-1
VIZ.H2V.Module/NDISettingView/ViewModel/NDISettingPanelViewModel.cs
+54
-0
No files found.
VIZ.H2V.Module/NDISettingView/View/NDISettingPanelView.xaml
View file @
3f2501e4
...
@@ -41,8 +41,14 @@
...
@@ -41,8 +41,14 @@
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<!-- 输入源 -->
<!-- 输入源 -->
<TextBlock Text="输入源" Foreground="White" FontSize="18" VerticalAlignment="Center"></TextBlock>
<TextBlock Text="输入源" Foreground="White" FontSize="18" VerticalAlignment="Center"></TextBlock>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
<TextBlock Text="仅显示本机输入源" Foreground="#aaffffff" VerticalAlignment="Center"></TextBlock>
<CheckBox Style="{StaticResource CheckBox_Setting}" VerticalAlignment="Center"
HorizontalAlignment="Right" Margin="10,0,0,0"
IsChecked="{Binding Path=IsShowLocalStream,Mode=TwoWay}"></CheckBox>
</StackPanel>
<ComboBox Grid.Row="1" Style="{StaticResource ComboBox_Setting}" Height="40"
<ComboBox Grid.Row="1" Style="{StaticResource ComboBox_Setting}" Height="40"
ItemsSource="{Binding Path=NDIStreamInfos,Mode=OneWay}"
ItemsSource="{Binding Path=NDIStreamInfos
View
,Mode=OneWay}"
SelectedValue="{Binding Path=SelectedNDIStreamInfo,Mode=TwoWay}">
SelectedValue="{Binding Path=SelectedNDIStreamInfo,Mode=TwoWay}">
<ComboBox.ItemTemplate>
<ComboBox.ItemTemplate>
<DataTemplate>
<DataTemplate>
...
...
VIZ.H2V.Module/NDISettingView/ViewModel/NDISettingPanelViewModel.cs
View file @
3f2501e4
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
using
System.Windows.Data
;
using
VIZ.Framework.Common
;
using
VIZ.Framework.Common
;
using
VIZ.Framework.Core
;
using
VIZ.Framework.Core
;
using
VIZ.H2V.Domain
;
using
VIZ.H2V.Domain
;
...
@@ -73,6 +75,20 @@ namespace VIZ.H2V.Module
...
@@ -73,6 +75,20 @@ namespace VIZ.H2V.Module
#
endregion
#
endregion
#
region
NDIStreamInfosView
--
NDI
流信息视图
private
ICollectionView
ndiStreamInfosView
;
/// <summary>
/// NDI流信息视图
/// </summary>
public
ICollectionView
NDIStreamInfosView
{
get
{
return
ndiStreamInfosView
;
}
set
{
ndiStreamInfosView
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
NDIStreamInfosView
));
}
}
#
endregion
#
region
SelectedNDIStreamInfo
--
选中的
NDI
流信息
#
region
SelectedNDIStreamInfo
--
选中的
NDI
流信息
private
NDIStreamInfoModel
selectedNDIStreamInfo
;
private
NDIStreamInfoModel
selectedNDIStreamInfo
;
...
@@ -148,6 +164,25 @@ namespace VIZ.H2V.Module
...
@@ -148,6 +164,25 @@ namespace VIZ.H2V.Module
#
endregion
#
endregion
#
region
IsShowLocalStream
--
是否显示本地流
private
bool
isShowLocalStream
=
true
;
/// <summary>
/// 是否显示本地流
/// </summary>
public
bool
IsShowLocalStream
{
get
{
return
isShowLocalStream
;
}
set
{
isShowLocalStream
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
IsShowLocalStream
));
this
.
RaisePropertyChanged
(
nameof
(
NDIStreamInfosView
));
}
}
#
endregion
// ======================================================================================
// ======================================================================================
// === Command ===
// === Command ===
// ======================================================================================
// ======================================================================================
...
@@ -213,6 +248,8 @@ namespace VIZ.H2V.Module
...
@@ -213,6 +248,8 @@ namespace VIZ.H2V.Module
}
}
this
.
NDIStreamInfos
=
list
;
this
.
NDIStreamInfos
=
list
;
this
.
NDIStreamInfosView
=
CollectionViewSource
.
GetDefaultView
(
this
.
NDIStreamInfos
);
this
.
NDIStreamInfosView
.
Filter
=
o
=>
this
.
NDIStreamInfosViewFilter
(
o
as
NDIStreamInfoModel
);
this
.
SelectedNDIStreamInfo
=
selected
;
this
.
SelectedNDIStreamInfo
=
selected
;
}
}
...
@@ -377,5 +414,21 @@ namespace VIZ.H2V.Module
...
@@ -377,5 +414,21 @@ namespace VIZ.H2V.Module
return
false
;
return
false
;
}
}
/// <summary>
/// NDI流视图筛选器
/// </summary>
/// <param name="model">NDI流模型</param>
/// <returns>是否通过筛选</returns>
private
bool
NDIStreamInfosViewFilter
(
NDIStreamInfoModel
model
)
{
if
(
model
==
null
)
return
false
;
if
(!
this
.
IsShowLocalStream
)
return
true
;
return
model
.
IsLocalStream
;
}
}
}
}
}
\ No newline at end of file
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