Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
ZGGSONG committed Mar 1, 2024
1 parent 8cdcbae commit 7349322
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion STranslate/Views/MainView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,14 @@ public void ViewAnimation(bool show = true)
viewAnimation.Completed -= AnimationCompleted;
if (show)
{
// 如果当前已经显示了,则不执行动画
if (Mwin.Visibility == Visibility.Visible)
return;

// 在开始动画之前,确保窗口是可见的
Mwin.Visibility = Visibility.Visible;
doubleAnimation.From = 0;
doubleAnimation!.To = 1;
doubleAnimation.To = 1;
}
else
{
Expand Down

0 comments on commit 7349322

Please sign in to comment.