コード例 #1
0
ファイル: MainWindow.xaml.cs プロジェクト: Fred68/Consuntivo
		void PrintRigaTabella(ref Table table, ref TableRowGroup rowGroup, Riga dati)
			{
			TableRow row = new TableRow();
			row.Background = Brushes.Transparent;
			row.FontSize = textSize;
			row.FontWeight = FontWeights.Normal;
			foreach (string str in dati.Valori())
				{
				TableCell tc = new TableCell(new Paragraph(new Run(str)));
				tc.BorderBrush = Brushes.Black;
				tc.BorderThickness = new Thickness(0, 0, 0, 0.5);
				row.Cells.Add(tc);
				}
			rowGroup.Rows.Add(row);
			}
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: Fred68/Consuntivo
		void PrintTitoliTabella(ref Table table, ref TableRowGroup rowGroup, Riga empty)
			{
			int ncol = empty.Count();							// Colonne della tabella
			foreach (TipoColonna str in empty.Tipi())
				{
				TableColumn tc = new TableColumn();
				tc.Width = new GridLength(str.larghezzaColonna, GridUnitType.Pixel);
				table.Columns.Add(tc);
				}
			TableRow rowint = new TableRow();					// Riga di intestazione
			rowint.Background = Brushes.Transparent;
			rowint.FontSize = headerSize;
			rowint.FontWeight = FontWeights.Bold;
			foreach (string str in empty.Titoli())
				{
				TableCell tc = new TableCell(new Paragraph(new Run(str)));
				tc.BorderBrush = Brushes.Black;
				tc.BorderThickness = new Thickness(0, 1, 0, 1);
				rowint.Cells.Add(tc);
				}
			rowGroup.Rows.Add(rowint);
			}