Home Forums Software Development [Solved] Project building with several errors when using EyeXFramework Reply To: [Solved] Project building with several errors when using EyeXFramework

#1714
Siddarth
Participant

Yes, those are the ones I tried, but the keywords are still red-underlined. Here is my code below. The keywords void, [], args, EyeXHost and GazePointDataStream are unresolved. If I remove the Main method statement to run it as a script (not even sure if that’s possible because I’ve never used C# before), EyeXHost and GazePointDataStream are still not resolved. Any ideas?

using EyeXFramework;
using System;
using Tobii.EyeX.Client;
using Tobii.EyeX.Framework;
using System.Text;

public static void Main(string[] args)
{
using (var eyeXHost = new EyeXHost())
{
eyeXHost.Start();

// Create a data stream: lightly filtered gaze point data.

using (var lightlyFilteredGazeDataStream = eyeXHost.CreateDataStream(new GazePointDataStream(GazePointDataMode.LightlyFiltered))

// using (var stream = eyeXHost.CreateDataStream(new EyePositionDataStream(EyePositionDataMode.LightlyFiltered))

{
// Write the data to the console.

lightlyFilteredGazeDataStream.Next += (s, e) => Console.WriteLine(“Gaze point at ({0:0.0}, {1:0.0}) @{2:0}”, e.X, e.Y, e.Timestamp);

// stream.Next += (s,e) => Console.WriteLine(“Eye position at

// Let it run until a key is pressed.

Console.WriteLine(“Listening for gaze data, press any key to exit…”);
Console.In.Read();
}
}
}