Ready for Review - [Mouse Without Borders] - refactoring "Common" classes (Part 3) - #35155 (#36950)

* [MWB] - refactoring MachineInf from Common.MachineStuff.cs into MachineInf.cs - #35155

* [MWB] - fixing references to MachineInf - #35155

* [MWB] - cleaning up MachineInf.cs - #35155

* [MWB] - moving MyRectangle from Common.MachineStuff.cs into MyRectangle.cs - #35155

* [MWB] - cleaning up MyRectangle.cs - #35155

* [MWB] - moving Common.MachineStuff.cs to MachineStuff.cs - #35155

* [MWB] - fixing references to MachineStuff - #35155

* [MWB] - cleaning up MachineStuff.cs - #35155

* [MWB] - cleaning up MachineStuff.cs - #35155

* [MWB] - moving Common.DragDrop.cs to DragDrop.cs - #35155

* [MWB] - fixing references to DragDrop - #35155

* [MWB] - fixing unit test - #35155

* [MWB] - cleaning up DragDrop.cs - #35155

* [MWB] - cleaning up DragDrop.cs - #35155
This commit is contained in:
Michael Clayton
2025-02-21 08:31:44 +00:00
committed by GitHub
parent 273a45ff1f
commit 6515374ce9
32 changed files with 1889 additions and 1845 deletions

View File

@@ -68,11 +68,6 @@ avgSendTime = 0
maxSendTime = 0
totalSendCount = 0
totalSendTime = 0
isDragging = False
dragDropStep05ExCalledByIpc = 0
isDropping = False
dragMachine = NONE
<MouseDown>k__BackingField = False
magicNumber = 0
ran = System.Random
--_impl = System.Random+XoshiroImpl
@@ -163,35 +158,6 @@ ReopenSocketDueToReadError = False
--MaxValue = 31/12/9999 23:59:59
--UnixEpoch = 01/01/1970 00:00:00
lastReleaseAllKeysCall = 0
McMatrixLock = Lock
--_owningThreadId = 0
--_state = 0
--_recursionCount = 0
--_spinCount = 22
--_waiterStartTimeMs = 0
--s_contentionCount = 0
--s_maxSpinCount = 22
--s_minSpinCountForAdaptiveSpin = -100
desMachineID = NONE
DesMachineName =
newDesMachineID = NONE
newDesMachineIdEx = NONE
dropMachineID = NONE
lastJump = ????????????
desktopBounds = MouseWithoutBorders.MyRectangle
--Left = 0
--Top = 0
--Right = 0
--Bottom = 0
primaryScreenBounds = MouseWithoutBorders.MyRectangle
--Left = 0
--Top = 0
--Right = 0
--Bottom = 0
SwitchLocation = MouseWithoutBorders.Class.MouseLocation
--<X>k__BackingField = 0
--<Y>k__BackingField = 0
--<Count>k__BackingField = 0
PackageSent = MouseWithoutBorders.PackageMonitor
--Keyboard = 0
--Mouse = 0
@@ -259,11 +225,6 @@ SymAlBlockSize = 16
PW_LENGTH = 16
HELPER_FORM_TEXT = Mouse without Borders Helper
HelperProcessName = PowerToys.MouseWithoutBordersHelper
MAX_MACHINE = 4
MAX_SOCKET = 8
HEARTBEAT_TIMEOUT = 1500000
SKIP_PIXELS = 1
JUMP_PIXELS = 2
PACKAGE_SIZE = 32
PACKAGE_SIZE_EX = 64
WP_PACKAGE_SIZE = 6
@@ -358,6 +319,49 @@ MAX_LOG = 10000
MaxLogExceptionPerHour = 1000
HeaderSENT = Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},Ie{12},Ni{13}
HeaderRECEIVED = Be{0},Ke{1},Mo{2},He{3},Mx{4},Tx{5},Im{6},By{7},Cl{8},Dr{9},De{10},Ed{11},In{12},Ni{13},Pc{14}/{15}
[DragDrop]
===============
isDragging = False
dragDropStep05ExCalledByIpc = 0
isDropping = False
dragMachine = NONE
<MouseDown>k__BackingField = False
[MachineStuff]
===============
McMatrixLock = Lock
--_owningThreadId = 0
--_state = 0
--_recursionCount = 0
--_spinCount = 22
--_waiterStartTimeMs = 0
--s_contentionCount = 0
--s_maxSpinCount = 22
--s_minSpinCountForAdaptiveSpin = -100
desMachineID = NONE
DesMachineName =
newDesMachineID = NONE
newDesMachineIdEx = NONE
dropMachineID = NONE
lastJump = ????????????
desktopBounds = MouseWithoutBorders.Core.MyRectangle
--Left = 0
--Top = 0
--Right = 0
--Bottom = 0
primaryScreenBounds = MouseWithoutBorders.Core.MyRectangle
--Left = 0
--Top = 0
--Right = 0
--Bottom = 0
SwitchLocation = MouseWithoutBorders.Class.MouseLocation
--<X>k__BackingField = 0
--<Y>k__BackingField = 0
--<Count>k__BackingField = 0
MAX_MACHINE = 4
MAX_SOCKET = 8
HEARTBEAT_TIMEOUT = 1500000
SKIP_PIXELS = 1
JUMP_PIXELS = 2
[Receiver]
===============
QUEUE_SIZE = 50

View File

@@ -120,6 +120,10 @@ public static class LoggerTests
_ = Logger.PrivateDump(sb, new Common(), "[Other Logs]\r\n===============\r\n", 0, settingsDumpObjectsLevel, false);
sb.AppendLine("[Logger]\r\n===============");
Logger.DumpType(sb, typeof(Logger), 0, settingsDumpObjectsLevel);
sb.AppendLine("[DragDrop]\r\n===============");
Logger.DumpType(sb, typeof(DragDrop), 0, settingsDumpObjectsLevel);
sb.AppendLine("[MachineStuff]\r\n===============");
Logger.DumpType(sb, typeof(MachineStuff), 0, settingsDumpObjectsLevel);
sb.AppendLine("[Receiver]\r\n===============");
Logger.DumpType(sb, typeof(Receiver), 0, settingsDumpObjectsLevel);
var actual = sb.ToString();