public PdfObjectRun(ObjectId objectId, PdfSourceRichTextBox pdfSourceRichTextBox) { ObjectId = objectId; this.pdfSourceRichTextBox = pdfSourceRichTextBox; pdfSourceRichTextBox.pdfObjects[objectId] = this; //overwrites older with later version FontWeight = FontWeights.Bold; Text = $"{objectId.ObjectNumber} {objectId.Generation} obj"; }
public PdfRefRun(ObjectId objectId, PdfSourceRichTextBox pdfSourceRichTextBox) { ObjectId = objectId; this.pdfSourceRichTextBox = pdfSourceRichTextBox; if (!pdfSourceRichTextBox.pdfRefs.TryGetValue(objectId, out var pdfRefList)) { pdfRefList = new List <PdfRefRun>(); pdfSourceRichTextBox.pdfRefs.Add(objectId, pdfRefList); } pdfRefList.Add(this); TextDecorations = System.Windows.TextDecorations.Underline; Foreground = Brushes.DarkBlue; Text = $"{objectId.ObjectNumber} {objectId.Generation} R"; }