Place the user in edit mode after they set the text alignment. This assures that the alignment setting is saved.

Changed the error log message when the user uses a format that does not have an initials header for a section which contains signoffs.  Also limited this message so that it is only output once per session.
This commit is contained in:
Rich 2015-03-27 12:27:42 +00:00
parent ea8014c8d2
commit 381376843f
2 changed files with 25 additions and 2 deletions

View File

@ -1646,6 +1646,9 @@ namespace Volian.Controls.Library
cs.TextAlign = newAlign;
tmp.Style = cs;
}
// If one column and one row, then go into edit mode.
if (cr.r1 == cr.r2 && cr.c1 == cr.c2)
SendKeys.Send("{F2}"); // Toggle Edit Mode with F2
}
public void ChangeCellBorder(CellRange cr, BorderStyleEnum newBorder)
{

View File

@ -902,6 +902,13 @@ namespace Volian.Print.Library
}
return retval;
}
private static bool _MissingInitials = false;
public static bool MissingInitials
{
get { return vlnParagraph._MissingInitials; }
set { vlnParagraph._MissingInitials = value; }
}
public static void TextAt(PdfContentByte cb,VlnSvgPageHelper myPageHelper,PageItem pi,float yloc, float leftMargin)
{
System.Drawing.Color sysColor = PrintOverride.OverrideSvgColor(System.Drawing.Color.Black);
@ -911,9 +918,22 @@ namespace Volian.Print.Library
iTextSharp.text.Font font;
int fontStyle = 0;
bool underline = false;
if (pi == null)
if (pi == null) // The header for the signoffs is missing in the current section format.
// An Example can currently be found in Calvert OI-34
{
_MyLog.WarnFormat("Error in Initials");
if (!MissingInitials) // Only show this once.
{
_MyLog.WarnFormat("Initials Header Missing" +
"\r\nInitials header missing for section {0}" +
"\r\nfrom format [{1}], {2}, subformat {3}" +
"\r\nA default Arial font and a default location will be used." +
"\r\nPerhaps another section format should be used.",
myPageHelper.MySection.ShortPath,
myPageHelper.MySection.ActiveFormat.Name,
myPageHelper.MySection.ActiveFormat.Description,
myPageHelper.MySection.MyDocStyle.Name);
MissingInitials = true;
}
ct.SetSimpleColumn(450 + leftMargin, yloc + 6.9F, 550 + leftMargin, yloc - 50);
font = FontFactory.GetFont("Arial", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 10F);
}