using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// You can duplicate this script, then change layoutID to something different to save another layout
string layoutID = "Layout1";
IntPtr[] windowHandles = BFS.Window.GetVisibleWindowHandles();
foreach (IntPtr window in windowHandles)
{
// Get the window title and bounds
string windowTitle = BFS.Window.GetText(window);
Rectangle windowBounds = BFS.Window.GetBounds(window);
// If the window title isn't blank, write the window's x, y, width, and height values to the registry
if (windowTitle != "")
{
BFS.ScriptSettings.WriteValue(windowTitle + "_X_" + layoutID, windowBounds.X.ToString());
BFS.ScriptSettings.WriteValue(windowTitle + "_Y_" + layoutID, windowBounds.Y.ToString());
BFS.ScriptSettings.WriteValue(windowTitle + "_width_" + layoutID, windowBounds.Width.ToString());
BFS.ScriptSettings.WriteValue(windowTitle + "_height_" + layoutID, windowBounds.Height.ToString());
}
}
}
}