示例#1
0
        public void ShowSplash(SplashInfo splashInfo)
        {
            if (splash != null)
            {
                splash.DataContext = new SplashViewModel(splashInfo);
            }
            else
            {
                Application.Current.Activated   += AppActivated;
                Application.Current.Deactivated += AppDeactivated;

                Window active = AllWindows.FirstOrDefault(w => w.IsActive);
                restoreActiveWindow = active != null;


                foreach (Window window in AllWindows)
                {
                    window.IsEnabled = false;
                }

                splash             = new SplashView();
                splash.DataContext = new SplashViewModel(splashInfo);
                splash.Owner       = active ?? this.MainWindow;

                splash.Show();
                timer.Start();
            }
        }
示例#2
0
 public SplashViewModel(SplashInfo splashInfo)
 {
     this.splashInfo = splashInfo;
 }