예제 #1
0
파일: DBWrapper.cs 프로젝트: shalse/HARE_ET
 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();
 }
예제 #2
0
파일: MainForm.cs 프로젝트: shalse/HARE_ET
 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);
 }