public void Insert(Exercise exercise, ExerciseQueue exerciseQueue) { var command = new SqliteCommand( "INSERT INTO ExerciseExerciseQueueConn (ExerciseId, ExerciseQueueId)" + "VALUES (@exerciseId, @exerciseQueueId)"); command.Parameters.Add(new SqliteParameter("exerciseId", exercise.Id)); command.Parameters.Add(new SqliteParameter("exerciseQueueId", exerciseQueue.Id)); Execute(command); }
public void Delete(Exercise exercise, ExerciseQueue exerciseQueue) { var command = new SqliteCommand( "DELETE ExerciseExerciseQueueConn" + "WHERE ExerciseId = @exerciseId " + "AND ExerciseQueueId = @exerciseQueueId"); command.Parameters.Add(new SqliteParameter("exerciseId", exercise.Id)); command.Parameters.Add(new SqliteParameter("exerciseQueueId", exerciseQueue.Id)); Execute(command); }
public ActionResult <ExerciseQueue> Insert(ExerciseQueue exerciseQueue) { _exerciseQueueRepository.Insert(exerciseQueue); return(CreatedAtAction("Insert", exerciseQueue)); }
public ActionResult <ExerciseQueue> Delete(ExerciseQueue exerciseQueue) { _exerciseQueueRepository.Delete(exerciseQueue); return(CreatedAtAction("Delete", true)); }
public KinectTherapyGame() { IsMouseVisible = true; Window.Title = "Kinect Therapy"; Keyboard.GetState(); _graphics = new GraphicsDeviceManager(this); _graphics.PreferredBackBufferWidth = WIDTH; _graphics.PreferredBackBufferHeight = (WIDTH / 4) * 3; _graphics.PreparingDeviceSettings += this.GraphicsDevicePreparingDeviceSettings; _graphics.SynchronizeWithVerticalRetrace = true; #if DEBUG _graphics.IsFullScreen = false; #else _graphics.IsFullScreen = true; #endif // this will give the viewport a border _viewPortRectangle = new Rectangle(10, 80, WIDTH - 20, ((WIDTH / 4) * 3) - 90); Content.RootDirectory = "Content"; #region Services _chooser = new KinectChooser(this, ColorImageFormat.RgbResolution640x480Fps30, DepthImageFormat.Resolution640x480Fps30); Services.AddService(typeof(KinectChooser), this._chooser); _skeletonPool = new SkeletonPool(this, SKELETON_POOL_SIZE); Services.AddService(typeof(SkeletonPool), _skeletonPool); _exerciseQueue = new ExerciseQueue(this); Services.AddService(typeof(ExerciseQueue), _exerciseQueue); _recordingManager = new RecordingManager(); Services.AddService(typeof(RecordingManager), _recordingManager); _catalogManager = new CatalogManager(); Services.AddService(typeof(CatalogManager), _catalogManager); #endregion #region Components _userInterfaceManager = new Manager(this); #endregion #region Screens _homeScreen = new HomeScreen(this, _viewPortRectangle, ScreenState.Active); _summaryScreen = new SummaryScreen(this, _viewPortRectangle, ScreenState.Hidden); _exerciseScreen = new ExerciseScreen(this, _viewPortRectangle, ScreenState.Hidden); _catalogScreen = new CatalogScreen(this, _viewPortRectangle, ScreenState.Hidden); _catalogTileEditScreen = new CatalogTileEditScreen( this, new Rectangle( 0, 0, _graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight ), ScreenState.Hidden ); _loadingScreen = new LoadingScreen( this, new Rectangle( 0, 0, _graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight ), ScreenState.Hidden ); _sensorTileEditScreen = new SensorTileEditScreen( this, new Rectangle( 0, 0, _graphics.PreferredBackBufferWidth, _graphics.PreferredBackBufferHeight ), ScreenState.Hidden ); #endregion }