Compare commits
2 Commits
9271e77f68
...
bf2027035c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf2027035c | ||
|
|
3abc86b451 |
@ -13,7 +13,7 @@
|
||||
<ItemsControl x:Name="ItemsHost" ItemsSource="{Binding Images, RelativeSource={RelativeSource AncestorType=UserControl}}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<Canvas/>
|
||||
<Canvas/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
|
||||
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/1.gif
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/1.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 MiB |
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/2.gif
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/2.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 MiB |
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/3.gif
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/3.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 MiB |
@ -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>
|
||||
|
||||
@ -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();
|
||||
|
||||
|
||||
@ -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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user