/// <summary> /// The main entry point for the application. /// </summary> static void Main() { using (AnGame game = new AnGame()) { game.Run(); } }
public ActionResult DeleteConfirmed(int id) { AnGame anGame = db.AnGames.Find(id); db.AnGames.Remove(anGame); db.SaveChanges(); return(RedirectToAction("Index")); }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { NSApplication.Init(); using (var game = new AnGame()) { game.Run(); } }
public GamePage() { this.InitializeComponent(); // Create the game. var launchArguments = string.Empty; _game = MonoGame.Framework.XamlGame <AnGame> .Create(launchArguments, Window.Current.CoreWindow, swapChainPanel); }
public ActionResult Edit([Bind(Include = "GameId,Name,Description,Platform,ImgSrc,Price,DeveloperId,GenreID,ReviewId")] AnGame anGame) { if (ModelState.IsValid) { db.Entry(anGame).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.DeveloperId = new SelectList(db.AnDevelopers, "DeveloperId", "Name", anGame.DeveloperId); ViewBag.GenreID = new SelectList(db.AnGenres, "GenreID", "Name", anGame.GenreID); return(View(anGame)); }
// GET: AnGames/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AnGame anGame = db.AnGames.Find(id); if (anGame == null) { return(HttpNotFound()); } return(View(anGame)); }
// GET: AnGames/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AnGame anGame = db.AnGames.Find(id); if (anGame == null) { return(HttpNotFound()); } ViewBag.DeveloperId = new SelectList(db.AnDevelopers, "DeveloperId", "Name", anGame.DeveloperId); ViewBag.GenreID = new SelectList(db.AnGenres, "GenreID", "Name", anGame.GenreID); return(View(anGame)); }
public GamePage(string launchArguments) { this.InitializeComponent(); _game = XamlGame <AnGame> .Create(launchArguments, Window.Current.CoreWindow, this); }