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
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;;
......
......@@ -11,7 +11,7 @@
xmlns:resource="clr-namespace:VIZ.FGOUT.Module.Resource;assembly=VIZ.FGOUT.Module.Resource"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
d:DataContext="{d:DesignInstance Type=local:AlgorithmSettingPanelViewModel}"
d:DesignHeight="450"
d:DesignHeight="900"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Resources>
......@@ -68,7 +68,9 @@
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="60" />
<RowDefinition Height="3" />
<RowDefinition Height="240" />
<RowDefinition Height="3" />
<RowDefinition Height="60" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
......@@ -110,6 +112,7 @@
FontSize="18"
Foreground="White"
Text="赛事" />
<!--<ComboBox
Grid.Row="5"
Width="510"
......@@ -131,8 +134,15 @@
</b:EventTrigger>
</b:Interaction.Triggers>
</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>
<RowDefinition Height="60" />
<RowDefinition Height="60" />
......@@ -228,14 +238,21 @@
Style="{StaticResource TextBoxStyle}"
Text="{Binding AScale, Mode=TwoWay}" />
</Grid>
<!-- 白线 -->
<Rectangle
Grid.Row="4"
Height="1"
Margin="0,0,10,0"
VerticalAlignment="Bottom"
Fill="White" />
<!-- UE预设 -->
<TextBlock
Grid.Row="3"
Grid.Row="5"
VerticalAlignment="Center"
FontSize="18"
Foreground="White"
Text="UE预设" />
<Grid Grid.Row="4" Margin="0,10">
<Grid Grid.Row="6" Margin="0,10">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
......@@ -259,9 +276,9 @@
Foreground="White"
Text="ZoomEase:" />
<ComboBox
x:Name="_Eases1_"
Grid.Column="1"
Width="180"
ItemsSource="{StaticResource Eases}"
SelectedItem="{Binding ZoomEaseItem, Mode=TwoWay}"
Style="{StaticResource ComboBoxStyle}" />
<TextBlock
......@@ -270,6 +287,7 @@
Foreground="White"
Text="MoveEase:" />
<ComboBox
x:Name="_Eases2_"
Grid.Column="3"
Width="180"
ItemsSource="{StaticResource Eases}"
......@@ -447,7 +465,12 @@
Style="{StaticResource TextBoxStyle}"
Text="{Binding MovementOnlyYPosition, Mode=TwoWay}" />
</Grid>
<Rectangle
Grid.Row="6"
Height="1"
Margin="0,0,10,0"
VerticalAlignment="Bottom"
Fill="White" />
<!--<TabControl
Grid.Row="2"
Grid.RowSpan="2"
......
......@@ -16,6 +16,8 @@ namespace VIZ.FGOUT.Module
WPFHelper.BindingViewModel(this, new AlgorithmSettingPanelViewModel());
_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 System;
using System.Collections.Generic;
using System.IO.Packaging;
using System.Linq;
using System.Windows;
using System.Windows.Input;
using System.Windows.Shapes;
using VIZ.FGOUT.Connection;
using VIZ.FGOUT.Connection.UDP.Clip.Signal.Send;
......@@ -203,6 +205,14 @@ namespace VIZ.FGOUT.Module
this.SelectedAlgorithmStrategy = this.SelectedAlgorithmGroup == null ? null : this.SelectedAlgorithmGroup.Items.FirstOrDefault(p => p.ID == strategyID);
this.oldAlgorithmStrategy = this.SelectedAlgorithmStrategy;
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>
......@@ -273,6 +283,76 @@ namespace VIZ.FGOUT.Module
}
/// <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>
/// <returns>是否成功</returns>
......@@ -290,6 +370,17 @@ namespace VIZ.FGOUT.Module
service.StrategyType = this.ViewConfig.StrategyType;
}
if (PresetsItem != null)
{
//发送UE预设数据
PresetSave();
//发送算法参数
SendAlgorithmParameters();
this.ViewConfig.GameName = GetDicKey(PresetsItem);
ApplicationDomainEx.LiteDbContext.ViewConfig.Upsert(this.ViewConfig);
}
return true;
}
......@@ -407,7 +498,7 @@ namespace VIZ.FGOUT.Module
private void SendAlgorithmParameters()
{
//如果没有选择预设则不发送
if (string.IsNullOrEmpty(PresetsItem)) return;
//if (string.IsNullOrEmpty(PresetsItem)) return;
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
if (manager == null)
......@@ -458,10 +549,41 @@ namespace VIZ.FGOUT.Module
//ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(javelinThrowConfig);
#endregion
if (!String.IsNullOrEmpty(PresetsItem))
if (String.IsNullOrEmpty(PresetsItem))
{
UEDetailEmpty();
}
else
{
var config = GetConfig(PresetsItem);
InitUEDetail(config.Data);
}
}
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(GetConfig(PresetsItem).Data, typeof(UEPackage));
var uePackage = (UEPackage)JsonConvert.DeserializeObject(data, typeof(UEPackage));
var zoomSets = uePackage.UE_Presets.StartSets.ZoomSets;
ZoomEaseItem = zoomSets.ZoomEase;
MoveEaseItem = zoomSets.MoveEase;
......@@ -483,7 +605,6 @@ namespace VIZ.FGOUT.Module
var splineSets = uePackage.UE_Presets.StartSets.SplineSets;
Line = splineSets.bLineBehind;
}
}
#region 预设属性
......
......@@ -411,16 +411,17 @@ namespace VIZ.FGOUT.Module
this.ViewConfig.StreamName = streamName;
// this.ViewConfig.DelayFrame = delay;
// this.ViewConfig.IsSendToCrop = this.IsSendToCrop;
var gameCode = "";
if (PresetsItem != null)
{
gameCode = GetDicKey(PresetsItem);
//发送UE预设数据
PresetSave();
//发送算法参数
SendAlgorithmParameters();
}
this.ViewConfig.GameName = gameCode;
//var gameCode = "";
//if (PresetsItem != null)
//{
// gameCode = GetDicKey(PresetsItem);
// //发送UE预设数据
// PresetSave();
// //发送算法参数
// SendAlgorithmParameters();
// }
//this.ViewConfig.GameName = gameCode;
ApplicationDomainEx.LiteDbContext.ViewConfig.Upsert(this.ViewConfig);
return true;
......
......@@ -204,32 +204,22 @@ namespace VIZ.FGOUT.Module
public AlgorithmPackage_Figout_model bulidPackage(string cmd, Point box)
{
AlgorithmPackage_Figout_model package = new AlgorithmPackage_Figout_model();
package.mode = cmd;
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.X, (int)box.Y };
return package;
}
public override void Tracking(Point center)
{
this.manualConfig = ApplicationDomainEx.LiteDbContext.SetManualConfig.FindAll().FirstOrDefault();
if (this.manualConfig.IsManual) return;
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(NDIViewKeys.CAM_1);
AlgorithmSenderOption option = new AlgorithmSenderOption();
option.id = this.Support.ID;
AlgorithmSender.AutoMode(manager, this.bulidPackage(AlgorithmPackageSignal.manual_mode, center), option);
}
}
......
......@@ -176,7 +176,6 @@ namespace VIZ.FGOUT.Module
{
if (e.HitTrackingBoxInfo == null)
return;
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>
// 此代码由工具生成。
......@@ -48,7 +48,7 @@ namespace VIZ.FGOUT.Module {
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")]
internal System.Windows.Controls.ComboBox _Sports_;
......@@ -56,7 +56,23 @@ namespace VIZ.FGOUT.Module {
#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")]
internal System.Windows.Controls.Primitives.ToggleButton EnableSpline;
......@@ -64,7 +80,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 415 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
#line 433 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyX;
......@@ -72,7 +88,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 438 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
#line 456 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyY;
......@@ -113,12 +129,18 @@ namespace VIZ.FGOUT.Module {
this._Sports_ = ((System.Windows.Controls.ComboBox)(target));
return;
case 2:
this.EnableSpline = ((System.Windows.Controls.Primitives.ToggleButton)(target));
this._Eases1_ = ((System.Windows.Controls.ComboBox)(target));
return;
case 3:
this.MovementOnlyX = ((System.Windows.Controls.Primitives.ToggleButton)(target));
this._Eases2_ = ((System.Windows.Controls.ComboBox)(target));
return;
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));
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>
// 此代码由工具生成。
......@@ -48,7 +48,7 @@ namespace VIZ.FGOUT.Module {
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")]
internal System.Windows.Controls.ComboBox _Sports_;
......@@ -56,7 +56,23 @@ namespace VIZ.FGOUT.Module {
#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")]
internal System.Windows.Controls.Primitives.ToggleButton EnableSpline;
......@@ -64,7 +80,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 415 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
#line 433 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyX;
......@@ -72,7 +88,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 438 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
#line 456 "..\..\..\..\..\NDISettingView\View\AlgorithmSettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyY;
......@@ -113,12 +129,18 @@ namespace VIZ.FGOUT.Module {
this._Sports_ = ((System.Windows.Controls.ComboBox)(target));
return;
case 2:
this.EnableSpline = ((System.Windows.Controls.Primitives.ToggleButton)(target));
this._Eases1_ = ((System.Windows.Controls.ComboBox)(target));
return;
case 3:
this.MovementOnlyX = ((System.Windows.Controls.Primitives.ToggleButton)(target));
this._Eases2_ = ((System.Windows.Controls.ComboBox)(target));
return;
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));
return;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
using System;
using System.Collections.Generic;
using SharpDX.Mathematics.Interop;
using System;
using System.Windows;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SharpDX.Mathematics.Interop;
namespace VIZ.Framework.Core
{
......@@ -113,6 +109,9 @@ namespace VIZ.Framework.Core
/// <returns>图片坐标点</returns>
public static Point ConvertUiPointToImagePoint(int imgWidth, int imgHeight, Rect uiDrawRect, Point uiPoint)
{
imgWidth = 3840;
imgHeight = 2160;
double xp = uiDrawRect.Width / imgWidth;
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