Example #1
0
        public void Run()
        {
            ScreenConfiguration configuration = new ScreenConfiguration(
                System.Windows.Forms.Screen.AllScreens.Select(s => new Screen(s)).ToArray(), -300); //120
            WallpaperComposer composer = new WallpaperComposer(configuration);

            WallpaperComposerParameters parameters = new WallpaperComposerParameters();
            parameters.ImageProvider = new StaticImageProvider(imagePath);
            parameters.ImageResizer = new FillingImageResizer();
            parameters.WallpaperProcessor = new ApplyingWallpaperProcessor();

            composer.Compose(parameters);
        }
        public MainWindowViewModel(ScreenConfiguration screenConfiguration, 
            ResizingType resizingType)
        {
            this.ScreenConfiguration = screenConfiguration;
            this.ResizingType = resizingType;

            this.ResizingTypes = new Dictionary<ResizingType, string>()
            {
                { ResizingType.Filling, "Fill" },
                { ResizingType.Fitting, "Fit" },
                { ResizingType.Stretching, "Stretch" },
                { ResizingType.Centering, "Center" }
            };
        }
Example #3
0
 public WallpaperComposer(ScreenConfiguration screenConfiguration)
 {
     this.screenConfiguration = screenConfiguration;
 }
Example #4
0
 public ScreenDistributor(ScreenConfiguration screenConfiguration)
 {
     this.screenConfiguration = screenConfiguration;
 }