This commit is contained in:
parent
37dc25c7cb
commit
84d293dc34
@ -378,6 +378,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
_AppendMethods.Add("{?.Sect Hdr}", AddOptionalTranGetSectionHdr);
|
_AppendMethods.Add("{?.Sect Hdr}", AddOptionalTranGetSectionHdr);
|
||||||
_AppendMethods.Add("{Sect Title}", AddTranGetSectionTitle);
|
_AppendMethods.Add("{Sect Title}", AddTranGetSectionTitle);
|
||||||
_AppendMethods.Add("{?.Sect Title}", AddOptionalTranGetSectionTitle);
|
_AppendMethods.Add("{?.Sect Title}", AddOptionalTranGetSectionTitle);
|
||||||
|
_AppendMethods.Add("{?.Sect Num}", AddOptionalTranGetSectionNum);
|
||||||
_AppendMethods.Add("{Sect Num}", AddTranGetSectionNumber);
|
_AppendMethods.Add("{Sect Num}", AddTranGetSectionNumber);
|
||||||
}
|
}
|
||||||
public static string GetResolvedText(ItemInfo fromInfo, int tranType, ItemInfo toItem, ItemInfo rangeItem)
|
public static string GetResolvedText(ItemInfo fromInfo, int tranType, ItemInfo toItem, ItemInfo rangeItem)
|
||||||
@ -417,6 +418,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
bool lastAdded = false;
|
bool lastAdded = false;
|
||||||
while ((index = tb._TransFormat.IndexOf("{", startIndex)) > -1)
|
while ((index = tb._TransFormat.IndexOf("{", startIndex)) > -1)
|
||||||
{
|
{
|
||||||
|
prefix = null;
|
||||||
if (index > startIndex) prefix = tb._TransFormat.Substring(startIndex, index - startIndex);
|
if (index > startIndex) prefix = tb._TransFormat.Substring(startIndex, index - startIndex);
|
||||||
if (startIndex == 0 && prefix != null && prefix.Length > 0)
|
if (startIndex == 0 && prefix != null && prefix.Length > 0)
|
||||||
{
|
{
|
||||||
@ -448,7 +450,6 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return (tb.ToString());
|
return (tb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: TStepNoFlag, i.e. include step number in range items.
|
|
||||||
// TODO: TStepNoFlag, i.e. include step number in range items.
|
// TODO: TStepNoFlag, i.e. include step number in range items.
|
||||||
// TODO: For hlp: LowerCaseTranNumber - lower case substep numbers in transitions
|
// TODO: For hlp: LowerCaseTranNumber - lower case substep numbers in transitions
|
||||||
private static bool AddTransitionProcNum(TransitionBuilder tb) // Coded for HLP
|
private static bool AddTransitionProcNum(TransitionBuilder tb) // Coded for HLP
|
||||||
@ -458,6 +459,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// LATER: Format Flag TruncateProcNmAfter1stSpace (dropped plants)
|
// LATER: Format Flag TruncateProcNmAfter1stSpace (dropped plants)
|
||||||
// LATER: Format Flag HardSpTranProcNumb (active plants)
|
// LATER: Format Flag HardSpTranProcNumb (active plants)
|
||||||
tb.AppendPrefix();
|
tb.AppendPrefix();
|
||||||
|
if (tb._FormatData.TransData.HardSpTranProcNumb) retstr = retstr.Replace(" ", @"\u160?");
|
||||||
tb.ReplaceToken(retstr);
|
tb.ReplaceToken(retstr);
|
||||||
return (retstr != null && retstr != "");
|
return (retstr != null && retstr != "");
|
||||||
}
|
}
|
||||||
@ -568,7 +570,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
// check for transition that goes to a procedure step section with title of 'Procedure steps' followed
|
// check for transition that goes to a procedure step section with title of 'Procedure steps' followed
|
||||||
// by ', Step'. This should output as 'Procedure step xyz' rather than 'Procedure steps, step xyz'
|
// by ', Step'. This should output as 'Procedure step xyz' rather than 'Procedure steps, step xyz'
|
||||||
if (!tb._TransFormat.Contains("{Last Step}") && tb.Prefix.ToUpper().Contains(", STEP") && tb.ToString().ToUpper().EndsWith("PROCEDURE STEPS"))
|
if (!tb._TransFormat.Contains("{Last Step}") && tb.Prefix != null && tb.Prefix.ToUpper().Contains(", STEP") && tb.ToString().ToUpper().EndsWith("PROCEDURE STEPS"))
|
||||||
{
|
{
|
||||||
tb.Remove(tb.Length - 15, 15); // remove "procedure steps"
|
tb.Remove(tb.Length - 15, 15); // remove "procedure steps"
|
||||||
tb.Append("procedure Step");
|
tb.Append("procedure Step");
|
||||||
@ -582,6 +584,12 @@ namespace VEPROMS.CSLA.Library
|
|||||||
tb.ReplaceToken(Tab(tb._ToItem));
|
tb.ReplaceToken(Tab(tb._ToItem));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if ((tb._ToItem.IsSection || tb._ToItem.IsProcedure) && ((tb._TransUI & E_TransUI.StepAllowNone) == E_TransUI.StepAllowNone))
|
||||||
|
{
|
||||||
|
string tmpStr = tb.ToString();
|
||||||
|
if (tmpStr.ToUpper().EndsWith(", STEP ")) tb.Remove(tb.Length - 7, 7); // 7 is length of ", Step "
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -683,12 +691,21 @@ namespace VEPROMS.CSLA.Library
|
|||||||
tb.ReplaceToken(retstr);
|
tb.ReplaceToken(retstr);
|
||||||
return (retstr != null && retstr != "");
|
return (retstr != null && retstr != "");
|
||||||
}
|
}
|
||||||
|
private static bool AddOptionalTranGetSectionNum(TransitionBuilder tb)
|
||||||
|
{
|
||||||
|
if (TranGetSectionItem(tb._FromItem).ItemID == TranGetSectionItem(tb._ToItem).ItemID) return false;
|
||||||
|
if (tb._ToItem.IsSection) return false;
|
||||||
|
tb.AppendPrefix();
|
||||||
|
string retstr = TranGetSectionNumber(tb._ToItem);
|
||||||
|
tb.ReplaceToken(retstr);
|
||||||
|
return (retstr != null && retstr != "");
|
||||||
|
}
|
||||||
private static bool AddTranGetSectionTitle(TransitionBuilder tb)
|
private static bool AddTranGetSectionTitle(TransitionBuilder tb)
|
||||||
{
|
{
|
||||||
// LATER: Cap1stSectionTitle, CapFirstLetterOnly
|
// LATER: Cap1stSectionTitle, CapFirstLetterOnly
|
||||||
if (tb._FormatData.TransData.UseSecTitles)
|
if (tb._FormatData.TransData.UseSecTitles)
|
||||||
{
|
{
|
||||||
string retstr = TranGetSectionTitle(tb,tb._FromItem);
|
string retstr = TranGetSectionTitle(tb,tb._ToItem);
|
||||||
tb.AppendPrefix();
|
tb.AppendPrefix();
|
||||||
tb.ReplaceToken(retstr);
|
tb.ReplaceToken(retstr);
|
||||||
return (retstr != null && retstr != "");
|
return (retstr != null && retstr != "");
|
||||||
@ -697,6 +714,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
private static bool AddTranGetSectionNumber(TransitionBuilder tb)
|
private static bool AddTranGetSectionNumber(TransitionBuilder tb)
|
||||||
{
|
{
|
||||||
|
if (tb._TranType == 1 && tb._ToItem.ActiveSection.ItemID == tb._FromItem.ActiveSection.ItemID) return false;
|
||||||
string retstr = TranGetSectionNumber(tb._ToItem);
|
string retstr = TranGetSectionNumber(tb._ToItem);
|
||||||
tb.AppendPrefix();
|
tb.AppendPrefix();
|
||||||
tb.ReplaceToken(retstr);
|
tb.ReplaceToken(retstr);
|
||||||
@ -718,6 +736,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
private static string TranGetSectionNumber(ItemInfo itminfo)
|
private static string TranGetSectionNumber(ItemInfo itminfo)
|
||||||
{
|
{
|
||||||
ItemInfo tmpitm = TranGetSectionItem(itminfo);
|
ItemInfo tmpitm = TranGetSectionItem(itminfo);
|
||||||
|
if (!tmpitm.IsSection) return "";
|
||||||
return (tmpitm.MyContent.Number);
|
return (tmpitm.MyContent.Number);
|
||||||
}
|
}
|
||||||
private static string TranGetSectionTitle(TransitionBuilder tb, ItemInfo itminfo)
|
private static string TranGetSectionTitle(TransitionBuilder tb, ItemInfo itminfo)
|
||||||
|
@ -118,6 +118,42 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
#region CancelSectTitle
|
||||||
|
[Category("Miscellaneous")]
|
||||||
|
[Description("Section Cancel Section Title")]
|
||||||
|
private LazyLoad<bool> _CancelSectTitle;
|
||||||
|
public bool CancelSectTitle
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _CancelSectTitle, "@CancelSectTitle");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#region SpecialStepsFoldout
|
||||||
|
[Category("Miscellaneous")]
|
||||||
|
[Description("Section Special Steps Foldout")]
|
||||||
|
private LazyLoad<bool> _SpecialStepsFoldout;
|
||||||
|
public bool SpecialStepsFoldout
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _SpecialStepsFoldout, "@SpecialStepsFoldout");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#region UndSpecialStepsFoldout
|
||||||
|
[Category("Miscellaneous")]
|
||||||
|
[Description("Section Cancel Section Title")]
|
||||||
|
private LazyLoad<bool> _UndSpecialStepsFoldout;
|
||||||
|
public bool UndSpecialStepsFoldout
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _UndSpecialStepsFoldout, "@UndSpecialStepsFoldout");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
#region pagestyle
|
#region pagestyle
|
||||||
private PageStyle _pagestyle;
|
private PageStyle _pagestyle;
|
||||||
[Category("Miscellaneous")]
|
[Category("Miscellaneous")]
|
||||||
@ -195,16 +231,16 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
public Layout(XmlNode xmlNode) : base(xmlNode) { }
|
public Layout(XmlNode xmlNode) : base(xmlNode) { }
|
||||||
public Layout() : base() { }
|
public Layout() : base() { }
|
||||||
#region TopRow
|
#region TopMargin
|
||||||
private LazyLoad<float?> _TopRow;
|
private LazyLoad<float?> _TopMargin;
|
||||||
[Category("Layout")]
|
[Category("Layout")]
|
||||||
[DisplayName("Top Row on Printed Page")]
|
[DisplayName("Top Margin on Printed Page")]
|
||||||
[Description("Top Row on Printed Page")]
|
[Description("Top Margin on Printed Page")]
|
||||||
public float? TopRow
|
public float? TopMargin
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return LazyLoad(ref _TopRow, "@TopRow");
|
return LazyLoad(ref _TopMargin, "@TopMargin");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
x
Reference in New Issue
Block a user