Esempio n. 1
0
        private static void ShowDesktopApp()
        {
            _runningAsScreensaver = false;

            Screen homeScreen = null;

            if (Screen.AllScreens.Length > 1)
            {
                ScreenSelectorForm form = new ScreenSelectorForm();
                if (form.ShowDialog() == DialogResult.OK)
                {
                    homeScreen = form.SelectedScreen;
                }
                else
                {
                    return;
                }
            }
            else
            {
                homeScreen = Screen.PrimaryScreen;
            }

            if (homeScreen != null)
            {
                PhotoQueue          source   = new PhotoQueue();
                BaseScreenSaverForm mainForm = new BaseScreenSaverForm(homeScreen);
                ScreenSaverBase     base2    = new PhotoshowScreenSaver(mainForm.GetBackgroundImage(), source);
                base2.Init();
                mainForm.CurrentScreenSaver = base2;
                Application.Run(mainForm);
            }
        }
Esempio n. 2
0
        private static void ShowScreenSaver()
        {
            _runningAsScreensaver = true;
            PhotoQueue source = new PhotoQueue();

            foreach (Screen screen in Screen.AllScreens)
            {
                BaseScreenSaverForm form  = new BaseScreenSaverForm(screen);
                ScreenSaverBase     base2 = new PhotoshowScreenSaver(form.GetBackgroundImage(), source);
                base2.Init();
                form.CurrentScreenSaver = base2;
                form.Show();
            }
            Application.Run();
        }