using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
// Set the list of websites here
string[] websiteURLs = { "https://www.displayfusion.com",
"https://www.traystatus.com",
"https://www.logfusion.ca" };
// Set the target monitor ID here
uint monitorID = 1;
// Get the monitor bounds
Rectangle monitorBounds = BFS.Monitor.GetMonitorWorkAreaByID(monitorID);
// Open each browser window and position it
for (int i = 0; i < 3; i++)
{
// Set up the window y, width, and heigh values
Rectangle windowBounds = new Rectangle();
int windowWidth = (int)(monitorBounds.Width / 3);
windowBounds.Y = monitorBounds.Y;
windowBounds.Width = windowWidth;
windowBounds.Height = monitorBounds.Height;
// Open the window
IntPtr window = BFS.Web.OpenUrlNewWindow(websiteURLs[i]);
// Modify the X value depending on where we are in the loop and move the window
if (i == 0)
{
windowBounds.X = monitorBounds.X;
BFS.Window.SetSizeAndLocation(window, windowBounds.X, windowBounds.Y, windowBounds.Width, windowBounds.Height);
}
else if (i == 1)
{
windowBounds.X = monitorBounds.X + windowWidth;
BFS.Window.SetSizeAndLocation(window, windowBounds.X, windowBounds.Y, windowBounds.Width, windowBounds.Height);
}
else if (i == 2)
{
windowBounds.X = monitorBounds.X + (windowWidth * 2);
BFS.Window.SetSizeAndLocation(window, windowBounds.X, windowBounds.Y, windowBounds.Width, windowBounds.Height);
}
}
}
}