public MNReferencedStyle FindStyle(string styleName) { MNReferencedStyle s = null; if (CurrentLanguage != null) { s = CurrentLanguage.FindStyle(styleName); } if (s != null) { return(s); } if (DefaultLanguage != null) { s = DefaultLanguage.FindStyle(styleName); } return(s); }
public void ReapplyStyles() { foreach (MNPage p in Data.Pages) { foreach (SMControl c in p.Objects) { MNReferencedStyle style = DefaultLanguage.FindStyle(c.StyleName); if (style != null) { c.ApplyStyle(style); } else { c.Font.Size = Math.Max(c.Font.Size, 12); } } } foreach (MNPage p in Data.Templates) { foreach (SMControl c in p.Objects) { MNReferencedStyle style = DefaultLanguage.FindStyle(c.StyleName); if (style != null) { c.ApplyStyle(style); } else { c.Font.Size = Math.Max(c.Font.Size, 12); } } } Book.Version = Math.Max(2, Book.Version); }