C2021-027: Procedure level PC/PC
This commit is contained in:
@@ -716,6 +716,9 @@ namespace Volian.Controls.Library
|
||||
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
|
||||
//if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
|
||||
//btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = allow && !MyItemInfo.IsInCalvertConditionResponse;
|
||||
// C2021 - 027: Procedure level PC/PC - if text changed, i.e. applicability may have changed, redo the print menus
|
||||
if (MyItemInfo != null && MyItemInfo.MyDocVersion.MultiUnitCount > 1)
|
||||
SetParentChildCreatePDFButton(MyItemInfo.MyDocVersion.UnitNames, MyItemInfo);
|
||||
}
|
||||
|
||||
void MyFlexGrid_SelChange(object sender, EventArgs e)
|
||||
@@ -1916,7 +1919,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
MyItemInfo.MyProcedure.ProcedureConfig.SelectedSlave = 0; // unselect the unit (child)
|
||||
}
|
||||
public void SetParentChildCreatePDFButton(string[] unitNames)
|
||||
public void SetParentChildCreatePDFButton(string[] unitNames, ItemInfo ii)
|
||||
{
|
||||
btnPdfCreate.SubItems.Clear();
|
||||
btnPdfCreate.Tag = null;
|
||||
@@ -1930,15 +1933,23 @@ namespace Volian.Controls.Library
|
||||
int k = 0;
|
||||
foreach (string s in unitNames)
|
||||
{
|
||||
// C2021-027: Procedure level PC/PC - see if menu items for unit should be enabled
|
||||
bool procAppl = ii.MyProcedure.ApplIncludeFromStr(s);
|
||||
k++;
|
||||
btnPdfCreate.SubItems.Add(MakeSubMenuButton(s,k,miMultiUnit_Click));
|
||||
btnReviewCreatePDF.SubItems.Add(MakeSubMenuButton(s, k, miMultiUnit_Click));
|
||||
btnCASCreate.SubItems.Add(MakeSubMenuButton(s, k, miMultiUnit_Click));
|
||||
ButtonItem btn = MakeSubMenuButton(s, k, miMultiUnit_Click);
|
||||
btn.Enabled = procAppl;
|
||||
btnPdfCreate.SubItems.Add(btn);
|
||||
btn = MakeSubMenuButton(s, k, miMultiUnit_Click);
|
||||
btn.Enabled = procAppl;
|
||||
btnReviewCreatePDF.SubItems.Add(btn);
|
||||
btn = MakeSubMenuButton(s, k, miMultiUnit_Click);
|
||||
btn.Enabled = procAppl;
|
||||
btnCASCreate.SubItems.Add(btn);
|
||||
}
|
||||
btnPdfCreate.AutoExpandOnClick = true;
|
||||
btnReviewCreatePDF.AutoExpandOnClick = true;
|
||||
btnCASCreate.AutoExpandOnClick = true;
|
||||
}
|
||||
}
|
||||
private DevComponents.DotNetBar.ButtonItem MakeSubMenuButton(string s, object tag, EventHandler ehandler)
|
||||
{
|
||||
DevComponents.DotNetBar.ButtonItem bi = new DevComponents.DotNetBar.ButtonItem();
|
||||
|
Reference in New Issue
Block a user