C2019-042 Added a check box to identify a section as being a foldout – used in with printing in duplex

C2019-042 use new format config setting to check if sections are foldouts
C2019-042 use new format config setting to check if sections are foldout
B2019-134 code cleanup, discovered we were missing a “break;” statement in processing folder specific information
This commit is contained in:
2019-11-06 20:50:29 +00:00
parent e8cac09909
commit cfb847de9c
10 changed files with 294 additions and 198 deletions

View File

@@ -274,6 +274,31 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Section_WordMargin");
}
}
//C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
[Category("Format")]
[DisplayName("This is a Foldout Section")]
[Description("Identify This Section as a Foldout")]
public string Section_IsFoldout
{
get
{
string rtnstr = "N";
string tmp = _Xp["Section", "IsFoldout"];
if (tmp == null || tmp == "")
{
if ((Number != null && Number.ToUpper().StartsWith("FOLDOUT")) || (Title != null && Title.ToUpper().Contains("FOLDOUT")))
rtnstr = "Y";
}
else
rtnstr = tmp;
return rtnstr;
}
set
{
_Xp["Section", "IsFoldout"] = value;
OnPropertyChanged("Section_IsFoldout");
}
}
#endregion
#region ToString
public override string ToString()

View File

@@ -1160,8 +1160,8 @@ namespace VEPROMS.CSLA.Library
//At some point, add a property off a section 'IsFoldout' and use the next two lines:
//if ((myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts && mySection.MyContent.Number.ToUpper() == "FOLDOUT")
//|| (myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.AlternateFloatingFoldout && mySection.MyContent.Text.ToUpper().Contains("FOLDOUT")))
if (tb._ToItem.PageNumber != -1 && (tb._FromItem.PageNumber != -1 || tb._FromItem.ActiveSection.MyContent.Number.ToUpper() == "FOLDOUT"))
{
if (tb._ToItem.PageNumber != -1 && (tb._FromItem.PageNumber != -1 || (tb._FromItem.ActiveSection.MyConfig as SectionConfig).Section_IsFoldout == "Y")) //C2019-042 Section_IsFoldout checks Section Number, Section Title, and use of check box
{
int pgoffset = tb._ToItem.PageNumber - tb._FromItem.PageNumber;
tb._ToItem.PageNumberUsed = tb._ToItem.PageNumber;