Commit efb9c1c3 by 鲁志-悦动

最高点勾选跳水项目可用 And 添加拉框逻辑

parent 3733b996
......@@ -989,7 +989,7 @@
Style="{StaticResource TextBoxStyle}"
Text="{Binding Moving_pixel, Mode=TwoWay}">
<b:Interaction.Behaviors>
<local:TextBoxEnterKeyUpdateBehavior />
<local:TextBoxEnterKeyUpdateDownBehavior />
</b:Interaction.Behaviors>
<b:Interaction.Triggers>
<b:EventTrigger EventName="KeyDown">
......@@ -1035,6 +1035,7 @@
FontSize="14"
Foreground="White"
IsChecked="{Binding Path=IsKeepHighest, Mode=TwoWay}"
IsEnabled="{Binding KeepHighestIsEnabled}"
Style="{StaticResource CheckBox_Setting}" />
<CheckBox
......
......@@ -109,7 +109,19 @@ namespace VIZ.FGOUT.Module
var number = ApplicationDomainEx.LiteDbContext.ViewConfig.FindOne(p => p.ViewKey == NDIViewKeys.CAM_1)
.GameName;
if (!string.IsNullOrEmpty(number))
{
Title = "FigureOUT(" + dics[number] + ")";
if (number.Equals("DS") || number.Equals("DT") || number.Equals("SS") || number.Equals("ST"))
{
KeepHighestIsEnabled = true;
}
else
{
KeepHighestIsEnabled = false;
}
}
}
catch (Exception ex)
{
......@@ -425,6 +437,17 @@ namespace VIZ.FGOUT.Module
}
}
private bool _keepHighestIsEnabled;
public bool KeepHighestIsEnabled
{
get => _keepHighestIsEnabled;
set
{
_keepHighestIsEnabled = value;
this.RaisePropertyChanged(nameof(KeepHighestIsEnabled));
}
}
private bool _isBigModel;
/// <summary>
/// 是否用大模型
......
......@@ -346,6 +346,7 @@
FontSize="16"
Foreground="White"
IsChecked="{Binding Path=IsKeepHighest, Mode=TwoWay}"
IsEnabled="{Binding KeepHighestIsEnabled}"
Style="{StaticResource CheckBox_Setting}" />
<CheckBox
......
......@@ -249,6 +249,15 @@ namespace VIZ.FGOUT.Module
//初始化UE预设数据
//InitUEDetail(config.Data);
if (number.Equals("DS") || number.Equals("DT") || number.Equals("SS") || number.Equals("ST"))
{
KeepHighestIsEnabled = true;
}
else
{
KeepHighestIsEnabled = false;
}
//初始化算法数据
InitAlgorithmData(config.AlgorithmData);
}
......@@ -660,6 +669,17 @@ namespace VIZ.FGOUT.Module
}
}
private bool _keepHighestIsEnabled;
public bool KeepHighestIsEnabled
{
get => _keepHighestIsEnabled;
set
{
_keepHighestIsEnabled = value;
this.RaisePropertyChanged(nameof(KeepHighestIsEnabled));
}
}
//要存库的算法数据
private string _algorithmMessage = "";
private void SendAlgorithmParameters()
......
......@@ -36,6 +36,8 @@ namespace VIZ.FGOUT.Module
public Rect rectReplay;
public static List<Rect> rectsReplay = new List<Rect>();
public Rect rectOutReplay;
public static List<Rect> rectsOutReplay = new List<Rect>();
public static TrackingBoxInfo saveInfo = new TrackingBoxInfo();
public static TrackingBoxInfo saveOutPointInfo = new TrackingBoxInfo();
public static List<TrackingBoxInfo> saveInfos = new List<TrackingBoxInfo>();
......@@ -335,6 +337,8 @@ namespace VIZ.FGOUT.Module
{
_isMove = false;
aa = new PathGeometry();
if (vm.IsStartValue)
{
if (rectReplay.Width >= 15 && rectReplay.Height >= 15)
{
if (!rectsReplay.Contains(rectReplay))
......@@ -352,6 +356,26 @@ namespace VIZ.FGOUT.Module
}
}
}
else if (vm.IsEndValue)
{
if (rectOutReplay.Width >= 15 && rectOutReplay.Height >= 15)
{
if (!rectsOutReplay.Contains(rectOutReplay))
{
aa.AddGeometry(new RectangleGeometry(rectOutReplay));
rectsOutReplay.Add(rectOutReplay);
var myPath = new Path()
{
Fill = Brushes.Transparent,
Stroke = Brushes.Green,
StrokeThickness = 1,
Data = aa
};
canvas1.Children.Add(myPath);
}
}
}
}
}
else
{
......@@ -453,6 +477,7 @@ namespace VIZ.FGOUT.Module
else
{
rectsReplay.Clear();
rectsOutReplay.Clear();
}
}
......@@ -575,7 +600,14 @@ namespace VIZ.FGOUT.Module
if (vm.IsReplay)
{
if (vm.IsStartValue)
{
rectReplay = new Rect(startPoint, e.GetPosition(this.canvas1));
}
else if (vm.IsEndValue)
{
rectOutReplay = new Rect(startPoint, e.GetPosition(this.canvas1));
}
_isMove = true;
}
}
......
......@@ -175,7 +175,8 @@ namespace VIZ.FGOUT.Module
EndTime = e.Frame.TimeStamp;
view.vm.IsSliderEndClicked = false;
}
//在Replay状态下
#region Replay状态下
if (view.vm.IsReplay)
{
Queue<MatExtend> buffer = _frameBuffer.GetFrames();
......@@ -333,8 +334,10 @@ namespace VIZ.FGOUT.Module
//清除点选跟踪框的数据
NDIView.saveInfo = new TrackingBoxInfo();
NDIView.saveOutPointInfo = new TrackingBoxInfo();
//清除拖框的数据
NDIView.rectsReplay.Clear();
NDIView.rectsOutReplay.Clear();
}
}
......@@ -381,12 +384,25 @@ namespace VIZ.FGOUT.Module
_RecordStartTime = saveInfo.TimeCode;
}
}
foreach (var saveOutInfo in NDIView.saveOutPointInfos)
{
//更新红绿色点中框
if (saveOutInfo.SrcRect.Left > 0)
{
saveOutInfo.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR_GREEN;
//把选中框的信息也加到这个集合里
_cam3Infos.Add(saveOutInfo);
//记录标红框时出点时间戳
_RecordEndTime = saveOutInfo.TimeCode;
}
}
}
else
{
//单人
var info = NDIView.saveInfo;
//更新红色点中框
var info = NDIView.saveInfo;
var infoOut = NDIView.saveOutPointInfo;
if (info.SrcRect.Left > 0)
{
info.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR;
......@@ -395,6 +411,14 @@ namespace VIZ.FGOUT.Module
//记录标红框时入点时间戳
_RecordStartTime = info.TimeCode;
}
if (infoOut.SrcRect.Left > 0)
{
infoOut.DrawingBorderColor = this.TRACKING_BOX_BORDER_COLOR_GREEN;
//把选中框的信息也加到这个集合里
_cam3Infos.Add(infoOut);
//记录标绿框时入点时间戳
_RecordEndTime = infoOut.TimeCode;
}
}
//再更新跟踪框信息
view3.video.UpdateTrackingBox(_cam3Infos);
......@@ -413,7 +437,11 @@ namespace VIZ.FGOUT.Module
#endregion
}
#endregion
else
//if (!view.vm.IsReplay)
{
index = 0;
//缓存策略2
......
using Microsoft.Xaml.Behaviors;
using System.Windows.Controls;
using System.Windows.Input;
namespace VIZ.FGOUT.Module
{
public class TextBoxEnterKeyUpdateDownBehavior : Behavior<TextBox>
{
protected override void OnAttached()
{
if (AssociatedObject != null)
{
base.OnAttached();
AssociatedObject.KeyDown += AssociatedObject_KeyDown;
}
}
protected override void OnDetaching()
{
if (AssociatedObject != null)
{
AssociatedObject.KeyDown -= AssociatedObject_KeyDown;
base.OnDetaching();
}
}
private void AssociatedObject_KeyDown(object sender, KeyEventArgs e)
{
if (sender is TextBox textBox)
{
if (e.Key == Key.Return)
{
if (e.Key == Key.Enter)
{
textBox.MoveFocus(new TraversalRequest(FocusNavigationDirection.Down));
}
}
}
}
}
}
......@@ -273,6 +273,7 @@
<Compile Include="Themes\SliderArrange.xaml.cs">
<DependentUpon>SliderArrange.xaml</DependentUpon>
</Compile>
<Compile Include="Themes\TextBoxEnterKeyUpdateDownBehavior.cs" />
<Compile Include="Themes\TextBoxEnterKeyUpdatePreBehavior.cs" />
<Compile Include="Themes\TextBoxEnterKeyUpdateBehavior.cs" />
</ItemGroup>
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "BC6F5F4A9DD24CFDC33C7497FB5A8A82DC67BD3798FCFAB85378F3EDC73D416A"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "27D273E06DFA15F6D27EB8C64BF9DA66E94CD4CD54532517742A535F99BE11A0"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1435 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1436 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1;
......@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1620 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1621 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2;
......@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1635 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1636 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3;
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "BC6F5F4A9DD24CFDC33C7497FB5A8A82DC67BD3798FCFAB85378F3EDC73D416A"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "27D273E06DFA15F6D27EB8C64BF9DA66E94CD4CD54532517742A535F99BE11A0"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1435 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1436 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam1;
......@@ -82,7 +82,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1620 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1621 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam2;
......@@ -90,7 +90,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1635 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1636 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3;
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0B3E6CB266435A45208836AAB95FB222C0FD554383AA89DA48C9E4CFACB0DC11"
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "7E2B2F9B699623C7C4FE86BD0457F0D5372EDDF060883720233944C99AC58E26"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "0B3E6CB266435A45208836AAB95FB222C0FD554383AA89DA48C9E4CFACB0DC11"
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "7E2B2F9B699623C7C4FE86BD0457F0D5372EDDF060883720233944C99AC58E26"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
ba191734d45adb3f5aa173c25a05bb6f90d91da6f2d3424ca71b878426306191
fec8ecabf1a44bcef30953a1475567246ed246dc8b2a5be20e17856e3781c4d0
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
25-429057470
4-1529606353
98391250289
151915249285
25-1434354873
4-699044453
99-439317849
151674092382
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\LanguagePanelView.xaml;SystemSetting\View\MattingImagePanelView.xaml;SystemSetting\View\NewWindowView.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;Themes\SliderArrange.xaml;
True
False
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;;
......
......@@ -55,5 +55,5 @@ using System.Windows;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.12.0")]
[assembly: AssemblyFileVersion("1.0.12.0")]
[assembly: AssemblyVersion("1.0.13.0")]
[assembly: AssemblyFileVersion("1.0.13.0")]
......@@ -24,6 +24,8 @@ VIDEO_RECTANGLE_BORDER_COLOR=#FFFF0000
VIDEO_TRACKING_BOX_BORDER_WIDTH=2
;视频跟踪框边框颜色
VIDEO_TRACKING_BOX_BORDER_COLOR=#FFFF0000
;视频跟踪框边框颜色绿色
VIDEO_TRACKING_BOX_BORDER_COLOR_GREEN=#FF00FF00
;检测边框宽度(单位:像素)
VIDEO_DETECT_BOX_BORDER_WIDTH=2
;检测框边框颜色(格式:#AARRGGBB)
......
......@@ -10,10 +10,10 @@ none
false
TRACE
91711917753
9-721875057
3-1719726047
20-2028247964
3-630027162
19468308608
Path\ArrowPathResource.xaml;Style\Button\Button_MessageBox.xaml;Style\Button\Button_Normal.xaml;Style\Button\Button_WindowTop.xaml;Style\GridSplitter\GridSplitter_None.xaml;Style\ListBox\ListBox_None.xaml;Style\ScrollView\ScrollView_Default.xaml;Style\TextBox\TextBox_None.xaml;Themes\Generic.xaml;
False
......

//------------------------------------------------------------------------------
// <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
TRACE
15488264905
15-721109437
1212046750213
150-875198046
121-1133520871
150-762123096
MessageBox\MessageBoxEx.xaml;MessageBox\MessageBoxExWindow.xaml;Themes\Generic.xaml;VideoControl\Control\VideoControl.xaml;Widgets\ColorPickButton\ColorPickButton.xaml;Widgets\ColorPickButton\ColorPickWindow.xaml;Widgets\GPIOPinTestControl\GPIOPinTestControl.xaml;Widgets\HotkeyBox\HotkeyBox.xaml;Widgets\IconButton\IconButton.xaml;Widgets\LabelValue\LabelValue.xaml;Widgets\NavigationControl\NavigationControl.xaml;Widgets\ResizeImageControl\ResizeImageControl.xaml;Widgets\ShowMessageControl\ShowMessageControl.xaml;Widgets\VideoTimeBar\VideoTimeBar.xaml;Widgets\ViewLoader\ViewLoader.xaml;
False
True
......@@ -10,11 +10,11 @@ none
false
TRACE
11882902973
1-731644535
212023628146
26917618797
212002329545
25-1969161261
Themes\Generic.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