private void Form1_Load(object sender, EventArgs e) { //this.WindowState = FormWindowState.Maximized; this.Size = new Size(1500, 800); // Ресуем финиш finish = new Finish(this); // Рисуем игрока Player = new Model1(); // Отображаем все label1.Text = Convert.ToString(Player.life); // Отображаем жизни pictureBoxMain.Controls.Add(Player.Player); pictureBoxMain.Controls.Add(finish.finish); // Окружение min = new Mines(); tree = new Trees(); rocks = new Rock(); // Минируем поле min.Mining(this, pictureBoxMain, Envi); // Размещаем деревья tree.Landing(this, pictureBoxMain, Envi); // Камни rocks.Resp(this, pictureBoxMain, Envi); Game_time.Start(); Bombs.Start(); Respawn_enemies.Start(); }
public ActionResult DeleteConfirmed(int id) { Game_time game_time = db.Game_time.Find(id); db.Game_time.Remove(game_time); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "PlayerId,AppointmentId,TimeFrom,TimeTo")] Game_time game_time) { if (ModelState.IsValid) { db.Entry(game_time).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.AppointmentId = new SelectList(db.Appointment, "Id", "Id", game_time.AppointmentId); ViewBag.PlayerId = new SelectList(db.Player, "Id", "FirstName", game_time.PlayerId); return(View(game_time)); }
// GET: Game_time/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Game_time game_time = db.Game_time.Find(id); if (game_time == null) { return(HttpNotFound()); } return(View(game_time)); }
// GET: Game_time/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Game_time game_time = db.Game_time.Find(id); if (game_time == null) { return(HttpNotFound()); } ViewBag.AppointmentId = new SelectList(db.Appointment, "Id", "Id", game_time.AppointmentId); ViewBag.PlayerId = new SelectList(db.Player, "Id", "FirstName", game_time.PlayerId); return(View(game_time)); }