Beispiel #1
0
        // <summary>
        /// Change all screens
        /// </summary>
        public void NextSameTime()
        {
            try
            {
                Screen[] screens = Screen.AllScreens;
                Dictionary <string, DesktopImage> images = new Dictionary <string, DesktopImage>(screens.Length);

                for (int i = 0; i < screens.Length; i++)
                {
                    Screen screen = screens[i];

                    if (OrderMode == OrderModes.Random)
                    {
                        images[screen.DeviceName] = new DesktopImage(ImageList.NextRandom(screen.DeviceName));
                    }
                    else
                    {
                        images[screen.DeviceName] = new DesktopImage(ImageList.Next(screen.DeviceName));
                    }
                }

                Wallpaper.CreateBackgroundImage(images, _controlerForms);
            }
            catch (MissingImagesException)
            {
                Wallpaper.CreateTestBackgroundImage();
            }
        }
Beispiel #2
0
        public void Previous()
        {
            Screen[] screens = Screen.AllScreens;
            Dictionary <string, DesktopImage> images = new Dictionary <string, DesktopImage>(screens.Length);

            // do in reverse order to keep multimonitors in sync
            for (int i = screens.Length - 1; i >= 0; i--)
            {
                Screen screen = screens[i];
                images[screen.DeviceName] = new DesktopImage(ImageList.Previous(screen.DeviceName));
            }

            Wallpaper.CreateBackgroundImage(images, _controlerForms);
        }
Beispiel #3
0
        private void NextAlternately()
        {
            try
            {
                Screen[] screens = Screen.AllScreens;
                Dictionary <string, DesktopImage> images = new Dictionary <string, DesktopImage>(screens.Length);


                for (int i = 0; i < screens.Length; i++)
                {
                    Screen screen = screens[i];

                    if (i == NextAlternatelyCount)
                    {
                        if (OrderMode == OrderModes.Random)
                        {
                            images[screen.DeviceName] = new DesktopImage(ImageList.NextRandom(screen.DeviceName));
                        }
                        else
                        {
                            images[screen.DeviceName] = new DesktopImage(ImageList.Next(screen.DeviceName));
                        }
                    }
                    else
                    {
                        images[screen.DeviceName] = new DesktopImage(ImageList.Current(screen.DeviceName));
                    }
                }


                Wallpaper.CreateBackgroundImage(images, _controlerForms);

                // next wallpaper
                NextAlternatelyCount++;
                if (NextAlternatelyCount >= screens.Length)
                {
                    NextAlternatelyCount = 0;
                }
            }
            catch (MissingImagesException)
            {
                Wallpaper.CreateTestBackgroundImage();
            }
        }
Beispiel #4
0
        /// <summary>
        /// Display the current images on the background
        /// </summary>
        public void Refresh()
        {
            try
            {
                Screen[] screens = Screen.AllScreens;
                Dictionary <string, DesktopImage> images = new Dictionary <string, DesktopImage>(screens.Length);

                for (int i = 0; i < screens.Length; i++)
                {
                    Screen screen = screens[i];

                    images[screen.DeviceName] = new DesktopImage(ImageList.Current(screen.DeviceName));
                }

                Wallpaper.CreateBackgroundImage(images, _controlerForms);
            }
            catch (MissingImagesException)
            {
                Wallpaper.CreateTestBackgroundImage();
            }
        }
Beispiel #5
0
 public void TestBackground()
 {
     Wallpaper.CreateTestBackgroundImage();
 }