Beispiel #1
0
 private void RemoveThemeCss()
 {
     foreach (var theme in Themes.List(ThemeTypes.Site))
     {
         if (theme.IsConfigurationBased)
         {
             ThemeFiles.Remove(theme, ThemeContexts.Site, ThemeProperties.CssFiles, "custom-editor.css");
             ThemeFiles.RemoveFactoryDefault(theme, ThemeProperties.CssFiles, "custom-editor.css");
         }
     }
 }
Beispiel #2
0
 private void UpdateThemeCss(string getString)
 {
     foreach (var theme in Themes.List(ThemeTypes.Site))
     {
         if (theme.IsConfigurationBased)
         {
             using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(getString)))
             {
                 ThemeFiles.AddUpdateFactoryDefault(theme, ThemeProperties.CssFiles, "custom-editor.css", stream, (int)stream.Length);
                 stream.Seek(0, SeekOrigin.Begin);
                 ThemeFiles.AddUpdate(theme, ThemeContexts.Site, ThemeProperties.CssFiles, "custom-editor.css", stream, (int)stream.Length);
             }
         }
     }
 }