Commit 61f6e3b8 by 鲁志-悦动

手动模式下,空格键控制开始、结束抠图

parent 28f22f09

//------------------------------------------------------------------------------
// <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);
}
}
}
......@@ -10,11 +10,11 @@ none
false
21870986562
2-725104376
31364711570
17-1683084370
3947974750
17-1462717611
Themes\Generic.xaml;Widgets\FootballFieldPanel\FootballFieldPanel.xaml;
False
True
......@@ -109,17 +109,20 @@ namespace VIZ.FGOUT.Module
// return;
}
/// <summary>
/// 算法是否处于停止状态
/// </summary>
bool _isStop = true;
/// <summary>
/// 处理自动裁切
/// </summary> <param name="hotkey">热键</param>
/// <returns>是否完成处理</returns>
private bool ExecuteAuto(string hotkey)
{
private bool ExecuteAuto(string hotkey) {
//INDIViewService service = null;
//if (ApplicationDomainEx.LiteDbContext.SetManualConfig.FindAll().FirstOrDefault().IsManual) return false;
//如果是自动,返回false
//如果不是手动,返回false
var manualConfig = ApplicationDomainEx.LiteDbContext.SetManualConfig.FindAll().FirstOrDefault();
if (manualConfig == null || !manualConfig.IsManual) return false;
......@@ -154,6 +157,29 @@ namespace VIZ.FGOUT.Module
AlgorithmSender.MatImageCmd(manager, algorithmPackage__MatCmd);
}
//点击空格实现算法手动模式下的开始、结束抠像
//先实现不兼容S、D的情况
if(string.Equals("Space", hotkey))
{
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmPackage__MatCmd algorithmPackage__MatCmd = new AlgorithmPackage__MatCmd();
algorithmPackage__MatCmd.mode = AlgorithmPackageSignal.manual_mode;
if (_isStop)
{
algorithmPackage__MatCmd.signal = AlgorithmPackageSignal.matt_start;
log.Info(hotkey + "发送开始命令:" + algorithmPackage__MatCmd.mode + "" + algorithmPackage__MatCmd.signal);
_isStop = false;
}
else
{
algorithmPackage__MatCmd.signal = AlgorithmPackageSignal.matt_end;
log.Info(hotkey + "发送结束命令:" + algorithmPackage__MatCmd.mode + "" + algorithmPackage__MatCmd.signal);
_isStop = true;
}
AlgorithmSender.MatImageCmd(manager, algorithmPackage__MatCmd);
}
//if (string.Equals(this.Support.HotkeyConfig.AutoCAM3, hotkey))
//{
// // service = ApplicationDomainEx.ServiceManager.GetService<INDIViewService>(NDIViewKeys.CAM_3);
......
......@@ -16,6 +16,10 @@ namespace VIZ.FGOUT.Module
/// </summary>
public partial class NDIViewModel
{
/// <summary>
/// 算法落盘开始、结束时间戳消息
/// </summary>
/// <param name="msg"></param>
private void OnAlgorithmMessage__start_end(AlgorithmMessage__start_end msg)
{
var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
......
......@@ -71,7 +71,7 @@ namespace VIZ.FGOUT.Module
//初始化算法
// this.InitAlgorithm();
//初始化定时器
// 初始化定时器
InitTimer();
}
......@@ -410,7 +410,7 @@ namespace VIZ.FGOUT.Module
/// <param name="displayPlaceModel"></param>
private void DisplayPlace(DisplayPlaceModel displayPlaceModel)
{
SetPlaceNewConfig setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p =>
var setPlaceNewConfig = ApplicationDomainEx.LiteDbContext.SetPlaceNewConfig.FindOne(p =>
p.SportCode == this.viewConfig.GameName);
if (setPlaceNewConfig == null) return;
if (setPlaceNewConfig.EndPlace.Count == 0) return;
......@@ -442,8 +442,8 @@ namespace VIZ.FGOUT.Module
{
IsCleanPlace = cleanPlaceModel.CleanPlace;
NDIView nDIView = this.GetView<NDIView>();
if(nDIView == null)
var ndiView = this.GetView<NDIView>();
if(ndiView == null)
return;
//nDIView.aa = null;
......@@ -457,13 +457,13 @@ namespace VIZ.FGOUT.Module
//nDIView.rectEnd = new System.Windows.Rect(0, 0, 0, 0);
//nDIView.rectInvalid = new System.Windows.Rect(0, 0, 0, 0);
nDIView.polygonsStart.Clear();
nDIView.polygonsEnd.Clear();
ndiView.polygonsStart.Clear();
ndiView.polygonsEnd.Clear();
//nDIView.polygonsInvalid.Clear();
nDIView.rectsInvalid.Clear();
ndiView.rectsInvalid.Clear();
nDIView.canvas1.Children.Clear();
nDIView.polygon = null;
ndiView.canvas1.Children.Clear();
ndiView.polygon = null;
}
/// <summary>
......
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
22-808211288
4-699044453
90-747441034
151674092382
22-1559853185
4-1529606353
90-1236168610
151915249285
NDIMainView\View\NDIMainView.xaml;NDIPreviewView\View\NDIPreviewView.xaml;NDISettingView\View\AlgorithmSettingPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmCablewayPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmNearPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSinglePanelView.xaml;NDISettingView\View\Algorithm\AlgorithmSixteenPanelView.xaml;NDISettingView\View\Algorithm\AlgorithmTacticsPanelView.xaml;NDISettingView\View\NDISettingPanelView.xaml;NDISettingView\View\NDISettingView.xaml;NDIView\View\NDIView.xaml;SystemSetting\View\AboutPanelView.xaml;SystemSetting\View\CheckDataPanelView.xaml;SystemSetting\View\HotkeySettingPanelView.xaml;SystemSetting\View\MattingImagePanelView.xaml;SystemSetting\View\PackageSettingPanelView.xaml;SystemSetting\View\PreviewSettingPanelView.xaml;SystemSetting\View\ReplayPanelView.xaml;SystemSetting\View\StyleSettingPanelView.xaml;SystemSetting\View\SystemSettingView.xaml;SystemSetting\View\UEControlPanelView.xaml;SystemSetting\View\UESettingPanelView.xaml;
False
True

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;;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT\App.xaml
2-1347366880
21265083526
6968741766
43-1958993781
6-790135758
421356718200
CloseAlgorithmWindow.xaml;MainWindow.xaml;
False
True
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