Commit 2413be01 by 鲁志-悦动

开始做发给音视频的裁切框

parent 2b9b6b4c
//------------------------------------------------------------------------------
// <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

C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\Themes\Generic.xaml;;
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\Widgets\FootballFieldPanel\FootballFieldPanel.xaml;;
......
namespace VIZ.FGOUT.Domain
{
public class SelectedModel
{
}
}
......@@ -105,6 +105,7 @@
<Compile Include="Message\Setting\RestartAlgorithmModel.cs" />
<Compile Include="Message\Setting\SaveMarkModel.cs" />
<Compile Include="Message\Setting\SavePlaceModel.cs" />
<Compile Include="Message\Setting\SelectedModel.cs" />
<Compile Include="Message\Setting\SendPlaceModel.cs" />
<Compile Include="Message\Setting\ShowInvalidPlaceModel.cs" />
<Compile Include="Message\Setting\StartPlaceModel.cs" />
......
938d89f8a41b1d10d311c9a80e37ba0b11fb8b24d3f0882cff04f9fd017b0a12
2f14f2db1b01881eda563500b12f9256867d2957342ab955e6ef57d67fe5881a
......@@ -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
......@@ -1117,10 +1117,10 @@
</Border>
<!-- 裁切区域 -->
<!--<Border
<Border
Grid.Row="5"
Grid.Column="0"
Grid.ColumnSpan="3"
Grid.ColumnSpan="5"
BorderBrush="Gray"
BorderThickness="1">
<Grid>
......@@ -1128,6 +1128,8 @@
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBlock
HorizontalAlignment="Center"
......@@ -1153,7 +1155,7 @@
Content="{DynamicResource Send}"
Style="{StaticResource ButtonStyle}" />
</Grid>
</Border>-->
</Border>
<!-- 系统版本 -->
<StackPanel
......
......@@ -221,7 +221,7 @@ namespace VIZ.FGOUT.Module
this.BigModelCommand = new VCommand(this.BigModel);
//裁切区域
//this.SelectedCommand = new VCommand(this.Selected);
this.SelectedCommand = new VCommand(this.Selected);
}
/// <summary>
......@@ -280,9 +280,10 @@ namespace VIZ.FGOUT.Module
WPFHelper.BeginInvoke(() =>
{
MessageBoxEx.ShowDialog(message);
});
//关闭Replay
ReplayStop();
});
}
}
......@@ -1601,26 +1602,27 @@ namespace VIZ.FGOUT.Module
#region 裁切区域
//private bool _selectedIsChecked;
//public bool SelectedIsChecked
//{
// get => _selectedIsChecked;
// set
// {
// _selectedIsChecked = value;
// this.RaisePropertyChanged(nameof(SelectedIsChecked));
// }
//}
//public VCommand SelectedCommand { get; set; }
private bool _selectedIsChecked;
public bool SelectedIsChecked
{
get => _selectedIsChecked;
set
{
_selectedIsChecked = value;
this.RaisePropertyChanged(nameof(SelectedIsChecked));
}
}
//private void Selected()
//{
// if (SelectedIsChecked)
// {
SelectedModel _selectedModel = new SelectedModel();
public VCommand SelectedCommand { get; set; }
// }
//}
private void Selected()
{
if (SelectedIsChecked)
{
ApplicationDomain.MessageManager.Send(_selectedModel);
}
}
#endregion
......
......@@ -32,7 +32,9 @@ namespace VIZ.FGOUT.Module
public List<PointCollection> polygonsStart = new List<PointCollection>();
public List<PointCollection> polygonsEnd = new List<PointCollection>();
public List<PointCollection> polygonsInvalid = new List<PointCollection>();
public Rect rectInvalid;
//public Rect rectInvalid;
//public List<Rect> rectsInvalid = new List<Rect>();
public Rect rectReplay;
public static List<Rect> rectsReplay = new List<Rect>();
......@@ -43,6 +45,10 @@ namespace VIZ.FGOUT.Module
public static List<TrackingBoxInfo> saveInfos = new List<TrackingBoxInfo>();
public static List<TrackingBoxInfo> saveOutPointInfos = new List<TrackingBoxInfo>();
//裁切
public Rect rectSelected;
public List<Rect> rectsSelected = new List<Rect>();
public NDIView()
{
InitializeComponent();
......@@ -329,6 +335,26 @@ namespace VIZ.FGOUT.Module
// }
//}
//裁切
if (vm.IsSelected)
{
aa = new PathGeometry();
aa.AddGeometry(new RectangleGeometry(rectSelected));
var myPath = new Path()
{
Fill = Brushes.Transparent,
Stroke = Brushes.Yellow,
StrokeThickness = 1,
Data = aa
};
if (!this.canvas1.Children.Contains(myPath))
{
this.canvas1.Children.Add(myPath);
}
}
if (vm.IsReplay)
{
if (_isMove)
......@@ -542,6 +568,16 @@ namespace VIZ.FGOUT.Module
//}
//else
//if (vm.IsSelected)
//{
// var selectedCount = rectsSelected.Count;
// if (selectedCount > 0)
// {
// rectsSelected[selectedCount - 1] = new Rect();
// rectsSelected.RemoveAt(selectedCount - 1);
// }
//}
#endregion
//鼠标左键单击画点
......@@ -610,6 +646,12 @@ namespace VIZ.FGOUT.Module
}
_isMove = true;
}
//裁切
if (vm.IsSelected)
{
rectSelected = new Rect(startPoint, e.GetPosition(this.canvas1));
}
}
}
......@@ -686,8 +728,7 @@ namespace VIZ.FGOUT.Module
/// <param name="e"></param>
private void Border_OnPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
if(points == null)
return;
if(points == null) return;
if (vm.IsDrawStartPlace)
{
......@@ -709,6 +750,7 @@ namespace VIZ.FGOUT.Module
if (!polygonsInvalid.Contains(points))
polygonsInvalid.Add(points);
}
polygon = null;
}
}
......
......@@ -212,6 +212,16 @@ namespace VIZ.FGOUT.Module
//二次确认自动发送间隔时间
//ApplicationDomain.MessageManager.Register<ReconfirmAutoSendIntervalTimeModel>(this, this.ReconfirmAutoSendIntervalTime);
//裁切区域发送命令
ApplicationDomain.MessageManager.Register<SelectedModel>(this, this.Selected);
}
public bool IsSelected;
private void Selected(SelectedModel selectedModel)
{
if (this.ViewKey == NDIViewKeys.CAM_2 || this.ViewKey == NDIViewKeys.CAM_4) return;
IsSelected = true;
}
private void ReplayOutPort(ReplayOutPointModel replayOutPointModel)
......
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A25B7FBA0B84B088564252FE23AF3AAB986E09C2E387816A9C3A8CB1206B638C"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "50A104AF79A5D20E9C306E99391E80B56F06BC7FC2C026131FA83FAF45D13A4F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1434 "..\..\..\..\..\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 1619 "..\..\..\..\..\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 1634 "..\..\..\..\..\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}" "A25B7FBA0B84B088564252FE23AF3AAB986E09C2E387816A9C3A8CB1206B638C"
#pragma checksum "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "50A104AF79A5D20E9C306E99391E80B56F06BC7FC2C026131FA83FAF45D13A4F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -74,7 +74,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 1434 "..\..\..\..\..\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 1619 "..\..\..\..\..\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 1634 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
#line 1636 "..\..\..\..\..\NDIMainView\View\NDIMainView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal VIZ.FGOUT.Module.NDIView cam3;
......
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
25-429057470
4-1529606353
99-1491530721
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
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
C:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT\App.xaml
21265083526
2-1347366880
6-790135758
421356718200
6968741766
43-1958993781
CloseAlgorithmWindow.xaml;MainWindow.xaml;
True
False
......@@ -10,10 +10,10 @@ none
false
DEBUG;TRACE
9-721875057
91711917753
3-630027162
19-1136530284
3-1719726047
201914760168
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
DEBUG;TRACE
15-721109437
15488264905
121-1133520871
150238613261
1212046750213
150843184444
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;
True
False

C:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\obj\x64\Debug\GeneratedInternalTypeHelper.g.cs
FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxEx.xaml;;
FC:\Projects\FGOUT\VIZ.Framework\VIZ.Framework.Common\MessageBox\MessageBoxExWindow.xaml;;
......
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
1-731644535
11882902973
212002329545
25439653939
212023628146
26-1598261527
Themes\Generic.xaml;
True
False
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