Kaynağa Gözat

Added patches 7389 and 7421 submitted by lckuiper. These patches contains support for Cell Margins and Table\Cell borders.

Thank you for sharing your custom features with the group lckuiper.
master
coffeycathal_cp 15 yıl önce
ebeveyn
işleme
b7c5db65d3
4 değiştirilmiş dosya ile 1128 ekleme ve 0 silme
  1. 60
    0
      DocX/Border.cs
  2. 1
    0
      DocX/DocX.csproj
  3. 987
    0
      DocX/Table.cs
  4. 80
    0
      DocX/_Enumerations.cs

+ 60
- 0
DocX/Border.cs Dosyayı Görüntüle

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace Novacode
{
/// <summary>
/// Represents a border of a table or table cell
/// Added by lckuiper @ 20101117
/// </summary>
public class Border
{
BorderStyle tcbs;
Color color;
BorderSize size;
int space;
public BorderStyle Tcbs
{
get { return tcbs; }
set { tcbs = value; }
}
public BorderSize Size
{
get { return size; }
set { size = value; }
}
public int Space
{
get { return space; }
set { space = value; }
}
public Color Color
{
get { return color; }
set { color = value; }
}
public Border()
{
this.tcbs = BorderStyle.Tcbs_single;
this.size = BorderSize.one;
this.space = 0;
this.color = Color.Black;
}
public Border(BorderStyle tcbs, BorderSize size, int space, Color color)
{
this.Tcbs = tcbs;
this.size = size;
this.space = space;
this.Color = color;
}
}
}

+ 1
- 0
DocX/DocX.csproj Dosyayı Görüntüle

</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Border.cs" />
<Compile Include="Container.cs" /> <Compile Include="Container.cs" />
<Compile Include="Footers.cs" /> <Compile Include="Footers.cs" />
<Compile Include="Footer.cs" /> <Compile Include="Footer.cs" />

+ 987
- 0
DocX/Table.cs
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 80
- 0
DocX/_Enumerations.cs Dosyayı Görüntüle

namespace Novacode namespace Novacode
{ {
public enum BorderSize
{
one,
two,
three,
four,
five,
six,
seven,
eight,
nine
}
/// <summary>
/// Table Cell Border styles
/// Added by lckuiper @ 20101117
/// source: http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.tablecellborders.aspx
/// </summary>
public enum BorderStyle
{
Tcbs_none = 0,
Tcbs_single,
Tcbs_thick,
Tcbs_double,
Tcbs_dotted,
Tcbs_dashed,
Tcbs_dotDash,
Tcbs_dotDotDash,
Tcbs_triple,
Tcbs_thinThickSmallGap,
Tcbs_thickThinSmallGap,
Tcbs_thinThickThinSmallGap,
Tcbs_thinThickMediumGap,
Tcbs_thickThinMediumGap,
Tcbs_thinThickThinMediumGap,
Tcbs_thinThickLargeGap,
Tcbs_thickThinLargeGap,
Tcbs_thinThickThinLargeGap,
Tcbs_wave,
Tcbs_doubleWave,
Tcbs_dashSmallGap,
Tcbs_dashDotStroked,
Tcbs_threeDEmboss,
Tcbs_threeDEngrave,
Tcbs_outset,
Tcbs_inset
}
/// <summary>
/// Table Cell Border Types
/// Added by lckuiper @ 20101117
/// source: http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.tablecellborders.aspx
/// </summary>
public enum TableCellBorderType
{
Top,
Bottom,
Left,
Right,
InsideH,
InsideV,
TopLeftToBottomRight,
TopRightToBottomLeft
}
/// <summary>
/// Table Border Types
/// Added by lckuiper @ 20101117
/// source: http://msdn.microsoft.com/en-us/library/documentformat.openxml.wordprocessing.tableborders.aspx
/// </summary>
public enum TableBorderType
{
Top,
Bottom,
Left,
Right,
InsideH,
InsideV
}
// Patch 7398 added by lckuiper on Nov 16th 2010 @ 2:23 PM // Patch 7398 added by lckuiper on Nov 16th 2010 @ 2:23 PM
public enum VerticalAlignment { Top, Center, Bottom }; public enum VerticalAlignment { Top, Center, Bottom };

Loading…
İptal
Kaydet