Пример #1
0
        internal void Modify(Func <XLStyleKey, XLStyleKey> modification)
        {
            Key = modification(Key);

            if (_container != null)
            {
                _container.ModifyStyle(modification);
            }
        }
Пример #2
0
 internal XLStyleValue(XLStyleKey key)
 {
     Key          = key;
     Alignment    = XLAlignmentValue.FromKey(Key.Alignment);
     Border       = XLBorderValue.FromKey(Key.Border);
     Fill         = XLFillValue.FromKey(Key.Fill);
     Font         = XLFontValue.FromKey(Key.Font);
     NumberFormat = XLNumberFormatValue.FromKey(Key.NumberFormat);
     Protection   = XLProtectionValue.FromKey(Key.Protection);
 }
Пример #3
0
 internal XLStyleValue(XLStyleKey key)
 {
     Key = key;
     var(alignment, border, fill, font, _, numberFormat, protection) = Key;
     Alignment          = XLAlignmentValue.FromKey(ref alignment);
     Border             = XLBorderValue.FromKey(ref border);
     Fill               = XLFillValue.FromKey(ref fill);
     Font               = XLFontValue.FromKey(ref font);
     IncludeQuotePrefix = key.IncludeQuotePrefix;
     NumberFormat       = XLNumberFormatValue.FromKey(ref numberFormat);
     Protection         = XLProtectionValue.FromKey(ref protection);
 }
Пример #4
0
 public static XLStyleValue FromKey(XLStyleKey key)
 {
     return(Repository.GetOrCreate(key));
 }
Пример #5
0
 public XLStyle(IXLStylized container, XLStyleKey key) : this(container, XLStyleValue.FromKey(key))
 {
 }