本文整理汇总了C#中Novacode.Table类的典型用法代码示例。如果您正苦于以下问题:C# Table类的具体用法?C# Table怎么用?C# Table使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Table类属于Novacode命名空间,在下文中一共展示了Table类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TablazatFormazas
private static void TablazatFormazas( Table table ) {
table.AutoFit = AutoFit.Contents;
table.AutoFit = AutoFit.ColumnWidth;
foreach( Row row in table.Rows ) {
row.Cells[0].Width = 30;
row.Cells[1].Width = 50;
row.Cells[2].Width = 50;
row.Cells[3].Width = 200;
row.Cells[4].Width = 200;
row.Cells[5].Width = 70;
row.Cells[6].Width = 70;
}
Border c = new Border(Novacode.BorderStyle.Tcbs_none, BorderSize.seven, 0, Color.Black);
Border d = new Border(Novacode.BorderStyle.Tcbs_single, BorderSize.five, 0, Color.Black);
table.SetBorder( TableBorderType.InsideH, d );
table.SetBorder( TableBorderType.InsideV, c );
table.SetBorder( TableBorderType.Bottom, c );
table.SetBorder( TableBorderType.Top, c );
table.SetBorder( TableBorderType.Left, c );
table.SetBorder( TableBorderType.Right, c );
}
示例2: FillData
public void FillData(Table table)
{
for (int i = 1; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
table.Rows[i].Cells[j].Paragraphs[0].Append(string.Format("Rows:{0} Columns:{1}", i, j));
}
}
}
示例3: CreateAndInsertInvoiceTableAfter
private static Table CreateAndInsertInvoiceTableAfter(Table t, ref DocX document)
{
// Grab data from somewhere (Most likely a database)
schooldbEntities DAO = new schooldbEntities();
List<teacher> tlist = (from tt in DAO.teachers select tt).ToList<teacher>();
/*
* The trick to replacing one Table with another,
* is to insert the new Table after the old one,
* and then remove the old one.
*/
Table invoice_table = t.InsertTableAfterSelf(tlist.Count + 1, 4);
invoice_table.Design = TableDesign.LightShadingAccent1;
#region Table title
Formatting table_title = new Formatting();
table_title.Bold = true;
invoice_table.Rows[0].Cells[0].Paragraph.InsertText("Serial No.", false, table_title);
invoice_table.Rows[0].Cells[0].Paragraph.Alignment = Alignment.center;
invoice_table.Rows[0].Cells[1].Paragraph.InsertText("Employee Name", false, table_title);
invoice_table.Rows[0].Cells[1].Paragraph.Alignment = Alignment.center;
invoice_table.Rows[0].Cells[2].Paragraph.InsertText("Account No.", false, table_title);
invoice_table.Rows[0].Cells[2].Paragraph.Alignment = Alignment.center;
invoice_table.Rows[0].Cells[3].Paragraph.InsertText("Salary", false, table_title);
invoice_table.Rows[0].Cells[3].Paragraph.Alignment = Alignment.center;
#endregion
// Loop through the rows in the Table and insert data from the data source.
for (int row = 1; row < tlist.Count; row++)
{
Paragraph cell_paragraph = invoice_table.Rows[row].Cells[0].Paragraph;
cell_paragraph.InsertText(row.ToString(), false);
cell_paragraph = invoice_table.Rows[row].Cells[1].Paragraph;
cell_paragraph.InsertText(tlist[row - 1].TeacherName.ToString(), false);
cell_paragraph = invoice_table.Rows[row].Cells[2].Paragraph;
cell_paragraph.InsertText(tlist[row - 1].Account_Number.ToString(), false);
cell_paragraph = invoice_table.Rows[row].Cells[3].Paragraph;
cell_paragraph.InsertText(tlist[row - 1].BasicSalary.ToString(), false);
}
// Let the tables coloumns expand to fit its contents.
invoice_table.AutoFit = AutoFit.Contents;
// Center the Table
invoice_table.Alignment = Alignment.center;
// Return the invloce table now that it has been created.
return invoice_table;
}
示例4: MinBizDataTable
MinBizDataTable( MINOSEGBIZONYLAT _data, KONSZIGNACIOSZALLITOLEVEL _szállítólevél, int i, Table table )
{
int c;
if ( _szállítólevél.Nyelv == "M" )
{
#region fixstring
c = -1;
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Szállítólevél szám:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Vevő megnevezése:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Megnevezés:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Gyártási idő:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Sarzs:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Szín:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Íz:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Illat:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Brix:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Savtartalom (citromsavban):" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "pH:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Konzisztencia (Bostwick fok):" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Hozzáadott citromsav:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Hozzáadott cukor:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Aszkorbinsav:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Hozzáadott színezék:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Hozzáadott aroma:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Hozzáadott tartósítószer:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Átlagos tápérték tartalom 100 g termékben" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( " Energia tartalom:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( " Fehérje:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( " Szénhidrát:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( " Zsír:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( " Élelmi rost:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Mikrobiológia:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Minőségét megőrzi:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Passzírozottság:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Nettó tömeg:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Tárolás:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Csomagolás:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Származási hely:" ).Bold( );
#endregion
#region data
c = -1;
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _szállítólevél.Szallitolevel ).Bold( );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.szallitolevel.Vevo ).Bold( );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.vizsgalatilap.Megnevezes ).Bold( );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.szallitolevel.GyartasiIdo.Substring( 0, 4 ) + ". évben" ).Bold( );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.vizsgalatilap.Sarzs ).Bold( );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.szallitolevel.Szin );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.szallitolevel.Iz );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.szallitolevel.Illat );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( MinMax( _data.vizsgalatilap.Brix ) + " %" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( MinMax( _data.vizsgalatilap.Citromsav ) + " %" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( MinMax( _data.vizsgalatilap.Ph ) );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( MinMax( _data.vizsgalatilap.Bostwick ) + " cm/30 sec" );
if ( _data.vizsgalatilap.CitromsavAdagolas.min == 0 && _data.vizsgalatilap.CitromsavAdagolas.max == 0 ) { table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( "nincs" ); }
else { table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( MinMax( _data.vizsgalatilap.CitromsavAdagolas ) ); }
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.fixstring.Cukor );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( "maximum " + _data.vizsgalatilap.Aszkorbinsav + " mg/kg" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.fixstring.Szinezek );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.fixstring.Aroma );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.fixstring.Aroma );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( "" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.tapertek.EnergiaTartalom1 + " kj / " + _data.tapertek.EnergiaTartalom2 + " kcal" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.tapertek.Feherje + " g" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.tapertek.Szenhidrat + " g" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.tapertek.Zsir + " g" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.tapertek.Elelmirost + " g" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.fixstring.MikroBiologia );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.fixstring.MinosegetMegorzi );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.vizsgalatilap.Paszirozottsag + "-es szitán" );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.fixstring.NettoTomeg );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.fixstring.Tarolas );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( "aszeptikus zsákban és " + _data.vizsgalatilap.Csomagolas );
table.Rows[ ++c ].Cells[ 1 ].Paragraphs[ 0 ].Append( _data.vizsgalatilap.SzarmazasiHely );
#endregion
}
else
{
#region fixstring
c = -1;
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Customer name:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Product name:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Date of production:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Batch number:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Colour:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Taste:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Odour:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Brix:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Acid content (in citric acid):" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "pH:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Consistence (Bostwick, 20°C):" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Added citric acid:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Added sugar:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Ascorbic acid:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Added colours:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Added flavours:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Added preservatives:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( "Average nutritional values in 100 g product" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( " Energy:" ).Bold( );
table.Rows[ ++c ].Cells[ 0 ].Paragraphs[ 0 ].Append( " Protein:" ).Bold( );
//.........这里部分代码省略.........
示例5: InsertTable
public Table InsertTable(int index, Table t)
{
Paragraph p = HelperFunctions.GetFirstParagraphEffectedByInsert(Document, index);
XElement[] split = HelperFunctions.SplitParagraph(p, index - p.startIndex);
XElement newXElement = new XElement(t.Xml);
p.Xml.ReplaceWith
(
split[0],
newXElement,
split[1]
);
Table newTable = new Table(Document, newXElement)
{
mainPart = mainPart,
Design = t.Design
};
return newTable;
}
示例6: InsertTableBeforeSelf
/// <summary>
/// Insert a new Table before this Table, this Table can be from this document or another document.
/// </summary>
/// <param name="t">The Table t to be inserted</param>
/// <returns>A new Table inserted before this Table.</returns>
/// <example>
/// Insert a new Table before this Table.
/// <code>
/// // Place holder for a Table.
/// Table t;
///
/// // Load document a.
/// using (DocX documentA = DocX.Load(@"a.docx"))
/// {
/// // Get the first Table from this document.
/// t = documentA.Tables[0];
/// }
///
/// // Load document b.
/// using (DocX documentB = DocX.Load(@"b.docx"))
/// {
/// // Get the first Table in document b.
/// Table t2 = documentB.Tables[0];
///
/// // Insert the Table from document a before this Table.
/// Table newTable = t2.InsertTableBeforeSelf(t);
///
/// // Save all changes made to document b.
/// documentB.Save();
/// }// Release this document from memory.
/// </code>
/// </example>
public override Table InsertTableBeforeSelf(Table t)
{
return base.InsertTableBeforeSelf(t);
}
示例7: Row
internal Row(Table table, DocX document, XElement xml)
: base(document, xml)
{
this.table = table;
this.mainPart = table.mainPart;
}
示例8: InsertTable
/// <summary>
/// Insert a Table into this document. The Table's source can be a completely different document.
/// </summary>
/// <param name="t">The Table to insert.</param>
/// <returns>The Table now associated with this document.</returns>
/// <example>
/// Extract a Table from document a and insert it at the end of document b.
/// <code>
/// // Place holder for a Table.
/// Table t;
///
/// // Load document a.
/// using (DocX documentA = DocX.Load(@"C:\Example\a.docx"))
/// {
/// // Get the first Table from this document.
/// t = documentA.Tables[0];
/// }
///
/// // Load document b.
/// using (DocX documentB = DocX.Load(@"C:\Example\b.docx"))
/// {
/// /*
/// * Insert the Table that was extracted from document a, into document b.
/// * This creates a new Table that is now associated with document b.
/// */
/// Table newTable = documentB.InsertTable(t);
///
/// // Save all changes made to document b.
/// documentB.Save();
/// }// Release this document from memory.
/// </code>
/// </example>
public new Table InsertTable(Table t)
{
t = base.InsertTable(t);
t.mainPart = mainPart;
return t;
}
示例9: Find
public static IEnumerable<TemplMatchTable> Find(TemplRegex rxp, Table t, int rowIdx, int cellIdx,
uint maxPerCell = TemplConst.MaxMatchesPerScope)
{
return Find<TemplMatchTable>(rxp, t.Rows[rowIdx].Cells[cellIdx].Paragraphs).Select(m =>
{
m.Table = t;
m.RowIndex = rowIdx;
m.CellIndex = cellIdx;
return m;
}).Take((int)maxPerCell);
}
示例10: TablazatFormazas
private void TablazatFormazas( Table table ) {
table.AutoFit = AutoFit.ColumnWidth;
for( int i = 0; i < table.Rows.Count; i++ ) {
table.Rows[i].Cells[0].Width = 30;
table.Rows[i].Cells[1].Width = 50;
table.Rows[i].Cells[2].Width = 200;
table.Rows[i].Cells[3].Width = 50;
table.Rows[i].Cells[4].Width = 200;
table.Rows[i].Cells[5].Width = 70;
table.Rows[i].Cells[6].Width = 70;
}
Border c = new Border(Novacode.BorderStyle.Tcbs_none,BorderSize.seven, 0, Color.Black);
Border d = new Border(Novacode.BorderStyle.Tcbs_single,BorderSize.five, 0, Color.Black);
//table.SetBorder( TableBorderType.InsideH, d );
//table.SetBorder( TableBorderType.InsideV, c );
//table.SetBorder( TableBorderType.Bottom, c );
//table.SetBorder( TableBorderType.Top, c );
//table.SetBorder( TableBorderType.Left, c );
//table.SetBorder( TableBorderType.Right, c );
}
示例11: InsertTableBeforeSelf
/// <summary>
/// Insert a new Table before this Table, this Table can be from this document or another document.
/// </summary>
/// <param name="t">The Table t to be inserted</param>
/// <returns>A new Table inserted before this Table.</returns>
/// <example>
/// Insert a new Table before this Table.
/// <code>
/// // Place holder for a Table.
/// Table t;
///
/// // Load document a.
/// using (DocX documentA = DocX.Load(@"a.docx"))
/// {
/// // Get the first Table from this document.
/// t = documentA.Tables[0];
/// }
///
/// // Load document b.
/// using (DocX documentB = DocX.Load(@"b.docx"))
/// {
/// // Get the first Table in document b.
/// Table t2 = documentB.Tables[0];
///
/// // Insert the Table from document a before this Table.
/// Table newTable = t2.InsertTableBeforeSelf(t);
///
/// // Save all changes made to document b.
/// documentB.Save();
/// }// Release this document from memory.
/// </code>
/// </example>
public Table InsertTableBeforeSelf(Table t)
{
xml.AddBeforeSelf(t.xml);
XElement newlyInserted = xml.ElementsBeforeSelf().First();
t.xml = newlyInserted;
DocX.RebuildTables(document);
DocX.RebuildParagraphs(document);
return t;
}
示例12: KonszignacioDataTableFormazas
KonszignacioDataTableFormazas( Table _table )
{
_table.AutoFit = AutoFit.Contents;
Border c = new Border( BorderStyle.Tcbs_none, BorderSize.two, 0, Color.Black );
_table.SetBorder( TableBorderType.InsideH, c );
_table.SetBorder( TableBorderType.InsideV, c );
_table.SetBorder( TableBorderType.Bottom, c );
_table.SetBorder( TableBorderType.Top, c );
_table.SetBorder( TableBorderType.Left, c );
_table.SetBorder( TableBorderType.Right, c );
for ( int i = 0 ; i < _table.Rows[ 0 ].Cells.Count ; i++ )
{
_table.Rows[ 0 ].Cells[ i ].SetBorder( TableCellBorderType.Top, new Border( BorderStyle.Tcbs_single, BorderSize.six, 0, Color.Black ) );
_table.Rows[ 0 ].Cells[ i ].SetBorder( TableCellBorderType.Bottom, new Border( BorderStyle.Tcbs_single, BorderSize.six, 0, Color.Black ) );
}
for ( int i = 0 ; i < _table.Rows.Count ; i++ )
{
if ( _table.Rows[ i ].Cells[ 1 ].Paragraphs[ 0 ].Text.Contains( "összesen" ) )
{
for ( int j = 0 ;
j < _table.Rows[ i ].Cells.Count ;
j++ )
{
_table.Rows[ i ].Cells[ j ].SetBorder( TableCellBorderType.Top, new Border( BorderStyle.Tcbs_single,
BorderSize.six, 0, Color.Black ) );
}
}
else if ( _table.Rows[ i ].Cells[ 1 ].Paragraphs[ 0 ].Text.Contains( "elszállítás" ) )
{
for ( int j = 0 ;
j < _table.Rows[ i ].Cells.Count ;
j++ )
{
_table.Rows[ i ].Cells[ j ].SetBorder( TableCellBorderType.Top, new Border( BorderStyle.Tcbs_single,
BorderSize.six, 0, Color.Black ) );
_table.Rows[ i ].Cells[ j ].SetBorder( TableCellBorderType.Bottom, new Border( BorderStyle.Tcbs_single,
BorderSize.six, 0, Color.Black ) );
}
_table.Rows[ i ].Cells[ 0 ].SetBorder( TableCellBorderType.Left, new Border( BorderStyle.Tcbs_single,
BorderSize.six, 0, Color.Black ) );
_table.Rows[ i ].Cells[ 6 ].SetBorder( TableCellBorderType.Right, new Border( BorderStyle.Tcbs_single,
BorderSize.six, 0, Color.Black ) );
}
}
//konszig táblázat-BN
_table.AutoFit = AutoFit.ColumnWidth;
for ( int i = 0 ; i < _table.Rows.Count ; i++ )
{
_table.Rows[ i ].Cells[ 0 ].Width = 45; //sorszám
_table.Rows[ i ].Cells[ 1 ].Width = 210; //megnevezés
_table.Rows[ i ].Cells[ 2 ].Width = 60; //hordó
_table.Rows[ i ].Cells[ 3 ].Width = 50; //sarzs
_table.Rows[ i ].Cells[ 4 ].Width = 80; //súly
_table.Rows[ i ].Cells[ 5 ].Width = 160; //h.típus
_table.Rows[ i ].Cells[ 6 ].Width = 110; //dátum
}
_table.AutoFit = AutoFit.ColumnWidth;
}
示例13: KonszignacioFejlecTablazatFormazas
KonszignacioFejlecTablazatFormazas( Table _table )
{
Border c = new Border( BorderStyle.Tcbs_none, BorderSize.seven, 0, Color.Black );
_table.SetBorder( TableBorderType.InsideH, c );
_table.SetBorder( TableBorderType.InsideV, c );
_table.SetBorder( TableBorderType.Bottom, c );
_table.SetBorder( TableBorderType.Top, c );
_table.SetBorder( TableBorderType.Left, c );
_table.SetBorder( TableBorderType.Right, c );
//konszig táblázat fejléc-BN
_table.AutoFit = AutoFit.ColumnWidth;
for ( int i = 0 ; i < _table.Rows.Count ; i++ )
{
_table.Rows[ i ].Cells[ 0 ].Width = 80; //vevő fix
_table.Rows[ i ].Cells[ 1 ].Width = 300; //vevő
_table.Rows[ i ].Cells[ 2 ].Width = 60; //feladó fix
_table.Rows[ i ].Cells[ 3 ].Width = 300; //feladó
}
_table.AutoFit = AutoFit.ColumnWidth;
}
示例14: MinBizDataTablazatFormazasa
MinBizDataTablazatFormazasa( Table _table )
{
_table.AutoFit = AutoFit.Contents;
Border c = new Border( BorderStyle.Tcbs_none, BorderSize.seven, 0, Color.Black );
_table.SetBorder( TableBorderType.InsideH, c );
_table.SetBorder( TableBorderType.InsideV, c );
_table.SetBorder( TableBorderType.Bottom, c );
_table.SetBorder( TableBorderType.Top, c );
_table.SetBorder( TableBorderType.Left, c );
_table.SetBorder( TableBorderType.Right, c );
}
示例15: AddTable
public Table AddTable(int rowCount, int columnCount)
{
if (rowCount < 1 || columnCount < 1)
throw new ArgumentOutOfRangeException("Row and Column count must be greater than zero.");
Table t = new Table(this, HelperFunctions.CreateTable(rowCount, columnCount));
t.mainPart = mainPart;
return t;
}