Simplify signature formatting and adjust layout
Simplified the `signatureInformation` string formatting by removing the `"Empfaengerunterschrift\n"` prefix and starting directly with `signerFullName`. Adjusted `infoHeight` from `65F` to `48.75F` to refine layout spacing. Added a `BackColor` property to both `XRPictureBox` and `XRLabel` for consistent background styling (`Color.FromArgb(219, 219, 219)`). Updated `XRLabel` properties: adjusted `BoundsF` to offset `labelY` by `-5` for better vertical alignment and changed `TextAlignment` from `TopLeft` to `TopCenter`. Made minor formatting adjustments to improve the visual consistency of signature and label elements.
This commit is contained in:
@@ -503,8 +503,8 @@ int _lastOverlayViewerKey = -1;
|
||||
float labelY = imageY + sigImgHeight + innerGap;
|
||||
|
||||
var signatureInformation = string.IsNullOrWhiteSpace(signerPosition)
|
||||
? $"Empfaengerunterschrift\n{signerFullName}\n{signaturePlace}, {DateTime.Now:d}"
|
||||
: $"Empfaengerunterschrift\n{signerFullName}\n{signerPosition}\n{signaturePlace}, {DateTime.Now:d}";
|
||||
? $"{signerFullName}\n{signaturePlace}, {DateTime.Now:d}"
|
||||
: $"{signerFullName}\n{signerPosition}\n{signaturePlace}, {DateTime.Now:d}";
|
||||
|
||||
var signature = new XRPictureBox {
|
||||
Name = "receiverSignatureImage",
|
||||
@@ -554,7 +554,7 @@ int _lastOverlayViewerKey = -1;
|
||||
|
||||
const float sigWidth = 230F;
|
||||
const float sigImgHeight = 70F;
|
||||
const float infoHeight = 65F;
|
||||
const float infoHeight = 48.75F;
|
||||
const float innerGap = 5F;
|
||||
const float bottomPad = 6F;
|
||||
const float defaultTopPad = 8F;
|
||||
@@ -568,8 +568,8 @@ int _lastOverlayViewerKey = -1;
|
||||
float labelY = imageY + sigImgHeight + innerGap;
|
||||
|
||||
var signatureInformation = string.IsNullOrWhiteSpace(signerPosition)
|
||||
? $"Empfaengerunterschrift\n{signerFullName}\n{signaturePlace}, {DateTime.Now:d}"
|
||||
: $"Empfaengerunterschrift\n{signerFullName}\n{signerPosition}\n{signaturePlace}, {DateTime.Now:d}";
|
||||
? $"{signerFullName}\n{signaturePlace}, {DateTime.Now:d}"
|
||||
: $"{signerFullName}\n{signerPosition}\n{signaturePlace}, {DateTime.Now:d}";
|
||||
|
||||
var signature = new XRPictureBox {
|
||||
Name = $"receiverSignatureImage_{annotId}",
|
||||
@@ -577,17 +577,19 @@ int _lastOverlayViewerKey = -1;
|
||||
BoundsF = new RectangleF(sigX, imageY, sigWidth, sigImgHeight),
|
||||
Sizing = ImageSizeMode.ZoomImage,
|
||||
Borders = BorderSide.Bottom,
|
||||
BorderColor = System.Drawing.Color.FromArgb(73, 80, 87)
|
||||
BorderColor = System.Drawing.Color.FromArgb(73, 80, 87),
|
||||
BackColor = Color.FromArgb(219, 219, 219),
|
||||
};
|
||||
|
||||
var signatureLabel = new XRLabel {
|
||||
Name = $"receiverSignatureLabel_{annotId}",
|
||||
Text = signatureInformation,
|
||||
Multiline = true,
|
||||
BoundsF = new RectangleF(sigX, labelY, sigWidth, infoHeight),
|
||||
BoundsF = new RectangleF(sigX, labelY - 5, sigWidth, infoHeight),
|
||||
Font = new DXFont("Open Sans", 8F, DXFontStyle.Regular),
|
||||
ForeColor = System.Drawing.Color.FromArgb(73, 80, 87),
|
||||
TextAlignment = TextAlignment.TopLeft
|
||||
TextAlignment = TextAlignment.TopCenter,
|
||||
BackColor = Color.FromArgb(219, 219, 219)
|
||||
};
|
||||
|
||||
bottomMargin.Controls.AddRange(new XRControl[] { signature, signatureLabel });
|
||||
|
||||
Reference in New Issue
Block a user