/// <summary>
 /// Display application splash screen.
 /// </summary>
 private static void DisplayApplicationSplashScreen()
 {
     applicationSplashScreen = new DemoSplashScreen();
     applicationSplashScreen.Show();
     manualResetEventSplashScreen.Set();
     Dispatcher.Run();
 }
 /// <summary>
 /// Initializes a new instance of the App class.
 /// </summary>
 /// <param name="appSplashScreen">Instance of application splash screen window.</param>
 public App(DemoSplashScreen appSplashScreen)
 {
     this.appSplashScreen = appSplashScreen;
     applicationSplashScreenTimer = new ST.Timer(100);
     applicationSplashScreenTimer.Elapsed += new ST.ElapsedEventHandler(applicationSplashScreenTimer_Elapsed);
     applicationSplashScreenTimer.Start();
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the App class.
 /// </summary>
 /// <param name="appSplashScreen">Instance of application splash screen window.</param>
 public App(DemoSplashScreen appSplashScreen)
 {
     this.appSplashScreen                  = appSplashScreen;
     applicationSplashScreenTimer          = new ST.Timer(100);
     applicationSplashScreenTimer.Elapsed += new ST.ElapsedEventHandler(applicationSplashScreenTimer_Elapsed);
     applicationSplashScreenTimer.Start();
 }
Example #4
0
 /// <summary>
 /// Display application splash screen.
 /// </summary>
 private static void DisplayApplicationSplashScreen()
 {
     applicationSplashScreen = new DemoSplashScreen();
     applicationSplashScreen.Show();
     manualResetEventSplashScreen.Set();
     Dispatcher.Run();
 }
        /// <summary>
        /// Event handler for Application splash screen timer time elapsed event.
        /// </summary>
        /// <param name="sender">Sender object.</param>
        /// <param name="eventArgs">Event arguments.</param>
        private void applicationSplashScreenTimer_Elapsed(object sender, ST.ElapsedEventArgs eventArgs)
        {
            if (loadingCount >= 100)
            {
                applicationSplashScreenTimer.Stop();
                applicationSplashScreenTimer.Dispose();
                applicationSplashScreenTimer = null;

                appSplashScreen.AppLoadingCompleted();
                appSplashScreen = null;

                Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(StartMainApplication));
            }
            else
            {
                loadingCount += 1;
                appSplashScreen.AppLoadingPercentCompleted(loadingCount);
            }
        }
Example #6
0
        /// <summary>
        /// Event handler for Application splash screen timer time elapsed event.
        /// </summary>
        /// <param name="sender">Sender object.</param>
        /// <param name="eventArgs">Event arguments.</param>
        private void applicationSplashScreenTimer_Elapsed(object sender, ST.ElapsedEventArgs eventArgs)
        {
            if (loadingCount >= 100)
            {
                applicationSplashScreenTimer.Stop();
                applicationSplashScreenTimer.Dispose();
                applicationSplashScreenTimer = null;

                appSplashScreen.AppLoadingCompleted();
                appSplashScreen = null;

                Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(StartMainApplication));
            }
            else
            {
                loadingCount += 1;
                appSplashScreen.AppLoadingPercentCompleted(loadingCount);
            }
        }