private IFont GetFont(FONTSTYLE mode) { // 登録済みのスタイルは流用 if (fonts.ContainsKey(mode)) { return(fonts[mode]); } // 未登録の場合は作成 var font = book.CreateFont(); if (mode == FONTSTYLE.PGOTHIC_11_BOLD) { font.FontName = "MS Pゴシック"; font.FontHeightInPoints = 11; font.IsBold = true; } else if (mode == FONTSTYLE.NORMAL) { font.FontName = "MS Pゴシック"; font.FontHeightInPoints = 11; } fonts.Add(mode, font); return(font); }
public CellStyle() { format = FORMAT.NORMAL; border = BORDER.NORMAL; alignment = HALIGNMENT.NORMAL; valignment = VALIGNMENT.NORMAL; color = COLOR.NORMAL; control = CONTROL.NORMAL; font = FONTSTYLE.NORMAL; }
public CellStyle(FORMAT format = FORMAT.NORMAL, BORDER border = BORDER.NORMAL, HALIGNMENT alignment = HALIGNMENT.NORMAL, VALIGNMENT valignment = VALIGNMENT.NORMAL, COLOR color = COLOR.NORMAL, CONTROL control = CONTROL.NORMAL, FONTSTYLE font = FONTSTYLE.NORMAL) { this.format = format; this.border = border; this.alignment = alignment; this.valignment = valignment; this.color = color; this.control = control; this.font = font; }