public FullScreen(DisplayMonkeyEntities _db, Canvas _canvas) : base(_db) { Left = 0; Top = 0; Height = _canvas.Height; Width = _canvas.Width; Name = Resources.FullScreen; Canvas = _canvas; init(_db); }
public ActionResult Edit(Canvas canvas) { if (ModelState.IsValid) { db.Entry(canvas).State = EntityState.Modified; db.SaveChanges(); return this.RestoreReferrer() ?? RedirectToAction("Index"); } fillSelectBackgroundImage(canvas.BackgroundImage); return View(canvas); }
public ActionResult Create(Canvas canvas) { if (ModelState.IsValid) { this.makeFullscreenPanel(canvas); db.Canvases.Add(canvas); db.SaveChanges(); return this.RestoreReferrer() ?? RedirectToAction("Index"); } fillSelectBackgroundImage(canvas.BackgroundImage); return View(canvas); }
private void makeFullscreenPanel(Canvas canvas) { Panel panel = new Panel() { Left = 0, Top = 0, Height = canvas.Height, Width = canvas.Width, Name = "Full-screen", // TODO: resource Canvas = canvas, }; FullScreen fullScreen = new FullScreen() { Canvas = canvas, Panel = panel, }; fullScreen.init(db); panel.FullScreens.Add(fullScreen); canvas.Panels.Add(panel); }
private void makeFullscreenPanel(Canvas canvas) { canvas.Panels.Add(new FullScreen(db, canvas)); }