void InitSettings() { // instantiate the eye tracking controller eyeTrackingController = new EyeTrackingController.EyeTrackingController(); // define callbacks for data stream sampleCallback = new GetSampleCallback(GetSampleCallbackFunction); eyeTrackingController.iV_SetSampleCallback(sampleCallback); backgroundWorker = new BackgroundWorker(); backgroundWorker.WorkerReportsProgress = true; backgroundWorker.DoWork += new DoWorkEventHandler(CheckEyeTrackerStatus); backgroundWorker.ProgressChanged += new ProgressChangedEventHandler(StartEyeTracker); backgroundWorker.RunWorkerAsync(); Utils.AddDirectorySecurity(configPath, Environment.UserDomainName + "\\" + Environment.UserName, System.Security.AccessControl.FileSystemRights.FullControl, System.Security.AccessControl.AccessControlType.Allow); experimentLogHandler = new ConfigDataXMLSerializer <ExperimentLog>(configPath + settingsFile); experimentLogHandler.GetConfigs(out experimentLogs); if (experimentLogs == null) { experimentLogs = new ExperimentLog(0); } LoadImages(); pictureBox.Location = new Point(this.Width / 2 - pictureBox.Width / 2, this.Height / 2 - (int)(pictureBox.Height * (float)(0.8))); flowLayoutPanel2.Location = new Point(this.Width / 2 - flowLayoutPanel2.Width / 2, this.Height - flowLayoutPanel2.Height - panel1.Height * 3); panel1.Location = new Point(this.Width / 2 - panel1.Width / 2, this.Height - panel1.Height * 4); groupBox1.Location = new Point(this.Width / 2 - groupBox1.Width / 2, (this.Height - groupBox1.Height) / 2); groupBox1.Visible = false; }
/// <summary> /// Initializes this instance. /// </summary> public void initialize() { ETDevice = new EyeTrackingController(); m_CalibrationCallback = new CalibrationCallback(CalibrationCallbackFunction); m_SampleCallback = new GetSampleCallback(GetSampleCallbackFunction); m_EventCallback = new GetEventCallback(GetEventCallbackFunction); m_EyeImageCallback = new GetEyeImageCallback(GetEyeImageCallbackFunction); m_SceneVideoCallback = new GetSceneVideoCallback(GetSceneVideoCallbackFunction); m_TrackingMonitorCallback = new GetTrackingMonitorCallback(GetTrackingMonitorCallbackFunction); }
private void SmiSample_Load(object sender, EventArgs e) { ETDevice = new EyeTrackingController.EyeTrackingController(); m_CalibrationCallback = new CalibrationCallback(CalibrationCallbackFunction); m_SampleCallback = new GetSampleCallback(GetSampleCallbackFunction); m_EventCallback = new GetEventCallback(GetEventCallbackFunction); m_EyeImageCallback = new GetEyeImageCallback(GetEyeImageCallbackFunction); m_SceneVideoCallback = new GetSceneVideoCallback(GetSceneVideoCallbackFunction); m_TrackingMonitorCallback = new GetTrackingMonitorCallback(GetTrackingMonitorCallbackFunction); }
private void Form1_Load(object sender, EventArgs e) { //Schritt 06: ETDevice = new EyeTrackingController.EyeTrackingController(); //Schritt 07: m_SampleCallback = new GetSampleCallback(GetSampleCallbackFunction); //Schritt 08: mit EyeTracker verbinden ETDevice.iV_ConnectLocal(); }
public GazeController() { //Init the Controller ETDevice = new EyeTrackingController.EyeTrackingController(); //Init the Callbacks calibrationCallback = new CalibrationCallback(getCalibration); sampleDataCallback = new GetSampleCallback(getSampleData); eyeImageCallback = new GetEyeImagedata(getEyeImagedata); trackingMonitorCallback = new GetTrackingMonitor(getTrackingMonitordata); setCallbacks(); ETDevice.iV_EnableGazeDataFilter(); }
private void Window_Initialized(object sender, EventArgs e) { try { ETDevice = new EyeTrackingController.EyeTrackingController(); m_CalibrationWindow = new CalibrationSample(); m_CalibrationCallback = new CalibrationCallback(CalibrationCallbackFunction); m_SampleCallback = new GetSampleCallback(GetSampleCallbackFunction); m_EventCallback = new GetEventCallback(GetEventCallbackFunction); } catch (System.Exception exc) { logger4.Text = "Exception: " + exc.Message; } }
public override void Connect() { ValidateSettings(); int ret = 0; try { ETDevice = new EyeTrackingController.EyeTrackingController(); ETDevice.iV_SetLogger(0, new StringBuilder(this.GetType().Name + ".txt")); calibrationCallbackDelegate = new CalibrationCallback(CalibrationCallbackFunction); sampleCallbackDelegate = new GetSampleCallback(GetSampleCallbackFunction); ETDevice.iV_SetCalibrationCallback(calibrationCallbackDelegate); ETDevice.iV_SetSampleCallback(sampleCallbackDelegate); // connect to server DebugLog.Info("SMI Eye Tracker: Connect"); ret = ETDevice.iV_Connect( new StringBuilder(ServerSendAddress), ServerSendPort, new StringBuilder(ServerRecvAddress), ServerRecvPort); if (ret == 1) { DebugLog.Info("EyeTracker connection established: {0}:{1}", ServerRecvAddress, ServerRecvPort); IsConnected = true; } else { throw new Exception("Unable to connect. " + GetErrorMessage(ret)); } } catch (Exception e) { throw new Exception(string.Format("Unable to connect SMI server ({0}:{1}). {2}", ServerRecvAddress, ServerRecvPort, e.Message)); } }
public override void Connect() { ValidateSettings(); int ret = 0; try { ETDevice = new EyeTrackingController.EyeTrackingController(); ETDevice.iV_SetLogger(0, new StringBuilder(this.GetType().Name + ".txt")); calibrationCallbackDelegate = new CalibrationCallback(CalibrationCallbackFunction); sampleCallbackDelegate = new GetSampleCallback(GetSampleCallbackFunction); ETDevice.iV_SetCalibrationCallback(calibrationCallbackDelegate); ETDevice.iV_SetSampleCallback(sampleCallbackDelegate); // connect to server DebugLog.Info("SMI Eye Tracker: Connect"); ret = ETDevice.iV_Connect( new StringBuilder(ServerSendAddress), ServerSendPort, new StringBuilder(ServerRecvAddress), ServerRecvPort); if (ret == 1) { DebugLog.Info("EyeTracker connection established: {0}:{1}", ServerRecvAddress, ServerRecvPort); IsConnected = true; } else { throw new Exception("Unable to connect. " + GetErrorMessage(ret)); } } catch (Exception e) { throw new Exception(string.Format("Unable to connect SMI server ({0}:{1}). {2}", ServerRecvAddress, ServerRecvPort, e.Message)); } }
public void startDataFeedback() { m_SampleCallback = new GetSampleCallback(GetSampleCallbackFunction); ETDevice.iV_SetSampleCallback(m_SampleCallback); }
public void startDataFeedback() { m_SampleCallback = new GetSampleCallback(GetSampleCallbackFunction); ETDevice.iV_SetSampleCallback(m_SampleCallback); }
/// <summary> /// Initializes this instance. /// </summary> public void initialize() { ETDevice = new EyeTrackingController(); m_CalibrationCallback = new CalibrationCallback(CalibrationCallbackFunction); m_SampleCallback = new GetSampleCallback(GetSampleCallbackFunction); m_EventCallback = new GetEventCallback(GetEventCallbackFunction); m_EyeImageCallback = new GetEyeImageCallback(GetEyeImageCallbackFunction); m_SceneVideoCallback = new GetSceneVideoCallback(GetSceneVideoCallbackFunction); m_TrackingMonitorCallback = new GetTrackingMonitorCallback(GetTrackingMonitorCallbackFunction); }