namespace Core.File.Excel
{
/// <summary>
/// ExcelFontアクセサー
/// </summary>
public class FontAccessor
{
#region 構築・破棄
/// <summary>
/// コンストラクタ
/// </summary>
/// <param name="font"></param>
private FontAccessor(OfficeExcel.Font font)
{
Font = font;
}
/// <summary>
/// 構成子
/// </summary>
/// <param name="font"></param>
/// <returns></returns>
internal static FontAccessor GetAccessor(OfficeExcel.Font font)
{
return new FontAccessor(font);
}
#endregion
#region プロパティ
/// <summary>Font</summary>
private OfficeExcel.Font Font { get; set; }
/// <summary>サイズ</summary>
public int Size
{
get
{
return Font.Size;
}
set
{
Font.Size = value;
}
}
/// <summary>フォント名</summary>
public string Name
{
get
{
return Font.Name;
}
set
{
Font.Name = value;
}
}
/// <summary>スタイル-太字</summary>
public bool Bold
{
get
{
return Font.Bold;
}
set
{
Font.Bold = value;
}
}
/// <summary>スタイル-斜体</summary>
public bool Italic
{
get
{
return Font.Italic;
}
set
{
Font.Italic = value;
}
}
/// <summary>スタイル-下線</summary>
public ExcelUnderlineStyle Underline
{
get
{
return Font.Underline;
}
set
{
Font.Underline = value;
}
}
/// <summary>色</summary>
public dynamic Color
{
get
{
return Font.Color;
}
set
{
Font.Color = value;
}
}
/// <summary>色</summary>
public int ColorIndex
{
get
{
return Font.ColorIndex;
}
set
{
Font.ColorIndex = value;
}
}
/// <summary>文字飾り-取り消し線</summary>
public bool Strikethrough
{
get
{
return Font.Strikethrough;
}
set
{
Font.Strikethrough = value;
}
}
/// <summary>文字飾り-上付き</summary>
public bool Superscript
{
get
{
return Font.Superscript;
}
set
{
Font.Superscript = value;
}
}
/// <summary>文字飾り-下付き</summary>
public bool Subscript
{
get
{
return Font.Subscript;
}
set
{
Font.Subscript = value;
}
}
#endregion
}
#region 列挙型
/// <summary>フォントに適用される下線の種類</summary>
public enum ExcelUnderlineStyle
{
/// <summary>太い二重下線</summary>
Double = OfficeExcel.XlUnderlineStyle.xlUnderlineStyleDouble,
/// <summary>互いに近接する細い二重下線</summary>
DoubleAccounting = OfficeExcel.XlUnderlineStyle.xlUnderlineStyleDoubleAccounting,
/// <summary>下線なし</summary>
None = OfficeExcel.XlUnderlineStyle.xlUnderlineStyleNone,
/// <summary>一重下線</summary>
Single = OfficeExcel.XlUnderlineStyle.xlUnderlineStyleSingle,
/// <summary>サポートされていません。</summary>
SingleAccounting = OfficeExcel.XlUnderlineStyle.xlUnderlineStyleSingleAccounting
}
#endregion
}
0 件のコメント:
コメントを投稿