C2025-022-Remove-UCF-2

This commit is contained in:
2025-08-27 12:59:53 -04:00
parent 47a4c62e92
commit 525173bc9f
30 changed files with 1159 additions and 1603 deletions

View File

@@ -6067,7 +6067,7 @@ namespace VEPROMS.CSLA.Library
// To determine if the section has a checkoff...
// Section won't have checkoffs if there is no checkofflist, or
ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData;
int maxindx = pd.CheckOffUCF ? pd.CheckOffData.CheckOffList.MaxIndex : pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
if (pd.CheckOffData == null || pd.CheckOffData.CheckOffList == null || maxindx <= 0) return false;
if (pd.CheckOffData.CheckOffHeaderList == null || pd.CheckOffData.CheckOffHeaderList.MaxIndex <= 1) return true;
//if (pd.CheckOffData == null || pd.CheckOffData.CheckOffHeaderList == null || pd.CheckOffData.CheckOffHeaderList.Count <= 1) return false;
@@ -6099,7 +6099,7 @@ namespace VEPROMS.CSLA.Library
private int SectionDefaultCheckOffIndex()
{
ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData;
int maxindx = pd.CheckOffUCF ? pd.CheckOffData.CheckOffList.MaxIndex : pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
if (pd.CheckOffData != null && pd.CheckOffData.CheckOffList != null && maxindx == 2) return 0; // if only two items, first is macro - use it.
SectionConfig sc = ActiveSection.MyConfig as SectionConfig;
return sc.Section_CheckoffListSelection;
@@ -6111,23 +6111,23 @@ namespace VEPROMS.CSLA.Library
if (!SectionHasCheckOffs()) return null;
int stpCoIndx = CheckOffIndex(); // this step has a checkoff defined
if (stpCoIndx == -1) return null;
if (stpCoIndx > 1)
{
if (ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF && stpCoIndx >= 100)
{
// get index, if greater than 100, store that - otherwise store index down list.
// if this format does not have ucf signoffs, indx is just the selected index from the combo box.
foreach (CheckOff co in ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList)
{
if (stpCoIndx == co.Index)
{
stpCoIndx = (int)co.Index;
break;
}
}
}
return ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList[stpCoIndx]; // DO override of CheckOffList[] to get ucf
}
//if (stpCoIndx > 1)
//{
// if (ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffUCF && stpCoIndx >= 100)
// {
// // get index, if greater than 100, store that - otherwise store index down list.
// // if this format does not have ucf signoffs, indx is just the selected index from the combo box.
// foreach (CheckOff co in ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList)
// {
// if (stpCoIndx == co.Index)
// {
// stpCoIndx = (int)co.Index;
// break;
// }
// }
// }
// return ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffList[stpCoIndx]; // DO override of CheckOffList[] to get ucf
//}
int sectCoIndx = SectionDefaultCheckOffIndex(); // no checkoff on step, see if there is a section default.
if (sectCoIndx == -1) return null;
if ((ActiveFormat.PlantFormat.FormatData.ProcData.CheckOffData.CheckOffOnHLSOnly && IsHigh)
@@ -6161,7 +6161,7 @@ namespace VEPROMS.CSLA.Library
get
{
ProcData pd = ActiveFormat.PlantFormat.FormatData.ProcData;
int maxindx = pd.CheckOffUCF ? pd.CheckOffData.CheckOffList.MaxIndex : pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
int maxindx = pd.CheckOffData.CheckOffList.MaxIndexNoInherit;
if (pd.CheckOffData != null && pd.CheckOffData.CheckOffList != null && maxindx == 2 && pd.CheckOffData.CheckOffList[0].MenuItem == "Enabled")
return true; // if only two items, first is macro - use it.
return false;