Added logic to identify that we are in a Condition/Response section of the Calvert Cliffs Alarms

Disable the ability to insert a Caution or Note when in a Condition/Response section of the Calvert Cliffs Alarms
This commit is contained in:
John Jenko 2014-08-20 17:52:23 +00:00
parent 7c26029b92
commit ff57e04521
2 changed files with 26 additions and 0 deletions

View File

@ -1331,6 +1331,25 @@ namespace VEPROMS.CSLA.Library
return parent.IsInRNO;
}
}
public bool IsInCalvertConditionResponse
{
get
{
ItemInfo itmifo = this;
bool rtn = false;
if (ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
{
// TemplateChildColumnMode is set to 2 for the TitleWithTextBelow step type
// we want to stop searching at this level
while (!rtn && itmifo != null && itmifo.IsStep && !itmifo.TemplateChildColumnMode.Equals(2))
{
rtn = itmifo.TemplateColumnMode.Equals(2);
itmifo = itmifo.MyParent;
}
}
return rtn;
}
}
#endregion
#region Level Columns Relationships
public int RNOLevel

View File

@ -448,6 +448,8 @@ namespace Volian.Controls.Library
// toggle context menus used with the shortcut key
btnCMInsHLS.Enabled = btnCMInsRNO.Enabled = btnCMInsSubStps.Enabled = btnCMInsCaution.Enabled =
btnCMInsNote.Enabled = btnCMInsTable.Enabled = btnCMInsFigure.Enabled = allow;
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = allow && !MyItemInfo.IsInCalvertConditionResponse;
}
void MyFlexGrid_SelChange(object sender, EventArgs e)
@ -875,6 +877,8 @@ namespace Volian.Controls.Library
btnInsNote.Enabled = true;
btnInsCaut.Enabled = true;
}
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = setting && !MyItemInfo.IsInCalvertConditionResponse;
}
private void SetButtonAndMenuEnabling(bool docontextmenus)
{
@ -1134,6 +1138,9 @@ namespace Volian.Controls.Library
btnInsTrans.Enabled = btnCMTransition.Enabled = btnInsRO.Enabled = btnCMRO.Enabled = true;
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = !MyItemInfo.IsInCalvertConditionResponse;
_RibbonControl.Refresh(); // jsj- added this because Table Design ribbon tab grouping was not going away when not on a table step type
}
/// <summary>