private void Timer1_Tick(object sender, EventArgs e) { foreach (Point item in Univers.CheckAllives()) { Redraw(item); } }
public void createUniver(string n, string t) { Univers un = new Univers(); un.NameOfUniver = n; un.Town = t; unitOfWork.Univers.Create(un); }
public void Delete(int id) { Univers univer = db.Univers.Find(id); if (univer != null) { db.Univers.Remove(univer); } }
public IActionResult GetFaculties(Int32 Id) { IEnumerable <Faculties> Faculties = fS.getAllFaculties().Where(t => t.UniversId == Id); Univers Uni = unvS.getAllUnivers().Where(t => t.Id == Id).First(); string qwe = Uni.NameOfUniver; ViewBag.ChoisenUniver = qwe; return(View("FacultyList", Faculties.ToList())); }
public JsonResult Post([FromBody] string NameOfUniver, [FromBody] string NameOfFaculty) { Univers choisenUniver = uS.getUniverByName(NameOfUniver); List <Faculties> facultiesOfUniver = new List <Faculties>(fS.getFacultiesOfUniver(choisenUniver.Id)); Faculties choisenFaculty = facultiesOfUniver.First(c => c.NameOfFaculties == NameOfFaculty); return(Json(sS.getSubjectsOfFaculty(choisenFaculty.Id))); }
public JsonResult Get(String Univer) { if (Univer != null) { Univers q = uS.getUniverByName(Univer); return(Json(fS.getFacultiesOfUniver(q.Id))); } else { return(Json(fS.getAllFaculties())); } }
private void Universe_MouseClick(object sender, MouseEventArgs e) { Point inLocal = new Point(e.Location.X / Scale, e.Location.Y / Scale); switch (e.Button) { case MouseButtons.Left: Univers.SetAlliveCell(inLocal); break; case MouseButtons.Right: Univers.SetDeadCell(inLocal); break; default: break; } Redraw(inLocal); }
private void Form1_KeyDown(object sender, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Space: ChangePauseState(); break; case Keys.Tab: foreach (Point item in Univers.Clear()) { Redraw(item); } break; default: break; } }
public async Task <IActionResult> EditUniver(int id, [Bind("Id,NameOfUniver, Town")] Univers univer) { if (id != univer.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(univer); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { throw; } return(RedirectToAction(nameof(Index))); } return(View(univer)); }
public void Update(Univers univer) { db.Entry(univer).State = EntityState.Modified; }
public void Create(Univers univer) { db.Univers.Add(univer); }
public ModulAction(Univers univers) { this.univers = univers; this.univers.modAct = this; }