Added timer to splash screen to simulate data load.
This commit is contained in:
@@ -11,6 +11,7 @@ using System.Windows.Input;
|
|||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
using System.Windows.Threading;
|
||||||
|
|
||||||
namespace osrs_toolbox
|
namespace osrs_toolbox
|
||||||
{
|
{
|
||||||
@@ -20,11 +21,16 @@ namespace osrs_toolbox
|
|||||||
public partial class SplashScreenView : Window
|
public partial class SplashScreenView : Window
|
||||||
{
|
{
|
||||||
public static SplashScreenView Current;
|
public static SplashScreenView Current;
|
||||||
|
private DispatcherTimer timer;
|
||||||
|
|
||||||
public SplashScreenView()
|
public SplashScreenView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Current = this;
|
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)
|
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)
|
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
HomePageView hp = new HomePageView();
|
HomePageView hp = new HomePageView();
|
||||||
|
Reference in New Issue
Block a user