Esempio n. 1
0
        public void StyleSheetChange(string sheetName)
        {
            IStyleSheet styleSheet  = null;
            var         styleSheets = Registry.Pooled <StyleSheets> ();

            if (!styleSheets.TryGetValue(sheetName, out styleSheet))
            {
                var style = StyleSheet.CreateStyleWithSystemSettings();
                styleSheet = new StyleSheet(sheetName, style);
                styleSheets.Add(styleSheet.Name, styleSheet);
            }
            var currentDisplay = this.CurrentDisplay;

            if (currentDisplay != null)
            {
                currentDisplay.StyleSheet = styleSheet;
                currentDisplay.BackendRenderer.Render();
                CurrentStyleSheet = styleSheet;
            }
        }