using System;
using System.Drawing;
public static class DisplayFusionFunction
{
public static void Run(IntPtr windowHandle)
{
BFS.Window.Focus(BFS.Window.GetWindowByClass("WorkerW"));
//Get the mouse X,Y values (获取鼠标的XY值)
int x = BFS.Input.GetMousePositionX();
int y = BFS.Input.GetMousePositionY();
//Get the current monitor ID that the mouse is on (通过鼠标位置获取当前的监视器ID)
uint currentMonitor = BFS.Monitor.GetMonitorIDByXY(x, y);
//Get all monitor IDs (获取所有监视器ID)
uint[] ids = BFS.Monitor.GetMonitorIDs();
//Find the current monitor in the array (查找我们在监视器ID数组中的位置)
int index = -1;
for(int i = 0; i < ids.Length; i++)
{
if(ids[i] != currentMonitor)
continue;
index = i;
break;
}
//If index isn't found, exit script (如果找不到索引,请退出脚本)
if(index == -1)
return;
//Find the next monitor ID (查找下一个监视器ID)
uint nextMonitorID = ids[++index % ids.Length];
var mBounds = BFS.Monitor.GetMonitorBoundsByID(nextMonitorID);
BFS.Input.SetMousePosition(mBounds.X, mBounds.Y);
BFS.Input.SetMousePosition(mBounds.X + 800, mBounds.Y + 600);
}
}