public override void CopyFrom(BindableObject bindableObject) { base.CopyFrom(bindableObject); TabStyle tabStyle = bindableObject as TabStyle; if (null != tabStyle) { if (null != tabStyle.ItemPadding) { ItemPadding?.CopyFrom(tabStyle.ItemPadding); } ItemSpace = tabStyle.ItemSpace; UseTextNaturalSize = tabStyle.UseTextNaturalSize; if (null != tabStyle.UnderLine) { UnderLine?.CopyFrom(tabStyle.UnderLine); } if (null != tabStyle.Text) { Text?.CopyFrom(tabStyle.Text); } } }
public override void CopyFrom(BindableObject bindableObject) { base.CopyFrom(bindableObject); if (bindableObject is TabStyle tabStyle) { UnderLine.CopyFrom(tabStyle.UnderLine); Text.CopyFrom(tabStyle.Text); ItemPadding = tabStyle.ItemPadding == null ? null : new Extents(tabStyle.ItemPadding); ItemSpace = tabStyle.ItemSpace; UseTextNaturalSize = tabStyle.UseTextNaturalSize; } }
/// <summary> /// 創建一個新的單元格格式對象 /// </summary> public ExcelCellStyle() { // ICellStyle e; _dataFormart = string.Empty; _fontSize = 9; _fontBold = FontBoldWeight.None; _fontName = "Arial"; _alignment = HorizontalAlignment.LEFT; _verticalAlignment = VerticalAlignment.CENTER; _borderBottom = BorderStyle.NONE; _borderLeft = BorderStyle.NONE; _borderRight = BorderStyle.NONE; _borderTop = BorderStyle.NONE; _styleValueIsChange = true; _cellStyle = null; _warpText = false; _underline = Excel.UnderLine.NONE; _fontColor = NPOI.HSSF.Util.HSSFColor.BLACK.index; _isItalic = false; _isStrikeout = false; _fontTypeOffset = 0; }