Home › Forums › Software Development › Differences between EyeX.Framework and Interactions › Reply To: Differences between EyeX.Framework and Interactions
I have been looking into examples and it seems if I want to detect user presence and trigger the calibration I need the new SDK.
In order to migrate from the old SDK, is the VirtualInteractorAgent the equivalent of the old BehaviorMap?
I have a form that contains 3 buttons and I want to detect the OnGaze and LostGaze. Does that look like is the correct approach?
var virtualWindowsAgent = _eyeXHost.InitializeVirtualWindowsAgent();
var floatingWindow = virtualWindowsAgent.CreateFreeFloatingVirtualWindowAsync(
“MyFreeFloatingWindow”,
new Tobii.Interaction.Rectangle
{
X = form.bounds.left,
Y = form.bounds.bottom,
Height = form.height,
Width = form.width
}).Result;
var virtualAgent = _eyeXHost.InitializeVirtualInteractorAgent(floatingWindow.Id);
foreach (button in buttonList)
{
virtualAgent.AddInteractorFor(new Rectangle(button.Left, button.Bottom, button.Width, button.Height))
.WithGazeAware()
.HasGaze(() => OnGaze(button, null))
.LostGaze(() => LostGaze(button, null));
}