Compare commits
No commits in common. "1983453a3c4800cc000fa56e8084793db750b60d" and "c537bcfca7c18d1c66ac43cb760c00250235e60e" have entirely different histories.
1983453a3c
...
c537bcfca7
@ -9,14 +9,14 @@
|
|||||||
|
|
||||||
>
|
>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid x:Name="great" Visibility="Hidden" Panel.ZIndex="1000" HorizontalAlignment="Left" Height="172" Width="221" VerticalAlignment="Bottom" Margin="-105,0,0,0" >
|
<Grid x:Name="great" Visibility="Hidden" HorizontalAlignment="Left" Height="172" Width="221" VerticalAlignment="Bottom" Margin="-110,0,0,0" >
|
||||||
<Image Source="/Resources/Img/play_img/music_rope/great.png" HorizontalAlignment="Right" Width="90" VerticalAlignment="Top" Margin="0,0,0,0"/>
|
<Image Source="/Resources/Img/play_img/music_rope/great.png" HorizontalAlignment="Right" Width="90" VerticalAlignment="Top" Margin="0,0,0,0"/>
|
||||||
<Image Source="/Resources/Img/play_img/music_rope/great-p.png" Width="145" Height="141" VerticalAlignment="Bottom" />
|
<Image Source="/Resources/Img/play_img/music_rope/great-p.png" Width="145" Height="141" VerticalAlignment="Bottom" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Image x:Name="miss" Source="/Resources/Img/play_img/music_rope/miss.png" Visibility="Hidden" HorizontalAlignment="Left" Width="157" Height="85" VerticalAlignment="Bottom" Margin="0,0,0,86"/>
|
<Image x:Name="miss" Source="/Resources/Img/play_img/music_rope/miss.png" Visibility="Hidden" HorizontalAlignment="Left" Width="157" Height="85" VerticalAlignment="Bottom" Margin="0,0,0,86"/>
|
||||||
|
|
||||||
<Image x:Name="head_g" Source="/Resources/Img/play_img/music_rope/head_g.png" Visibility="Hidden" HorizontalAlignment="Right" Width="152" Height="85" VerticalAlignment="Top" Margin="0,0,0,0"/>
|
<Image x:Name="head_g" Source="/Resources/Img/play_img/music_rope/head_g.png" Visibility="Visible" HorizontalAlignment="Right" Width="152" Height="85" VerticalAlignment="Top" Margin="0,0,0,0"/>
|
||||||
<Image x:Name="head_m" Source="/Resources/Img/play_img/music_rope/head_m.png" Visibility="Hidden" HorizontalAlignment="Right" Width="152" Height="85" VerticalAlignment="Top" Margin="0,0,0,0"/>
|
<Image x:Name="head_m" Source="/Resources/Img/play_img/music_rope/head_m.png" Visibility="Visible" HorizontalAlignment="Right" Width="152" Height="85" VerticalAlignment="Top" Margin="0,0,0,0"/>
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<Grid Width="3" Height="140" Background="#fedd40" ClipToBounds="False" Margin="0,500,0,0"></Grid>
|
<Grid Width="3" Height="140" Background="#fedd40" ClipToBounds="False" Margin="0,500,0,0"></Grid>
|
||||||
<Grid Width="580" Height="87" Background="#25ffffff" ClipToBounds="False" Margin="0,500,0,0" HorizontalAlignment="Left">
|
<Grid Width="580" Height="87" Background="#25ffffff" ClipToBounds="False" Margin="0,500,0,0" HorizontalAlignment="Left">
|
||||||
|
|||||||
@ -163,14 +163,14 @@ namespace Wpf_AiSportsMicrospace.MyUserControl
|
|||||||
private void OnTimePointReached(double timePoint)
|
private void OnTimePointReached(double timePoint)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"触发时间点: {timePoint}");
|
Console.WriteLine($"触发时间点: {timePoint}");
|
||||||
if (isMiss)
|
if (_isMiss)
|
||||||
{
|
{
|
||||||
head_m.Visibility = Visibility.Visible;
|
head_m.Visibility = Visibility.Visible;
|
||||||
miss.Visibility = Visibility.Visible;
|
miss.Visibility = Visibility.Visible;
|
||||||
head_g.Visibility = Visibility.Hidden;
|
head_g.Visibility = Visibility.Hidden;
|
||||||
great.Visibility = Visibility.Hidden;
|
great.Visibility = Visibility.Hidden;
|
||||||
// 200ms 后隐藏
|
// 200ms 后隐藏
|
||||||
var hideTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(300) };
|
var hideTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(200) };
|
||||||
hideTimer.Start();
|
hideTimer.Start();
|
||||||
hideTimer.Tick += (s, e) =>
|
hideTimer.Tick += (s, e) =>
|
||||||
{
|
{
|
||||||
@ -185,10 +185,8 @@ namespace Wpf_AiSportsMicrospace.MyUserControl
|
|||||||
great.Visibility = Visibility.Visible;
|
great.Visibility = Visibility.Visible;
|
||||||
head_m.Visibility = Visibility.Hidden;
|
head_m.Visibility = Visibility.Hidden;
|
||||||
miss.Visibility = Visibility.Hidden;
|
miss.Visibility = Visibility.Hidden;
|
||||||
ShowImageWithAnimation(great , 221 , 172);
|
|
||||||
ShowImageWithAnimation(head_g , 152 , 82);
|
|
||||||
// 200ms 后隐藏
|
// 200ms 后隐藏
|
||||||
var hideTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(300) };
|
var hideTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(200) };
|
||||||
hideTimer.Start();
|
hideTimer.Start();
|
||||||
hideTimer.Tick += (s, e) =>
|
hideTimer.Tick += (s, e) =>
|
||||||
{
|
{
|
||||||
@ -199,44 +197,6 @@ namespace Wpf_AiSportsMicrospace.MyUserControl
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ShowImageWithAnimation(UIElement ui , int width, int height)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
// 透明度动画
|
|
||||||
DoubleAnimation opacityAnimation = new DoubleAnimation
|
|
||||||
{
|
|
||||||
From = 0,
|
|
||||||
To = 1,
|
|
||||||
Duration = TimeSpan.FromSeconds(0.1)
|
|
||||||
};
|
|
||||||
|
|
||||||
// 缩放动画
|
|
||||||
DoubleAnimation scaleYAnimation = new DoubleAnimation
|
|
||||||
{
|
|
||||||
From = height - 12,
|
|
||||||
To = height + 12,
|
|
||||||
Duration = TimeSpan.FromSeconds(0.3),
|
|
||||||
EasingFunction = new ElasticEase { EasingMode = EasingMode.EaseOut }
|
|
||||||
};
|
|
||||||
|
|
||||||
DoubleAnimation scaleXAnimation = new DoubleAnimation
|
|
||||||
{
|
|
||||||
From = width - 30,
|
|
||||||
To = width + 20,
|
|
||||||
Duration = TimeSpan.FromSeconds(0.3),
|
|
||||||
EasingFunction = new ElasticEase { EasingMode = EasingMode.EaseOut}
|
|
||||||
};
|
|
||||||
|
|
||||||
ui.BeginAnimation(Image.OpacityProperty, opacityAnimation);
|
|
||||||
ui.BeginAnimation(Image.WidthProperty, scaleXAnimation);
|
|
||||||
ui.BeginAnimation(Image.HeightProperty, scaleYAnimation);
|
|
||||||
//ui.BeginAnimation(RotateTransform.AngleProperty, rotateAnimation);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TimedEventTrigger
|
public class TimedEventTrigger
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 57 KiB |
@ -57,22 +57,12 @@
|
|||||||
<Image
|
<Image
|
||||||
gif:ImageBehavior.AnimatedSource="/Resources/Img/Album/1.gif"
|
gif:ImageBehavior.AnimatedSource="/Resources/Img/Album/1.gif"
|
||||||
gif:ImageBehavior.RepeatBehavior="Forever"
|
gif:ImageBehavior.RepeatBehavior="Forever"
|
||||||
HorizontalAlignment="right"
|
HorizontalAlignment="right"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Margin="50,10,200,20"
|
Margin="50,10,200,20"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Image
|
|
||||||
gif:ImageBehavior.AnimatedSource="/Resources/Img/Album/leight.gif"
|
|
||||||
gif:ImageBehavior.RepeatBehavior="Forever"
|
|
||||||
gif:ImageBehavior.AnimateInDesignMode="True"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Margin="20,80,0,0"
|
|
||||||
Width="880"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@ -326,8 +326,8 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope
|
|||||||
lose1.Margin = new Thickness(60, 0, 0, 0);
|
lose1.Margin = new Thickness(60, 0, 0, 0);
|
||||||
lose2.Margin = new Thickness(60, 0, 0, 0);
|
lose2.Margin = new Thickness(60, 0, 0, 0);
|
||||||
lose3.Margin = new Thickness(60, 0, 0, 0);
|
lose3.Margin = new Thickness(60, 0, 0, 0);
|
||||||
win1.Margin = new Thickness(980, -123, 0, 0);
|
win1.Margin = new Thickness(60, -123, 0, 0);
|
||||||
win2.Margin = new Thickness(980, -123, 0, 0);
|
win2.Margin = new Thickness(60, -123, 0, 0);
|
||||||
|
|
||||||
text1.Text = "LOSE";
|
text1.Text = "LOSE";
|
||||||
text2.Text = "WIN";
|
text2.Text = "WIN";
|
||||||
|
|||||||
@ -27,7 +27,6 @@
|
|||||||
<None Remove="Resources\Img\Album\home_history.png" />
|
<None Remove="Resources\Img\Album\home_history.png" />
|
||||||
<None Remove="Resources\Img\Album\home_play.png" />
|
<None Remove="Resources\Img\Album\home_play.png" />
|
||||||
<None Remove="Resources\Img\Album\home_test.png" />
|
<None Remove="Resources\Img\Album\home_test.png" />
|
||||||
<None Remove="Resources\Img\Album\leight.gif" />
|
|
||||||
<None Remove="Resources\Img\Album\title.png" />
|
<None Remove="Resources\Img\Album\title.png" />
|
||||||
<None Remove="Resources\Img\Album\vs.png" />
|
<None Remove="Resources\Img\Album\vs.png" />
|
||||||
<None Remove="Resources\Img\Badge\1.jpg" />
|
<None Remove="Resources\Img\Badge\1.jpg" />
|
||||||
@ -98,9 +97,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Resource Include="Resources\Img\Album\leight.gif">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</Resource>
|
|
||||||
<Resource Include="Resources\Img\play_img\music_rope\back.png">
|
<Resource Include="Resources\Img\play_img\music_rope\back.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</Resource>
|
</Resource>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user