private static void InitSplashScreen()
        {
            var waiting  = true;
            var ssThread = new Thread(() =>
            {
                SynchronizationContext.SetSynchronizationContext(
                    new DispatcherSynchronizationContext(Dispatcher.CurrentDispatcher));
                SplashScreen = new SplashScreen();
                SplashScreen.SetText("Initializing...");
                SplashScreen.SetVer(AppVersion);
                SplashScreen.Show();
                waiting = false;
                Dispatcher.Run();
            })
            {
                Name = "SplashScreen window thread"
            };

            ssThread.SetApartmentState(ApartmentState.STA);
            ssThread.Start();
            while (waiting)
            {
                Thread.Sleep(1);
            }
        }