Fixed separator location logic, added Template logic for Prairie Island Alarms

Added ChildIndent for use with Callaway Backgounds
This commit is contained in:
2013-12-06 19:51:59 +00:00
parent 7f396c2285
commit a2f1fb0640
3 changed files with 91 additions and 2 deletions

View File

@@ -2707,7 +2707,24 @@ namespace VEPROMS.CSLA.Library
_MyHeader.Text = FormatStepData.Sep;
_MyHeader.CleanText = StripRtfFormatting(_MyHeader.Text);
_MyHeader.Justify = ContentAlignment.MiddleCenter;
// per 16-bit format speadsheet, Location can have the following values:
// 0 - Left
// 1 - Right
// 2 or greater - Center
int sepLoc = ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.Separator.Location?? 2; //default to Center
switch (sepLoc)
{
case 0:
_MyHeader.Justify = ContentAlignment.MiddleLeft;
break;
case 1:
_MyHeader.Justify = ContentAlignment.MiddleRight;
break;
default:
_MyHeader.Justify = ContentAlignment.MiddleCenter;
break;
}
//_MyHeader.Justify = ContentAlignment.MiddleCenter;
}
#region Non Converted Plants tab TODO
// Position offset
@@ -3209,6 +3226,13 @@ namespace VEPROMS.CSLA.Library
if (IsStep && FormatStepData.MyFormat.PlantFormat.FormatData.TopTemplateTypes.ContainsKey((int)MyContent.Type - 20001)) return true;
return false;
}
public int GetSmartTemplateTopLevelIndxOfThisType(int oftype)
{
FormatData formatData = FormatStepData.MyFormat.PlantFormat.FormatData;
if (formatData.TopTemplateTypes == null || formatData.TopTemplateTypes.Count == 0) return -1;
if (formatData.TopTemplateTypes.ContainsKey(oftype - 20001)) return formatData.TopTemplateTypes[oftype - 20001];
return -1;
}
public int GetSmartTemplateTopLevelIndx()
{
FormatData formatData = FormatStepData.MyFormat.PlantFormat.FormatData;