Commit 772c0902 by 鲁志-悦动

双人项目ReplayStart的时候判断是否选择了两个入点,没有则提示 And 清除选区把选中的跟踪框数据的标记也清掉

parent 109aa871
45b35bce8f964eef9a875133cf2e3b0ed5047601
0f4738cf9699ccc2bf08156df4637e9cc2c5ed782c9b20bcbdd04d19b31d0164
......@@ -178,6 +178,6 @@ C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\Themes\Generic.baml
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\Widgets\FootballFieldPanel\FootballFieldPanel.baml
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\VIZ.FGOUT.Common.g.resources
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\VIZ.FGOUT.Common.csproj.CoreCompileInputs.cache
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\VIZ.FGOUT.Common.csproj.CopyComplete
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\VIZ.FGOUT.Common.dll
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\VIZ.FGOUT.Common.pdb
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\VIZ.FGOU.2BB051D9.Up2Date
9e7dea4eb92d708ccd19cfd4d1961f362b32e696
a83c5d648dadec9571c1a255b923e0d9044e93ee02822d123d5c05393c67f4ad
......@@ -274,6 +274,6 @@ C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Connection\bin\x64\Debug\System.Threading.
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Connection\bin\x64\Debug\Microsoft.Bcl.HashCode.xml
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Connection\obj\x64\Debug\VIZ.FGOUT.Connection.csproj.AssemblyReference.cache
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Connection\obj\x64\Debug\VIZ.FGOUT.Connection.csproj.CoreCompileInputs.cache
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Connection\obj\x64\Debug\VIZ.FGOUT.Connection.csproj.CopyComplete
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Connection\obj\x64\Debug\VIZ.FGOUT.Connection.dll
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Connection\obj\x64\Debug\VIZ.FGOUT.Connection.pdb
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Connection\obj\x64\Debug\VIZ.FGOU.8135E5BE.Up2Date
93ee4586c7532ced3ab352476596ea66c48809f0
a6d37163fdb07189b20bc5cc28dfe1bb38043a2ff612bba2b397af5181537a58
......@@ -250,6 +250,6 @@ C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Domain\bin\x64\Debug\System.Threading.Task
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Domain\bin\x64\Debug\Microsoft.Bcl.HashCode.xml
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Domain\obj\x64\Debug\VIZ.FGOUT.Domain.csproj.AssemblyReference.cache
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Domain\obj\x64\Debug\VIZ.FGOUT.Domain.csproj.CoreCompileInputs.cache
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Domain\obj\x64\Debug\VIZ.FGOUT.Domain.csproj.CopyComplete
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Domain\obj\x64\Debug\VIZ.FGOUT.Domain.dll
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Domain\obj\x64\Debug\VIZ.FGOUT.Domain.pdb
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Domain\obj\x64\Debug\VIZ.FGOU.A3F58D04.Up2Date
7b3b018f1e0e36a9fb183249887d931b28bd10e5
d286cd86c7c65ee69ab9480645ae872bdf4330e1c7a09e956fa39c85fd1594e9
......@@ -586,7 +586,6 @@ C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\VIZ.FGOUT.Mo
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\VIZ.FGOUT.Module.Resource_MarkupCompile.lref
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\VIZ.FGOUT.Module.Resource.g.resources
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\VIZ.FGOUT.Module.Resource.csproj.CoreCompileInputs.cache
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\VIZ.FGOUT.Module.Resource.csproj.CopyComplete
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\VIZ.FGOUT.Module.Resource.dll
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\VIZ.FGOUT.Module.Resource.pdb
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\Style\CheckBox\CheckBox_WindowTop.baml
......@@ -604,3 +603,4 @@ C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\Toolkit\Nume
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\Themes\Generic.baml
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\Style\RadioButton\RadioButton_NdiMainViewBlue.baml
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\Style\CheckBox\CheckBox_RaidoButtonStyle.baml
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Module.Resource\obj\x64\Debug\VIZ.FGOU.942AC757.Up2Date
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
20-1486193684
1470602451
11-350624472
24-1321085892
201334349489
1-1441241311
11-1602666439
23-2035776870
Style\Button\Button_NdiView.xaml;Style\Button\Button_Setting.xaml;Style\Button\Button_WindowTop.xaml;Style\CheckBox\CheckBox_NdiView.xaml;Style\CheckBox\CheckBox_RaidoButtonStyle.xaml;Style\CheckBox\CheckBox_Setting.xaml;Style\CheckBox\CheckBox_WindowTop.xaml;Style\ComboBox\ComboBox_Setting.xaml;Style\HotkeyBox\HotkeyBox_Setting.xaml;Style\MessageBox\MessageBoxEx.xaml;Style\RadioButton\RadioButton_FootballSide.xaml;Style\RadioButton\RadioButton_NdiMainViewBlue.xaml;Style\RadioButton\RadioButton_NdiView.xaml;Style\RadioButton\RadioButton_Setting.xaml;Style\Slider\Slider_Setting.xaml;Style\TextBlock\TextBlock_Setting.xaml;Style\TextBox\TextBox_Setting.xaml;Style\ToogleButton\ToogleButton_Setting.xaml;Themes\Generic.xaml;Toolkit\NumericUpDown\NumericUpDown.xaml;
False
True
......@@ -808,7 +808,7 @@
Foreground="Black"
IsEnabled="False"
Style="{StaticResource TextBoxStyle}"
Text="{Binding AutoSendCount}" />
Text="{Binding AutoSendCount, Mode=TwoWay}" />
</StackPanel>
</Border>
......
......@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interop;
using System.Windows.Threading;
using Newtonsoft.Json;
using VIZ.FGOUT.Connection;
using VIZ.FGOUT.Connection.UDP.Clip.Signal.Send;
......@@ -54,6 +55,7 @@ namespace VIZ.FGOUT.Module
// 初始化二次确认自动发送倒计时器
InitAutoSendTimer();
//_autoSend_Timer.Stop();
//_autoSend_Timer.Start();
......@@ -171,7 +173,21 @@ namespace VIZ.FGOUT.Module
{
try
{
WPFHelper.BeginInvoke(() =>
//WPFHelper.BeginInvoke(() =>
//{
// if (AutoSendCount == 1)
// AutoSendCount = _tempAutoSendCount;
// AutoSendCount--;
//});
//WPFHelper.Invoke(() =>
//{
// if (AutoSendCount == 1)
// AutoSendCount = _tempAutoSendCount;
// AutoSendCount--;
//},DispatcherPriority.DataBind);
WPFHelper.Invoke(() =>
{
if (AutoSendCount == 1)
AutoSendCount = _tempAutoSendCount;
......
......@@ -333,29 +333,31 @@ namespace VIZ.FGOUT.Module
// }
//}
if (vm.IsReplay)
{
if (_isMove)
{
_isMove = false;
aa = new PathGeometry();
if (rectReplay.Width > 30 && rectReplay.Height > 30)
if (this.NDIKey == NDIViewKeys.CAM_3)
{
if (!rectsReplay.Contains(rectReplay))
_isMove = false;
aa = new PathGeometry();
if (rectReplay.Width > 30 && rectReplay.Height > 30)
{
aa.AddGeometry(new RectangleGeometry(rectReplay));
rectsReplay.Add(rectReplay);
//if (rectsReplay.Count == 2)
// rectsReplay.RemoveAt(0);
var myPath = new Path()
if (!rectsReplay.Contains(rectReplay))
{
Fill = Brushes.Transparent,
Stroke = Brushes.Green,
StrokeThickness = 1,
Data = aa
};
canvas1.Children.Add(myPath);
aa.AddGeometry(new RectangleGeometry(rectReplay));
rectsReplay.Add(rectReplay);
//if (rectsReplay.Count == 2)
// rectsReplay.RemoveAt(0);
var myPath = new Path()
{
Fill = Brushes.Transparent,
Stroke = Brushes.Green,
StrokeThickness = 1,
Data = aa
};
canvas1.Children.Add(myPath);
}
}
}
}
......@@ -381,6 +383,7 @@ namespace VIZ.FGOUT.Module
//最小距离
double minDistance = 3840;
saveInfo = new TrackingBoxInfo();
if (NDIViewModel._cam3StaticInfos == null) return;
//当有跟踪框的时候,就不用拖一个出来了
if (NDIViewModel._cam3StaticInfos.Count > 0)
{
......
......@@ -297,7 +297,7 @@ namespace VIZ.FGOUT.Module
// 更新视频流
view3.video.UpdateVideoFrame(dsExtend, true);
//});
// 更新视频控件跟踪框信息
// 更新视频控件跟踪框信息,现在_cam3Infos里是缓存的跟踪框信息
if (_cam3Infos.Count > 0)
{
_cam3StaticInfos = _cam3Infos;
......@@ -311,7 +311,7 @@ namespace VIZ.FGOUT.Module
if (saveInfo.SrcRect.Left > 0)
{
saveInfo.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR;
_cam3Infos.Add(saveInfo);
_cam3Infos.Add(saveInfo);//把选中框的信息也加到这个集合里
}
}
}
......@@ -321,7 +321,7 @@ namespace VIZ.FGOUT.Module
if (view3.saveInfo.SrcRect.Left > 0)
{
view3.saveInfo.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR;
_cam3Infos.Add(view3.saveInfo);
_cam3Infos.Add(view3.saveInfo);//把选中框的信息也加到这个集合里
}
}
//WPFHelper.Invoke(() =>
......
......@@ -237,10 +237,8 @@ namespace VIZ.FGOUT.Module
var srcHeight = nDIView.video.ActualHeight;
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
if (manager == null)
{
return;
}
if (manager == null) return;
var managerAlgorithm = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (managerAlgorithm == null) return;
......@@ -262,16 +260,27 @@ namespace VIZ.FGOUT.Module
List<List<List<int>>> inPoints = new List<List<List<int>>>();
bool isInPoint = false;
//单人项目
if (nDIView.rectsReplay.Count > 0 && nDIView.rectsReplay[0].Width > 0 && nDIView.rectsReplay[0].Height > 0)
{
inPoints = Coordinate(nDIView.rectsReplay, srcWidth, srcHeight);
isInPoint = true;
}
//双人项目
else if(nDIView.saveInfos.Count > 0)
{
inPoints = CoordinateTrackingBoxInfos(nDIView.saveInfos, srcWidth, srcHeight);
isInPoint = true;
if (nDIView.saveInfos.Count == 2)
{
inPoints = CoordinateTrackingBoxInfos(nDIView.saveInfos, srcWidth, srcHeight);
isInPoint = true;
}
else
{
MessageBoxEx.ShowDialog("双人比赛项目应选择两个入点.");
return;
}
}
//手拖框
else
{
if(nDIView.saveInfo.SrcRect.Left > 0)
......@@ -305,19 +314,19 @@ namespace VIZ.FGOUT.Module
private void CleanInPoints(CleanInPointsModel cleanInPointsModel)
{
if (this.ViewKey != NDIViewKeys.CAM_3)
return;
if (this.ViewKey != NDIViewKeys.CAM_3) return;
var ndiView = this.GetView<NDIView>();
if (ndiView == null)
return;
if (ndiView == null) return;
ndiView.rectsReplay.Clear();
ndiView.canvas1.Children.Clear();
//清除跟踪框的数据
ndiView.saveInfo = new TrackingBoxInfo();
ndiView.saveInfos = new List<TrackingBoxInfo>();
}
private void NewWindow(NewWindowModel newWindowModel)
{
if (this.ViewKey != NDIViewKeys.CAM_1)
return;
if (this.ViewKey != NDIViewKeys.CAM_1) return;
NewWindowView newWindowView = new NewWindowView();
newWindowView.Show();
}
......@@ -349,18 +358,13 @@ namespace VIZ.FGOUT.Module
private void ReconfirmSendParamsCommon(ReconfirmStatus reconfirmStatus)
{
var manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1__CLIP);
if (manager == null)
{
return;
}
if (manager == null) return;
try
{
if(ApplicationDomainEx.LiteDbContext == null)
return;
if(ApplicationDomainEx.LiteDbContext == null) return;
var config = ApplicationDomainEx.LiteDbContext.AlgorithmSaveMatImage.FindAll().FirstOrDefault();
if (config == null)
return;
if (config == null) return;
var reconfirm = new ReconfirmPackage()
{
type = ClipPackageSignal.RECONFIRM,
......@@ -382,16 +386,14 @@ namespace VIZ.FGOUT.Module
private void UESetting(UESettingModel ueSettingModel)
{
if (this.ViewKey != NDIViewKeys.CAM_1)
return;
if (this.ViewKey != NDIViewKeys.CAM_1) return;
UESettingPanelView ueSettingPanelView = new UESettingPanelView();
ueSettingPanelView.Show();
}
private void UEControl(UEControlModel ueControlModel)
{
if (this.ViewKey != NDIViewKeys.CAM_1)
return;
if (this.ViewKey != NDIViewKeys.CAM_1) return;
UEControlPanelView ueControlPanelView = new UEControlPanelView();
ueControlPanelView.Show();
}
......@@ -423,24 +425,33 @@ namespace VIZ.FGOUT.Module
/// </summary>
private void Replay(ReplayModel replayModel)
{
if (this.ViewKey == NDIViewKeys.CAM_2)
return;
if (this.ViewKey == NDIViewKeys.CAM_2) return;
//if (this.ViewKey != NDIViewKeys.CAM_1)
// return;
IsReplayStarted = replayModel.IsReplayStarted;
IsStartValue = replayModel.IsStartValue;
IsEndValue = replayModel.IsEndValue;
IsReplay = replayModel.IsReplay;
IsSliderValueChanged = replayModel.IsSliderValueChanged;
SliderValue = replayModel.SliderValue;
if (IsReplay)
_autoSend_Timer.Stop();//自动发送计时器取消
else
{
NDIView nDIView = this.GetView<NDIView>();
nDIView.saveInfo = new TrackingBoxInfo();
nDIView.saveInfos = new List<TrackingBoxInfo>();
if(this.ViewKey == NDIViewKeys.CAM_3)
{
NDIView nDIView = this.GetView<NDIView>();
if(nDIView == null) return;
//清除拖框的数据
nDIView.rectsReplay.Clear();
nDIView.canvas1.Children.Clear();
//清除跟踪框的数据
nDIView.saveInfo = new TrackingBoxInfo();
nDIView.saveInfos = new List<TrackingBoxInfo>();
}
}
IsSliderValueChanged = replayModel.IsSliderValueChanged;
SliderValue = replayModel.SliderValue;
}
public bool IsMark;
......
......@@ -296,7 +296,7 @@ namespace VIZ.FGOUT.Module
vm.Settings.Add(this);
this.HotkeyConfig = ApplicationDomainEx.LiteDbContext.HotkeyConfig.FindAll().FirstOrDefault();
if(HotkeyConfig == null) return;
this.StartCmd = this.HotkeyConfig.StartCmd;
this.EndCmd = this.HotkeyConfig.EndCmd;
......@@ -412,6 +412,30 @@ namespace VIZ.FGOUT.Module
/// <returns>是否成功保存</returns>
public bool Save()
{
this.HotkeyConfig.StartCmd =StartCmd;
this.HotkeyConfig.EndCmd = EndCmd;
this.HotkeyConfig.I = InPointCmd;
this.HotkeyConfig.O = OutPointCmd;
this.HotkeyConfig.Up = UpCmd;
this.HotkeyConfig.Down = DownCmd;
this.HotkeyConfig.Left = LeftCmd;
this.HotkeyConfig.Right = RightCmd;
this.HotkeyConfig.Replay = ReplayCmd;
this.HotkeyConfig.ReplayStart = ReplayStartCmd;
this.HotkeyConfig.ReplayStop = ReplayStopCmd;
this.HotkeyConfig.CleanInPoint = CleanInPointCmd;
// 更新配置
ApplicationDomainEx.LiteDbContext.HotkeyConfig.Upsert(this.HotkeyConfig);
INDIMainViewService service = ApplicationDomainEx.ServiceManager.GetService<INDIMainViewService>(NDIViewKeys.MainView);
if (service != null)
{
service.HotkeyConfig = this.HotkeyConfig;
}
return true;
//// 算法裁切
//this.HotkeyConfig.AutoCAM1 = this.AutoCAM1;
//this.HotkeyConfig.AutoCAM2 = this.AutoCAM2;
......@@ -439,29 +463,6 @@ namespace VIZ.FGOUT.Module
//// 错误标记
//this.HotkeyConfig.ErrorTagActivedCAM = this.ErrorTagActivedCAM;
//this.HotkeyConfig.CancelErrorTagActivedCAM = this.CancelErrorTagActivedCAM;
this.HotkeyConfig.StartCmd =StartCmd;
this.HotkeyConfig.EndCmd = EndCmd;
this.HotkeyConfig.I = InPointCmd;
this.HotkeyConfig.O = OutPointCmd;
this.HotkeyConfig.Up = UpCmd;
this.HotkeyConfig.Down = DownCmd;
this.HotkeyConfig.Left = LeftCmd;
this.HotkeyConfig.Right = RightCmd;
this.HotkeyConfig.Replay = ReplayCmd;
this.HotkeyConfig.ReplayStart = ReplayStartCmd;
this.HotkeyConfig.ReplayStop = ReplayStopCmd;
this.HotkeyConfig.CleanInPoint = CleanInPointCmd;
// 更新配置
ApplicationDomainEx.LiteDbContext.HotkeyConfig.Upsert(this.HotkeyConfig);
//INDIMainViewService service = ApplicationDomainEx.ServiceManager.GetService<INDIMainViewService>(NDIViewKeys.MainView);
//if (service != null)
//{
// service.HotkeyConfig = this.HotkeyConfig;
//}
return true;
}
/// <summary>
......
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using VIZ.Framework.Core;
using VIZ.Framework.Storage;
using VIZ.FGOUT.Domain;
using VIZ.FGOUT.Storage;
using VIZ.Framework.Core;
using VIZ.Framework.Storage;
namespace VIZ.FGOUT.Module
{
......@@ -446,7 +443,8 @@ namespace VIZ.FGOUT.Module
ApplicationDomainEx.Navigation3DMapping.Multiple = this.Navigation3DMappingMultiple;
ApplicationDomainEx.Navigation3DMapping.Mappings = this.SelectedNavigation3DMappingGroupModel.Mappings;
//ApplicationDomainEx.ServiceManager.GetService<INDIMainViewService>(NDIViewKeys.MainView).SetNavigation3DCheckEnabled(this.IsWhenNavigationTouchedChangeToManualMode);
ApplicationDomainEx.ServiceManager.GetService<INDIMainViewService>(NDIMainViewKeys.MainView).SetNavigation3DCheckEnabled(this.IsWhenNavigationTouchedChangeToManualMode);
//20240327注释
//ApplicationDomainEx.ServiceManager.GetService<INDIMainViewService>(NDIMainViewKeys.MainView).SetNavigation3DCheckEnabled(this.IsWhenNavigationTouchedChangeToManualMode);
// 返回
return true;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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