Ejemplo n.º 1
0
        public ActionResult ChangeTheme()
        {
            List <string> ThemesListString = new List <string>();
            string        startupPath      = @"C:\Akce\Users\Content";

            try {
                string[] absoulte_paths = System.IO.Directory.GetFiles(startupPath, "*bootstra*.css");

                foreach (string path in absoulte_paths)
                {
                    ThemesListString.Add(path.Substring(path.LastIndexOf(@"\") + 1));
                }
            }
            catch (Exception e) {
                Error.toFile(e.Message.ToString(), this.GetType().Name.ToString());
            }
            MultiSelectList ThemesList = new MultiSelectList(ThemesListString);
            var             model      = new ChangeThemeModel {
                ThemesList = ThemesList
            };

            return(View(model));
        }
Ejemplo n.º 2
0
 public ActionResult ChangeTheme(ChangeThemeModel model)
 {
     Session["tempforview"] = "Theme: " + model.Theme + " has been successfully chosen.";
     return(View());
 }