Development #464

Merged
djankowski merged 18 commits from Development into master 2024-11-11 11:39:02 -05:00
4 changed files with 17 additions and 10 deletions
Showing only changes of commit 4bc73f847c - Show all commits

Binary file not shown.

View File

@ -4286,7 +4286,7 @@ namespace VEPROMS.CSLA.Library
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 (!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);
@ -4384,7 +4384,7 @@ namespace VEPROMS.CSLA.Library
{
//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 (!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);
@ -4401,7 +4401,7 @@ namespace VEPROMS.CSLA.Library
{
//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 (!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);
@ -4417,7 +4417,7 @@ namespace VEPROMS.CSLA.Library
string tmprnotab = MyParent.MyTab.CleanText.Substring(0, MyParent.MyTab.CleanText.IndexOf(".") + 1) + incSub;
//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 (!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);
@ -4435,7 +4435,7 @@ namespace VEPROMS.CSLA.Library
_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 (!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);
@ -4783,7 +4783,7 @@ namespace VEPROMS.CSLA.Library
// Note could have modified logic for clock macro (above) but older logic uses the IdentEdit setting
// for CAS (Continuous Action Summary steps) that have a circle printed around the step number
// this is the least impact of current code/formats
if (!string.IsNullOrEmpty(FormatStepData.TabData.MacroEditTag))
if (!string.IsNullOrEmpty(FormatStepData?.TabData?.MacroEditTag))
{
int eidx = tbformat.IndexOf("}", macroindx);
if (eidx > -1)
@ -4806,12 +4806,14 @@ namespace VEPROMS.CSLA.Library
}
}
//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)
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);
if (tbformat.StartsWith(" "))
tbformat = tbformat.Substring(1);
cltext = FormatStepData.TabData.MacroEditTag + cltext;
}
}
@ -5620,7 +5622,7 @@ namespace VEPROMS.CSLA.Library
}
//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)
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);

View File

@ -559,7 +559,7 @@ namespace Volian.Controls.Library
//CSM F2024 - 080: For South Texas (HLP formats), enable the initial line checkbox if it is in the formats
//Also, they want disable being selected to impact substeps - so do not show toggle if selected on a parent step
cbInitialLine.Visible = cbInitialLine.Enabled = false;
if (CurItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ShowInitialLineDisable && !string.IsNullOrEmpty(CurItemInfo.FormatStepData.TabData.MacroEditTag) && CurItemInfo.FormatStepData.TabData.MacroEditTag == "_" && CurItemInfo.FormatStepData.TabData.MacroList != null && CurItemInfo.FormatStepData.TabData.MacroList.Count > 0 && !(CurItemInfo.IsRNOPart && CurItemInfo.FormatStepData.TabData.MacroList[0].NotInRNO))
if (CurItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ShowInitialLineDisable && !string.IsNullOrEmpty(CurItemInfo.FormatStepData?.TabData?.MacroEditTag) && CurItemInfo.FormatStepData.TabData.MacroEditTag == "_" && CurItemInfo.FormatStepData.TabData.MacroList != null && CurItemInfo.FormatStepData.TabData.MacroList.Count > 0 && !(CurItemInfo.IsRNOPart && CurItemInfo.FormatStepData.TabData.MacroList[0].NotInRNO))
{
cbInitialLine.Visible = cbInitialLine.Enabled = true;
cbInitialLine.Checked = sc.Step_DisableInitialLine;

View File

@ -3781,7 +3781,12 @@ namespace Volian.Print.Library
else if (itemInfo.MyTab.AltPrintTab != null)
mytab = new vlnTab(cb, this, itemInfo.MyTab.AltPrintTab, itemInfo.MyTab.AltPrintTab, localXOffset, yoff, itemInfo.MyTab.MyFont, doSectTab, StepRTB.MySymbolFontName, itemInfo.MyTab.RemovedStyleUnderline);
else
mytab = new vlnTab(cb, this, itemInfo.MyTab.Text, itemInfo.MyTab.CleanText, localXOffset, yoff, itemInfo.MyTab.MyFont, doSectTab, StepRTB.MySymbolFontName, itemInfo.MyTab.RemovedStyleUnderline);
{
string clntxt = itemInfo.MyTab.CleanText;
if (!string.IsNullOrEmpty(itemInfo.FormatStepData?.TabData?.MacroEditTag) && itemInfo.FormatStepData.TabData.MacroEditTag == "_" && clntxt.StartsWith("_"))
clntxt = clntxt.Substring(1);
mytab = new vlnTab(cb, this, itemInfo.MyTab.Text, clntxt, localXOffset, yoff, itemInfo.MyTab.MyFont, doSectTab, StepRTB.MySymbolFontName, itemInfo.MyTab.RemovedStyleUnderline);
}
PartsLeft.Add(mytab);
if (mytab.MyMacro != null) PartsLeft.Add(mytab.MyMacro);
}