Additional code to support special cases in Template for Calvert Alarms including a TemplateColumnMode and mix of Cautions/Notes
Added Support for BGE Alarms, bottom continue message location. Additional code to support special cases in Template for Calvert Alarms and new flag SpecialCaseCalvertAlarm Support for Docstyle DSS_PageBreakHLS for page break on HLS Changes for Calvert Alarms use of template to define top portion of alarm pages and CONDITION/RESPONSE table support. Handle 3 top/bottom continue messages for Calvert Alarms; support box around CONDITION/RESPONSE table in Calvert Alarms; {REVUNIT} fix; if TabPtsPerChar format is 0, set to a default of 6
This commit is contained in:
@@ -119,7 +119,7 @@ namespace Volian.Print.Library
|
||||
Text = cleanTab;
|
||||
MyFont = vFont;
|
||||
// BGE has a format flag to increase size of font, if top level:
|
||||
if (doSectTab && myparent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.SectionNumber.Level0Big && myparent.MyItemInfo.MyParent.IsProcedure)
|
||||
if (doSectTab && myparent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.SectionNumber.Level0Big && myparent.MyItemInfo.MyParent.IsProcedure)
|
||||
vFont = new VE_Font(vFont.Family, 14, (E_Style)vFont.Style | E_Style.Bold, 8);
|
||||
float CCCs = GetTextWidth(MyFont, "CCCCCCCCCC", symblFontName);
|
||||
float IIIs = GetTextWidth(MyFont, "iiiiiiiiii", symblFontName);
|
||||
@@ -130,12 +130,12 @@ namespace Volian.Print.Library
|
||||
Width = 90;
|
||||
}
|
||||
else if ((myparent.MyItemInfo.FormatStepData != null) && (myparent.MyItemInfo.FormatStepData.TabData.IdentWidth ?? 0) > 0)
|
||||
//if ((myparent.MyItemInfo.FormatStepData != null) && (myparent.MyItemInfo.FormatStepData.TabData.IdentWidth ?? 0) > 0)
|
||||
//if ((myparent.MyItemInfo.FormatStepData != null) && (myparent.MyItemInfo.FormatStepData.TabData.IdentWidth ?? 0) > 0)
|
||||
Width = (float)myparent.MyItemInfo.FormatStepData.TabData.IdentWidth;
|
||||
else if (CCCs != IIIs)
|
||||
{
|
||||
float tPtPerChar = myparent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TabPtsPerChar ?? 6;
|
||||
Width = tPtPerChar * origTab.Length;
|
||||
Width = (tPtPerChar == 0 ? 6 : tPtPerChar) * origTab.Length;
|
||||
// Check the following, it may be needed for FPL:
|
||||
//origTab1 = origTab1.TrimStart(" ".ToCharArray());
|
||||
// 6 = number of points per character. 4 characters between end of tab and beginning of text
|
||||
@@ -144,7 +144,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
else
|
||||
Width = GetTextWidth(MyFont, (Text != null ? Text : origTab), symblFontName); //MyFont.CharsToTwips * (Text != null ? Text.Length : origTab.Length);
|
||||
|
||||
|
||||
// Pairie Island (NSP) Caution and Note tabs use a larger font
|
||||
// When using a bullet, we need to use the font size of the Caution/Note text instead of the tab.
|
||||
// To do this we set the TabData.Bullet.Separate to true (currently - 4/26/2013 - only NSP uses this).
|
||||
@@ -170,7 +170,7 @@ namespace Volian.Print.Library
|
||||
if (CCCs != IIIs)
|
||||
{
|
||||
float? tPtPerChar1 = myparent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TabPtsPerChar;
|
||||
if (tPtPerChar1!=null)
|
||||
if (tPtPerChar1 != null)
|
||||
Width = (float)tPtPerChar1 * origTab.Length;
|
||||
else
|
||||
{
|
||||
@@ -241,7 +241,7 @@ namespace Volian.Print.Library
|
||||
Rtf = Rtf.Replace("\u0394", @"\f1\u916?\f0 "); // delta 0x0394
|
||||
if (ScriptCaution)
|
||||
{
|
||||
Rtf = GetRtf("\u25CFCaution ", vFont);
|
||||
Rtf = GetRtf("\u25CFCaution ", vFont);
|
||||
Rtf = Rtf.Replace("\u25CF", @"\f1\fs20 \u9679?\f0\par\f0\fs64 "); // bullet 25CF // jsj- force bullet size (is different than tab text)
|
||||
if (myparent.MyItemInfo.FormatStepData != null && !myparent.MyItemInfo.FormatStepData.AlwaysTab && myparent.MyItemInfo.MyPrevious != null)
|
||||
Rtf = Rtf.Replace("Caution ", @"\u61472?\u61472?\u61472?\u61472?\u61472?\u61472?\u61472?\u61472?\u61472?");
|
||||
@@ -294,12 +294,12 @@ namespace Volian.Print.Library
|
||||
XOffset = xoffset;
|
||||
// the width was just a little small, so it was wrapping - but only if there were no spaces at end
|
||||
// so use this condition to do minimal impact (WCN1 format, for section tabs with three places, i.e. 6.1.2
|
||||
if (!cleanTab.EndsWith(" "))Width += .1f;
|
||||
if (!cleanTab.EndsWith(" ")) Width += .1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
// if using a proportional font and the tab font/size is different than the text font/size
|
||||
if (CCCs != IIIs &&
|
||||
if (CCCs != IIIs &&
|
||||
(MyFont.Family != myparent.MyItemInfo.FormatStepData.Font.Family ||
|
||||
MyFont.Size != myparent.MyItemInfo.FormatStepData.Font.Size))
|
||||
{
|
||||
@@ -308,14 +308,14 @@ namespace Volian.Print.Library
|
||||
string txt = Text;
|
||||
if (alignAsIfBulleted)
|
||||
txt += myparent.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB;
|
||||
System.Drawing.Font font = new System.Drawing.Font(MyFont.Family,(float)MyFont.Size);
|
||||
iTextSharp.text.Font iFont = Volian.Svg.Library.VolianPdf.GetFont(font);
|
||||
System.Drawing.Font font = new System.Drawing.Font(MyFont.Family, (float)MyFont.Size);
|
||||
iTextSharp.text.Font iFont = Volian.Svg.Library.VolianPdf.GetFont(font);
|
||||
float w = iFont.BaseFont.GetWidthPointKerned(txt, (float)MyFont.Size);
|
||||
Width = w;
|
||||
Width = w;
|
||||
}
|
||||
XOffset = xoffset - Width;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public override float ToPdf(PdfContentByte cb, float yPageStart, ref float yTopMargin, ref float yBottomMargin)
|
||||
{
|
||||
|
Reference in New Issue
Block a user