Commit 712af7c5 by 马宁-艾果

UE预设数据库表扩充到12个项目

parent 8c02da6c
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
......@@ -29,6 +29,7 @@ x86/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
......
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
\ No newline at end of file
......@@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
181380438361
1-1441241311
11-1602666439
23-2035776870
18560433975
1470602451
11-350624472
24-1321085892
Style\Button\Button_NdiView.xaml;Style\Button\Button_Setting.xaml;Style\Button\Button_WindowTop.xaml;Style\CheckBox\CheckBox_NdiView.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_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
......@@ -150,20 +150,8 @@
Width="550"
Height="40"
Margin="0,10,0,10"
SelectedValue="{Binding PresetsItem}"
SelectedValue="{Binding PresetsItem, Mode=TwoWay}"
Style="{StaticResource ComboBoxStyle}">
<!--<ComboBoxItem>跳远</ComboBoxItem>
<ComboBoxItem>三级跳</ComboBoxItem>
<ComboBoxItem>跳马</ComboBoxItem>
<ComboBoxItem>标枪</ComboBoxItem>
<ComboBoxItem>自由操</ComboBoxItem>
<ComboBoxItem>单杠</ComboBoxItem>
<ComboBoxItem>高低杠</ComboBoxItem>
<ComboBoxItem>单人3m跳水</ComboBoxItem>
<ComboBoxItem>单人10m跳水</ComboBoxItem>
<ComboBoxItem>双人3m跳水</ComboBoxItem>
<ComboBoxItem>双人10m跳水</ComboBoxItem>
<ComboBoxItem>双人速度攀岩</ComboBoxItem>-->
<b:Interaction.Triggers>
<b:EventTrigger EventName="SelectionChanged">
<b:InvokeCommandAction Command="{Binding PresetsSelectionChangedCommand}" />
......@@ -174,7 +162,10 @@
Grid.Row="4"
Grid.RowSpan="2"
Background="Transparent">
<TabItem FontSize="18" Header="UE预设">
<TabItem
Background="{StaticResource ButtonMouseoverBackground}"
FontSize="18"
Header="UE预设">
<Grid Width="700" Margin="0,10">
<Grid.RowDefinitions>
<RowDefinition />
......@@ -396,8 +387,14 @@
Style="{StaticResource ButtonStyle}" />-->
</Grid>
</TabItem>
<TabItem FontSize="18" Header="算法参数">
<Grid Width="600" Margin="0,10">
<TabItem
Background="{StaticResource ButtonMouseoverBackground}"
FontSize="18"
Header="算法参数">
<Grid
Width="600"
Margin="0,10"
HorizontalAlignment="Left">
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
......@@ -409,57 +406,63 @@
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<TextBlock
Width="150"
Style="{StaticResource TextBlockStyle}"
Width="180"
VerticalAlignment="Center"
Foreground="White"
Text="maintain_matting_n" />
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding Maintain_matting_n, Mode=TwoWay}" />
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBlock
Width="150"
Style="{StaticResource TextBlockStyle}"
Width="180"
VerticalAlignment="Center"
Foreground="White"
Text="matting_interval" />
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding Matting_interval, Mode=TwoWay}" />
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal">
<TextBlock
Width="150"
Style="{StaticResource TextBlockStyle}"
Width="180"
VerticalAlignment="Center"
Foreground="White"
Text="extend_frame" />
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding Extend_frame, Mode=TwoWay}" />
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal">
<TextBlock
Width="150"
Style="{StaticResource TextBlockStyle}"
Width="180"
VerticalAlignment="Center"
Foreground="White"
Text="pad_det_x" />
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding Pad_det_x, Mode=TwoWay}" />
</StackPanel>
<StackPanel Grid.Row="4" Orientation="Horizontal">
<TextBlock
Width="150"
Style="{StaticResource TextBlockStyle}"
Width="180"
VerticalAlignment="Center"
Foreground="White"
Text="pad_det_y" />
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding Pad_det_y, Mode=TwoWay}" />
</StackPanel>
<StackPanel Grid.Row="5" Orientation="Horizontal">
<TextBlock
Width="150"
Style="{StaticResource TextBlockStyle}"
Width="180"
VerticalAlignment="Center"
Foreground="White"
Text="pad_det_square" />
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding Pad_det_square, Mode=TwoWay}" />
</StackPanel>
<StackPanel Grid.Row="6" Orientation="Horizontal">
<TextBlock
Width="150"
Style="{StaticResource TextBlockStyle}"
Width="180"
VerticalAlignment="Center"
Foreground="White"
Text="scale" />
<TextBox Style="{StaticResource TextBoxStyle}" Text="{Binding AScale, Mode=TwoWay}" />
</StackPanel>
</Grid>
</TabItem>
</TabControl>
</Grid>
</Border>
</UserControl>
......@@ -15,7 +15,7 @@ namespace VIZ.FGOUT.Module
WPFHelper.BindingViewModel(this, new NDISettingPanelViewModel());
_Sports_.ItemsSource = new List<string>() { "跳远", "三级跳", "跳马", "标枪", "自由操", "单杠", "高低杠", "单人3m跳水", "单人10m跳水", "双人3m跳水", "双人10m跳水", "双人速度攀岩" };
_Sports_.ItemsSource = new List<string>() { "", "跳远", "三级跳", "跳马", "标枪", "自由操", "单杠", "高低杠", "单人3m跳水", "单人10m跳水", "双人3m跳水", "双人10m跳水", "双人速度攀岩" };
}
}
}
......@@ -12,14 +12,14 @@
Height="800"
d:DataContext="{d:DesignInstance Type=local:NDISettingViewModel}"
mc:Ignorable="d">
<UserControl.Resources>
<!--<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/VIZ.FGOUT.Module.Resource;component/Style/RadioButton/RadioButton_Setting.xaml" />
<ResourceDictionary Source="/VIZ.FGOUT.Module.Resource;component/Style/Button/Button_Setting.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
</UserControl.Resources>-->
<behaviors:Interaction.Triggers>
<behaviors:EventTrigger EventName="Loaded">
<behaviors:InvokeCommandAction Command="{Binding LoadedCommand}" />
......
using Newtonsoft.Json;
using OpenCvSharp;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
......@@ -255,6 +255,7 @@ namespace VIZ.FGOUT.Module
List<NDIStreamInfoModel> list = new List<NDIStreamInfoModel>();
NDIStreamInfoModel none = new NDIStreamInfoModel();
//第一行为空行
list.Add(none);
NDIStreamInfoModel selected = none;
......@@ -275,7 +276,6 @@ namespace VIZ.FGOUT.Module
{
selected = model;
}
list.Add(model);
}
}
......@@ -496,7 +496,11 @@ namespace VIZ.FGOUT.Module
#region UE相关
//Dictionary<string, string> dics = new Dictionary<string, string> { { "JT", "Javelin Throw" }, { "TJ", "Triple Jump" }, { "LJ", "Long Jump" } };
Dictionary<string, string> dics = new Dictionary<string, string> { { "JT", "标枪" }, { "TJ", "三级跳" }, { "LJ", "跳远" } };
Dictionary<string, string> dics = new Dictionary<string, string>
{
{ "LJ", "跳远" }, { "TJ", "三级跳" }, { "VT", "跳马" }, { "JT", "标枪" }, { "FX", "自由操" }, { "PB", "单杠" }, { "UB", "高低杠" }
, { "DS", "单人3m跳水" } , { "DT", "单人10m跳水" } , { "SS", "双人3m跳水" } , { "ST", "双人10m跳水" } , { "SP", "双人速度攀岩" }
};
private JavelinThrowConfig GetConfig(string number)
{
var key = GetDicKey(number);
......@@ -519,12 +523,23 @@ namespace VIZ.FGOUT.Module
this.RaisePropertyChanged(nameof(PresetsItem));
}
}
//Dictionary<string, string> dics = new Dictionary<string, string>
//{
// { "LJ", "跳远" }, { "TJ", "三级跳" }, { "VT", "跳马" }, { "JT", "标枪" }, { "FX", "自由操" }, { "PB", "单杠" }, { "UB", "高低杠" }
// , { "DS", "单人3m跳水" } , { "DT", "单人10m跳水" } , { "SS", "双人3m跳水" } , { "ST", "双人10m跳水" } , { "SP", "双人速度攀岩" }
//};
public VCommand PresetsSelectionChangedCommand { get; set; }
private void PresetsSelectionChanged()
{
if (PresetsItem != null)
#region LiteDB插入新的体育项目
//JavelinThrowConfig javelinThrowConfig = new JavelinThrowConfig();
//javelinThrowConfig.Number = "SP";
//javelinThrowConfig.Data = "{\"UE_Presets\":{\"StartSets\":{\"EventCode\":\"SP\",\"DualMode\":0,\"EnableStats\":{\"bEnableSpline\":false,\"bShowHeight\":true,\"bShowSpeed\":true,\"bEnableZoom\":true},\"SplineSets\":{\"bLineBehind\":false},\"ZoomSets\":{\"ZoomEase\":\"SinusoidalInOut\",\"MoveEase\":\"SinusoidalInOut\",\"Scale\":50.0,\"SafeScale\":0.9,\"ZoomIn\":3.0,\"ZoomOut\":3.0,\"Move\":3.0,\"delay_zoomin_move\":1.0,\"delay_move_zoomout\":1.0,\"bMovementOnlyX\":false,\"MovementOnlyXPosition\":0,\"bMovementOnlyY\":false,\"MovementOnlyYPosition\":0},\"Datas\":{\"bIsManualMode\":false,\"Positions\":[{\"name\":\"height\",\"x\":230,\"y\":485},{\"name\":\"speed\",\"x\":1035,\"y\":1890}]}}}}";
//ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(javelinThrowConfig);
#endregion
if (!String.IsNullOrEmpty(PresetsItem))
{
//反序列化
var uePackage = (UEPackage)JsonConvert.DeserializeObject(GetConfig(PresetsItem).Data, typeof(UEPackage));
......@@ -760,13 +775,13 @@ namespace VIZ.FGOUT.Module
private void PresetSave()
{
//如果没有选择预设则不发送
if (PresetsItem == null) return;
if (string.IsNullOrEmpty(PresetsItem)) return;
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager(_endpointKey);
if (manager == null) return;
UEPackage uePackage = new UEPackage();
//uePackage.UE_Presets.StartSets.EventCode = key;
//uePackage.UE_Presets.StartSets.EventCode = GetDicKey(PresetsItem);
var zoomSets = new ZoomSets();
zoomSets.ZoomEase = ZoomEaseItem;
zoomSets.MoveEase = MoveEaseItem;
......@@ -803,19 +818,13 @@ namespace VIZ.FGOUT.Module
string msg = uePackage == null ? string.Empty : JsonConvert.SerializeObject(uePackage, JSON_SERIALIZER_SETTINGS);
manager.SendJson(uePackage);
#region 项目预设数据保存到LiteDB
//JavelinThrowConfig javelinThrowConfig = new JavelinThrowConfig();
//this.javelinThrowConfig = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindAll().FirstOrDefault();
//if (javelinThrowConfig == null) return;
//javelinThrowConfig.Number = "JT";//掷标枪
//javelinThrowConfig.Number = "TJ";//三级跳
//javelinThrowConfig.Number = "LJ";//跳远
//javelinThrowConfig.Data = msg;
//config.Data = msg;
//ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(GetConfig(PresetsItem));
#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");
}
......@@ -922,7 +931,7 @@ namespace VIZ.FGOUT.Module
private void SendAlgorithmParameters()
{
//如果没有选择预设则不发送
if (PresetsItem == null) return;
if (string.IsNullOrEmpty(PresetsItem)) return;
UdpEndpointManager manager = ConnectionManager.UdpConnection.GetEndpointManager("CAM_1");
if (manager == null)
......
......@@ -21,6 +21,7 @@ namespace VIZ.FGOUT.Module
public UEControlPanelViewModel()
{
CloseCommand = new VCommand(this.Close);
StartPackagingCommand = new VCommand(this.StartPackaging);
StopPackagingCommand = new VCommand(this.StopPackaging);
DisplaySpeedCommand = new VCommand(this.DisplaySpeed);
......@@ -33,14 +34,12 @@ namespace VIZ.FGOUT.Module
HideLineCommand = new VCommand(this.HideLine);
BeforeDrawingLinePositionCommand = new VCommand(this.BeforeDrawingLinePosition);
AfterDrawingTheLinePositionCommand = new VCommand(this.AfterDrawingTheLinePosition);
SendPresetCommand = new VCommand(this.SendPreset);
DetailCommand = new VCommand(this.Detail);
CancelCommand = new VCommand(this.Cancel);
PresetsSelectionChangedCommand = new VCommand(this.PresetsSelectionChanged);
SaveCommand = new VCommand(this.Save);
//SendPresetCommand = new VCommand(this.SendPreset);
//DetailCommand = new VCommand(this.Detail);
//CancelCommand = new VCommand(this.Cancel);
//PresetsSelectionChangedCommand = new VCommand(this.PresetsSelectionChanged);
//SaveCommand = new VCommand(this.Save);
//ConnectionManager.UdpConnection.AddEndpointManager(new UdpEndpointManager(_endpointKey, "127.0.0.1", 8888));
string clientIP = ApplicationDomainEx.IniStorage.GetValue<UdpConfig, string>(p => p.UDP_UESETTING_IP);
......@@ -50,19 +49,20 @@ namespace VIZ.FGOUT.Module
int port = ApplicationDomainEx.IniStorage.GetValue<UdpConfig, int>(p => p.UDP_UESETTING_PORT);
ConnectionManager.UdpConnection.AddEndpointManager(new UdpEndpointManager(_endpointKey, clientIP, port));
//ConnectionManager.UdpConnection.AddEndpointManager(new UdpEndpointManager(_endpointKey, "192.168.31.70", 8888));
//javelinThrowConfig = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindAll().FirstOrDefault();
//if (javelinThrowConfig == null) return;
////掷标枪
//PresetsProjects.Add("Javelin Throw");
//var number = javelinThrowConfig.Number;
//var data = javelinThrowConfig.Data;
var sports = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindAll();
if (sports == null) return;
foreach (var sport in sports)
{
PresetsProjects.Add(dics[sport.Number]);
}
//var sports = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindAll();
//if (sports == null) return;
//foreach (var sport in sports)
//{
// PresetsProjects.Add(dics[sport.Number]);
//}
}
Dictionary<string,string> dics = new Dictionary<string,string>{{"JT", "Javelin Throw" }, { "TJ", "Triple Jump"},{ "LJ", "Long Jump" } };
......@@ -143,16 +143,13 @@ namespace VIZ.FGOUT.Module
string msg = uePackage == null ? string.Empty : JsonConvert.SerializeObject(uePackage, JSON_SERIALIZER_SETTINGS);
manager.SendJson(uePackage);
#region 项目预设数据保存到LiteDB
//JavelinThrowConfig javelinThrowConfig = new JavelinThrowConfig();
//this.javelinThrowConfig = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindAll().FirstOrDefault();
#region 项目预设数据更新到LiteDB
//JavelinThrowConfig javelinThrowConfig = ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.FindAll().FirstOrDefault();
//if (javelinThrowConfig == null) return;
//javelinThrowConfig.Number = "JT";//掷标枪
//javelinThrowConfig.Number = "TJ";//三级跳
//javelinThrowConfig.Number = "LJ";//跳远
//javelinThrowConfig.Data = msg;
//config.Data = msg;
//ApplicationDomainEx.LiteDbContext.JavelinThrowConfig.Upsert(GetConfig(PresetsItem));
#endregion
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "47E670D6216C7C47FE5C56DEBD9CDF5760FE6BE241BADEF4B6020BEC95366FA9"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "5E5710EFD7426F21C0A7995A42A757F5EC04A0951D00D9CA20FF24AB1491EE4F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -71,7 +71,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 235 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
#line 226 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton EnableSpline;
......@@ -79,7 +79,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 355 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
#line 346 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyX;
......@@ -87,7 +87,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 378 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
#line 369 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyY;
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "47E670D6216C7C47FE5C56DEBD9CDF5760FE6BE241BADEF4B6020BEC95366FA9"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "5E5710EFD7426F21C0A7995A42A757F5EC04A0951D00D9CA20FF24AB1491EE4F"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......@@ -71,7 +71,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 235 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
#line 226 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton EnableSpline;
......@@ -79,7 +79,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 355 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
#line 346 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyX;
......@@ -87,7 +87,7 @@ namespace VIZ.FGOUT.Module {
#line hidden
#line 378 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
#line 369 "..\..\..\..\..\NDISettingView\View\NDISettingPanelView.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Primitives.ToggleButton MovementOnlyY;
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6731034D933A6EE128A5399CAB0DF1DB5914A996CCBC7049063EE04FE8E5B610"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "240747B6F71A9ACD9F68A352975633D7F99C78994A1AE4EE2D67250E7C767928"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "6731034D933A6EE128A5399CAB0DF1DB5914A996CCBC7049063EE04FE8E5B610"
#pragma checksum "..\..\..\..\..\NDISettingView\View\NDISettingView.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "240747B6F71A9ACD9F68A352975633D7F99C78994A1AE4EE2D67250E7C767928"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
......
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;;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -64,7 +64,6 @@ namespace VIZ.Framework.Common
NDIlib.video_frame_v2_t frame = new NDIlib.video_frame_v2_t();
NDIlib.audio_frame_v2_t audio = new NDIlib.audio_frame_v2_t();
NDIlib.metadata_frame_t metadata = new NDIlib.metadata_frame_t();
//NDIlib.recv_bandwidth_e bandwidth = NDIlib.recv_bandwidth_e.recv_bandwidth_lowest;
NDIlib.frame_type_e type = NDIlib.recv_capture_v2(this.Stream.RecvInstancePtr, ref frame, ref audio, ref metadata, 1000);
......@@ -119,12 +118,6 @@ namespace VIZ.Framework.Common
Mat srcMat = new Mat(new OpenCvSharp.Size(frame.xres, frame.yres), MatType.CV_8UC4);
Buffer.MemoryCopy(frame.p_data.ToPointer(), srcMat.DataPointer, videoFrame.Length, videoFrame.Length);
// 将帧缩放到低分辨率
//Mat srcMat = new Mat(new OpenCvSharp.Size(frame.xres, frame.yres), MatType.CV_8UC4);
//var resizedFrame = new Mat();
//Cv2.Resize(srcMat, resizedFrame, new Size(srcMat.Width / 4, srcMat.Height / 4));
//Buffer.MemoryCopy(frame.p_data.ToPointer(), resizedFrame.DataPointer, videoFrame.Length, videoFrame.Length);
Mat dstMat = new Mat();
Cv2.Rotate(srcMat, dstMat, this.Stream.Option.Rotation.Value);
......@@ -137,10 +130,7 @@ namespace VIZ.Framework.Common
{
videoFrame.Width = frame.xres;
videoFrame.Height = frame.yres;
//videoFrame.Width = frame.xres / 4;
//videoFrame.Height = frame.yres / 4;
//Buffer.MemoryCopy(frame.p_data.ToPointer(), videoFrame.DataStream.DataPointer.ToPointer(), videoFrame.Length, videoFrame.Length);
Buffer.MemoryCopy(frame.p_data.ToPointer(), videoFrame.DataStream.DataPointer.ToPointer(), videoFrame.Length, videoFrame.Length);
}
}
......
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