Beispiel #1
0
        public MyStyleExtenstion(FormMain scopeFormMain, IContainer container) : base(container)
        {
            DesignConfig = scopeFormMain.DesignConfig;
            StylesDictionary.Add(fStyle.ConfigBasedStyle, _style);

            UpdateStyle();
            this.AllowUserResize = true;
            // this.ContextMenuForm = new ContextMenuStrip(new Container());

            Form      = scopeFormMain;
            FormStyle = fStyle.ConfigBasedStyle;
        }
Beispiel #2
0
        /////////////////////////////////////////////////////////////////////////////
        public void Add( string name, StylesDictionary styles )
        {
            // ******
            if( string.IsNullOrWhiteSpace( name ) ) {
                throw new ArgumentNullException( "name" );
            }

            if( null == styles ) {
                throw new ArgumentNullException( "styles" );
            }

            // ******
            var key = name;
            blockStyles [ key ] = styles;
        }
        public static IEnumerable <IBorderStyle> BorderStyles(this HtmlNode htmlNode)
        {
            var styles = new List <IBorderStyle>();

            if (htmlNode?.Attributes == null)
            {
                return(styles);
            }

            foreach (var attribute in htmlNode.Attributes)
            {
                if (StylesDictionary.Contains(attribute.Name))
                {
                    styles.Add(StylesDictionary.Get(attribute.Name));
                }
            }

            return(styles);
        }