F2024-080 Add Initial Line/Ability to Disable to UI for South Texas
This commit is contained in:
@@ -474,6 +474,25 @@ namespace VEPROMS.CSLA.Library
|
||||
OnPropertyChanged("Step_FixedTblForSrch");
|
||||
}
|
||||
}
|
||||
//CSM F2024-080: For South Texas - Ability to toggle off Initial Line
|
||||
public bool Step_DisableInitialLine
|
||||
{
|
||||
get
|
||||
{
|
||||
string s = _Xp["Step", "DisableInitialLine"];
|
||||
|
||||
if (s == string.Empty) return false;
|
||||
if (s == "True") return true;
|
||||
return false;
|
||||
}
|
||||
set
|
||||
{
|
||||
string s = _Xp["Step", "DisableInitialLine"];
|
||||
if (value.ToString() == s) return;
|
||||
_Xp["Step", "DisableInitialLine"] = value.ToString();
|
||||
OnPropertyChanged("Step_DisableInitialLine");
|
||||
}
|
||||
}
|
||||
#region RO image sizing
|
||||
// if the RO image (figure) is resized, save it in the step config, not in the ROImageConfig. If stored in ROImageConfig
|
||||
// the size is set for ALL uses.
|
||||
|
@@ -4251,6 +4251,13 @@ namespace VEPROMS.CSLA.Library
|
||||
if (tbformat.Contains("{!.+?}"))
|
||||
tstr = tbformat.Replace("{!.+?}", " "); // Comanche Peak Indented Paragraph
|
||||
_MyTab.Text = tstr;
|
||||
//CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
|
||||
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled)
|
||||
{
|
||||
if (tstr.StartsWith(" "))
|
||||
tstr = tstr.Substring(1);
|
||||
tstr = FormatStepData.TabData.MacroEditTag + tstr;
|
||||
}
|
||||
_MyTab.CleanText = tstr;
|
||||
return;
|
||||
}
|
||||
@@ -4341,25 +4348,73 @@ namespace VEPROMS.CSLA.Library
|
||||
incSub = (ord + 1).ToString();
|
||||
if (MyParent.MyTab.CleanText.Trim().EndsWith(")"))
|
||||
{
|
||||
_MyTab.CleanText = MyParent.MyTab.CleanText.Trim() + "." + incSub;
|
||||
//CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
|
||||
string tstr = MyParent.MyTab.CleanText.Trim() + "." + incSub;
|
||||
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled && !tstr.StartsWith("_"))
|
||||
{
|
||||
if (tstr.StartsWith(" "))
|
||||
tstr = tstr.Substring(1);
|
||||
tstr = FormatStepData.TabData.MacroEditTag + tstr;
|
||||
}
|
||||
else if (IsInitialLineDisabled && tstr.StartsWith("_"))
|
||||
tstr = tstr.Substring(1);
|
||||
|
||||
_MyTab.CleanText = tstr;
|
||||
_MyTab.Text = _MyTab.CleanText;
|
||||
return;
|
||||
}
|
||||
if (MyParent.MyTab.CleanText.Contains(ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.IdentB))
|
||||
{
|
||||
_MyTab.CleanText = MyParent.MyTab.CleanText.Trim() + "." + incSub + " ";
|
||||
//CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
|
||||
string tstr = MyParent.MyTab.CleanText.Trim() + "." + incSub + " ";
|
||||
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled && !tstr.StartsWith("_"))
|
||||
{
|
||||
if (tstr.StartsWith(" "))
|
||||
tstr = tstr.Substring(1);
|
||||
tstr = FormatStepData.TabData.MacroEditTag + tstr;
|
||||
}
|
||||
else if(IsInitialLineDisabled && tstr.StartsWith("_"))
|
||||
tstr = tstr.Substring(1);
|
||||
|
||||
_MyTab.CleanText = tstr;
|
||||
_MyTab.Text = _MyTab.CleanText;
|
||||
return;
|
||||
}
|
||||
string tmprnotab = MyParent.MyTab.CleanText.Substring(0, MyParent.MyTab.CleanText.IndexOf(".") + 1) + incSub;
|
||||
_MyTab.CleanText = tmprnotab.TrimStart();
|
||||
_MyTab.Text = tmprnotab.TrimStart();
|
||||
//CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
|
||||
tmprnotab = tmprnotab.TrimStart();
|
||||
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled && !tmprnotab.StartsWith("_"))
|
||||
{
|
||||
if (tmprnotab.StartsWith(" "))
|
||||
tmprnotab = tmprnotab.Substring(1);
|
||||
tmprnotab = FormatStepData.TabData.MacroEditTag + tmprnotab;
|
||||
}
|
||||
else if (IsInitialLineDisabled && tmprnotab.StartsWith("_"))
|
||||
tmprnotab = tmprnotab.Substring(1);
|
||||
|
||||
_MyTab.CleanText = tmprnotab;
|
||||
_MyTab.Text = tmprnotab;
|
||||
return;
|
||||
}
|
||||
if ((((ItemInfo)ActiveParent).IsHigh && FormatStepData.NumberHighLevel) || ((!((ItemInfo)ActiveParent).IsHigh) && ((tbformat == null || tbformat == "") && (RNOLevel <= ColumnMode))))
|
||||
{
|
||||
_MyTab.CleanText = ((ItemInfo)ActiveParent).MyTab.CleanText;
|
||||
_MyTab.Text = ((ItemInfo)ActiveParent).MyTab.Text;
|
||||
//CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
|
||||
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled && !_MyTab.CleanText.StartsWith("_"))
|
||||
{
|
||||
if (_MyTab.CleanText.StartsWith(" "))
|
||||
_MyTab.CleanText = _MyTab.CleanText.Substring(1);
|
||||
_MyTab.CleanText = FormatStepData.TabData.MacroEditTag + _MyTab.CleanText;
|
||||
}
|
||||
if (IsInitialLineDisabled && _MyTab.CleanText.StartsWith("_"))
|
||||
{
|
||||
_MyTab.CleanText = _MyTab.CleanText.Substring(1);
|
||||
}
|
||||
if (IsInitialLineDisabled && _MyTab.Text.StartsWith("_"))
|
||||
{
|
||||
_MyTab.Text = _MyTab.Text.Substring(1);
|
||||
}
|
||||
_MyTab.RNOTabWidthAdjust = ((ItemInfo)ActiveParent).FormatStepData.TabData.RNOAdjustTabSize ?? 0;
|
||||
if (((ItemInfo)ActiveParent).MyTab.Offset != 0) _MyTab.Offset = ((ItemInfo)ActiveParent).MyTab.Offset;
|
||||
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOExcludeMacros)
|
||||
@@ -4716,6 +4771,15 @@ namespace VEPROMS.CSLA.Library
|
||||
cltext = cltext + " ";
|
||||
}
|
||||
}
|
||||
//CSM F2024 - 080: For South Texas - if format contains initial line and it is not disabled, show an initial line
|
||||
else if (macroindx == -1 && !string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroList != null && FormatStepData.TabData.MacroList.Count > 0 && !(this.IsRNOPart && FormatStepData.TabData.MacroList[0].NotInRNO) && !IsInitialLineDisabled)
|
||||
{
|
||||
if (cltext == null)
|
||||
cltext = tbformat;
|
||||
if (cltext.StartsWith(" "))
|
||||
cltext = cltext.Substring(1);
|
||||
cltext = FormatStepData.TabData.MacroEditTag + cltext;
|
||||
}
|
||||
}
|
||||
macroindx = tbformat.IndexOf("{!diamond1}");
|
||||
if (macroindx > -1) //i found it
|
||||
@@ -5520,15 +5584,32 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
if (count <= macro.Grouping) addToList = false;
|
||||
}
|
||||
|
||||
//CSM F2024 - 080: For South Texas - if initial line is disabled for this step, do not add the macro
|
||||
if (macro.Name.ToUpper() == "CHECKOFF" && ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ShowInitialLineDisable && !string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag) && FormatStepData.TabData.MacroEditTag == "_" && IsInitialLineDisabled)
|
||||
addToList = false;
|
||||
|
||||
if (addToList) tmp.Add(macro);
|
||||
}
|
||||
if (tmp.Count > 0) _MyMacros = tmp;
|
||||
}
|
||||
#endregion
|
||||
#region UseSmartTemplate
|
||||
|
||||
// TemplateIndex is for Calvert only:
|
||||
private int _TemplateIndex = -2; // -2 not set; -1 not a template
|
||||
//CSM F2024 - 080: For South Texas - check if initial line is disabled for this step
|
||||
public bool IsInitialLineDisabled
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!IsStep) return false;
|
||||
StepConfig sc = MyConfig as StepConfig;
|
||||
return sc.Step_DisableInitialLine;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region UseSmartTemplate
|
||||
|
||||
// TemplateIndex is for Calvert only:
|
||||
private int _TemplateIndex = -2; // -2 not set; -1 not a template
|
||||
public int TemplateIndex
|
||||
{
|
||||
get
|
||||
|
@@ -3175,6 +3175,17 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _ChangeFontUpperCaseIinArial, "@ChangeFontUpperCaseIinArial");
|
||||
}
|
||||
}
|
||||
|
||||
// F2024-080 South Texas
|
||||
// Used to show if "Initial Line Disable" checkbox should show in the DisplayTab
|
||||
private LazyLoad<bool> _ShowInitialLineDisable;
|
||||
public bool ShowInitialLineDisable
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _ShowInitialLineDisable, "@ShowInitialLineDisable");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion - StepSectionData
|
||||
#region TextTypeValue
|
||||
|
Reference in New Issue
Block a user