private void Window_Loaded(object sender, RoutedEventArgs e) { this.Show(); var config = ConfigurationManager.AppSettings["ShowSplash"]; if (config.ToLower() == "true") { var screen = new Views.SplashScreen(); screen.ShowDialog(); } }
//--------------------------------------------------------------------- SplashScreenVM ShowSplashScreen() { _splashScreen = new Views.SplashScreen(); _splashScreen.Owner = _mainWindow; _splashScreenVM = new SplashScreenVM(); _splashScreen.DataContext = _splashScreenVM; _splashScreen.Show(); // start the timer to close the splash _timer = new System.Timers.Timer(300); _timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed); _timer.Enabled = true; return(_splashScreenVM); }
/// <summary> /// Creates the splash screen. /// </summary> /// <returns>The window.</returns> public Window CreateSplashScreen() { var splashScreen = new Views.SplashScreen(); return splashScreen; }
/// <summary> /// Creates the splash screen. /// </summary> /// <returns>The window.</returns> public Window CreateSplashScreen() { var splashScreen = new Views.SplashScreen(); return(splashScreen); }