コード例 #1
0
        private void AddWinnerRow(Siberix.PDF.Layout.Table.Table table, TrophyDataSet.tblWinnersRow winner)
        {
            Siberix.PDF.Layout.Table.Row row;
              Siberix.PDF.Layout.Table.Cell cell;
              Siberix.PDF.Layout.Text.Text text;

              Siberix.PDF.Layout.Text.Style regular = new Siberix.PDF.Layout.Text.Style(WinnerFont, Brushes.Black);

              row = table.AddRow();
              // Year
              cell = row.AddCell();
              cell.BottomPadding = Px(1);
              cell.Width = Px(15);
              cell.WidthIsFixed = true;
              text = cell.AddText();
              text.Style = regular;
              text.AddContent(winner.fldYear.ToString());
              // Sail #
              cell = row.AddCell();
              cell.BottomPadding = Px(1);
              cell.Width = Px(30);
              cell.WidthIsFixed = true;
              text = cell.AddText();
              text.Style = regular;
              text.AddContent(winner.fldSailNumber);
              // Helm
              cell = row.AddCell();
              cell.BottomPadding = Px(1);
              text = cell.AddText();
              text.Style = regular;
              text.AddContent(winner.fldHelm);
              // Owner
              cell = row.AddCell();
              cell.BottomPadding = Px(1);
              text = cell.AddText();
              text.Style = regular;
              text.AddContent(winner.fldOwner);
        }
コード例 #2
0
        private void AddTrophyWinnerRow(Siberix.PDF.Layout.Table.Table table, TrophyDataSet.TrophyWinnersRow winner)
        {
            Siberix.PDF.Layout.Table.Row row;
              Siberix.PDF.Layout.Table.Cell cell;
              Siberix.PDF.Layout.Text.Text text;

              Siberix.PDF.Layout.Text.Style regular = new Siberix.PDF.Layout.Text.Style(WinnerFont, Brushes.Black);

              row = table.AddRow();
              // Year
              cell = row.AddCell();
              cell.BottomPadding = Px(1);
              cell.Width = Px(15);
              cell.WidthIsFixed = true;
              text = cell.AddText();
              text.Style = regular;
              text.AddContent(winner.fldYear.ToString());
              // Trophy
              cell = row.AddCell();
              cell.BottomPadding = Px(1);
              cell.Width = Px(60);
              cell.WidthIsFixed = true;
              text = cell.AddText();
              text.Style = regular;
              text.AddContent(winner.fldTrophyName);
              // Class
              cell = row.AddCell();
              cell.BottomPadding = Px(1);
              cell.Width = Px(25);
              cell.WidthIsFixed = true;
              text = cell.AddText();
              text.Style = regular;
              text.AddContent(winner.fldClassName);

              // Helm / Crew / Owner
              cell = row.AddCell();
              cell.BottomPadding = Px(1);
              text = cell.AddText();
              text.Style = regular;

              string helm = winner.fldHelm;
              if (winner.fldCrew.Length != 0) {
            if (helm.Length != 0)
              helm += " / ";
            helm += winner.fldCrew;
              }
              if (winner.fldOwner.Length != 0) {
            if (helm.Length != 0)
              helm += "\n";
            helm += "Owner: " + winner.fldOwner;
              }
              text.AddContent(helm);
        }