This commit is contained in:
Meik
2025-11-11 11:03:42 +01:00
commit dc3e8a2e4c
582 changed files with 191465 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using C4IT.Logging;
using WpfAnimatedGif;
using static C4IT.Logging.cLogManager;
namespace FasdDesktopUi.Basics.UserControls
{
public partial class PauseCaseOverlay : UserControl
{
public event EventHandler<EventArgs> OnPauseEnd;
public PauseCaseOverlay()
{
InitializeComponent();
}
private async void EndPause()
{
try
{
var imageSource = new BitmapImage();
imageSource.BeginInit();
imageSource.UriSource = new Uri("pack://application:,,,/Resources/F4SD_logo_forward.gif");
ImageBehavior.SetAnimatedSource(HeroGif, imageSource);
await Task.Delay(900);
if (OnPauseEnd != null)
OnPauseEnd?.Invoke(this, new EventArgs());
}
catch (Exception E)
{
LogException(E);
}
}
private void PlayButton_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
EndPause();
}
private void StackPanel_TouchDown(object sender, TouchEventArgs e)
{
EndPause();
}
private void UserControl_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (this.Visibility == Visibility.Visible)
{
var imageSource = new BitmapImage();
imageSource.BeginInit();
imageSource.UriSource = new Uri("pack://application:,,,/Resources/F4SD_logo_reverse.gif");
ImageBehavior.SetAnimatedSource(HeroGif, imageSource);
}
}
}
}