/// <summary>
        /// Binds the grid.
        /// </summary>
        private void BindGrid()
        {
            DirectoryInfo themeDirectory = new DirectoryInfo(HttpRuntime.AppDomainAppPath + "Themes");

            var themes = RockTheme.GetThemes();

            var sortProperty = gThemes.SortProperty;

            if (sortProperty != null)
            {
                switch (sortProperty.Property)
                {
                case "Name":
                {
                    if (sortProperty.Direction == SortDirection.Ascending)
                    {
                        themes = themes.OrderBy(t => t.Name).ToList();
                    }
                    else
                    {
                        themes = themes.OrderByDescending(t => t.Name).ToList();
                    }
                    break;
                }
                }
            }

            gThemes.DataSource = themes.ToList();
            gThemes.DataBind();
        }
Example #2
0
 public void OnStartup()
 {
     foreach (var theme in RockTheme.GetThemes())
     {
         string themeMessage = string.Empty;
         bool   themeSuccess = theme.CompileSass(out themeMessage);
     }
 }