Beispiel #1
0
 public void AddEyeTrackerData(EyeTrackerORM eyeTracker)
 {
     connection.Open();
     string commandText = @"INSERT INTO EyeTracker (Gaze_X, Gaze_Y, Time_Stamp, GameId)
                     VALUES (@GazeX, @GazeY, @Time_Stamp, @GameId)";
     SqlCeCommand command = new SqlCeCommand(commandText, connection);
         command.Parameters.AddWithValue("@GazeX", eyeTracker.GazeX);
     command.Parameters.AddWithValue("@GazeY", eyeTracker.GazeY);
     command.Parameters.AddWithValue("@Time_Stamp", eyeTracker.Time_Stamp);
     command.Parameters.AddWithValue("@GameId", eyeTracker.GameId);
     command.CommandText = commandText;
     command.ExecuteNonQuery();
     connection.Close();
 }
Beispiel #2
0
 private void saveETDataToDB(int xPos, int yPos)
 {
     DBWrapper db = new DBWrapper();
     EyeTrackerORM testData = new EyeTrackerORM(xPos, yPos, DateTime.Now, 1);//change game ids
     db.AddEyeTrackerData(testData);
 }