Example #1
0
        public EWFill(System.Drawing.Color color, EWPattern pattern = EWPattern.Solid)
        {
            _oxFill = new Fill();

            PatternFill patternFill3 = new PatternFill()
            {
                PatternType = pattern.As <PatternValues>()
            };
            ForegroundColor foregroundColor1 = new ForegroundColor()
            {
                Rgb = color.ToHexString()
            };

            //BackgroundColor backgroundColor1 = new BackgroundColor() { Indexed = (UInt32Value)64U };
            patternFill3.Append(foregroundColor1);
            //patternFill3.Append(backgroundColor1);
            _oxFill.Append(patternFill3);
        }
Example #2
0
 public static T As <T>(this EWPattern c) where T : struct
 {
     return((T)System.Enum.Parse(typeof(T), c.ToString(), false));
 }