Today I want to show you an example how easy it is, to connect to our eye tracker Skyle in a .NET 5 WPF project with C#. Since we released the SkyleAPI NuGet package two month ago, you can just start with our simple API implementation (https://www.nuget.org/packages/SkyleAPI/).
The goal here is: we want to see the current gaze point, do a simple calibration, and see our eye positions.
The first step is to create a new project in Visual Studio or with the .NET CLI. I will use the CLI in this quick introduction. Create a folder Skyle_Sample and create a new WPF project in it:
dotnet new wpf
Next, you want to add the SkyleAPI package:
dotnet add package SkyleAPI --version 1.0.0
You can compile the project:
Now we need to add some code. Since the project should have a small GUI, you can edit the MainWindow.xaml and add the sample code:
This sample code will just create three buttons and some shapes on a canvas.
For the MainWindow.xaml.cs I wrote some tiny program code that you can find here:
This code is as simple as possible. With just a few lines we can create a working GUI for calibration, positioning display and gaze display.
If you want to test this now, you can simply clone the whole code from GitHub:
2 Kommentare zu „A sample WPF C# client for Skyle“
Pingback: Skyle for Android - eyeV meets Bewatec
thanks for share a-sample-wpf-c-client-for-skyle