C2014-009: Allow for edit/print of Notes & Cautions off a sub-step in the right column of Condition Response table (Calvert personnel made update request)

This commit is contained in:
Kathy Ruffing 2019-02-07 13:12:01 +00:00
parent 31033ae63f
commit 94cc5c22aa
3 changed files with 29 additions and 11 deletions

Binary file not shown.

View File

@ -709,9 +709,10 @@ namespace Volian.Controls.Library
//// toggle context menus used with the shortcut key //// toggle context menus used with the shortcut key
//btnCMInsHLS.Enabled = btnCMInsRNO.Enabled = btnCMInsSubStps.Enabled = btnCMInsCaution.Enabled = //btnCMInsHLS.Enabled = btnCMInsRNO.Enabled = btnCMInsSubStps.Enabled = btnCMInsCaution.Enabled =
// btnCMInsNote.Enabled = btnCMInsTable.Enabled = btnCMInsFigure.Enabled = allow; // btnCMInsNote.Enabled = btnCMInsTable.Enabled = btnCMInsFigure.Enabled = allow;
// C2014-009 Commented out to allow for inserting Note/Caution
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes // if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm) //if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = allow && !MyItemInfo.IsInCalvertConditionResponse; //btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = allow && !MyItemInfo.IsInCalvertConditionResponse;
} }
void MyFlexGrid_SelChange(object sender, EventArgs e) void MyFlexGrid_SelChange(object sender, EventArgs e)
@ -1477,9 +1478,10 @@ namespace Volian.Controls.Library
btnInsNote.Enabled = true; btnInsNote.Enabled = true;
btnInsCaut.Enabled = true; btnInsCaut.Enabled = true;
} }
// C2014-009 Commented out to allow for inserting Note/Caution
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes // if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm) //if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = setting && !MyItemInfo.IsInCalvertConditionResponse; //btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = setting && !MyItemInfo.IsInCalvertConditionResponse;
// B2016-237 added context menu item to change image size // B2016-237 added context menu item to change image size
btnCMImgSz.Enabled = MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK")); btnCMImgSz.Enabled = MyEditItem.MyItemInfo.IsFigure && (MyEditItem.MyItemInfo.MyContent.MyImage != null || MyEditItem.MyItemInfo.MyContent.Text.ToUpper().Contains("#LINK"));
if (MyItemInfo.IsSupInfoPart) btnInsAfter.Enabled = btnInsAftH.Enabled = btnInsBefore.Enabled = btnInsBefH.Enabled = false; if (MyItemInfo.IsSupInfoPart) btnInsAfter.Enabled = btnInsAftH.Enabled = btnInsBefore.Enabled = btnInsBefH.Enabled = false;
@ -1999,9 +2001,10 @@ namespace Volian.Controls.Library
btnInsTrans.Enabled = btnCMTransition.Enabled = !MyItemInfo.IsFigure && !MyItemInfo.IsRtfRaw; btnInsTrans.Enabled = btnCMTransition.Enabled = !MyItemInfo.IsFigure && !MyItemInfo.IsRtfRaw;
btnInsRO.Enabled = btnCMRO.Enabled = Mydvi.DocVersionAssociationCount > 0; // 2016-128 don't enable if RO Path was not selected at the Working Draft node btnInsRO.Enabled = btnCMRO.Enabled = Mydvi.DocVersionAssociationCount > 0; // 2016-128 don't enable if RO Path was not selected at the Working Draft node
// if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes // C2014-009 Commented out to allow for inserting Note/Caution
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm) //if in Calvert Alarms Condition/Response, disable insert of Cautions and Notes
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = !MyItemInfo.IsInCalvertConditionResponse; //if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
//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 _RibbonControl.Refresh(); // jsj- added this because Table Design ribbon tab grouping was not going away when not on a table step type
} }

View File

@ -5065,7 +5065,12 @@ namespace Volian.Print.Library
{ {
if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn if ((MyItemInfo.IsCaution || MyItemInfo.IsNote || MyItemInfo.MyParent.IsCaution || MyItemInfo.MyParent.IsNote) && !MyItemInfo.FormatStepData.SpaceIn
&& (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0) && (MyItemInfo.Steps == null || MyItemInfo.Steps.Count == 0)
&& (MyItemInfo.NextItem == null || MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type)) return 0; && (MyItemInfo.NextItem == null || MyItemInfo.MyContent.Type != MyItemInfo.NextItem.MyContent.Type))
{
// C2014-009: Don't add another blank line - print the calvert Condition/Response RNO Caution/Notes without it.
if (!(MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && MyItemInfo.IsInRNO))
return 0;
}
if (everyNLines == 99 && MyItemInfo.NextItem == null) if (everyNLines == 99 && MyItemInfo.NextItem == null)
{ {
if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0; if (MyItemInfo.Steps != null && MyItemInfo.Steps.Count > 0 && MyItemInfo.Steps[0].MyContent.Type == MyItemInfo.MyContent.Type) return 0;
@ -5364,6 +5369,8 @@ namespace Volian.Print.Library
else else
xoff += (float)((bx.TxtStart + _MyBoxLeftAdj + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin xoff += (float)((bx.TxtStart + _MyBoxLeftAdj + XOffsetBox + (bx.TxtWidth / 2)) - (hdrWidth / 2)); // xoff starts as left margin
} }
else if (formatInfo.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm && itemInfo.IsInRNO && (itemInfo.IsCaution || itemInfo.IsNote)) // C2014-009
xoff = XOffset + (para.Width / 2) - (hdrWidth / 2);
else if (formatInfo.MyStepSectionLayoutData.Separator.Location > 0) else if (formatInfo.MyStepSectionLayoutData.Separator.Location > 0)
xoff = XOffset + AdjustToCharPosition((float)((para.Width - hdrWidth) / formatInfo.MyStepSectionLayoutData.Separator.Location), itemInfo.MyHeader.MyFont.CPI); xoff = XOffset + AdjustToCharPosition((float)((para.Width - hdrWidth) / formatInfo.MyStepSectionLayoutData.Separator.Location), itemInfo.MyHeader.MyFont.CPI);
else if (itemInfo.IsInRNO && itemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].NumberWithLevel) else if (itemInfo.IsInRNO && itemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[40].NumberWithLevel)
@ -6272,12 +6279,20 @@ namespace Volian.Print.Library
Width = (float)formatInfo.MyStepSectionLayoutData.WidT + 1; Width = (float)formatInfo.MyStepSectionLayoutData.WidT + 1;
else if (itemInfo.IsInRNO) else if (itemInfo.IsInRNO)
{ {
if (MyItemInfo.FormatStepData.CenterOneLineAdjust) if (MyItemInfo.FormatStepData.CenterOneLineAdjust) // C2014-009: Condition/Response adjust xoffset & width
{ {
int rnoOff = ToInt(formatInfo.MyStepSectionLayoutData.ColRTable, maxRNO); int rnoOff = ToInt(formatInfo.MyStepSectionLayoutData.ColRTable, maxRNO);
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.SpecialCaseCalvertAlarm)
{
XOffset = MyTopRNO.MyTab.XOffset + 7.2f;
Width = MyParent.Width + (MyParent.XOffset - XOffset);
}
else
{
XOffset = rnoOff + MyHighLevelParagraph.XOffset; XOffset = rnoOff + MyHighLevelParagraph.XOffset;
Width = MyParent.Width; Width = MyParent.Width;
} }
}
else else
Width = (MyParent.XOffset + MyParent.Width) - (XOffset + mycolT); Width = (MyParent.XOffset + MyParent.Width) - (XOffset + mycolT);
} }