Commit 28f22f09 by 鲁志-悦动

Replay缓存500帧

parent 65e3f0c0
//------------------------------------------------------------------------------
// <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
2-725104376
21870986562
3947974750
17-1462717611
31364711570
17-1683084370
Themes\Generic.xaml;Widgets\FootballFieldPanel\FootballFieldPanel.xaml;
True
False
......@@ -68,7 +68,7 @@ namespace VIZ.FGOUT.Module
//ChangeStrategyContext context = new ChangeStrategyContext();
//context.IsUseClip = this.focusNDIViewModel.IsUseClip;
//context.Mode = AlgorithmStrategyMode.auto_mode;
//context.IsNeedRestart = false;
//context.IsNeedRestart = false;
//context.TriggerScene = NDIViewScene.SpaceHotkey;
//this.focusNDIViewModel.ChangeStrategyMode(context);
......@@ -109,13 +109,13 @@ namespace VIZ.FGOUT.Module
// return;
}
/// <summary>
/// <summary>
/// 处理自动裁切
/// </summary>
/// <param name="hotkey">热键</param>
/// </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;
......@@ -147,13 +147,11 @@ namespace VIZ.FGOUT.Module
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmPackage__MatCmd algorithmPackage__MatCmd = new AlgorithmPackage__MatCmd();
algorithmPackage__MatCmd.mode = AlgorithmPackageSignal.manual_mode;
algorithmPackage__MatCmd.signal = AlgorithmPackageSignal.matt_end;
log.Info(hotkey+"发送结束命令:" + algorithmPackage__MatCmd.mode+""+algorithmPackage__MatCmd.signal);
log.Info(hotkey + "发送结束命令:" + algorithmPackage__MatCmd.mode + "" + algorithmPackage__MatCmd.signal);
AlgorithmSender.MatImageCmd(manager, algorithmPackage__MatCmd);
}
//if (string.Equals(this.Support.HotkeyConfig.AutoCAM3, hotkey))
......
......@@ -492,8 +492,8 @@ namespace VIZ.FGOUT.Module
public VCommand UESettingCommand { get; set; }
private void UESetting()
{
UESettingModel ueSettingModel = new UESettingModel();
ApplicationDomainEx.MessageManager.Send(ueSettingModel);
var ueSettingModel = new UESettingModel();
ApplicationDomain.MessageManager.Send(ueSettingModel);
}
#endregion
......@@ -518,7 +518,7 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void Exit()
{
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null) return;
//manager.SendJson(new AlgorithmPackage_Figout_model(){signal = AlgorithmPackageSignal.EXIT});
manager.SendJson(new AlgorithmPackage_Figout_model() { signal = AlgorithmPackageSignal.GO_ON });
......@@ -530,7 +530,7 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void Holdon()
{
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null) return;
manager.SendJson(new AlgorithmPackage_Figout_model() { signal = AlgorithmPackageSignal.HOLD_ON });
}
......@@ -539,7 +539,7 @@ namespace VIZ.FGOUT.Module
private void MattStart()
{
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null) return;
var mode = AlgorithmPackageSignal.manual_mode;
if(isAutoEnable)
......@@ -550,7 +550,7 @@ namespace VIZ.FGOUT.Module
private void MattEnd()
{
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null) return;
var mode = AlgorithmPackageSignal.manual_mode;
if (isAutoEnable)
......@@ -583,7 +583,7 @@ namespace VIZ.FGOUT.Module
if (_initialValue != SliderValue)
{
_initialValue = SliderValue;
ReplayModel replayModel = new ReplayModel() { IsReplay = true, IsSliderValueChanged = true, SliderValue = SliderValue };
var replayModel = new ReplayModel() { IsReplay = true, IsSliderValueChanged = true, SliderValue = SliderValue };
ApplicationDomain.MessageManager.Send(replayModel);
}
}
......@@ -606,10 +606,10 @@ namespace VIZ.FGOUT.Module
ReplaySendVisibility = Visibility.Visible;
SliderVisibility = Visibility.Visible;
SliderValue = SliderMaxValue;
ReplayModel replayModel = new ReplayModel() { IsReplay = true };
var replayModel = new ReplayModel() { IsReplay = true };
ApplicationDomain.MessageManager.Send(replayModel);
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
if (manager == null) return;
var replayPackage = new ReplayPackage()
......@@ -624,11 +624,21 @@ namespace VIZ.FGOUT.Module
{
ReplaySendVisibility = Visibility.Hidden;
SliderVisibility = Visibility.Hidden;
ReplayModel replayModel = new ReplayModel() { IsReplay = false };
var replayModel = new ReplayModel() { IsReplay = false };
ApplicationDomain.MessageManager.Send(replayModel);
_initialValue = SliderMaxValue;
StartTime = 0;
EndTime = 0;
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
if (manager == null) return;
var replayPackage = new ReplayPackage()
{
type = ClipPackageSignal.REPLAY,
status = ReplayStatus.Stop
};
manager.SendJson(replayPackage);
}
#endregion
......@@ -668,25 +678,31 @@ namespace VIZ.FGOUT.Module
return;
}
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
if (manager == null) return;
ReplayPackage replayPackage = new ReplayPackage();
replayPackage.type = ClipPackageSignal.REPLAY;
replayPackage.start_time = StartTime;
replayPackage.end_time = EndTime;
replayPackage.status = ReplayStatus.ReStart;
var replayPackage = new ReplayPackage()
{
type = ClipPackageSignal.REPLAY,
start_time = StartTime,
end_time = EndTime,
status = ReplayStatus.ReStart
};
manager.SendJson(replayPackage);
MessageBoxEx.ShowDialog("Replay Restart OK.");
}
private void ReplayStop()
{
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
if (manager == null) return;
ReplayPackage replayPackage = new ReplayPackage();
replayPackage.type = ClipPackageSignal.REPLAY;
replayPackage.status = ReplayStatus.Stop;
var replayPackage = new ReplayPackage()
{
type = ClipPackageSignal.REPLAY,
status = ReplayStatus.Stop
};
manager.SendJson(replayPackage);
MessageBoxEx.ShowDialog("Replay Stop OK.");
ReplayIsChecked = false;
......@@ -1128,7 +1144,7 @@ namespace VIZ.FGOUT.Module
set { _sliderValue2 = value; this.RaisePropertyChanged(nameof(SliderValue2)); }
}
private int _sliderMaxValue = 150;
private int _sliderMaxValue = 500;
public int SliderMaxValue
{
get => (int)_sliderMaxValue;
......
......@@ -549,7 +549,7 @@ namespace VIZ.FGOUT.Module
_algorithmMessage = package == null ? string.Empty : JsonConvert.SerializeObject(package, JSON_SERIALIZER_SETTINGS);
//如果体育项目没有更改,向算法发送参数,此时算法不重启
//如果体育项目没有更改,向算法发送参数,此时算法不重启
if (_initItem == (PresetsItem ?? string.Empty))
manager.SendJson(package);
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VIZ.FGOUT.Storage;
using VIZ.FGOUT.Storage;
namespace VIZ.FGOUT.Module
{
......
<UserControl x:Class="VIZ.FGOUT.Module.HotkeySettingPanelView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VIZ.FGOUT.Module"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
d:DataContext="{d:DesignInstance Type=local:HotkeySettingPanelViewModel}"
mc:Ignorable="d"
d:DesignHeight="900" d:DesignWidth="800">
<UserControl
x:Class="VIZ.FGOUT.Module.HotkeySettingPanelView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:fcommon="clr-namespace:VIZ.Framework.Common;assembly=VIZ.Framework.Common"
xmlns:local="clr-namespace:VIZ.FGOUT.Module"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DataContext="{d:DesignInstance Type=local:HotkeySettingPanelViewModel}"
d:DesignHeight="900"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.FGOUT.Module.Resource;component/Style/HotkeyBox/HotkeyBox_Setting.xaml"></ResourceDictionary>
<ResourceDictionary Source="/VIZ.FGOUT.Module.Resource;component/Style/HotkeyBox/HotkeyBox_Setting.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
......@@ -32,44 +34,71 @@
<Grid Margin="45,60,40,0">
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="100"></RowDefinition>
<RowDefinition Height="50" />
<RowDefinition Height="100" />
</Grid.RowDefinitions>
<!-- 算法裁切快捷键 -->
<TextBlock Text="算法裁切快捷键" Foreground="#AAFFFFFF" FontSize="20" VerticalAlignment="Center"></TextBlock>
<Rectangle Height="1" VerticalAlignment="Bottom" Fill="#ff3d4758"></Rectangle>
<!-- 算法裁切快捷键 -->
<TextBlock
VerticalAlignment="Center"
FontSize="20"
Foreground="#AAFFFFFF"
Text="算法裁切快捷键" />
<Rectangle
Height="1"
VerticalAlignment="Bottom"
Fill="#ff3d4758" />
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="50" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="120"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="120" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- CAM 1 -->
<TextBlock Text="开始" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="0"></TextBlock>
<fcommon:HotkeyBox Grid.Column="1" Hotkey="{Binding Path=StartCmd,Mode=TwoWay}" Height="30"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
<!-- CAM 2 -->
<TextBlock Text="结束" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="0" Grid.Column="2"></TextBlock>
<fcommon:HotkeyBox Grid.Column="3" Hotkey="{Binding Path=EndCmd,Mode=TwoWay}" Height="30" Grid.Row="0"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
<!-- CAM 3 --><!--
<TextBlock Text="CAM 3" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="1"></TextBlock>
<fcommon:HotkeyBox Grid.Column="1" Hotkey="{Binding Path=AutoCAM3,Mode=TwoWay}" Height="30" Grid.Row="1"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>
--><!-- CAM 4 --><!--
<TextBlock Text="CAM 4" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="1" Grid.Column="2"></TextBlock>
<fcommon:HotkeyBox Grid.Column="3" Hotkey="{Binding Path=AutoCAM4,Mode=TwoWay}" Height="30" Grid.Row="1"
<!-- 开始 -->
<TextBlock
Grid.Row="0"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="开始" />
<fcommon:HotkeyBox
Grid.Column="1"
Height="30"
Margin="0,0,20,0"
Hotkey="{Binding Path=StartCmd, Mode=TwoWay}"
Style="{StaticResource HotkeyBox_Setting}" />
<!-- 结束 -->
<TextBlock
Grid.Row="0"
Grid.Column="2"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="结束" />
<fcommon:HotkeyBox
Grid.Row="0"
Grid.Column="3"
Height="30"
Margin="0,0,20,0"
Hotkey="{Binding Path=EndCmd, Mode=TwoWay}"
Style="{StaticResource HotkeyBox_Setting}" />
<!-- CAM 3 -->
<!--<TextBlock Text="CAM 3" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="1"></TextBlock>
<fcommon:HotkeyBox Grid.Column="1" Hotkey="{Binding Path=AutoCAM3,Mode=TwoWay}" Height="30" Grid.Row="1"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>-->
<!-- CAM 4 -->
<!--<TextBlock Text="CAM 4" Foreground="White" FontSize="18" VerticalAlignment="Center" Grid.Row="1" Grid.Column="2"></TextBlock>
<fcommon:HotkeyBox Grid.Column="3" Hotkey="{Binding Path=AutoCAM4,Mode=TwoWay}" Height="30" Grid.Row="1"
Style="{StaticResource HotkeyBox_Setting}" Margin="0,0,20,0"></fcommon:HotkeyBox>-->
</Grid>
</Grid>
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\HotkeySettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D888E13A2AE8413D64E24A715440AAAAAC9E21EEF16284F196352B1C8816F9B3"
#pragma checksum "..\..\..\..\..\SystemSetting\View\HotkeySettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6C3CAB4B3207BC7F539B9E8EEAEEEE5EE4618DC17FD6B1E0BFFCB953F424888F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\SystemSetting\View\HotkeySettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "D888E13A2AE8413D64E24A715440AAAAAC9E21EEF16284F196352B1C8816F9B3"
#pragma checksum "..\..\..\..\..\SystemSetting\View\HotkeySettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6C3CAB4B3207BC7F539B9E8EEAEEEE5EE4618DC17FD6B1E0BFFCB953F424888F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
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.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Text;
using System.Windows.Input;
namespace VIZ.Framework.Common
......@@ -115,7 +111,12 @@ namespace VIZ.Framework.Common
return sb.ToString();
}
// Space
if (e.KeyCode == System.Windows.Forms.Keys.Space)
{
sb.Append($"{e.KeyCode}");
return sb.ToString();
}
return sb.ToString();
}
......
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Core
{
......
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