Commit aef6317b by 马宁-艾果

设置参数设置交互实现

parent 953ddfa6
//------------------------------------------------------------------------------ 
// <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 ...@@ -10,11 +10,11 @@ none
false false
2-725104376 21870986562
3947974750 31364711570
17-1462717611 17-1683084370
Themes\Generic.xaml;Widgets\FootballFieldPanel\FootballFieldPanel.xaml; 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\Themes\Generic.xaml;;
FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\Widgets\FootballFieldPanel\FootballFieldPanel.xaml;; FC:\Projects\FGOUT\VIZ.FGOUT\VIZ.FGOUT.Common\Widgets\FootballFieldPanel\FootballFieldPanel.xaml;;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
xmlns:resource="clr-namespace:VIZ.FGOUT.Module.Resource;assembly=VIZ.FGOUT.Module.Resource" xmlns:resource="clr-namespace:VIZ.FGOUT.Module.Resource;assembly=VIZ.FGOUT.Module.Resource"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
d:DataContext="{d:DesignInstance Type=local:AlgorithmSettingPanelViewModel}" d:DataContext="{d:DesignInstance Type=local:AlgorithmSettingPanelViewModel}"
d:DesignHeight="450" d:DesignHeight="900"
d:DesignWidth="800" d:DesignWidth="800"
mc:Ignorable="d"> mc:Ignorable="d">
<UserControl.Resources> <UserControl.Resources>
...@@ -68,7 +68,9 @@ ...@@ -68,7 +68,9 @@
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="60" /> <RowDefinition Height="60" />
<RowDefinition Height="60" /> <RowDefinition Height="60" />
<RowDefinition Height="3" />
<RowDefinition Height="240" /> <RowDefinition Height="240" />
<RowDefinition Height="3" />
<RowDefinition Height="60" /> <RowDefinition Height="60" />
<RowDefinition Height="*" /> <RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
...@@ -110,6 +112,7 @@ ...@@ -110,6 +112,7 @@
FontSize="18" FontSize="18"
Foreground="White" Foreground="White"
Text="赛事" /> Text="赛事" />
<!--<ComboBox <!--<ComboBox
Grid.Row="5" Grid.Row="5"
Width="510" Width="510"
...@@ -131,8 +134,15 @@ ...@@ -131,8 +134,15 @@
</b:EventTrigger> </b:EventTrigger>
</b:Interaction.Triggers> </b:Interaction.Triggers>
</ComboBox> </ComboBox>
<!-- 白线 -->
<Rectangle
Grid.Row="2"
Height="1"
Margin="0,0,10,0"
VerticalAlignment="Bottom"
Fill="White" />
<!-- 算法参数 --> <!-- 算法参数 -->
<Grid Grid.Row="2"> <Grid Grid.Row="3">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="60" /> <RowDefinition Height="60" />
<RowDefinition Height="60" /> <RowDefinition Height="60" />
...@@ -228,14 +238,21 @@ ...@@ -228,14 +238,21 @@
Style="{StaticResource TextBoxStyle}" Style="{StaticResource TextBoxStyle}"
Text="{Binding AScale, Mode=TwoWay}" /> Text="{Binding AScale, Mode=TwoWay}" />
</Grid> </Grid>
<!-- 白线 -->
<Rectangle
Grid.Row="4"
Height="1"
Margin="0,0,10,0"
VerticalAlignment="Bottom"
Fill="White" />
<!-- UE预设 --> <!-- UE预设 -->
<TextBlock <TextBlock
Grid.Row="3" Grid.Row="5"
VerticalAlignment="Center" VerticalAlignment="Center"
FontSize="18" FontSize="18"
Foreground="White" Foreground="White"
Text="UE预设" /> Text="UE预设" />
<Grid Grid.Row="4" Margin="0,10"> <Grid Grid.Row="6" Margin="0,10">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition /> <RowDefinition />
<RowDefinition /> <RowDefinition />
...@@ -259,9 +276,9 @@ ...@@ -259,9 +276,9 @@
Foreground="White" Foreground="White"
Text="ZoomEase:" /> Text="ZoomEase:" />
<ComboBox <ComboBox
x:Name="_Eases1_"
Grid.Column="1" Grid.Column="1"
Width="180" Width="180"
ItemsSource="{StaticResource Eases}"
SelectedItem="{Binding ZoomEaseItem, Mode=TwoWay}" SelectedItem="{Binding ZoomEaseItem, Mode=TwoWay}"
Style="{StaticResource ComboBoxStyle}" /> Style="{StaticResource ComboBoxStyle}" />
<TextBlock <TextBlock
...@@ -270,6 +287,7 @@ ...@@ -270,6 +287,7 @@
Foreground="White" Foreground="White"
Text="MoveEase:" /> Text="MoveEase:" />
<ComboBox <ComboBox
x:Name="_Eases2_"
Grid.Column="3" Grid.Column="3"
Width="180" Width="180"
ItemsSource="{StaticResource Eases}" ItemsSource="{StaticResource Eases}"
...@@ -447,7 +465,12 @@ ...@@ -447,7 +465,12 @@
Style="{StaticResource TextBoxStyle}" Style="{StaticResource TextBoxStyle}"
Text="{Binding MovementOnlyYPosition, Mode=TwoWay}" /> Text="{Binding MovementOnlyYPosition, Mode=TwoWay}" />
</Grid> </Grid>
<Rectangle
Grid.Row="6"
Height="1"
Margin="0,0,10,0"
VerticalAlignment="Bottom"
Fill="White" />
<!--<TabControl <!--<TabControl
Grid.Row="2" Grid.Row="2"
Grid.RowSpan="2" Grid.RowSpan="2"
......
...@@ -16,6 +16,8 @@ namespace VIZ.FGOUT.Module ...@@ -16,6 +16,8 @@ namespace VIZ.FGOUT.Module
WPFHelper.BindingViewModel(this, new AlgorithmSettingPanelViewModel()); WPFHelper.BindingViewModel(this, new AlgorithmSettingPanelViewModel());
_Sports_.ItemsSource = new List<string>() { "", "跳远", "三级跳", "跳马", "标枪", "自由操", "单杠", "高低杠", "单人3m跳水", "单人10m跳水", "双人3m跳水", "双人10m跳水", "双人速度攀岩" }; _Sports_.ItemsSource = new List<string>() { "", "跳远", "三级跳", "跳马", "标枪", "自由操", "单杠", "高低杠", "单人3m跳水", "单人10m跳水", "双人3m跳水", "双人10m跳水", "双人速度攀岩" };
_Eases1_.ItemsSource = _Eases2_.ItemsSource = new List<string>() { "", "Linear", "Step", "SinusoidalIn", "SinusoidalOut", "SinusoidalInOut", "EaseIn", "EaseOut", "EaseInOut", "ExpoIn",
"ExpoOut", "ExpoInOut", "CircularIn", "CircularOut", "CircularInOut" };
} }
} }
} }
using Newtonsoft.Json; using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO.Packaging;
using System.Linq; using System.Linq;
using System.Windows; using System.Windows;
using System.Windows.Input;
using System.Windows.Shapes; using System.Windows.Shapes;
using VIZ.FGOUT.Connection; using VIZ.FGOUT.Connection;
using VIZ.FGOUT.Connection.UDP.Clip.Signal.Send; using VIZ.FGOUT.Connection.UDP.Clip.Signal.Send;
...@@ -203,6 +205,14 @@ namespace VIZ.FGOUT.Module ...@@ -203,6 +205,14 @@ namespace VIZ.FGOUT.Module
this.SelectedAlgorithmStrategy = this.SelectedAlgorithmGroup == null ? null : this.SelectedAlgorithmGroup.Items.FirstOrDefault(p => p.ID == strategyID); this.SelectedAlgorithmStrategy = this.SelectedAlgorithmGroup == null ? null : this.SelectedAlgorithmGroup.Items.FirstOrDefault(p => p.ID == strategyID);
this.oldAlgorithmStrategy = this.SelectedAlgorithmStrategy; this.oldAlgorithmStrategy = this.SelectedAlgorithmStrategy;
this.oldGpu = this.ViewConfig.GPU; this.oldGpu = this.ViewConfig.GPU;
var number = this.ViewConfig.GameName;
if (!string.IsNullOrEmpty(number))
{
PresetsItem = dics[number];
var config = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindOne(p => p.Number == number);
InitUEDetail(config.Data);
}
} }
/// <summary> /// <summary>
...@@ -273,6 +283,76 @@ namespace VIZ.FGOUT.Module ...@@ -273,6 +283,76 @@ namespace VIZ.FGOUT.Module
} }
/// <summary> /// <summary>
/// 序列化设置
/// </summary>
private readonly static JsonSerializerSettings JSON_SERIALIZER_SETTINGS = new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore
};
//网络终结点key
private string _endpointKey = "UE";
/// <summary>
/// 发送自定义的预设数据
/// </summary>
private void PresetSave()
{
//如果没有选择预设则不发送
//if (string.IsNullOrEmpty(PresetsItem)) return;
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(_endpointKey);
if (manager == null) return;
UEPackage uePackage = new UEPackage();
//uePackage.UE_Presets.StartSets.EventCode = GetDicKey(PresetsItem);
var zoomSets = new ZoomSets();
zoomSets.ZoomEase = ZoomEaseItem;
zoomSets.MoveEase = MoveEaseItem;
zoomSets.Scale = Scale;
zoomSets.ZoomIn = ZoomIn;
zoomSets.ZoomOut = ZoomOut;
zoomSets.Move = Move;
zoomSets.SafeScale = SafeScale;
zoomSets.bMovementOnlyX = BMovementOnlyX;
zoomSets.MovementOnlyXPosition = MovementOnlyXPosition;
zoomSets.bMovementOnlyY = BMovementOnlyY;
zoomSets.MovementOnlyYPosition = MovementOnlyYPosition;
uePackage.UE_Presets.StartSets.ZoomSets = zoomSets;
var enableStates = new EnableStats();
enableStates.bEnableSpline = BEnableSpline;
enableStates.bShowHeight = ShowHeight;
enableStates.bShowSpeed = ShowSpeed;
enableStates.bEnableZoom = UseZoom;
uePackage.UE_Presets.StartSets.EnableStats = enableStates;
var splineSets = new SplineSets();
splineSets.bLineBehind = Line;
uePackage.UE_Presets.StartSets.SplineSets = splineSets;
var positions = new List<Position>
{
new Position() { name = "height", x = 230, y = 485 },
new Position() { name = "speed", x = 1035, y = 1890 }
};
uePackage.UE_Presets.StartSets.Datas.Positions = positions;
//发送自定义预设参数
string msg = uePackage == null ? string.Empty : JsonConvert.SerializeObject(uePackage, JSON_SERIALIZER_SETTINGS);
manager.SendJson(uePackage);
#region 项目预设数据更新到LiteDB
JavelinThrowConfig javelinThrowConfig = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindAll().FirstOrDefault();
if (javelinThrowConfig == null) return;
javelinThrowConfig.Number = GetDicKey(PresetsItem);
javelinThrowConfig.Data = msg;
ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(javelinThrowConfig);
#endregion
//MessageBoxEx.ShowDialog("Save Succeed");
}
/// <summary>
/// 应用设置 /// 应用设置
/// </summary> /// </summary>
/// <returns>是否成功</returns> /// <returns>是否成功</returns>
...@@ -290,6 +370,17 @@ namespace VIZ.FGOUT.Module ...@@ -290,6 +370,17 @@ namespace VIZ.FGOUT.Module
service.StrategyType = this.ViewConfig.StrategyType; service.StrategyType = this.ViewConfig.StrategyType;
} }
if (PresetsItem != null)
{
//发送UE预设数据
PresetSave();
//发送算法参数
SendAlgorithmParameters();
this.ViewConfig.GameName = GetDicKey(PresetsItem);
ApplicationDomainEx.LiteDbContext.ViewConfig.Upsert(this.ViewConfig);
}
return true; return true;
} }
...@@ -407,7 +498,7 @@ namespace VIZ.FGOUT.Module ...@@ -407,7 +498,7 @@ namespace VIZ.FGOUT.Module
private void SendAlgorithmParameters() private void SendAlgorithmParameters()
{ {
//如果没有选择预设则不发送 //如果没有选择预设则不发送
if (string.IsNullOrEmpty(PresetsItem)) return; //if (string.IsNullOrEmpty(PresetsItem)) return;
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1); UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null) if (manager == null)
...@@ -458,33 +549,63 @@ namespace VIZ.FGOUT.Module ...@@ -458,33 +549,63 @@ namespace VIZ.FGOUT.Module
//ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(javelinThrowConfig); //ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(javelinThrowConfig);
#endregion #endregion
if (!String.IsNullOrEmpty(PresetsItem)) if (String.IsNullOrEmpty(PresetsItem))
{ {
//反序列化 UEDetailEmpty();
var uePackage = (UEPackage)JsonConvert.DeserializeObject(GetConfig(PresetsItem).Data, typeof(UEPackage)); }
var zoomSets = uePackage.UE_Presets.StartSets.ZoomSets; else
ZoomEaseItem = zoomSets.ZoomEase; {
MoveEaseItem = zoomSets.MoveEase; var config = GetConfig(PresetsItem);
Scale = zoomSets.Scale; InitUEDetail(config.Data);
ZoomIn = zoomSets.ZoomIn;
ZoomOut = zoomSets.ZoomOut;
Move = zoomSets.Move;
SafeScale = zoomSets.SafeScale;
BMovementOnlyX = zoomSets.bMovementOnlyX;
MovementOnlyXPosition = zoomSets.MovementOnlyXPosition;
BMovementOnlyY = zoomSets.bMovementOnlyY;
MovementOnlyYPosition = zoomSets.MovementOnlyYPosition;
var enableStats = uePackage.UE_Presets.StartSets.EnableStats;
ShowHeight = enableStats.bShowHeight;
ShowSpeed = enableStats.bShowSpeed;
UseZoom = enableStats.bEnableZoom;
var splineSets = uePackage.UE_Presets.StartSets.SplineSets;
Line = splineSets.bLineBehind;
} }
} }
private void UEDetailEmpty()
{
ZoomEaseItem = "";
MoveEaseItem = "";
Scale = 0;
ZoomIn = 0;
ZoomOut = 0;
Move = 0;
SafeScale = 0;
BMovementOnlyX = false;
MovementOnlyXPosition = 0;
BMovementOnlyY = false;
MovementOnlyYPosition = 0;
ShowHeight = false;
ShowSpeed = false;
UseZoom = false;
Line = false;
}
private void InitUEDetail(string data)
{
var uePackage = (UEPackage)JsonConvert.DeserializeObject(data, typeof(UEPackage));
var zoomSets = uePackage.UE_Presets.StartSets.ZoomSets;
ZoomEaseItem = zoomSets.ZoomEase;
MoveEaseItem = zoomSets.MoveEase;
Scale = zoomSets.Scale;
ZoomIn = zoomSets.ZoomIn;
ZoomOut = zoomSets.ZoomOut;
Move = zoomSets.Move;
SafeScale = zoomSets.SafeScale;
BMovementOnlyX = zoomSets.bMovementOnlyX;
MovementOnlyXPosition = zoomSets.MovementOnlyXPosition;
BMovementOnlyY = zoomSets.bMovementOnlyY;
MovementOnlyYPosition = zoomSets.MovementOnlyYPosition;
var enableStats = uePackage.UE_Presets.StartSets.EnableStats;
ShowHeight = enableStats.bShowHeight;
ShowSpeed = enableStats.bShowSpeed;
UseZoom = enableStats.bEnableZoom;
var splineSets = uePackage.UE_Presets.StartSets.SplineSets;
Line = splineSets.bLineBehind;
}
#region 预设属性 #region 预设属性
private string _zoomEaseItem = string.Empty; private string _zoomEaseItem = string.Empty;
......
...@@ -411,16 +411,17 @@ namespace VIZ.FGOUT.Module ...@@ -411,16 +411,17 @@ namespace VIZ.FGOUT.Module
this.ViewConfig.StreamName = streamName; this.ViewConfig.StreamName = streamName;
// this.ViewConfig.DelayFrame = delay; // this.ViewConfig.DelayFrame = delay;
// this.ViewConfig.IsSendToCrop = this.IsSendToCrop; // this.ViewConfig.IsSendToCrop = this.IsSendToCrop;
var gameCode = "";
if (PresetsItem != null) //var gameCode = "";
{ //if (PresetsItem != null)
gameCode = GetDicKey(PresetsItem); //{
//发送UE预设数据 // gameCode = GetDicKey(PresetsItem);
PresetSave(); // //发送UE预设数据
//发送算法参数 // PresetSave();
SendAlgorithmParameters(); // //发送算法参数
} // SendAlgorithmParameters();
this.ViewConfig.GameName = gameCode; // }
//this.ViewConfig.GameName = gameCode;
ApplicationDomainEx.LiteDbContext.ViewConfig.Upsert(this.ViewConfig); ApplicationDomainEx.LiteDbContext.ViewConfig.Upsert(this.ViewConfig);
return true; return true;
......
...@@ -204,32 +204,22 @@ namespace VIZ.FGOUT.Module ...@@ -204,32 +204,22 @@ namespace VIZ.FGOUT.Module
public AlgorithmPackage_Figout_model bulidPackage(string cmd, Point box) public AlgorithmPackage_Figout_model bulidPackage(string cmd, Point box)
{ {
AlgorithmPackage_Figout_model package = new AlgorithmPackage_Figout_model(); AlgorithmPackage_Figout_model package = new AlgorithmPackage_Figout_model();
package.mode = cmd; package.mode = cmd;
package.signal = AlgorithmPackageSignal.track; package.signal = AlgorithmPackageSignal.track;
// package.track_xy = box == null ? null : new List<int> { (int)box.SrcRect.Left, (int)box.SrcRect.Top, (int)box.SrcRect.Right, (int)box.SrcRect.Bottom }; // package.track_xy = box == null ? null : new List<int> { (int)box.SrcRect.Left, (int)box.SrcRect.Top, (int)box.SrcRect.Right, (int)box.SrcRect.Bottom };
package.track_xy = box == null ? null : new List<int> { (int)box.X, (int)box.Y }; package.track_xy = box == null ? null : new List<int> { (int)box.X, (int)box.Y };
return package; return package;
} }
public override void Tracking(Point center) public override void Tracking(Point center)
{ {
this.manualConfig = ApplicationDomainEx.LiteDbContext.SetManualConfig.FindAll().FirstOrDefault(); this.manualConfig = ApplicationDomainEx.LiteDbContext.SetManualConfig.FindAll().FirstOrDefault();
if (this.manualConfig.IsManual) return; if (this.manualConfig.IsManual) return;
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1); UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmSenderOption option = new AlgorithmSenderOption(); AlgorithmSenderOption option = new AlgorithmSenderOption();
option.id = this.Support.ID; option.id = this.Support.ID;
AlgorithmSender.AutoMode(manager, this.bulidPackage(AlgorithmPackageSignal.manual_mode, center), option); AlgorithmSender.AutoMode(manager, this.bulidPackage(AlgorithmPackageSignal.manual_mode, center), option);
} }
} }
......
...@@ -176,7 +176,6 @@ namespace VIZ.FGOUT.Module ...@@ -176,7 +176,6 @@ namespace VIZ.FGOUT.Module
{ {
if (e.HitTrackingBoxInfo == null) if (e.HitTrackingBoxInfo == null)
return; return;
this.AlgorithmControllerDic[this.StrategyType].Tracking(e.VideoPointCenter); this.AlgorithmControllerDic[this.StrategyType].Tracking(e.VideoPointCenter);
} }
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F1CA0F98F6FAEEC69D8AD359D34A260D38C966EC07E0613C2ED703E3C15379AA" #pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "01DD8B687722CEA3505A0F5237DB88FC7344409E9D6935DC6D7FAFB0437FEE0B"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
...@@ -48,7 +48,7 @@ namespace VIZ.FGOUT.Module { ...@@ -48,7 +48,7 @@ namespace VIZ.FGOUT.Module {
public partial class AlgorithmSettingPanelView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { public partial class AlgorithmSettingPanelView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
#line 121 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" #line 124 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox _Sports_; internal System.Windows.Controls.ComboBox _Sports_;
...@@ -56,7 +56,23 @@ namespace VIZ.FGOUT.Module { ...@@ -56,7 +56,23 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 295 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" #line 279 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox _Eases1_;
#line default
#line hidden
#line 290 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox _Eases2_;
#line default
#line hidden
#line 313 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton EnableSpline; internal System.Windows.Controls.Primitives.ToggleButton EnableSpline;
...@@ -64,7 +80,7 @@ namespace VIZ.FGOUT.Module { ...@@ -64,7 +80,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 415 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" #line 433 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyX; internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyX;
...@@ -72,7 +88,7 @@ namespace VIZ.FGOUT.Module { ...@@ -72,7 +88,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 438 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" #line 456 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyY; internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyY;
...@@ -113,12 +129,18 @@ namespace VIZ.FGOUT.Module { ...@@ -113,12 +129,18 @@ namespace VIZ.FGOUT.Module {
this._Sports_ = ((System.Windows.Controls.ComboBox)(target)); this._Sports_ = ((System.Windows.Controls.ComboBox)(target));
return; return;
case 2: case 2:
this.EnableSpline = ((System.Windows.Controls.Primitives.ToggleButton)(target)); this._Eases1_ = ((System.Windows.Controls.ComboBox)(target));
return; return;
case 3: case 3:
this.MovementOnlyX = ((System.Windows.Controls.Primitives.ToggleButton)(target)); this._Eases2_ = ((System.Windows.Controls.ComboBox)(target));
return; return;
case 4: case 4:
this.EnableSpline = ((System.Windows.Controls.Primitives.ToggleButton)(target));
return;
case 5:
this.MovementOnlyX = ((System.Windows.Controls.Primitives.ToggleButton)(target));
return;
case 6:
this.MovementOnlyY = ((System.Windows.Controls.Primitives.ToggleButton)(target)); this.MovementOnlyY = ((System.Windows.Controls.Primitives.ToggleButton)(target));
return; return;
} }
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F1CA0F98F6FAEEC69D8AD359D34A260D38C966EC07E0613C2ED703E3C15379AA" #pragma checksum "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "01DD8B687722CEA3505A0F5237DB88FC7344409E9D6935DC6D7FAFB0437FEE0B"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// 此代码由工具生成。 // 此代码由工具生成。
...@@ -48,7 +48,7 @@ namespace VIZ.FGOUT.Module { ...@@ -48,7 +48,7 @@ namespace VIZ.FGOUT.Module {
public partial class AlgorithmSettingPanelView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector { public partial class AlgorithmSettingPanelView : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
#line 121 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" #line 124 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox _Sports_; internal System.Windows.Controls.ComboBox _Sports_;
...@@ -56,7 +56,23 @@ namespace VIZ.FGOUT.Module { ...@@ -56,7 +56,23 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 295 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" #line 279 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox _Eases1_;
#line default
#line hidden
#line 290 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.ComboBox _Eases2_;
#line default
#line hidden
#line 313 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton EnableSpline; internal System.Windows.Controls.Primitives.ToggleButton EnableSpline;
...@@ -64,7 +80,7 @@ namespace VIZ.FGOUT.Module { ...@@ -64,7 +80,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 415 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" #line 433 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyX; internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyX;
...@@ -72,7 +88,7 @@ namespace VIZ.FGOUT.Module { ...@@ -72,7 +88,7 @@ namespace VIZ.FGOUT.Module {
#line hidden #line hidden
#line 438 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml" #line 456 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyY; internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyY;
...@@ -113,12 +129,18 @@ namespace VIZ.FGOUT.Module { ...@@ -113,12 +129,18 @@ namespace VIZ.FGOUT.Module {
this._Sports_ = ((System.Windows.Controls.ComboBox)(target)); this._Sports_ = ((System.Windows.Controls.ComboBox)(target));
return; return;
case 2: case 2:
this.EnableSpline = ((System.Windows.Controls.Primitives.ToggleButton)(target)); this._Eases1_ = ((System.Windows.Controls.ComboBox)(target));
return; return;
case 3: case 3:
this.MovementOnlyX = ((System.Windows.Controls.Primitives.ToggleButton)(target)); this._Eases2_ = ((System.Windows.Controls.ComboBox)(target));
return; return;
case 4: case 4:
this.EnableSpline = ((System.Windows.Controls.Primitives.ToggleButton)(target));
return;
case 5:
this.MovementOnlyX = ((System.Windows.Controls.Primitives.ToggleButton)(target));
return;
case 6:
this.MovementOnlyY = ((System.Windows.Controls.Primitives.ToggleButton)(target)); this.MovementOnlyY = ((System.Windows.Controls.Primitives.ToggleButton)(target));
return; return;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
using System; using SharpDX.Mathematics.Interop;
using System.Collections.Generic; using System;
using System.Windows; using System.Windows;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SharpDX.Mathematics.Interop;
namespace VIZ.Framework.Core namespace VIZ.Framework.Core
{ {
...@@ -113,6 +109,9 @@ namespace VIZ.Framework.Core ...@@ -113,6 +109,9 @@ namespace VIZ.Framework.Core
/// <returns>图片坐标点</returns> /// <returns>图片坐标点</returns>
public static Point ConvertUiPointToImagePoint(int imgWidth, int imgHeight, Rect uiDrawRect, Point uiPoint) public static Point ConvertUiPointToImagePoint(int imgWidth, int imgHeight, Rect uiDrawRect, Point uiPoint)
{ {
imgWidth = 3840;
imgHeight = 2160;
double xp = uiDrawRect.Width / imgWidth; double xp = uiDrawRect.Width / imgWidth;
double yp = uiDrawRect.Height / imgHeight; double yp = uiDrawRect.Height / imgHeight;
......
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