zur zeit versuche ich meine ProgressBar so zu gestallten, dass wenn der Value Wert 100 erreicht hat, dass der Splash Screen sich schließt und das Hauptmodul geladen wird. Aber ich scheitere an folgendem Problem (WPA war nie so wirklich meines)
Code:
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media.Animation;
using System.Windows.Threading;
namespace Cabal_EU_Online_Hack
{
/// <summary>
/// Interaktionslogik für Splash.xaml
/// </summary>
public partial class Splash : Window
{
DispatcherTimer timer = new DispatcherTimer();
public Splash()
{
InitializeComponent();
createtimer();
}
private void createtimer()
{
splashProgress.IsIndeterminate = false;
Duration dur = new Duration(TimeSpan.FromSeconds(10));
DoubleAnimation dba = new DoubleAnimation(200.0, dur);
splashProgress.BeginAnimation(ProgressBar.ValueProperty, dba);
if (splashProgress.Value == 100)
{
timer.Stop();
MainWindow mw = new MainWindow();
this.Hide();
mw.Show();
}
}
private void move(object sender, MouseButtonEventArgs e)
{
DragMove();
}
private void splashScreen_Loaded(object sender, RoutedEventArgs e)
{
timer.Start();
}
}
}







