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" } }; }
public WallpaperComposer(ScreenConfiguration screenConfiguration) { this.screenConfiguration = screenConfiguration; }
public ScreenDistributor(ScreenConfiguration screenConfiguration) { this.screenConfiguration = screenConfiguration; }