Ejemplo n.º 1
0
        public ActionResult Layout(int id)
        {
            var model = new LayoutVM();

            //Get layout by id then send populate model.Layout

            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult ExternalLoginFailure()
        {
            LayoutVM model = new LayoutVM();
            var      repo  = RepositoryFactory.GetRepository();

            model.Categories  = repo.GetAllCategories();
            model.StaticPosts = repo.GetAllStaticPublished();

            return(View(model));
        }
Ejemplo n.º 3
0
        public ActionResult ResetPasswordConfirmation()
        {
            LayoutVM model = new LayoutVM();
            var      repo  = RepositoryFactory.GetRepository();

            model.Categories  = repo.GetAllCategories();
            model.StaticPosts = repo.GetAllStaticPublished();

            return(View(model));
        }
Ejemplo n.º 4
0
        public ActionResult Publish()
        {
            var model = new LayoutVM();

            model.Layouts = new List <Layouts>();

            //Get list of layouts from layout manager and populate model.Layouts


            //TRASH THIS TEST DATA BELOW
            Layouts layout1 = new Layouts
            {
                LayoutId       = 1,
                LayoutName     = "Crap",
                ColorMain      = "Red",
                ColorSecondary = "Blue",
                LogoImageFile  = "placeholder.png",
                HeaderTitle    = "Crappy layout",
                BannerText     = "This is the crappy layout",
                IsActive       = true
            };

            Layouts layout2 = new Layouts
            {
                LayoutId       = 2,
                LayoutName     = "Nice",
                ColorMain      = "Green",
                ColorSecondary = "Black",
                LogoImageFile  = "placeholder2.png",
                HeaderTitle    = "Nice layout",
                BannerText     = "This is the nice layout",
                IsActive       = false
            };

            Layouts layout3 = new Layouts
            {
                LayoutId       = 3,
                LayoutName     = "Lovely",
                ColorMain      = "Yellow",
                ColorSecondary = "Purple",
                LogoImageFile  = "placeholder3.png",
                HeaderTitle    = "Lovely layout",
                BannerText     = "This is the lovely layout",
                IsActive       = false
            };

            model.Layouts.Add(layout1);
            model.Layouts.Add(layout2);
            model.Layouts.Add(layout3);

            return(View(model));
        }
Ejemplo n.º 5
0
 public override void InitLayout()
 {
     LayoutVM
     .StartLayout(120)
     .TopStack()
     .AddInput("Value1", "Value1 : ", "")
     .AddInput("Value2", "Value2 : ", "")
     .EndStack()
     .BottomStack()
     .AddInputReadOnly("Result", "Result : ", "", TextSizeType.Medium)
     .AddButton("Sum", "Sum", Sum)
     .EndStack()
     .EndLayout();
 }
Ejemplo n.º 6
0
 public ActionResult AddLayout(LayoutVM model)
 {
     try
     {
         if (model.LogoImage.ContentLength > 0)
         {
             model.Layout.LogoImageFile = Path.GetFileName(model.LogoImage.FileName);
             var path = Path.Combine(Server.MapPath("~/Images/Layout/Logo/"), model.Layout.LogoImageFile);
             model.LogoImage.SaveAs(path);
         }
         return(RedirectToAction("Index", "Home", null));
     }
     catch (Exception ex)
     {
         throw new ApplicationException("Something wrong happened while adding a review:", ex);
     }
 }
Ejemplo n.º 7
0
 protected BaseScreenGenericVM(IInitDisposeManager initDisposeManager, IScreenContainerVM parent)
     : base(initDisposeManager, parent)
 {
     LayoutVM = new LayoutVM(this);
 }
Ejemplo n.º 8
0
 private void Sum()
 {
     LayoutVM.SetValue("Result", SumService.Sum(LayoutVM.GetValue("Value1"), LayoutVM.GetValue("Value2")));
 }