Adjust widths of items within the template for non-CONDITION/RESPONSE steps
Determine if step is within a single column template step Use width for template items (uses change in format file); fixed HLS continue message location; center table around page center if under a single column template step
This commit is contained in:
@@ -100,16 +100,16 @@ namespace Volian.Print.Library
|
||||
if (childItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
{
|
||||
// if this template element has a -1 for row, print it (if = 0 this is a heading for edit
|
||||
// and not printed). if this template element has a width of 0, then also print it,
|
||||
// and not printed). if this template element has a width of > 0, then also print it,
|
||||
// these are headings and should be printed). This was added for Calvert Alarm (BGEALN) format for
|
||||
// DEVICE/SETPOINT (row=-1), and for POSSIBLE CAUSES, AUTOMATIC ACTIONS, etc (width=0)
|
||||
// DEVICE/SETPOINT (row=-1), and for POSSIBLE CAUSES, AUTOMATIC ACTIONS, etc (width>0)
|
||||
// find the indexes into the template for this item. The index must be for the HLS this is
|
||||
// or this is under.
|
||||
int tindx = childItemInfo.TemplateIndex;
|
||||
if (tindx == -1)
|
||||
xoff = (float)childItemInfo.MyDocStyle.Layout.LeftMargin;
|
||||
else if (childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].row < 0 ||
|
||||
childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].width == 0)
|
||||
childItemInfo.ActiveFormat.PlantFormat.FormatData.Templates[tindx].width > 0)
|
||||
{
|
||||
// move down for the 'POSSIBLE CAUSES'. To know it's that step type, check
|
||||
// the column field in template. -1 represents staying on same row but using
|
||||
@@ -1304,7 +1304,7 @@ namespace Volian.Print.Library
|
||||
string HLSTabTextForContMsg = MyHighLevelParagraph.MyItemInfo.MyTab.CleanText + " " + MyHighLevelParagraph.MyItemInfo.MyContent.Text;
|
||||
int len = (HLSTabTextForContMsg.Length - 10) * 6;
|
||||
HLSTabTextForContMsg = @"\ul\b " + MyHighLevelParagraph.MyItemInfo.MyTab.CleanText.Trim() + @" \b0\ulnone \b " + MyHighLevelParagraph.MyItemInfo.MyContent.Text + @"\b0";
|
||||
MyPageHelper.TopMessageR = new vlnText(cb, this, HLSTabTextForContMsg, HLSTabTextForContMsg, (float)docstyle.Layout.PageWidth - len, yTopMargin + 0.1F, docstyle.Continue.Top.Font);
|
||||
MyPageHelper.TopMessageR = new vlnText(cb, this, HLSTabTextForContMsg, HLSTabTextForContMsg, MyHighLevelParagraph.MyTab.XOffset, yTopMargin + 0.1F, docstyle.Continue.Top.Font);
|
||||
if (subTab != null && MyItemInfo.StepLevel > 2)
|
||||
{
|
||||
float ybot = yTopMargin + (4 * SixLinesPerInch);
|
||||
@@ -2710,7 +2710,8 @@ namespace Volian.Print.Library
|
||||
{
|
||||
bool aerTableOrFigure = itemInfo.FormatStepData.Type.Contains("AER");
|
||||
vlnParagraph hls1 = MyParent;
|
||||
while (hls1.MyParent != null && !hls1.MyItemInfo.IsHigh) hls1 = hls1.MyParent;
|
||||
if (!formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
while (hls1.MyParent != null && !hls1.MyItemInfo.IsHigh) hls1 = hls1.MyParent;
|
||||
float colR = float.Parse(formatInfo.MyStepSectionLayoutData.ColRTable.Split(",".ToCharArray())[itemInfo.ColumnMode]);
|
||||
float xLowerLimit = (aerTableOrFigure && hls1.PartsLeft != null && hls1.PartsLeft.Count > 0) ? hls1.PartsLeft[0].XOffset : hls1.XOffset;
|
||||
float xUpperLimit = 0;
|
||||
@@ -2725,8 +2726,14 @@ namespace Volian.Print.Library
|
||||
// the around the right margin, i.e. 'hls xoffset' + 'location of rno (colR) * columnmode' + 'width of rno'
|
||||
xUpperLimit = hls1.XOffset + hls1.Width + colR * itemInfo.ColumnMode;
|
||||
|
||||
// If a table is within the alarm section and its parent is a template item is single column
|
||||
// adjust the xoffset so that the table is centered around center of page
|
||||
bool ctrCalvertAlarmTbl = false;
|
||||
if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
ctrCalvertAlarmTbl = MyItemInfo.IsWithInSingleColumnTemplate();
|
||||
|
||||
float TableCenterPos = float.Parse(formatInfo.MyStepSectionLayoutData.TableCenterPos.Split(",".ToCharArray())[itemInfo.ColumnMode]);
|
||||
if (formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
||||
if (ctrCalvertAlarmTbl || formatInfo.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
||||
XOffset = leftMargin + (pageWidth - leftMargin - Width) / 2;
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user