Commit 213d03ee by 鲁志-悦动

在CAM_1设置页面点击保存的时候更新主页面Title体育项目名和位置标记(在自动模式下加载开始和结束位置)

parent 13fa2a7a
namespace VIZ.FGOUT.Domain namespace VIZ.FGOUT.Domain
{ {
/// <summary>
/// 自动发送
/// </summary>
public class AutoSendModel public class AutoSendModel
{ {
public int Interval { get; set; } public int Interval { get; set; }
......
using System; namespace VIZ.FGOUT.Domain
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.FGOUT.Domain
{ {
/// <summary> /// <summary>
/// 显示位置模型 /// 显示位置模型
/// </summary> /// </summary>
public class DisplayPlaceModel public class DisplayPlaceModel
{ {
/// <summary>
/// 是否是自动模式
/// </summary>
public bool IsAutoMode { get; set; }
} }
} }
namespace VIZ.FGOUT.Domain.Message.Setting
{
/// <summary>
/// 更新主页面Title体育项目名和位置标记
/// </summary>
public class UpdateTitleAndPositionMarkModel
{
}
}
...@@ -109,6 +109,7 @@ ...@@ -109,6 +109,7 @@
<Compile Include="Message\Setting\StopAlgorithmModel.cs" /> <Compile Include="Message\Setting\StopAlgorithmModel.cs" />
<Compile Include="Message\Setting\UEControlModel.cs" /> <Compile Include="Message\Setting\UEControlModel.cs" />
<Compile Include="Message\Setting\UESettingModel.cs" /> <Compile Include="Message\Setting\UESettingModel.cs" />
<Compile Include="Message\Setting\UpdateTitleAndPositionMarkModel.cs" />
<Compile Include="Model\Algorithm\AlgorithmBorderScenceModel.cs" /> <Compile Include="Model\Algorithm\AlgorithmBorderScenceModel.cs" />
<Compile Include="Model\Algorithm\AlgorithmProcessModel.cs" /> <Compile Include="Model\Algorithm\AlgorithmProcessModel.cs" />
<Compile Include="Model\Algorithm\AlgorithmStrategyGroupModel.cs" /> <Compile Include="Model\Algorithm\AlgorithmStrategyGroupModel.cs" />
......
299548c82a3c191879628f36b01e3b411c73afa8160c518e198b2712e832497e 66951d7d855714407e801fcd5acaf49611b3106deecdf1232b5d72073ba783ec
...@@ -179,12 +179,10 @@ namespace VIZ.FGOUT.Module ...@@ -179,12 +179,10 @@ namespace VIZ.FGOUT.Module
this.MattStartCommand = new VCommand(this.MattStart); this.MattStartCommand = new VCommand(this.MattStart);
//算法结束抠图 //算法结束抠图
this.MattEndCommand = new VCommand(this.MattEnd); this.MattEndCommand = new VCommand(this.MattEnd);
//打开一个新的输出窗口 //打开一个新的输出窗口
this.NewWindowCommand = new VCommand(this.NewWindow); this.NewWindowCommand = new VCommand(this.NewWindow);
//刷新位置 //刷新位置
this.RefreshPositionCommand = new VCommand(this.RefreshPosition); this.RefreshPositionCommand = new VCommand(this.RefreshPosition);
//二次确认抛弃 //二次确认抛弃
this.AbandonCommand = new VCommand(this.Abandon); this.AbandonCommand = new VCommand(this.Abandon);
//二次确认发送 //二次确认发送
...@@ -205,8 +203,12 @@ namespace VIZ.FGOUT.Module ...@@ -205,8 +203,12 @@ namespace VIZ.FGOUT.Module
////Replay出点值 ////Replay出点值
//ApplicationDomain.MessageManager.Register<ReplayEndValueModel>(this, this.ReplayEndValueFromNDIViewModel); //ApplicationDomain.MessageManager.Register<ReplayEndValueModel>(this, this.ReplayEndValueFromNDIViewModel);
//接收自动发送消息
ApplicationDomain.MessageManager.Register<AutoSendModel>(this, this.AutoSendIntervalTimeChanged); ApplicationDomain.MessageManager.Register<AutoSendModel>(this, this.AutoSendIntervalTimeChanged);
//接收更新主页面Title体育项目名和位置标记消息
ApplicationDomain.MessageManager.Register<UpdateTitleAndPositionMarkModel>(this, this.UpdateTitleAndPositionMarkMethod);
// 算法落盘开始、结束时间戳消息 // 算法落盘开始、结束时间戳消息
//ApplicationDomain.MessageManager.Register<AlgorithmMessage__start_end>(this, this.OnAlgorithmMessage__start_end); //ApplicationDomain.MessageManager.Register<AlgorithmMessage__start_end>(this, this.OnAlgorithmMessage__start_end);
} }
...@@ -227,6 +229,14 @@ namespace VIZ.FGOUT.Module ...@@ -227,6 +229,14 @@ namespace VIZ.FGOUT.Module
//_autoSend_Timer.Start(); //_autoSend_Timer.Start();
} }
private void UpdateTitleAndPositionMarkMethod(UpdateTitleAndPositionMarkModel model)
{
//刷新Title
InitSportName();
//刷新位置标记
RefreshPosition();
}
private void AutoSendIntervalTimeChanged(AutoSendModel model) private void AutoSendIntervalTimeChanged(AutoSendModel model)
{ {
//_tempAutoSendCount = AutoSendCount = (model.Interval / 1000) + 1; //_tempAutoSendCount = AutoSendCount = (model.Interval / 1000) + 1;
...@@ -809,7 +819,7 @@ namespace VIZ.FGOUT.Module ...@@ -809,7 +819,7 @@ namespace VIZ.FGOUT.Module
HidePlace(); HidePlace();
ShowPlace(); ShowPlace();
//点恢复的时候刷新一下体育项目名 //点恢复的时候刷新一下体育项目名
InitSportName(); //InitSportName();
} }
#endregion #endregion
...@@ -1366,13 +1376,15 @@ namespace VIZ.FGOUT.Module ...@@ -1366,13 +1376,15 @@ namespace VIZ.FGOUT.Module
if (IsMatImage) if (IsMatImage)
{ {
var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault(); var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
if (config == null) if (config == null) return;
return;
SaveMatImagePackage package = new SaveMatImagePackage(); var package = new SaveMatImagePackage()
package.type = ClipPackageSignal.LOADMASK; {
package.start_time = config.start; type = ClipPackageSignal.LOADMASK,
package.end_time = config.end; start_time = config.start,
end_time = config.end
};
// 发送UDP命令给音视频 // 发送UDP命令给音视频
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP); UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
...@@ -1383,12 +1395,8 @@ namespace VIZ.FGOUT.Module ...@@ -1383,12 +1395,8 @@ namespace VIZ.FGOUT.Module
//// 发送UDP命令给算法 //// 发送UDP命令给算法
//UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1); //UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null) if (manager == null) return;
{
return;
}
manager.SendJson(package); manager.SendJson(package);
} }
//ReplayPackage replayPackage = new ReplayPackage(); //ReplayPackage replayPackage = new ReplayPackage();
...@@ -1586,6 +1594,7 @@ namespace VIZ.FGOUT.Module ...@@ -1586,6 +1594,7 @@ namespace VIZ.FGOUT.Module
/// </summary> /// </summary>
private void ShowPlace() private void ShowPlace()
{ {
displayPlaceModel.IsAutoMode = IsAutoEnable;
ApplicationDomain.MessageManager.Send(displayPlaceModel); ApplicationDomain.MessageManager.Send(displayPlaceModel);
} }
......
...@@ -6,9 +6,11 @@ using System.Windows; ...@@ -6,9 +6,11 @@ using System.Windows;
using VIZ.FGOUT.Connection; using VIZ.FGOUT.Connection;
using VIZ.FGOUT.Connection.UDP.Clip.Signal.Send; using VIZ.FGOUT.Connection.UDP.Clip.Signal.Send;
using VIZ.FGOUT.Domain; using VIZ.FGOUT.Domain;
using VIZ.FGOUT.Domain.Message.Setting;
using VIZ.FGOUT.Storage; using VIZ.FGOUT.Storage;
using VIZ.Framework.Connection; using VIZ.Framework.Connection;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Framework.Domain;
namespace VIZ.FGOUT.Module namespace VIZ.FGOUT.Module
{ {
...@@ -415,9 +417,15 @@ namespace VIZ.FGOUT.Module ...@@ -415,9 +417,15 @@ namespace VIZ.FGOUT.Module
javelinThrowConfig.Number = this.ViewConfig.GameName; javelinThrowConfig.Number = this.ViewConfig.GameName;
} }
javelinThrowConfig.AlgorithmData = _algorithmMessage; javelinThrowConfig.AlgorithmData = _algorithmMessage;
//存算法数据
ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(javelinThrowConfig); ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(javelinThrowConfig);
//存ViewConfig
ApplicationDomainEx.LiteDbContext.ViewConfig.Upsert(this.ViewConfig); ApplicationDomainEx.LiteDbContext.ViewConfig.Upsert(this.ViewConfig);
//更新主页面Title体育项目名和位置标记
var updateTitleAndPositionMarkModel = new UpdateTitleAndPositionMarkModel();
ApplicationDomain.MessageManager.Send(updateTitleAndPositionMarkModel);
} }
return true; return true;
} }
......
...@@ -258,8 +258,9 @@ namespace VIZ.FGOUT.Module ...@@ -258,8 +258,9 @@ namespace VIZ.FGOUT.Module
// 如果需要重启算法那么重启算法 // 如果需要重启算法那么重启算法
INDIViewService service = ApplicationDomainEx.ServiceManager.GetService<INDIViewService>(this.ViewKey); INDIViewService service = ApplicationDomainEx.ServiceManager.GetService<INDIViewService>(this.ViewKey);
// 关闭窗口 //// 关闭窗口
this.GetWindow().Close(); //this.GetWindow().Close();
//如果是CAM_2或CAM_4,不需要重启算法进程 //如果是CAM_2或CAM_4,不需要重启算法进程
if (this.ViewKey.Equals(NDIViewKeys.CAM_2) || this.ViewKey.Equals(NDIViewKeys.CAM_4)) if (this.ViewKey.Equals(NDIViewKeys.CAM_2) || this.ViewKey.Equals(NDIViewKeys.CAM_4))
return; return;
...@@ -271,6 +272,9 @@ namespace VIZ.FGOUT.Module ...@@ -271,6 +272,9 @@ namespace VIZ.FGOUT.Module
context.TriggerScene = NDIViewScene.SettingPanel; context.TriggerScene = NDIViewScene.SettingPanel;
service.ChangeStrategyMode(context); service.ChangeStrategyMode(context);
// 关闭窗口
this.GetWindow().Close();
} }
#endregion #endregion
......
...@@ -32,7 +32,7 @@ namespace VIZ.FGOUT.Module ...@@ -32,7 +32,7 @@ namespace VIZ.FGOUT.Module
_autoSend_Timer.Stop(); _autoSend_Timer.Stop();
_autoSend_Timer.Start(); _autoSend_Timer.Start();
AutoSendModel autoSendModel = new AutoSendModel(){ Interval = ALGORITHM_ReconfirmAutoSend_TIME }; var autoSendModel = new AutoSendModel(){ Interval = ALGORITHM_ReconfirmAutoSend_TIME };
ApplicationDomain.MessageManager.Send(autoSendModel); ApplicationDomain.MessageManager.Send(autoSendModel);
} }
......
...@@ -569,30 +569,34 @@ namespace VIZ.FGOUT.Module ...@@ -569,30 +569,34 @@ namespace VIZ.FGOUT.Module
/// <param name="displayPlaceModel"></param> /// <param name="displayPlaceModel"></param>
private void DisplayPlace(DisplayPlaceModel displayPlaceModel) private void DisplayPlace(DisplayPlaceModel displayPlaceModel)
{ {
if (this.ViewKey != NDIViewKeys.CAM_1) if (this.ViewKey != NDIViewKeys.CAM_1) return;
return;
NDIView ndiView = this.GetView<NDIView>(); NDIView ndiView = this.GetView<NDIView>();
if (ndiView == null) if (ndiView == null) return;
return;
var setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p => var setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p =>
p.SportCode == this.viewConfig.GameName); p.SportCode == this.viewConfig.GameName);
if (setPlaceNewConfig == null) return; if (setPlaceNewConfig == null) return;
//if (setPlaceNewConfig.EndPlace.Count == 0) return; //if (setPlaceNewConfig.EndPlace.Count == 0) return;
if (setPlaceNewConfig.StartPlace.Count > 0)
{
ndiView.polygonsStart = setPlaceNewConfig.StartPlace;
foreach (var points in setPlaceNewConfig.StartPlace)
AddPoints(ndiView, points, Brushes.Blue);
}
if (setPlaceNewConfig.EndPlace.Count > 0) //自动模式下显示开始和结束位置
if (displayPlaceModel.IsAutoMode)
{ {
ndiView.polygonsEnd = setPlaceNewConfig.EndPlace; if (setPlaceNewConfig.StartPlace.Count > 0)
foreach (var points in setPlaceNewConfig.EndPlace) {
AddPoints(ndiView, points, Brushes.Green); ndiView.polygonsStart = setPlaceNewConfig.StartPlace;
} foreach (var points in setPlaceNewConfig.StartPlace)
AddPoints(ndiView, points, Brushes.Blue);
}
if (setPlaceNewConfig.EndPlace.Count > 0)
{
ndiView.polygonsEnd = setPlaceNewConfig.EndPlace;
foreach (var points in setPlaceNewConfig.EndPlace)
AddPoints(ndiView, points, Brushes.Green);
}
}
if (setPlaceNewConfig.InvlidPlace.Count > 0) if (setPlaceNewConfig.InvlidPlace.Count > 0)
{ {
//ndiView.rectsInvalid = setPlaceNewConfig.InvlidPlace; //ndiView.rectsInvalid = setPlaceNewConfig.InvlidPlace;
......
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs 
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIMainView\View\NDIMainView.xaml;; FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIMainView\View\NDIMainView.xaml;;
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIPreviewView\View\NDIPreviewView.xaml;; FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module\NDIPreviewView\View\NDIPreviewView.xaml;;
......
...@@ -77,10 +77,10 @@ namespace VIZ.Framework.Common ...@@ -77,10 +77,10 @@ namespace VIZ.Framework.Common
get { return (int)GetValue(TempNumTextProperty); } get { return (int)GetValue(TempNumTextProperty); }
set { SetValue(TempNumTextProperty, value); } set { SetValue(TempNumTextProperty, value); }
} }
public static readonly DependencyProperty TempNumTextProperty = public static readonly DependencyProperty TempNumTextProperty =
DependencyProperty.Register(nameof(TempNumText), typeof(int), typeof(CountdownDisplayControl)); DependencyProperty.Register(nameof(TempNumText), typeof(int), typeof(CountdownDisplayControl));
/// <summary> /// <summary>
/// 更新 /// 更新
/// </summary> /// </summary>
......
 //------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace XamlGeneratedNamespace {
/// <summary>
/// GeneratedInternalTypeHelper
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public sealed class GeneratedInternalTypeHelper : System.Windows.Markup.InternalTypeHelper {
/// <summary>
/// CreateInstance
/// </summary>
protected override object CreateInstance(System.Type type, System.Globalization.CultureInfo culture) {
return System.Activator.CreateInstance(type, ((System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic)
| (System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.CreateInstance)), null, null, culture);
}
/// <summary>
/// GetPropertyValue
/// </summary>
protected override object GetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, System.Globalization.CultureInfo culture) {
return propertyInfo.GetValue(target, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// SetPropertyValue
/// </summary>
protected override void SetPropertyValue(System.Reflection.PropertyInfo propertyInfo, object target, object value, System.Globalization.CultureInfo culture) {
propertyInfo.SetValue(target, value, System.Reflection.BindingFlags.Default, null, null, culture);
}
/// <summary>
/// CreateDelegate
/// </summary>
protected override System.Delegate CreateDelegate(System.Type delegateType, object target, string handler) {
return ((System.Delegate)(target.GetType().InvokeMember("_CreateDelegate", (System.Reflection.BindingFlags.InvokeMethod
| (System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance)), null, target, new object[] {
delegateType,
handler}, null)));
}
/// <summary>
/// AddEventHandler
/// </summary>
protected override void AddEventHandler(System.Reflection.EventInfo eventInfo, object target, System.Delegate handler) {
eventInfo.AddEventHandler(target, handler);
}
}
}
C:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs 
FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxEx.xaml;; FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxEx.xaml;;
FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxExWindow.xaml;; FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxExWindow.xaml;;
......
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