Adjusted splash screen to enable loading of data prior to launching main application.
This commit is contained in:
@@ -5,10 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:osrs_toolbox"
|
||||
mc:Ignorable="d"
|
||||
Title="OSRS Toolbox" SizeToContent="WidthAndHeight" AllowsTransparency="True" Background="Transparent" WindowStyle="None" ResizeMode="NoResize" MouseDown="Window_MouseDown" WindowStartupLocation="CenterScreen">
|
||||
<Window.DataContext>
|
||||
<local:SplashScreenViewModel/>
|
||||
</Window.DataContext>
|
||||
Title="OSRS Toolbox" SizeToContent="WidthAndHeight" AllowsTransparency="True" Background="Transparent" WindowStyle="None" ResizeMode="NoResize" MouseDown="Window_MouseDown" WindowStartupLocation="CenterScreen" PreviewKeyDown="Window_PreviewKeyDown" Loaded="Window_Loaded">
|
||||
<Grid>
|
||||
<Image Source="/Resources/SplashScreenLogo.png" MaxHeight="540"/>
|
||||
</Grid>
|
||||
|
@@ -32,5 +32,21 @@ namespace osrs_toolbox
|
||||
if (e.LeftButton == MouseButtonState.Pressed)
|
||||
DragMove();
|
||||
}
|
||||
|
||||
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Space)
|
||||
{
|
||||
Application.Current.MainWindow = HomePageView.Current;
|
||||
HomePageView.Current.Show();
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
HomePageView hp = new HomePageView();
|
||||
//TODO: Handle loading of data into datacontext, then open home screen
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user