Added timer to splash screen to simulate data load.

This commit is contained in:
2025-05-22 11:43:38 -04:00
parent bc46830939
commit 1fe4df4b7b

View File

@@ -11,6 +11,7 @@ using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;
namespace osrs_toolbox
{
@@ -20,11 +21,16 @@ namespace osrs_toolbox
public partial class SplashScreenView : Window
{
public static SplashScreenView Current;
private DispatcherTimer timer;
public SplashScreenView()
{
InitializeComponent();
Current = this;
timer = new DispatcherTimer();
timer.Interval = TimeSpan.FromSeconds(15);
timer.Tick += new EventHandler(TimerTick);
timer.Start();
}
private void Window_MouseDown(object sender, MouseButtonEventArgs e)
@@ -43,6 +49,13 @@ namespace osrs_toolbox
}
}
private void TimerTick(object sender, EventArgs e)
{
Application.Current.MainWindow = HomePageView.Current;
HomePageView.Current.Show();
this.Close();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
HomePageView hp = new HomePageView();