Пример #1
0
        private static void AddAttachmentRow(IFileRelation rel, PdfPTable table)
        {
            if (rel.File != null)
            {
                table.AddCell(GetVendorLink(rel.Vendor));
                table.AddCell(new Phrase(rel.Name, PdfFonts.Normal));

                var path  = rel.File.GetPath();
                var chunk = new Chunk(path, PdfFonts.Link);
                chunk.SetRemoteGoto(path, 1);
                chunk.SetUnderline(0.5f, -2f);
                chunk.setLineHeight(15);
                table.AddCell(new Phrase(chunk));

                table.DefaultCell.HorizontalAlignment = Element.ALIGN_CENTER;
                table.DefaultCell.VerticalAlignment   = Element.ALIGN_MIDDLE;

                table.AddCell(new Phrase(rel.IncludedPrintedVersion ? "Ja" : "Nei", PdfFonts.Normal));

                table.DefaultCell.HorizontalAlignment = Element.ALIGN_LEFT;
                table.DefaultCell.VerticalAlignment   = Element.ALIGN_TOP;
            }
        }
Пример #2
0
 public int CompareTo(IFileRelation other)
 {
     return(String.Compare(Name, other.Name, StringComparison.Ordinal));
 }