private void SaveSettingsCollectionStylesCss()
{
string path = FolderPath.CombineForPath("settingsCollectionStyles.css");
try
{
var sb = new StringBuilder();
sb.AppendLine("/* These styles are controlled by the Settings dialog box in Bloom. */");
sb.AppendLine("/* They many be over-ridden by rules in customCollectionStyles.css or customBookStyles.css */");
AddFontCssRule(sb, "BODY", GetDefaultFontName(), 0);
AddFontCssRule(sb, "[lang='" + Language1Iso639Code + "']", DefaultLanguage1FontName, Language1LineHeight);
AddFontCssRule(sb, "[lang='" + Language2Iso639Code + "']", DefaultLanguage2FontName, Language2LineHeight);
if (!string.IsNullOrEmpty(Language3Iso639Code))
{
AddFontCssRule(sb, "[lang='" + Language3Iso639Code + "']", DefaultLanguage3FontName, Language3LineHeight);
}
AddNumberingStyleCssRule(sb, PageNumberStyle);
RobustFile.WriteAllText(path, sb.ToString());
}
catch (Exception error)
{
SIL.Reporting.ErrorReport.NotifyUserOfProblem(error, "Bloom was unable to update this file: {0}",path);
}
}