public IHttpActionResult PutInstrumentMaster(long id, InstrumentMaster instrumentMaster)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != instrumentMaster.instrument_id)
            {
                return(BadRequest());
            }

            db.InsertOrUpdate(instrumentMaster);

            try
            {
                db.Save();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!InstrumentMasterExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
Ejemplo n.º 2
0
        public Player(Game game) : base(game)
        {
            Game.Services.RemoveService(typeof(IPlayerService));
            Game.Services.AddService(typeof(IPlayerService), this);

            _instrument = InstrumentMaster.GetSingleton().GetInstrument("LGT");

            smoke = new SmokePlumeParticleSystem(game, 50);
            game.Components.Add(smoke);
        }
        public IHttpActionResult GetInstrumentMaster(long id)
        {
            InstrumentMaster instrumentMaster = db.Find(id);

            if (instrumentMaster == null)
            {
                return(NotFound());
            }

            return(Ok(instrumentMaster));
        }
        public IHttpActionResult PostInstrumentMaster(InstrumentMaster instrumentMaster)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.InsertOrUpdate(instrumentMaster);
            db.Save();

            return(CreatedAtRoute("DefaultApi", new { id = instrumentMaster.instrument_id }, instrumentMaster));
        }
Ejemplo n.º 5
0
 public void InsertOrUpdate(InstrumentMaster instrumentmaster)
 {
     if (instrumentmaster.instrument_id == default(long))
     {
         // New entity
         context.InstrumentMasters.Add(instrumentmaster);
     }
     else
     {
         // Existing entity
         context.Entry(instrumentmaster).State = System.Data.Entity.EntityState.Modified;
     }
 }
        public IHttpActionResult DeleteInstrumentMaster(long id)
        {
            InstrumentMaster instrumentMaster = db.Find(id);

            if (instrumentMaster == null)
            {
                return(NotFound());
            }

            db.Delete(id);
            db.Save();

            return(Ok(instrumentMaster));
        }
Ejemplo n.º 7
0
        Microsoft.Xna.Framework.Media.VideoPlayer introVideo = null; // 4.0change

        public RhythmGame()
        {
            graphics = new GraphicsDeviceManager(this);
            graphics.PreferredBackBufferHeight = 600;
            graphics.PreferredBackBufferWidth  = 800; // btftest

            Content.RootDirectory = "Content";

            Services.AddService(typeof(ISpriteBatchService), this);

            InstrumentMaster.CreateSingleton();
            GameInstance = this;
            //this.IsFixedTimeStep = false;
            State            = GameStateType.None;
            ActivePlugin     = new NoPlugin();
            _backgroundTimer = TimeSpan.Zero;
            //_videoContentManager = new VideoContentManager(Services);

#if DEMO_MODE
            this.graphics.IsFullScreen = true;
#else
            this.graphics.IsFullScreen = false;
#endif
        }