Commit 213d03ee by 鲁志-悦动

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

parent 13fa2a7a
namespace VIZ.FGOUT.Domain
{
/// <summary>
/// 自动发送
/// </summary>
public class AutoSendModel
{
public int Interval { get; set; }
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.FGOUT.Domain
namespace VIZ.FGOUT.Domain
{
/// <summary>
/// 显示位置模型
/// </summary>
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 @@
<Compile Include="Message\Setting\StopAlgorithmModel.cs" />
<Compile Include="Message\Setting\UEControlModel.cs" />
<Compile Include="Message\Setting\UESettingModel.cs" />
<Compile Include="Message\Setting\UpdateTitleAndPositionMarkModel.cs" />
<Compile Include="Model\Algorithm\AlgorithmBorderScenceModel.cs" />
<Compile Include="Model\Algorithm\AlgorithmProcessModel.cs" />
<Compile Include="Model\Algorithm\AlgorithmStrategyGroupModel.cs" />
......
299548c82a3c191879628f36b01e3b411c73afa8160c518e198b2712e832497e
66951d7d855714407e801fcd5acaf49611b3106deecdf1232b5d72073ba783ec
......@@ -179,12 +179,10 @@ namespace VIZ.FGOUT.Module
this.MattStartCommand = new VCommand(this.MattStart);
//算法结束抠图
this.MattEndCommand = new VCommand(this.MattEnd);
//打开一个新的输出窗口
this.NewWindowCommand = new VCommand(this.NewWindow);
//刷新位置
this.RefreshPositionCommand = new VCommand(this.RefreshPosition);
//二次确认抛弃
this.AbandonCommand = new VCommand(this.Abandon);
//二次确认发送
......@@ -205,8 +203,12 @@ namespace VIZ.FGOUT.Module
////Replay出点值
//ApplicationDomain.MessageManager.Register<ReplayEndValueModel>(this, this.ReplayEndValueFromNDIViewModel);
//接收自动发送消息
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);
}
......@@ -227,6 +229,14 @@ namespace VIZ.FGOUT.Module
//_autoSend_Timer.Start();
}
private void UpdateTitleAndPositionMarkMethod(UpdateTitleAndPositionMarkModel model)
{
//刷新Title
InitSportName();
//刷新位置标记
RefreshPosition();
}
private void AutoSendIntervalTimeChanged(AutoSendModel model)
{
//_tempAutoSendCount = AutoSendCount = (model.Interval / 1000) + 1;
......@@ -809,7 +819,7 @@ namespace VIZ.FGOUT.Module
HidePlace();
ShowPlace();
//点恢复的时候刷新一下体育项目名
InitSportName();
//InitSportName();
}
#endregion
......@@ -1366,13 +1376,15 @@ namespace VIZ.FGOUT.Module
if (IsMatImage)
{
var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
if (config == null)
return;
if (config == null) return;
var package = new SaveMatImagePackage()
{
type = ClipPackageSignal.LOADMASK,
start_time = config.start,
end_time = config.end
};
SaveMatImagePackage package = new SaveMatImagePackage();
package.type = ClipPackageSignal.LOADMASK;
package.start_time = config.start;
package.end_time = config.end;
// 发送UDP命令给音视频
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
......@@ -1383,12 +1395,8 @@ namespace VIZ.FGOUT.Module
//// 发送UDP命令给算法
//UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null)
{
return;
}
if (manager == null) return;
manager.SendJson(package);
}
//ReplayPackage replayPackage = new ReplayPackage();
......@@ -1586,6 +1594,7 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void ShowPlace()
{
displayPlaceModel.IsAutoMode = IsAutoEnable;
ApplicationDomain.MessageManager.Send(displayPlaceModel);
}
......
......@@ -6,9 +6,11 @@ using System.Windows;
using VIZ.FGOUT.Connection;
using VIZ.FGOUT.Connection.UDP.Clip.Signal.Send;
using VIZ.FGOUT.Domain;
using VIZ.FGOUT.Domain.Message.Setting;
using VIZ.FGOUT.Storage;
using VIZ.Framework.Connection;
using VIZ.Framework.Core;
using VIZ.Framework.Domain;
namespace VIZ.FGOUT.Module
{
......@@ -415,9 +417,15 @@ namespace VIZ.FGOUT.Module
javelinThrowConfig.Number = this.ViewConfig.GameName;
}
javelinThrowConfig.AlgorithmData = _algorithmMessage;
//存算法数据
ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(javelinThrowConfig);
//存ViewConfig
ApplicationDomainEx.LiteDbContext.ViewConfig.Upsert(this.ViewConfig);
//更新主页面Title体育项目名和位置标记
var updateTitleAndPositionMarkModel = new UpdateTitleAndPositionMarkModel();
ApplicationDomain.MessageManager.Send(updateTitleAndPositionMarkModel);
}
return true;
}
......
......@@ -258,8 +258,9 @@ namespace VIZ.FGOUT.Module
// 如果需要重启算法那么重启算法
INDIViewService service = ApplicationDomainEx.ServiceManager.GetService<INDIViewService>(this.ViewKey);
// 关闭窗口
this.GetWindow().Close();
//// 关闭窗口
//this.GetWindow().Close();
//如果是CAM_2或CAM_4,不需要重启算法进程
if (this.ViewKey.Equals(NDIViewKeys.CAM_2) || this.ViewKey.Equals(NDIViewKeys.CAM_4))
return;
......@@ -271,6 +272,9 @@ namespace VIZ.FGOUT.Module
context.TriggerScene = NDIViewScene.SettingPanel;
service.ChangeStrategyMode(context);
// 关闭窗口
this.GetWindow().Close();
}
#endregion
......
......@@ -32,7 +32,7 @@ namespace VIZ.FGOUT.Module
_autoSend_Timer.Stop();
_autoSend_Timer.Start();
AutoSendModel autoSendModel = new AutoSendModel(){ Interval = ALGORITHM_ReconfirmAutoSend_TIME };
var autoSendModel = new AutoSendModel(){ Interval = ALGORITHM_ReconfirmAutoSend_TIME };
ApplicationDomain.MessageManager.Send(autoSendModel);
}
......
......@@ -569,16 +569,19 @@ namespace VIZ.FGOUT.Module
/// <param name="displayPlaceModel"></param>
private void DisplayPlace(DisplayPlaceModel displayPlaceModel)
{
if (this.ViewKey != NDIViewKeys.CAM_1)
return;
if (this.ViewKey != NDIViewKeys.CAM_1) return;
NDIView ndiView = this.GetView<NDIView>();
if (ndiView == null)
return;
if (ndiView == null) return;
var setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p =>
p.SportCode == this.viewConfig.GameName);
if (setPlaceNewConfig == null) return;
//if (setPlaceNewConfig.EndPlace.Count == 0) return;
//自动模式下显示开始和结束位置
if (displayPlaceModel.IsAutoMode)
{
if (setPlaceNewConfig.StartPlace.Count > 0)
{
ndiView.polygonsStart = setPlaceNewConfig.StartPlace;
......@@ -592,6 +595,7 @@ namespace VIZ.FGOUT.Module
foreach (var points in setPlaceNewConfig.EndPlace)
AddPoints(ndiView, points, Brushes.Green);
}
}
if (setPlaceNewConfig.InvlidPlace.Count > 0)
{
......
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\NDIPreviewView\View\NDIPreviewView.xaml;;
......
......@@ -77,10 +77,10 @@ namespace VIZ.Framework.Common
get { return (int)GetValue(TempNumTextProperty); }
set { SetValue(TempNumTextProperty, value); }
}
public static readonly DependencyProperty TempNumTextProperty =
DependencyProperty.Register(nameof(TempNumText), typeof(int), typeof(CountdownDisplayControl));
/// <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\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