コード例 #1
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main()
 {
     using (AnGame game = new AnGame())
     {
         game.Run();
     }
 }
コード例 #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            AnGame anGame = db.AnGames.Find(id);

            db.AnGames.Remove(anGame);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #3
0
ファイル: Main.cs プロジェクト: SteveProXNA/SimpsonsTrivia
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            NSApplication.Init();

            using (var game = new AnGame())
            {
                game.Run();
            }
        }
コード例 #4
0
        public GamePage()
        {
            this.InitializeComponent();

            // Create the game.
            var launchArguments = string.Empty;

            _game = MonoGame.Framework.XamlGame <AnGame> .Create(launchArguments, Window.Current.CoreWindow, swapChainPanel);
        }
コード例 #5
0
 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));
 }
コード例 #6
0
        // 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));
        }
コード例 #7
0
        // 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));
        }
コード例 #8
0
        public GamePage(string launchArguments)
        {
            this.InitializeComponent();

            _game = XamlGame <AnGame> .Create(launchArguments, Window.Current.CoreWindow, this);
        }