using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run()
{
const string leftOrRight = "Script_Move_Left_Or_Right_Setting";
string setting = BFS.ScriptSettings.ReadValue(leftOrRight);
bool isMovingRight = (setting.Length == 0) || (setting.Equals("right"));
BFS.ScriptSettings.WriteValue(leftOrRight, (isMovingRight) ? "left" : "right");
foreach(IntPtr window in BFS.Window.GetVisibleWindowHandles())
{
if(isMovingRight)
BFS.Window.MoveToNextMonitor(window);
else
BFS.Window.MoveToPreviousMonitor(window);
}
}
}