Compare commits
No commits in common. "4879a923d761f964f9cf018e686e30b588e7fcaf" and "50d462e806bd03893022def28c3bb1aa2098b96d" have entirely different histories.
4879a923d7
...
50d462e806
@ -301,9 +301,6 @@
|
||||
<Content Include="fmtall\SHESAMall.xml" />
|
||||
<Content Include="fmtall\SHESSDall.xml" />
|
||||
<Content Include="fmtall\SHESSD_00all.xml" />
|
||||
<Content Include="fmtall\VEGP1all.xml" />
|
||||
<Content Include="fmtall\VEGP2all.xml" />
|
||||
<Content Include="fmtall\VEGPAlrall.xml" />
|
||||
<Content Include="fmtall\SUMall.xml" />
|
||||
<Content Include="fmtall\SUMSAMall.xml" />
|
||||
<Content Include="fmtall\TPall.xml" />
|
||||
@ -510,9 +507,6 @@
|
||||
<Content Include="genmacall\shervsu.svg" />
|
||||
<Content Include="genmacall\shesam.svg" />
|
||||
<Content Include="genmacall\shessd.svg" />
|
||||
<Content Include="genmacall\VEGP1.svg" />
|
||||
<Content Include="genmacall\VEGP2.svg" />
|
||||
<Content Include="genmacall\VEGPAlr.svg" />
|
||||
<Content Include="genmacall\sum.svg" />
|
||||
<Content Include="genmacall\sumsam.svg" />
|
||||
<Content Include="genmacall\tp.svg" />
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -8067,8 +8067,7 @@ namespace VEPROMS.CSLA.Library
|
||||
private string GetSectionTab(bool underline)
|
||||
{
|
||||
if (DisplayNumber == null || DisplayNumber == "" || !IsStepSection) return DisplayNumber;
|
||||
// added DontParseSectionNumber flag so that the section number is used as is
|
||||
if (MyDocStyle.SpecialStepsFoldout || MyDocStyle.DontParseSectionNumber) return DisplayNumber;
|
||||
if (MyDocStyle.SpecialStepsFoldout) return DisplayNumber;
|
||||
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.TieTabToLevel)
|
||||
{
|
||||
if (underline)
|
||||
|
@ -378,18 +378,6 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region Section Number Flags
|
||||
[Category("Miscellaneous")]
|
||||
[Description("Don't parse the section number - use DisplayNumber value")]
|
||||
private LazyLoad<bool> _DontParseSectionNumber;
|
||||
public bool DontParseSectionNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _DontParseSectionNumber, "@DontParseSectionNumber");
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region SpecialStepsFoldout
|
||||
[Category("Miscellaneous")]
|
||||
[Description("Section Special Steps Foldout")]
|
||||
@ -640,13 +628,13 @@ namespace VEPROMS.CSLA.Library
|
||||
if (PlantFormat.IgnoreUCF) return LazyLoad(ref _LeftMargin, "@LeftMargin");
|
||||
if (MyFormat.PlantFormat.FormatConfig == null) return LazyLoad(ref _LeftMargin, "@LeftMargin");
|
||||
|
||||
// see if there is UCF (User Control of Format) data, need to match the index of the ucf data to that in the original format, and
|
||||
// also need to check that LeftMargin is not null, since other docstyle data may exist in UCF but not LeftMargin:
|
||||
XmlNode par = this.XmlNode.ParentNode;
|
||||
// see if there is UCF data, need to match the index of the ucf data to that in the original format, and
|
||||
// also need to check that LeftMargin is not null, since other docstyle data may exist in UCF but not PageLength:
|
||||
XmlNode par = this.XmlNode.ParentNode;
|
||||
string indx = null;
|
||||
XmlElement ele = par as XmlElement;
|
||||
if (ele.HasAttribute("Index")) indx = ele.GetAttribute("Index");
|
||||
if (indx == null) return LazyLoad(ref _LeftMargin, "@LeftMargin");
|
||||
if (indx == null) return LazyLoad(ref _PageLength, "@LeftMargin");
|
||||
if (MyFormat.PlantFormat.FormatConfig != null && this.MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles != null && MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles.Count > 0)
|
||||
{
|
||||
foreach (FormatConfig.DocStyle ds in MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles)
|
||||
@ -675,7 +663,7 @@ namespace VEPROMS.CSLA.Library
|
||||
if (PlantFormat.IgnoreUCF) return LazyLoad(ref _PageLength, "@PageLength");
|
||||
if (MyFormat.PlantFormat.FormatConfig == null) return LazyLoad(ref _PageLength, "@PageLength");
|
||||
|
||||
// see if there is UCF (User Control of Format) data, need to match the index of the ucf data to that in the original format, and
|
||||
// see if there is UCF data, need to match the index of the ucf data to that in the original format, and
|
||||
// also need to check that PageLength is not null, since other docstyle data may exist in UCF but not PageLength:
|
||||
XmlNode par = this.XmlNode.ParentNode;
|
||||
string indx = null;
|
||||
|
@ -32,11 +32,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
set { _FormatConfig = value; }
|
||||
}
|
||||
#region User Control of Format (UCF)
|
||||
// User Control of Format allows a PROMS user to make modifications to a very limited set of format settings
|
||||
// Variables in this region are not set in the format files. They are used only in the C# code
|
||||
|
||||
// when IgnoreUCF is true, get the original data, i.e. don't apply any UCF changes to it
|
||||
// when IgnoreUCF is true, get the original data, i.e. don't apply any UCF changes to it
|
||||
private static bool _IgnoreUCF = false;
|
||||
public static bool IgnoreUCF
|
||||
{
|
||||
@ -57,7 +53,6 @@ namespace VEPROMS.CSLA.Library
|
||||
get { return PlantFormat._DoingUCFCheckOffsUse; }
|
||||
set { PlantFormat._DoingUCFCheckOffsUse = value; }
|
||||
}
|
||||
#endregion //User Control of Format (UCF)
|
||||
public static FormatConfig GetFormatConfig(IFormatOrFormatInfo format)
|
||||
{
|
||||
FormatConfig fc = null;
|
||||
@ -83,8 +78,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return _XmlDoc;
|
||||
}
|
||||
}
|
||||
// FormatData contains flag and specific settings for step/sub-step types, tabbing information, etc. (pertains to the entire format)
|
||||
// Reads this information in from the format file
|
||||
private FormatData _FormatData;
|
||||
public FormatData FormatData
|
||||
{
|
||||
@ -95,9 +88,6 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
private PageStyles _PageStyles;
|
||||
// PageStyles (AKA PageList) contains settings used to print page boarders, page numbers, and positions information such as procedure number/title in page headers.
|
||||
// These are associated with the sections defined in DocStyle
|
||||
// Reads this information in from the format file
|
||||
public PageStyles PageStyles
|
||||
{
|
||||
get
|
||||
@ -107,8 +97,6 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
private DocStyles _DocStyles;
|
||||
// DocStyles define page margins, continue messages, end messages and associate each section with a PageSyle
|
||||
// Reads this information in from the format file
|
||||
public DocStyles DocStyles
|
||||
{
|
||||
get
|
||||
@ -117,18 +105,13 @@ namespace VEPROMS.CSLA.Library
|
||||
return _DocStyles;
|
||||
}
|
||||
}
|
||||
// Used to test if the current PageStyle uses the passed in "token"
|
||||
// A token in a PageStyle is surrounded by open/close curly brackets.
|
||||
// ex: {myToken}
|
||||
public bool HasPageListToken(string token)
|
||||
public bool HasPageListToken(string token)
|
||||
{
|
||||
string xpath = string.Format("/PlantFormat/PageStyles/PageStyle/Item[@Token = '{0}']", token);
|
||||
XmlNodeList nl = XmlDoc.SelectNodes(xpath);
|
||||
return nl.Count > 0;
|
||||
}
|
||||
private FormatConfig.ReplaceStrData _UCFandOrigReplaceStrData = null;
|
||||
// This will return a complete list of ReplaceWords, combining those in the original plant format
|
||||
// with the ones added by the user via User Control of Format (UCF)
|
||||
public FormatConfig.ReplaceStrData UCFandOrigReplaceStrData
|
||||
{
|
||||
get
|
||||
@ -224,7 +207,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_WinFontLookup.Add(key, new Font(family, size, style));
|
||||
return _WinFontLookup[key];
|
||||
}
|
||||
// part of bug B2017-117 and for conservation of window handles to reduce the frequency of
|
||||
// part of bug B2017-117 and for conservation of winow handles to reduce the frequency of
|
||||
// the Out of Window Handles error when editing and printing.
|
||||
// we are now using a common dictionary for font usages
|
||||
public static Font GetWinSysFont(string family, float size, FontStyle style)
|
||||
@ -341,7 +324,6 @@ namespace VEPROMS.CSLA.Library
|
||||
public class FormatData : vlnFormatItem
|
||||
{
|
||||
public FormatData(XmlNode xmlNode) : base(xmlNode) { }
|
||||
// Name of the format - as it appears when selecting the format to use in PROMS
|
||||
private LazyLoad<string> _Name;
|
||||
public string Name
|
||||
{
|
||||
@ -350,7 +332,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _Name, "@Name");
|
||||
}
|
||||
}
|
||||
// When true, this format is allowed to be used in the PROMS Express product
|
||||
private LazyLoad<bool> _Express;
|
||||
public bool Express
|
||||
{
|
||||
@ -359,8 +340,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _Express, "@Express");
|
||||
}
|
||||
}
|
||||
// When set to True, it enables the use of a Procedure Set Specific dialog, containing defined fields
|
||||
// in which the user enters data that is printed on all or specific pages for all of the procedures in the set using this format
|
||||
private LazyLoad<bool> _SpecificInfo;
|
||||
public bool SpecificInfo
|
||||
{
|
||||
@ -369,8 +348,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _SpecificInfo, "@SpecificInfo");
|
||||
}
|
||||
}
|
||||
// this is a structure defined in the format file that defines labels and fields on a pop-up dialog
|
||||
// in which the user will enter data - this is accessible only at the procedure set level
|
||||
private SI _SI;
|
||||
public SI SI
|
||||
{
|
||||
@ -394,15 +371,12 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _TPL, "@TPL");
|
||||
}
|
||||
}
|
||||
// not defined in format files, we now use TPL to define both the original and new template
|
||||
// the C# determines if it's a smart (new) template or the old style (search for NewTemplateFormat to see the code)
|
||||
private bool _NewTemplateFormat;
|
||||
public bool NewTemplateFormat
|
||||
{
|
||||
get { return _NewTemplateFormat; }
|
||||
set { _NewTemplateFormat = value; }
|
||||
}
|
||||
// Creates a dictionary of the templates (TPL) defined in the format
|
||||
private Dictionary<int, int> _TopTemplateTypes;
|
||||
public Dictionary<int, int> TopTemplateTypes
|
||||
{
|
||||
@ -424,8 +398,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return _TopTemplateTypes;
|
||||
}
|
||||
}
|
||||
// Parses the templates defined in the format file and creates a list
|
||||
// this also determines if it a Smart Template or the original style
|
||||
private List<TPlate> _Templates;
|
||||
public List<TPlate> Templates
|
||||
{
|
||||
@ -525,9 +497,6 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
|
||||
// Old style format flags (from DOS version of PROMS)
|
||||
// where we check which bits of the integer is set to determine if that option can be used.
|
||||
// See E_PurchaseOptions in ENums.cs for a description of each option flag (bit)
|
||||
private LazyLoad<E_PurchaseOptions?> _PurchaseOptions;
|
||||
public E_PurchaseOptions? PurchaseOptions
|
||||
{
|
||||
@ -536,8 +505,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad<E_PurchaseOptions>(ref _PurchaseOptions, "@PurchaseOptions");
|
||||
}
|
||||
}
|
||||
// Set at the top of the format(under FormatData) defined the default font used in this format.
|
||||
// Specific step types can have different font information assigned to override this default
|
||||
private VE_Font _Font;
|
||||
public VE_Font Font
|
||||
{
|
||||
@ -554,7 +521,7 @@ namespace VEPROMS.CSLA.Library
|
||||
return _PDFPageSize == null ? _PDFPageSize = new PDFPageSize(SelectSingleNode("PDFPageSize")) : _PDFPageSize;
|
||||
}
|
||||
}
|
||||
//C2021-005 Format file grouping containing a list of possible font sizes (used only for table text via the Table Ribbon)
|
||||
//C2021-005 Format file grouping containing a list of possible font sizes (used only for table text)
|
||||
private FontSizes _FontSizes;
|
||||
public FontSizes FontSizes
|
||||
{
|
||||
@ -563,7 +530,7 @@ namespace VEPROMS.CSLA.Library
|
||||
return _FontSizes == null ? _FontSizes = new FontSizes(SelectSingleNode("FontSizes")) : _FontSizes;
|
||||
}
|
||||
}
|
||||
// C2021-004 This gets the list for additional Table Cell shading options defined in the format (base) file
|
||||
// C2021-004 This gets the list for additional shading options defined in the format (base) file
|
||||
private ShadingOptionList _ShadingOptionList;
|
||||
public ShadingOptionList ShadingOptionList
|
||||
{
|
||||
@ -583,8 +550,6 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
set { _UnitWatermarkList = value; }
|
||||
}
|
||||
// This is a list of supported symbol characters used in the PROMS step editor
|
||||
// the master list is defined in the base format (Baseall.xml)
|
||||
private SymbolList _SymbolList;
|
||||
public SymbolList SymbolList
|
||||
{
|
||||
@ -1615,11 +1580,10 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
// The following line is used in UCF (User Control of Format).
|
||||
// This needs to be able to control a change in setting in UCF versus its use:
|
||||
// - This is a special case since the original format, using the value in BaseAll, is always 'false'. And the value
|
||||
// should never be set in original volian plant format files, if the additional UCF checkoffs are to be used, this must
|
||||
// be set in the UCF user interface.
|
||||
// The following line is used in UCF: this needs to be able to control a change in setting in UCF versus its use:
|
||||
// This is a special case since the original format, using the value in BaseAll, is always 'false'. And the value
|
||||
// should never be set in original volian plant format files, if the additional UCF checkoffs are to be used, this must
|
||||
// be set in the UCF user interface.
|
||||
if (PlantFormat.DoingUCFCheckOffs) return PlantFormat.DoingUCFCheckOffsUse;
|
||||
|
||||
if (PlantFormat.IgnoreUCF) return LazyLoad(ref _CheckOffUCF, "@CheckOffUCF");
|
||||
@ -2922,15 +2886,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _OnlyBoldTopSect, "@OnlyBoldTopSect");
|
||||
}
|
||||
}
|
||||
// If the section number is null or all blanks, then use the SectionNumber.Pos to position the section title
|
||||
private LazyLoad<bool> _UseNumPosWhenNumBlank;
|
||||
public bool UseNumPosWhenNumBlank
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _UseNumPosWhenNumBlank, "@UseNumPosWhenNumBlank");
|
||||
}
|
||||
}
|
||||
private VE_Font _Font;
|
||||
public VE_Font Font
|
||||
{
|
||||
|
@ -1983,7 +1983,7 @@ i = 0;
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayText));
|
||||
break;
|
||||
case "{METASECTIONTITLE}": // This will print the top level section title (versus level above current) starting from a sub-section
|
||||
case "{METASECTIONTITLE}": // This will print the top level section title (versus level above current)
|
||||
case "[METASECTIONTITLE]":
|
||||
if (section.MyParent.IsSection)
|
||||
{
|
||||
@ -2000,21 +2000,6 @@ i = 0;
|
||||
else
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{TOPSECTIONTITLE}": // This will print the top level section title
|
||||
case "[TOPSECTIONTITLE]":
|
||||
// get top most section:
|
||||
{
|
||||
ItemInfo top = section;
|
||||
while (top.MyParent != null && !top.MyParent.IsProcedure)
|
||||
{
|
||||
top = top.MyParent;
|
||||
}
|
||||
if (top.IsSection)
|
||||
plstr = SplitTitle(svgGroup, pageItem, top.DisplayText, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionTitleLength, token, plstr, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionNumberAndTitleLength);
|
||||
else
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
}
|
||||
break;
|
||||
case "{SECTIONLEVELNUMBER}":
|
||||
case "[SECTIONLEVELNUMBER]":
|
||||
// don't put out section title/number if doing SAMG facing pages
|
||||
@ -2035,7 +2020,7 @@ i = 0;
|
||||
plstr = plstr.Substring(3);
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token.Replace(token, section.DisplayNumber)));
|
||||
break;
|
||||
case "{METASECTIONNUMBER}": // This will print the top level section number when starting from a sub-section
|
||||
case "{METASECTIONNUMBER}": // This will print the top level section number
|
||||
case "[METASECTIONNUMBER]":
|
||||
if (section.MyParent.IsSection)
|
||||
{
|
||||
@ -2050,21 +2035,6 @@ i = 0;
|
||||
else
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{TOPSECTIONNUMBER}": // This will print the top level section number
|
||||
case "[TOPSECTIONNUMBER]":
|
||||
// get top most section:
|
||||
{
|
||||
ItemInfo top = section;
|
||||
while (top.MyParent != null && !top.MyParent.IsProcedure)
|
||||
{
|
||||
top = top.MyParent;
|
||||
}
|
||||
if (top.IsSection)
|
||||
plstr = plstr.Replace(token, top.DisplayNumber);
|
||||
else
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
}
|
||||
break;
|
||||
case "{UNITTEXT}":
|
||||
case "[UNITTEXT]":
|
||||
plstr = plstr.Replace(token, MySection.MyDocVersion.DocVersionConfig.Unit_Text);
|
||||
|
@ -2338,8 +2338,7 @@ namespace Volian.Print.Library
|
||||
else
|
||||
{ // Center the bottom message
|
||||
float wtpm = (float)docstyle.Layout.PageWidth - (float)docstyle.Layout.LeftMargin;
|
||||
//B2022-126 was using the wrong font definition to calaculate the centering position
|
||||
xpos = XOffsetBox + (float)docstyle.Layout.LeftMargin + (wtpm - (myMsg.Length * docstyle.End.Font.CharsToTwips)) / 2;
|
||||
xpos = XOffsetBox + (float)docstyle.Layout.LeftMargin + (wtpm - (myMsg.Length * MyItemInfo.FormatStepData.Font.CharsToTwips)) / 2;
|
||||
xpos = Math.Max(xpos, XOffsetBox + (float)docstyle.Layout.LeftMargin);
|
||||
vlnText vttmp = new vlnText(cb, this, myMsg, myMsg, xpos, msg_yLocation, docstyle.End.Font);
|
||||
MyPageHelper.BottomMessage.Add(vttmp);
|
||||
@ -6079,15 +6078,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
level = level <= 2 ? 1 : level - 1;
|
||||
if (level == 1)
|
||||
{
|
||||
// Use the section number position for the section title when the section number is blank
|
||||
if (formatInfo.PlantFormat.FormatData.SectData.SectionHeader.UseNumPosWhenNumBlank && MyTab != null && MyTab.Text.Trim().Length == 0)
|
||||
{
|
||||
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + ((float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos);
|
||||
}
|
||||
else
|
||||
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (level * (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos);
|
||||
}
|
||||
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + (level * (float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos);
|
||||
else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvert)
|
||||
XOffset = (myTab == null ? 0 : myTab.XOffset) + ((float)formatInfo.PlantFormat.FormatData.SectData.SectionHeader.Pos - (float)formatInfo.PlantFormat.FormatData.SectData.SectionNumber.Pos);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user