Commit 58136158 by 鲁志-悦动

只在调整入点的时候显示入点跟踪框 And 入点和入点跟踪框不一致加提示 And 有入点跟踪框的时候点选的入点框数据清空 And 修复双人项目有入点跟踪框的情况下只发送一人数据的缺陷

parent 1b842e9b
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
22-1578589972
1-1441241311
11-1602666439
23-2035776870
221979955803
1470602451
11-350624472
24-1321085892
Resources\StringResource.zh-CN.xaml;Resources\StringResource.en.xaml;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;
True
False
......@@ -46,9 +46,9 @@ namespace VIZ.FGOUT.Module
public Rect rectReplay;
// public Rectangle rectInvalid;
public List<Rect> rectsReplay = new List<Rect>();
public TrackingBoxInfo saveInfo = new TrackingBoxInfo();
public List<TrackingBoxInfo> saveInfos = new List<TrackingBoxInfo>();
public static List<Rect> rectsReplay = new List<Rect>();
public static TrackingBoxInfo saveInfo = new TrackingBoxInfo();
public static List<TrackingBoxInfo> saveInfos = new List<TrackingBoxInfo>();
// public Path myPath = new Path();
// public Path myPath1 = new Path();
......
......@@ -263,18 +263,40 @@ namespace VIZ.FGOUT.Module
//前三个手拖框、双人项目、单人项目都是判断是否有值
//手拖框
if (nDIView.rectsReplay.Count > 0 && nDIView.rectsReplay[0].Width > 0 && nDIView.rectsReplay[0].Height > 0)
//if (nDIView.rectsReplay.Count > 0 && nDIView.rectsReplay[0].Width > 0 && nDIView.rectsReplay[0].Height > 0)
//{
// inPoints = Coordinate(nDIView.rectsReplay, srcWidth, srcHeight);
// isInPoint = true;
//}
if (NDIView.rectsReplay.Count > 0 && NDIView.rectsReplay[0].Width > 0 && NDIView.rectsReplay[0].Height > 0)
{
inPoints = Coordinate(nDIView.rectsReplay, srcWidth, srcHeight);
inPoints = Coordinate(NDIView.rectsReplay, srcWidth, srcHeight);
isInPoint = true;
}
//双人项目
else if(nDIView.saveInfos.Count > 0)
//else if(nDIView.saveInfos.Count > 0)
//{
// if (nDIView.saveInfos.Count == 2)
// {
// if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
// inPoints = CoordinateTrackingBoxInfos(nDIView.saveInfos, srcWidth, srcHeight);
// isInPoint = true;
// }
// else
// {
// WPFHelper.BeginInvoke(() =>
// {
// MessageBoxEx.ShowDialog("双人比赛项目应选择两个入点.");
// });
// return;
// }
//}
else if (NDIView.saveInfos.Count > 0)
{
if (nDIView.saveInfos.Count == 2)
if (NDIView.saveInfos.Count == 2)
{
if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
inPoints = CoordinateTrackingBoxInfos(nDIView.saveInfos, srcWidth, srcHeight);
inPoints = CoordinateTrackingBoxInfos(NDIView.saveInfos, srcWidth, srcHeight);
isInPoint = true;
}
else
......@@ -296,21 +318,29 @@ namespace VIZ.FGOUT.Module
// isInPoint = true;
// }
//}
else if (nDIView.saveInfo.SrcRect.Left > 0)
//else if (nDIView.saveInfo.SrcRect.Left > 0)
//{
// if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
// inPoints = CoordinateTrackingBoxInfo(nDIView.saveInfo.SrcRect, srcWidth, srcHeight);
// isInPoint = true;
//}
else if (NDIView.saveInfo.SrcRect.Left > 0)
{
if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
inPoints = CoordinateTrackingBoxInfo(nDIView.saveInfo.SrcRect, srcWidth, srcHeight);
inPoints = CoordinateTrackingBoxInfo(NDIView.saveInfo.SrcRect, srcWidth, srcHeight);
isInPoint = true;
}
#region 算法识别到人的情况下
else if (_twoInfos.Count > 0)
{
if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
inPoints = CoordinateTrackingBoxInfos(_twoInfos, srcWidth, srcHeight);
isInPoint = true;
}
else if (_singleInfo.SrcRect.Left > 0)
{
if (InPointIsMoved()) return; //入点和入点标记框位置不一致,返回
inPoints = CoordinateTrackingBoxInfo(_singleInfo.SrcRect, srcWidth, srcHeight);
isInPoint = true;
}
......@@ -361,11 +391,14 @@ namespace VIZ.FGOUT.Module
if (this.ViewKey != NDIViewKeys.CAM_3) return;
var ndiView = this.GetView<NDIView>();
if (ndiView == null) return;
ndiView.rectsReplay.Clear();
//ndiView.rectsReplay.Clear();
NDIView.rectsReplay.Clear();
ndiView.canvas1.Children.Clear();
//清除跟踪框的数据
ndiView.saveInfo = new TrackingBoxInfo();
ndiView.saveInfos = new List<TrackingBoxInfo>();
//ndiView.saveInfo = new TrackingBoxInfo();
//ndiView.saveInfos = new List<TrackingBoxInfo>();
NDIView.saveInfo = new TrackingBoxInfo();
NDIView.saveInfos = new List<TrackingBoxInfo>();
_singleInfo = new TrackingBoxInfo();
_twoInfos = new List<TrackingBoxInfo>();
......@@ -522,16 +555,32 @@ namespace VIZ.FGOUT.Module
NDIView nDIView = this.GetView<NDIView>();
if (nDIView == null) return;
//清除拖框的数据
nDIView.rectsReplay.Clear();
//nDIView.rectsReplay.Clear();
NDIView.rectsReplay.Clear();
nDIView.canvas1.Children.Clear();
//清除跟踪框的数据
nDIView.saveInfo = new TrackingBoxInfo();
nDIView.saveInfos = new List<TrackingBoxInfo>();
//nDIView.saveInfo = new TrackingBoxInfo();
//nDIView.saveInfos = new List<TrackingBoxInfo>();
NDIView.saveInfo = new TrackingBoxInfo();
NDIView.saveInfos = new List<TrackingBoxInfo>();
_singleInfo = new TrackingBoxInfo();
_twoInfos = new List<TrackingBoxInfo>();
}
}
/// <summary>
/// 清除拖框和跟踪框的数据
/// </summary>
//private void ClearMoveAndTrackRectangleBoxData()
//{
// //清除拖框的数据
// nDIView.rectsReplay.Clear();
// nDIView.canvas1.Children.Clear();
// //清除跟踪框的数据
// nDIView.saveInfo = new TrackingBoxInfo();
// nDIView.saveInfos = new List<TrackingBoxInfo>();
//}
public bool IsMark;
/// <summary>
/// 算法标记命令
......@@ -1749,8 +1798,10 @@ namespace VIZ.FGOUT.Module
// view.rectsInvalid.RemoveAt(view.rectsInvalid.Count - 1);
else if (IsDrawInvalidPlace && view.polygonsInvalid.Count > 0)
view.polygonsInvalid.RemoveAt(view.polygonsInvalid.Count - 1);
else if (IsReplay && view.rectsReplay.Count > 0)
view.rectsReplay.RemoveAt(view.rectsReplay.Count - 1);
//else if (IsReplay && view.rectsReplay.Count > 0)
// view.rectsReplay.RemoveAt(view.rectsReplay.Count - 1);
else if (IsReplay && NDIView.rectsReplay.Count > 0)
NDIView.rectsReplay.RemoveAt(NDIView.rectsReplay.Count - 1);
//先清空
view.canvas1.Children.Clear();
......
......@@ -55,5 +55,5 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.8.0")]
[assembly: AssemblyFileVersion("1.0.8.0")]
[assembly: AssemblyVersion("1.0.9.0")]
[assembly: AssemblyFileVersion("1.0.9.0")]
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