Skip to content

Commit 90e2a72

Browse files
author
Codex
committed
Add friendly bounds setup window
1 parent a42e287 commit 90e2a72

6 files changed

Lines changed: 398 additions & 3 deletions

File tree

EyeLog/Bound.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ internal class Bound
1212
int y;
1313
int width;
1414
int height;
15+
public int X => x;
16+
public int Y => y;
17+
public int Width => width;
18+
public int Height => height;
1519
public Bound(int x, int y, int width, int height)
1620
{
1721
this.x = x;

EyeLog/EyeLog.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
<Compile Include="State\ClientRegistry.cs" />
9595
<Compile Include="State\ClientState.cs" />
9696
<Compile Include="State\GazeSample.cs" />
97+
<Compile Include="Tray\ClientSetupForm.cs" />
9798
<Compile Include="Tray\SingleInstance.cs" />
9899
<Compile Include="Tray\TrayApp.cs" />
99100
</ItemGroup>

EyeLog/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private static void Main()
3232
var server = new HttpServer(options, registry, gazeState, logBuffer);
3333

3434
using (var gazeService = new TobiiGazeService())
35-
using (var trayApp = new TrayApp(server, options, logBuffer))
35+
using (var trayApp = new TrayApp(server, options, logBuffer, registry))
3636
{
3737
try
3838
{

EyeLog/State/ClientState.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,33 @@ public void SetClickTimeout(int timeoutMs)
4747
}
4848
}
4949

50+
public int GetClickTimeout()
51+
{
52+
lock (sync)
53+
{
54+
return ClickTimeoutMs;
55+
}
56+
}
57+
58+
public List<BoundDto> GetBoundsSnapshot()
59+
{
60+
lock (sync)
61+
{
62+
var snapshot = new List<BoundDto>();
63+
foreach (var bound in Bounds)
64+
{
65+
snapshot.Add(new BoundDto
66+
{
67+
X = bound.X,
68+
Y = bound.Y,
69+
Width = bound.Width,
70+
Height = bound.Height
71+
});
72+
}
73+
return snapshot;
74+
}
75+
}
76+
5077
public void AddBoundsSocket(WebSocket socket)
5178
{
5279
lock (sync)

0 commit comments

Comments
 (0)