You need to sign in or sign up before continuing.
Commit 9ee8557f by liulongfei

裁切坐标向NDI流来源发送,读取exe版本并显示

parent 09cc38e2
......@@ -187,6 +187,7 @@ namespace VIZ.H2V.ClipTestTool
{
NDIStreamInfoModel model = new NDIStreamInfoModel();
model.FullName = info.FullName;
model.Address = info.Address;
if (model.FullName == ndiStream.RemoteSenderName)
{
selected = model;
......
......@@ -26,6 +26,20 @@ namespace VIZ.H2V.Domain
#endregion
#region Address -- 地址
private string address;
/// <summary>
/// 地址
/// </summary>
public string Address
{
get { return address; }
set { address = value; this.RaisePropertyChanged(nameof(Address)); }
}
#endregion
#region IsLocalStream -- 是否是本机流
private bool isLocalStream;
......
......@@ -237,6 +237,7 @@ namespace VIZ.H2V.Module
{
NDIStreamInfoModel model = new NDIStreamInfoModel();
model.FullName = info.FullName;
model.Address = info.Address;
model.IsLocalStream = info.Machine == localName;
if (model.FullName == ndiStream.RemoteSenderName)
{
......@@ -335,10 +336,12 @@ namespace VIZ.H2V.Module
if (!this.CheckIsSendToCrop())
return false;
string streamName = this.SelectedNDIStreamInfo == null ? string.Empty : this.SelectedNDIStreamInfo.FullName;
string streamAddress = this.SelectedNDIStreamInfo?.Address ?? string.Empty;
string streamName = this.SelectedNDIStreamInfo?.FullName ?? string.Empty;
int delay = this.SelectedNDIDelayInfo == null ? 0 : this.SelectedNDIDelayInfo.Value;
// 保存配置
this.ViewConfig.StreamAddress = streamAddress;
this.ViewConfig.DisplayName = this.NdiDispalyName;
this.ViewConfig.StreamName = streamName;
this.ViewConfig.DelayFrame = delay;
......
......@@ -439,6 +439,7 @@ namespace VIZ.H2V.Module
{
// 添加新的UDP管理器
string clientIP = ApplicationDomainEx.IniStorage.GetValue<UdpConfig, string>(p => p.UDP_BINDING_IP);
string streamIP = (this.Support.ViewConfig.StreamAddress ?? string.Empty).Split(':').FirstOrDefault()?.Trim();
AlgorithmStrategy strategy = ApplicationDomainEx.CsvContext.AlgorithmStrategys.FirstOrDefault(p => p.Type == this.Support.ViewConfig.StrategyType);
if (strategy == null)
......@@ -468,7 +469,7 @@ namespace VIZ.H2V.Module
return true;
}
ConnectionManager.UdpConnection.AddEndpointManager(new UdpEndpointManager($"{this.Support.ViewKey}__CLIP", clientIP, clip.UDP_PORT));
ConnectionManager.UdpConnection.AddEndpointManager(new UdpEndpointManager($"{this.Support.ViewKey}__CLIP", streamIP, clip.UDP_PORT));
return true;
}
......
......@@ -40,13 +40,7 @@
</Grid.ColumnDefinitions>
<!-- 系统版本 -->
<TextBlock Text="系统版本:" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="0" Grid.Column="0"></TextBlock>
<TextBlock Text="V1.0.0.0" Foreground="White" FontSize="18" VerticalAlignment="Center" Margin="20,0,0,0" Grid.Row="0" Grid.Column="1"></TextBlock>
<!-- 算法版本 -->
<TextBlock Text="算法版本:" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="1" Grid.Column="0"></TextBlock>
<TextBlock Text="V1.0.0.0" Foreground="White" FontSize="18" VerticalAlignment="Center" Margin="20,0,0,0" Grid.Row="1" Grid.Column="1"></TextBlock>
<!-- IO版本 -->
<TextBlock Text="IO版本:" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="2" Grid.Column="0"></TextBlock>
<TextBlock Text="V1.0.0.0" Foreground="White" FontSize="18" VerticalAlignment="Center" Margin="20,0,0,0" Grid.Row="2" Grid.Column="1"></TextBlock>
<TextBlock Text="{Binding Path=SystemVersion}" Foreground="White" FontSize="18" VerticalAlignment="Center" Margin="20,0,0,0" Grid.Row="0" Grid.Column="1"></TextBlock>
</Grid>
</Grid>
</Border>
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
using VIZ.H2V.Domain;
namespace VIZ.H2V.Module
{
......@@ -12,6 +15,53 @@ namespace VIZ.H2V.Module
/// </summary>
public class AboutPanelViewModel : ViewModelBase, ISystemSetting
{
public AboutPanelViewModel()
{
this.LoadedCommand = new VCommand(this.Loaded);
}
// ======================================================================================
// === Property ===
// ======================================================================================
#region SystemVersion -- 系统版本
private string systemVersion;
/// <summary>
/// 系统版本
/// </summary>
public string SystemVersion
{
get { return systemVersion; }
set { systemVersion = value; this.RaisePropertyChanged(nameof(SystemVersion)); }
}
#endregion
// ======================================================================================
// === Commond ===
// ======================================================================================
#region LoadedCommand -- 加载命令
/// <summary>
/// 加载命令
/// </summary>
public VCommand LoadedCommand { get; set; }
/// <summary>
/// 加载
/// </summary>
private void Loaded()
{
string str = Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyFileVersionAttribute>()?.Version;
Version.TryParse(str, out Version version);
this.SystemVersion = $"{version.Major}.{version.Minor}.{version.Build}";
}
#endregion
/// <summary>
/// 是否需要保存
/// </summary>
......
......@@ -22,11 +22,6 @@ namespace VIZ.H2V.Storage
public string NDI_NAME { get; set; }
/// <summary>
/// UDP IP
/// </summary>
public string UDP_IP { get; set; }
/// <summary>
/// UDP端口
/// </summary>
public int UDP_PORT { get; set; }
......
......@@ -29,6 +29,11 @@ namespace VIZ.H2V.Storage
public string DisplayName { get; set; }
/// <summary>
/// NDI流地址
/// </summary>
public string StreamAddress { get; set; }
/// <summary>
/// NDI流名称
/// </summary>
public string StreamName { get; set; }
......
ID,NDI_NAME,UDP_IP,UDP_PORT
1,NDIOutput1,127.0.0.1,5001
2,NDIOutput2,127.0.0.1,5002
3,NDIOutput3,127.0.0.1,5003
4,NDIOutput4,127.0.0.1,5004
ID,NDI_NAME,UDP_PORT
1,NDIOutput1,5001
2,NDIOutput2,5002
3,NDIOutput3,5003
4,NDIOutput4,5004
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment