コード例 #1
0
ファイル: FullScreen.cs プロジェクト: fuel9/DisplayMonkey
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }
コード例 #5
0
 private void makeFullscreenPanel(Canvas canvas)
 {
     canvas.Panels.Add(new FullScreen(db, canvas));
 }