C2023-015: Pagination on sub-step (currently only for Vogtle 3_4) #112

Merged
jjenko merged 1 commits from VogtleWork into Development 2023-09-12 08:48:45 -04:00
4 changed files with 63 additions and 6 deletions

View File

@ -333,6 +333,25 @@ namespace VEPROMS.CSLA.Library
OnPropertyChanged("Step_PreferredPagebreak");
}
}
// C2023-015: Pagination on a sub-step
public bool Step_SubStepPagebreak
{
get
{
string s = _Xp["Step", "SubStepPagebreak"];
if (s == string.Empty) return false;
if (s == "True") return true;
return false;
}
set
{
string s = _Xp["Step", "SubStepPagebreak"];
if (value.ToString() == s) return;
_Xp["Step", "SubStepPagebreak"] = value.ToString();
OnPropertyChanged("Step_SubStepPagebreak");
}
}
//[Category("Step Attributes")]
//[DisplayName("Step Change Bar Override")]
//[RefreshProperties(RefreshProperties.All)]

View File

@ -30,6 +30,7 @@ namespace Volian.Controls.Library
{
this.groupPanelPaginate = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbPrefPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbSubStepPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbPageBreak = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbCAS = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cmbCheckoff = new DevComponents.DotNetBar.Controls.ComboBoxEx();
@ -74,6 +75,7 @@ namespace Volian.Controls.Library
this.groupPanelPaginate.BackColor = System.Drawing.Color.Transparent;
this.groupPanelPaginate.CanvasColor = System.Drawing.SystemColors.Control;
this.groupPanelPaginate.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.groupPanelPaginate.Controls.Add(this.cbSubStepPageBreak);
this.groupPanelPaginate.Controls.Add(this.cbPrefPageBreak);
this.groupPanelPaginate.Controls.Add(this.cbPageBreak);
this.groupPanelPaginate.DisabledBackColor = System.Drawing.Color.Empty;
@ -130,6 +132,23 @@ namespace Volian.Controls.Library
this.cbPrefPageBreak.Text = "Preferred Page Break (for Sup Info)";
this.cbPrefPageBreak.CheckedChanged += new System.EventHandler(this.cbPrefPageBreak_CheckedChanged);
//
// cbSubStepPageBreak
//
this.cbSubStepPageBreak.AutoSize = true;
//
//
//
this.cbSubStepPageBreak.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbSubStepPageBreak.Location = new System.Drawing.Point(3, 19);
this.cbSubStepPageBreak.Margin = new System.Windows.Forms.Padding(2);
this.cbSubStepPageBreak.Name = "cbSubStepPageBreak";
this.cbSubStepPageBreak.Size = new System.Drawing.Size(195, 15);
this.superTooltipTags.SetSuperTooltip(this.cbSubStepPageBreak, new DevComponents.DotNetBar.SuperTooltipInfo("Page Break for Sub-Steps", "", "When set, starts this step at the top of a page.\r\n\r\nkeyboard command: <Ctrl><Ente" +
"r>", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cbSubStepPageBreak.TabIndex = 1;
this.cbSubStepPageBreak.Text = "Substep Page Break";
this.cbSubStepPageBreak.CheckedChanged += new System.EventHandler(this.cbSubStepPageBreak_CheckedChanged);
//
// cbPageBreak
//
this.cbPageBreak.AutoSize = true;
@ -770,6 +789,7 @@ namespace Volian.Controls.Library
private System.Windows.Forms.TrackBar trBarFS;
private System.Windows.Forms.Button btnFSrestore;
private DevComponents.DotNetBar.Controls.CheckBoxX cbPrefPageBreak;
private DevComponents.DotNetBar.Controls.CheckBoxX cbSubStepPageBreak;
private DevComponents.DotNetBar.Controls.CheckBoxX cbIncludeInTOC;
private DevComponents.DotNetBar.Controls.CheckBoxX cbTCAS;
}

View File

@ -110,6 +110,7 @@ namespace Volian.Controls.Library
cmbCheckoff.Enabled = false;
cbPageBreak.Enabled = false;
cbPrefPageBreak.Enabled = false;
cbSubStepPageBreak.Enabled = false;
cbPlaceKeeper.Enabled = false;
cbPlaceKeeperCont.Enabled = false;
cbIncludeInTOC.Enabled = false;
@ -244,10 +245,13 @@ namespace Volian.Controls.Library
groupPanelFigSize.Style.BackColor = Color.Cornsilk;
cbPageBreak.Checked = false; // will be set below if HLS & config has it on
cbPrefPageBreak.Checked = false;
cbSubStepPageBreak.Checked = false;
cbPlaceKeeper.Checked = false; // will be set below if HLS & config has this set
cbPlaceKeeperCont.Checked = false; // will be set below if substep & config has this set
cbPageBreak.Enabled = CurItemInfo.IsHigh;
cbPrefPageBreak.Visible = cbPrefPageBreak.Enabled = (!CurItemInfo.IsInSupInfo && CurItemInfo.MyDocStyle.SupplementalInformation);
// C2023-015: Pagination on a sub-step
cbSubStepPageBreak.Visible = cbSubStepPageBreak.Enabled = CurItemInfo.IsSubStep && CurItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AlarmPagination;
if (!CurItemInfo.IsFigure && !CurItemInfo.IsRtfRaw)
{
cbPlaceKeeper.Enabled = (((SectionConfig)CurItemInfo.ActiveSection.MyConfig).Section_Placekeeper == "Y");
@ -304,6 +308,7 @@ namespace Volian.Controls.Library
if (CurItemInfo.IsHigh)
cbPageBreak.Checked = sc.Step_NewManualPagebreak; // High Level Step has a manual page break
if (cbPrefPageBreak.Enabled) cbPrefPageBreak.Checked = sc.Step_PreferredPagebreak;
if (cbSubStepPageBreak.Enabled) cbSubStepPageBreak.Checked = sc.Step_SubStepPagebreak;
cbPlaceKeeper.Checked = (sc.Step_Placekeeper == "Y"); // step text to be included on PlaceKeeper (Calvert Cliffs)
cbPlaceKeeperCont.Checked = (sc.Step_Placekeeper == "C"); // step is included on Placekeeper and marked as continuous action (Calvert Cliffs)
// set the Continuous Action Summary check box to the saved setting in the config or, if nothing in config, set to format flag setting
@ -891,7 +896,17 @@ namespace Volian.Controls.Library
sc.Step_PreferredPagebreak = cbPrefPageBreak.Checked;
MyEditItem.ChangeBarForConfigItemChange = true;
}
// C2023-015: Pagination on a sub-step
private void cbSubStepPageBreak_CheckedChanged(object sender, EventArgs e)
{
if (_Initalizing) return;
MyEditItem.SaveContents();
StepConfig sc = CurItemInfo.MyConfig as StepConfig;
if (sc == null) return;
MyEditItem.ChangeBarForConfigItemChange = false;
sc.Step_SubStepPagebreak = cbSubStepPageBreak.Checked;
MyEditItem.ChangeBarForConfigItemChange = true;
}
//private void txbxAltConActSumText_Leave(object sender, EventArgs e)
//{

View File

@ -99,13 +99,15 @@ namespace Volian.Print.Library
}
return retval;
}
else if (MyItemInfo.MyDocStyle.SupplementalInformation && MyItemInfo.IsStep)
// C2023-015: Pagination on a sub-step added. Do the code if supplemental info or if format supports sub-step pagination
else if ((MyItemInfo.MyDocStyle.SupplementalInformation || MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AlarmPagination) && MyItemInfo.IsStep)
{
// if this is the first caution or note from a substep, if the substep has preferred page break, break at the first caution or note:
if ((MyItemInfo.IsCaution || MyItemInfo.IsNote) && MyItemInfo.MyParent.IsSubStep)
{
StepConfig scs = MyItemInfo.MyParent.MyConfig as StepConfig;
if (MyItemInfo.MyPrevious == null && scs.Step_PreferredPagebreak)
// C2023-015: Pagination on a sub-step added on this check
if (MyItemInfo.MyPrevious == null && (scs.Step_PreferredPagebreak || scs.Step_SubStepPagebreak))
{
// B2018-103: The following flags a break within the step. Before returning a '2' (flags break within step), clear it out of the
// ParaBreaks. Without the 'RemoveAt', a page break will occur after this step also.
@ -120,7 +122,7 @@ namespace Volian.Print.Library
}
// Now see if there is a preferred page break on this step.
StepConfig sci = MyItemInfo.MyConfig as StepConfig;
if (sci.Step_PreferredPagebreak)
if (sci.Step_PreferredPagebreak || sci.Step_SubStepPagebreak)
{
if (MyItemInfo.IsHigh) return 1;
// if this is the top caution/note return 1 also. Cautions always are first, that is why the check does not need to know if on a
@ -1472,7 +1474,8 @@ namespace Volian.Print.Library
// substep with preferred page break (B2017-109)
private SortedList<float, vlnParagraph> GetMyPreferredBreaks(StepLevelList myList)
{
if (!MyItemInfo.MyDocStyle.SupplementalInformation) return null;
// C2023-015: Pagination on a sub-step added. Do the code if supplemental info or if format supports sub-step pagination
if (!MyItemInfo.MyDocStyle.SupplementalInformation && !MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.AlarmPagination) return null;
SortedList<float, vlnParagraph> sdpara = null;
foreach (int stepLevel in myList.Keys) // loop thru StepLevels, starting with lowest.
{
@ -1480,7 +1483,7 @@ namespace Volian.Print.Library
{
vlnParagraph myPara = myList[stepLevel][yLocation];
StepConfig sci = myPara.MyItemInfo.MyConfig as StepConfig;
if (sci != null && sci.Step_PreferredPagebreak)
if (sci != null && sci.Step_PreferredPagebreak || sci.Step_SubStepPagebreak)
{
if (sdpara == null) sdpara = new SortedList<float, vlnParagraph>();
if (myPara.ChildrenAbove != null && myPara.ChildrenAbove.Count > 0) sdpara.Add(-yLocation, myPara.ChildrenAbove[0]);