Compare commits

...

2 Commits

Author SHA1 Message Date
ltx
bf2027035c Merge branch 'dev' of http://8.153.108.90:3000/YD/Wpf_AiSportsMicrospace into dev
# Conflicts:
#	Wpf_AiSportsMicrospace/Views/Home.xaml
#	Wpf_AiSportsMicrospace/Views/Home.xaml.cs
2025-10-09 10:38:53 +08:00
ltx
3abc86b451 update:ui修改 2025-10-09 10:22:55 +08:00
7 changed files with 68 additions and 11 deletions

View File

@ -13,7 +13,7 @@
<ItemsControl x:Name="ItemsHost" ItemsSource="{Binding Images, RelativeSource={RelativeSource AncestorType=UserControl}}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas/>
<Canvas/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

View File

@ -1,7 +1,9 @@
<UserControl x:Class="Wpf_AiSportsMicrospace.Home"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Wpf_AiSportsMicrospace.MyUserControl" Loaded="Window_Loaded">
xmlns:local="clr-namespace:Wpf_AiSportsMicrospace.MyUserControl"
xmlns:gif="http://wpfanimatedgif.codeplex.com"
Title="Home" Height="1080" Width="1920" Loaded="Window_Loaded">
<Grid VerticalAlignment="Bottom">
<Grid.Background>
<ImageBrush ImageSource="/Resources/Img/Album/home_bg.png" Stretch="UniformToFill"/>
@ -26,5 +28,44 @@
Margin="0,250,0,0"
Padding="0,100"
/>
<Grid Margin="314,803,314,0" VerticalAlignment="Top" Height="182">
<Image
Source="/Resources/Img/Album/change_back.png"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Width="330"
Margin="0,100,0,0"
/>
<Image
gif:ImageBehavior.AnimatedSource="/Resources/Img/Album/2.gif"
gif:ImageBehavior.RepeatBehavior="Forever"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Margin="-20,10,30,20"
/>
<Image
Source="/Resources/Img/Album/change_right.png"
HorizontalAlignment="right"
VerticalAlignment="Top"
Width="330"
Margin="0,100,0,0"
/>
<Image
gif:ImageBehavior.AnimatedSource="/Resources/Img/Album/1.gif"
gif:ImageBehavior.RepeatBehavior="Forever"
HorizontalAlignment="right"
VerticalAlignment="Top"
Margin="50,10,200,20"
/>
</Grid>
<Image
gif:ImageBehavior.AnimatedSource="/Resources/Img/Album/3.gif"
gif:ImageBehavior.RepeatBehavior="Forever"
HorizontalAlignment="right"
VerticalAlignment="Top"
Margin="100,120,200,20"
/>
</Grid>
</UserControl>

View File

@ -24,7 +24,6 @@ using Yztob.AiSports.Postures.Sports;
using Yztob.AiSports.Postures.Things;
using Yztob.AiSports.Sensors.Abstractions;
using Yztob.AiSports.Sensors.Things;
namespace Wpf_AiSportsMicrospace
{
/// <summary>
@ -37,6 +36,8 @@ namespace Wpf_AiSportsMicrospace
private ConcurrentQueue<VideoFrame> _frameQueue = new();
private CancellationTokenSource _cts = new();
private SportOperate _sportOperate;
public static Uri loadingImage = new Uri("/Resources/Img/Album/1.gif", UriKind.Relative);
public Home()
{
@ -62,19 +63,22 @@ namespace Wpf_AiSportsMicrospace
// 默认选中第3张
coverFlow.SelectedIndex = 0;
//AnimationBehavior.SetSourceUri(LoadingImage, loadingImage);
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
_sportOperate = new SportOperate();
_webcamClient = _sportOperate.CreateRTSP();
//_sportOperate = new SportOperate();
//_webcamClient = _sportOperate.CreateRTSP();
_webcamClient.OnExtractFrame += frame =>
{
if (frame != null)
_frameQueue.Enqueue(frame);
};
_webcamClient.StartExtract();
//_webcamClient.OnExtractFrame += frame =>
//{
// if (frame != null)
// _frameQueue.Enqueue(frame);
//};
//_webcamClient.StartExtract();
StartFrameProcessing();

View File

@ -9,8 +9,11 @@
</PropertyGroup>
<ItemGroup>
<None Remove="Resources\Img\Album\1.gif" />
<None Remove="Resources\Img\Album\1.jpg" />
<None Remove="Resources\Img\Album\2.gif" />
<None Remove="Resources\Img\Album\2.jpg" />
<None Remove="Resources\Img\Album\3.gif" />
<None Remove="Resources\Img\Album\3.jpg" />
<None Remove="Resources\Img\Album\4.jpg" />
<None Remove="Resources\Img\Album\5.jpg" />
@ -89,12 +92,21 @@
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\Img\Album\1.gif">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Img\Album\1.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Img\Album\2.gif">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Img\Album\2.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Img\Album\3.gif">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Img\Album\3.jpg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>