Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

Select Wallpaper Profile from Drop-Down List

Description
This script will prompt you to select a new wallpaper profile to load. It will exclude the currently applied profile.
Language
C#.net
Minimum Version
Created By
Dataman1701
Contributors
-
Date Created
3d ago
Date Last Modified
3d ago

Scripted Function (Macro) Code

using System;
using System.Drawing;
using System.Linq; 
using System.Collections.Generic;

public  class DisplayFusionFunction
{
	public static void Run(IntPtr windowHandle)
	{
		string CurrentProfile = BFS.DisplayFusion.GetCurrentWallpaperProfile();
		string selectedMonitorProfile = BFS.Dialog.GetUserInputList("Current Profile: " + CurrentProfile + "\r\r Please select new wallpaper profile:", RemoveCurrentProfile(BFS.DisplayFusion.GetWallpaperProfiles(), CurrentProfile) );
		BFS.DisplayFusion.LoadWallpaperProfile(selectedMonitorProfile);
	}


	private static string[]  RemoveCurrentProfile( string[] WallProfiles, string CurrentProfile)
	{
		List<string> list = WallProfiles.ToList();
		list.Remove( CurrentProfile );	
		WallProfiles = list.ToArray();
		return WallProfiles;
	}


}