Support for SAMGS Supplemental Information

This commit is contained in:
Kathy Ruffing 2017-05-03 14:37:25 +00:00
parent e7f9d4e3ed
commit f139c79d32
14 changed files with 1513 additions and 682 deletions

View File

@ -29,6 +29,7 @@ namespace Volian.Controls.Library
private void InitializeComponent()
{
this.groupPanelPaginate = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbPrefPageBreak = 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();
@ -49,13 +50,13 @@ namespace Volian.Controls.Library
this.groupPanelWcnTrnResp = new DevComponents.DotNetBar.Controls.GroupPanel();
this.tbRespons = new System.Windows.Forms.TextBox();
this.groupPanelFigSize = new DevComponents.DotNetBar.Controls.GroupPanel();
this.btnFSrestore = new System.Windows.Forms.Button();
this.trBarFS = new System.Windows.Forms.TrackBar();
this.btnFsSav = new System.Windows.Forms.Button();
this.tbFSHt = new System.Windows.Forms.TextBox();
this.tbFSWd = new System.Windows.Forms.TextBox();
this.lblFSHt = new System.Windows.Forms.Label();
this.lblFSWidth = new System.Windows.Forms.Label();
this.btnFSrestore = new System.Windows.Forms.Button();
this.groupPanelPaginate.SuspendLayout();
this.groupPanelCheckoff.SuspendLayout();
this.groupPanelChgBar.SuspendLayout();
@ -71,6 +72,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.cbPrefPageBreak);
this.groupPanelPaginate.Controls.Add(this.cbPageBreak);
this.groupPanelPaginate.DisabledBackColor = System.Drawing.Color.Empty;
this.groupPanelPaginate.Dock = System.Windows.Forms.DockStyle.Top;
@ -109,6 +111,23 @@ namespace Volian.Controls.Library
this.groupPanelPaginate.TabIndex = 11;
this.groupPanelPaginate.Text = "Pagination";
//
// cbPrefPageBreak
//
this.cbPrefPageBreak.AutoSize = true;
//
//
//
this.cbPrefPageBreak.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbPrefPageBreak.Location = new System.Drawing.Point(4, 23);
this.cbPrefPageBreak.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbPrefPageBreak.Name = "cbPrefPageBreak";
this.cbPrefPageBreak.Size = new System.Drawing.Size(238, 17);
this.superTooltipTags.SetSuperTooltip(this.cbPrefPageBreak, new DevComponents.DotNetBar.SuperTooltipInfo("Preferred Page Break for Supplemental Info", "", "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.cbPrefPageBreak.TabIndex = 1;
this.cbPrefPageBreak.Text = "Preferred Page Break (for Supp Info)";
this.cbPrefPageBreak.CheckedChanged += new System.EventHandler(this.cbPrefPageBreak_CheckedChanged);
//
// cbPageBreak
//
this.cbPageBreak.AutoSize = true;
@ -116,7 +135,7 @@ namespace Volian.Controls.Library
//
//
this.cbPageBreak.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.cbPageBreak.Location = new System.Drawing.Point(4, 14);
this.cbPageBreak.Location = new System.Drawing.Point(4, 2);
this.cbPageBreak.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbPageBreak.Name = "cbPageBreak";
this.cbPageBreak.Size = new System.Drawing.Size(140, 17);
@ -576,6 +595,16 @@ namespace Volian.Controls.Library
this.groupPanelFigSize.TabIndex = 21;
this.groupPanelFigSize.Text = "Image Size";
//
// btnFSrestore
//
this.btnFSrestore.Location = new System.Drawing.Point(150, 33);
this.btnFSrestore.Name = "btnFSrestore";
this.btnFSrestore.Size = new System.Drawing.Size(72, 32);
this.btnFSrestore.TabIndex = 6;
this.btnFSrestore.Text = "Restore";
this.btnFSrestore.UseVisualStyleBackColor = true;
this.btnFSrestore.Click += new System.EventHandler(this.btnFSrestore_Click);
//
// trBarFS
//
this.trBarFS.Location = new System.Drawing.Point(15, 71);
@ -631,16 +660,6 @@ namespace Volian.Controls.Library
this.lblFSWidth.TabIndex = 0;
this.lblFSWidth.Text = "Width";
//
// btnFSrestore
//
this.btnFSrestore.Location = new System.Drawing.Point(150, 33);
this.btnFSrestore.Name = "btnFSrestore";
this.btnFSrestore.Size = new System.Drawing.Size(72, 32);
this.btnFSrestore.TabIndex = 6;
this.btnFSrestore.Text = "Restore";
this.btnFSrestore.UseVisualStyleBackColor = true;
this.btnFSrestore.Click += new System.EventHandler(this.btnFSrestore_Click);
//
// DisplayTags
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
@ -703,5 +722,6 @@ namespace Volian.Controls.Library
private System.Windows.Forms.Button btnFsSav;
private System.Windows.Forms.TrackBar trBarFS;
private System.Windows.Forms.Button btnFSrestore;
private DevComponents.DotNetBar.Controls.CheckBoxX cbPrefPageBreak;
}
}

View File

@ -106,6 +106,7 @@ namespace Volian.Controls.Library
{
cmbCheckoff.Enabled = false;
cbPageBreak.Enabled = false;
cbPrefPageBreak.Enabled = false;
cbPlaceKeeper.Enabled = false;
cbPlaceKeeperCont.Enabled = false;
cbCAS.Enabled = false;
@ -199,9 +200,11 @@ namespace Volian.Controls.Library
groupPanelWcnTrnResp.Style.BackColor = Color.Cornsilk;
groupPanelFigSize.Style.BackColor = Color.Cornsilk;
cbPageBreak.Checked = false; // will be set below if HLS & config has it on
cbPrefPageBreak.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);
if (!CurItemInfo.IsFigure && !CurItemInfo.IsRtfRaw)
{
cbPlaceKeeper.Enabled = (((SectionConfig)CurItemInfo.ActiveSection.MyConfig).Section_Placekeeper == "Y");
@ -252,6 +255,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;
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
@ -405,7 +409,8 @@ namespace Volian.Controls.Library
private int DoListStepTypes(FormatData fmtdata, StepData topType, string curType)
{
int cursel=-1;
List<StepDataRetval> sdl = fmtdata.StepGetLevelTypes(false, topType, ref cursel, curType, CurItemInfo);
List<StepDataRetval> sdl = null;
if (!CurItemInfo.IsSupInfoPart) sdl = fmtdata.StepGetLevelTypes(false, topType, ref cursel, curType, CurItemInfo);
if (sdl==null || sdl.Count==0)
{
if (listBoxStepTypes.Items.Count==0)lblNoTypeChgReason.Text = topType.StepEditData.TypeMenu.NoChgReason;
@ -707,6 +712,17 @@ namespace Volian.Controls.Library
trBarFS.Value = int.Parse(tbFSWd.Text);
}
private void cbPrefPageBreak_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_PreferredPagebreak = cbPrefPageBreak.Checked;
MyEditItem.ChangeBarForConfigItemChange = true;
}
//private void txbxAltConActSumText_Leave(object sender, EventArgs e)
//{
// // User left Atlernate Continuous Action Text field. If text changed, then prompt

View File

@ -18,7 +18,8 @@ namespace Volian.Controls.Library
None = 0,
After = 1,
Before = 2,
RNO = 3
RNO = 3,
SupInfo = 4
}
public enum E_ChangeBarPosition : int
{
@ -59,7 +60,7 @@ namespace Volian.Controls.Library
bool allow = (MyStepPanel.VwMode == E_ViewMode.Edit);
StepTabRibbon str = MyStepPanel.MyStepTabPanel.MyStepTabRibbon;
str.SiblingsButtonsEnabled = allow;
str.InsertButtonsEnabled = allow && !(MyItemInfo.IsProcedure || MyItemInfo.IsSection || MyItemInfo.IsRNOPart);
str.InsertButtonsEnabled = allow && !(MyItemInfo.IsProcedure || MyItemInfo.IsSection || MyItemInfo.IsRNOPart || MyItemInfo.IsSupInfoPart);
// do special case for cpystep button: cannot copy an enhanced step:
if (MyItemInfo.IsEnhancedStep) str.SetCopyStepButton(false);
}
@ -96,7 +97,7 @@ namespace Volian.Controls.Library
get { return _MyBeforeEditItems != null || _MyRNOEditItems != null || _MyAfterEditItems != null; }
}
internal List<EditItem> _MyBeforeEditItems;
public List<EditItem> MyBeforeEditItems
public List<EditItem> MyBeforeEditItems // MyBeforeEditItems are Cautions & Notes
{
get { return _MyBeforeEditItems; }
set { _MyBeforeEditItems = value; }
@ -113,6 +114,12 @@ namespace Volian.Controls.Library
get { return _MyRNOEditItems; }
set { _MyRNOEditItems = value; }
}
internal List<EditItem> _MySupInfoEditItems;
public List<EditItem> MySupInfoEditItems
{
get { return _MySupInfoEditItems; }
set { _MySupInfoEditItems = value; }
}
private StepSectionLayoutData _MyStepSectionLayoutData;
public StepSectionLayoutData MyStepSectionLayoutData
{
@ -180,7 +187,7 @@ namespace Volian.Controls.Library
if (_MySectionRTBItem == null)
{
if (MyItemInfo.IsSection || MyItemInfo.IsProcedure) _MySectionRTBItem = (RTBItem)this;
else _MySectionRTBItem = _MyParentEditItem.MySectionRTBItem;
else _MySectionRTBItem = MyParent.MySectionRTBItem;
}
return _MySectionRTBItem;
}
@ -307,13 +314,133 @@ namespace Volian.Controls.Library
{
get { return _LastMethods.Count == 0; }
}
// This should find the item that precedes the current item vertically in the supplemental information column
// and then return the Bottom of that item.
// It is used so that an edit item does not overlap in 'y-direction' any preceding items.
internal int? FindTopSupInfo(bool useSuppInfoColBottom)
{
if (MyParentEditItem == null) return null;
// on supplemental info item: parent is item in left column.
// return null if parent does not have previous siblings or parents that have supp info. FindPreviousOrParentSupInfo looks above to
// items that have supinfo.
EditItem prevOrParSupInfo = MyParentEditItem.FindPreviousOrParentSupInfo();
if (prevOrParSupInfo == null || !prevOrParSupInfo.Visible)
{
// Account for Expanded or collapsed. note that BottomMostEditItem already accounts for
// whether it is expanded or collapsed.
if (MyParentEditItem.MyPreviousEditItem != null) return MyParentEditItem.MyPreviousEditItem.BottomMostEditItem.Bottom;
if (MyParentEditItem.MyBeforeEditItems != null) return MyParentEditItem.MyBeforeEditItems[MyParentEditItem.MyBeforeEditItems.Count - 1].BottomMostEditItem.Bottom;
return (MySectionRTBItem==null)?0:MySectionRTBItem.Bottom;
}
int b1 = prevOrParSupInfo.BottomMostEditItem.Bottom;
int b2 = b1;
if (prevOrParSupInfo.MyParentEditItem.MyItemInfo.StepLevel > MyParentEditItem.MyItemInfo.StepLevel)
b2 = prevOrParSupInfo.MyParentEditItem.LastSiblingEditItem.BottomMostEditItem.Bottom;
// if the current supinfo's parent (proc step) is same as the lastsibling bottom most, don't use its value - it puts the next step
// down too far:
if (this.MyParentEditItem.MyID == prevOrParSupInfo.MyParentEditItem.LastSiblingEditItem.BottomMostEditItem.MyID) b2 = b1;
// if not in the same HLS, don't use the lastsibling either:
if (this.MyParentEditItem.MyItemInfo.MyHLS.ItemID != prevOrParSupInfo.MyParentEditItem.LastSiblingEditItem.MyItemInfo.MyHLS.ItemID) b2 = b1;
if (useSuppInfoColBottom)
return b1;
else
return Math.Max(b1, b2); // look at both supinfo & parent column to determine bottom
}
// This goes up edititems, looking for the closest in 'y-direction' of any supplemental info items.
EditItem FindPreviousOrParentSupInfo() // current edit item is parent of supplmental info item
{
EditItem prev = this;
// First see if there are any Cautions or Notes before me that have supinfo:
EditItem lastBefore = prev.FindLastBeforeWithSupInfo();
if (lastBefore != null) return lastBefore.MySupInfoEditItems[0];
// There were no Cautions/Notes before me with supinfo, now see if there are previous items with supinfo:
while (prev.MyPreviousEditItem != null)
{
prev = prev.MyPreviousEditItem;
EditItem eiTmp = prev.FindLastSubstepWithSupInfo();
// check for MySupInfoEditItems as null because the FindLastSubstepWithSupInfo checks for data, but the supinfo step may
// not be displayed yet, i.e. the eiTmp.MySupInfoEditItems has an edititem defined only it if is displayed.
if (eiTmp != null && eiTmp.MySupInfoEditItems != null) return eiTmp.MySupInfoEditItems[0];
}
// No previous items had supinfo, look up to the parent. But if on first before, i.e. first caution or note, there is nothing before (just the section)
if (prev.MyParentEditItem.MyBeforeEditItems != null && prev.MyParentEditItem.MyBeforeEditItems.Count > 0 && prev.MyParentEditItem.MyBeforeEditItems[0] == prev)
{
EditItem eitmp = null;
// if on a Note/Caution, need to be sure there isn't a step before me with supinfo (don't just assume going to Section)
if (prev.MyParentEditItem.MyPreviousEditItem!=null)eitmp = prev.MyParentEditItem.MyPreviousEditItem.BottomMostEditItem.FindPreviousOrParentSupInfo();
return eitmp;
}
if (prev.MyParentEditItem.MySupInfoEditItems != null) return prev.MyParentEditItem.MySupInfoEditItems[0];
if (prev.MyItemInfo.IsSection) return null;
return prev.MyParentEditItem.FindPreviousOrParentSupInfo();
}
private EditItem FindLastBeforeWithSupInfo()
{
if (MyBeforeEditItems == null || MyBeforeEditItems.Count == 0) return null;
for (int i = MyBeforeEditItems.Count - 1; i > -1; i--)
{
// Need to look at caution/note (mybeforeedititems) if they have substeps that have supinfo
if (MyBeforeEditItems[i].MySupInfoEditItems != null && MyBeforeEditItems[i].MySupInfoEditItems.Count > 0) return MyBeforeEditItems[i];
}
return null;
}
// The next 2 methods, FindLastSubstepWithSupInfo, FindLastItemWithSupInfo:
// for the current item, get to its bottommost supplemental info, if any steps/substeps have it.
//
private EditItem FindLastSubstepWithSupInfo()
{
ItemInfo ii = FindLastItemWithSupInfo(MyItemInfo);
if (ii == null) return null;
return GetEditItemFromItemID(ii.ItemID);
}
private ItemInfo FindLastItemWithSupInfo(ItemInfo stp)
{
// first check substeps (& their substeps) of item passed in.
if (stp.Steps != null && stp.Steps.Count > 0)
{
for (int i = stp.Steps.Count - 1; i > -1; i--)
{
ItemInfo tmp = FindLastItemWithSupInfo(stp.Steps[i]);
if (tmp != null) return tmp;
}
}
//now check the step that was passed in.
if (stp.SupInfos != null && stp.SupInfos.Count > 0) return stp;
if (stp.Notes != null && stp.Notes.Count > 0)
{
for (int j = stp.Notes.Count - 1; j > -1; j--)
{
if (stp.Notes[j].SupInfos != null && stp.Notes[j].SupInfos.Count > 0) return stp.Notes[j];
}
}
if (stp.Cautions != null && stp.Cautions.Count > 0)
{
for (int j = stp.Cautions.Count - 1; j > -1; j--)
{
if (stp.Cautions[j].SupInfos != null && stp.Cautions[j].SupInfos.Count > 0) return stp.Cautions[j];
}
}
return null;
}
/// <summary>
/// This should find the item that precedes the current item vertically
/// and then return the Bottom of that item.
/// </summary>
/// <returns></returns>
internal int FindTop(int bottom)
internal int FindTop(int bottom, bool test1)
{
// if on a supplemental info, use special code to find what steps are above the supplemental info
if (MyItemInfo.MyDocStyle != null && MyItemInfo.MyDocStyle.SupplementalInformation)
{
if (MyItemInfo.IsSupInfoPart)
{
int? tmptop = FindTopSupInfo(test1);
return tmptop == null ? bottom : Math.Max(bottom, (int)tmptop);
}
}
int lastBottomPrev = bottom; // This is necessary if the value of bottom can be negative.
if (_MyPreviousEditItem != null)
lastBottomPrev = _MyPreviousEditItem.BottomMostEditItem.Bottom;
@ -324,6 +451,10 @@ namespace Volian.Controls.Library
//if (bottomRNO == null) return bottom;
return (int)max(bottomRNO, bottom);
}
internal int FindTop(int bottom)
{
return FindTop(bottom, true);
}
/// <summary>
/// The Top of the EditItem
/// </summary>
@ -630,6 +761,7 @@ namespace Volian.Controls.Library
if (_MyNextEditItem != null) _MyNextEditItem.SetAllTabs();
// Update the RNO tab if it exists - RHM 20100106
if (_MyRNOEditItems != null) foreach (EditItem chld in _MyRNOEditItems) chld.SetAllTabs();
if (_MySupInfoEditItems != null) foreach (EditItem chld in _MySupInfoEditItems) chld.SetAllTabs();
}
/// <summary>
/// Add the next item to a list
@ -778,6 +910,16 @@ namespace Volian.Controls.Library
if (!success)
Item.DeleteItemAndChildren(ii);
}
if (MyItemInfo.MyDocStyle != null && MyItemInfo.MyDocStyle.SupplementalInformation)
{
if (newFocus.MyItemInfo.IsInSupInfo)
newFocus.AdjustAllForSupInfoHeight();
else
{
EditItem prvOrParSupInfo = newFocus.FindPreviousOrParentSupInfo();
if (prvOrParSupInfo != null) prvOrParSupInfo.AdjustAllForSupInfoHeight();
}
}
}
private static void ForceEditItemRefresh(EditItem newFocus)
@ -955,6 +1097,12 @@ namespace Volian.Controls.Library
if (parentEditItem.MyRNOEditItems.Count == 0)
parentEditItem.MyRNOEditItems = null;
}
else if (parentEditItem.MySupInfoEditItems != null && parentEditItem.MySupInfoEditItems.Contains(this))
{
parentEditItem.MySupInfoEditItems.Remove(this);
if (parentEditItem.MySupInfoEditItems.Count == 0)
parentEditItem.MySupInfoEditItems = null;
}
if (parentEditItem.MyAfterEditItems == null && parentEditItem.MyBeforeEditItems == null && parentEditItem.MyRNOEditItems == null)
parentEditItem.CanExpand = false;
}
@ -1008,6 +1156,10 @@ namespace Volian.Controls.Library
{
EditItem child = new RTBItem(myItemInfo, MyStepPanel, this, ChildRelation.RNO, expand);
}
public void AddChildSupInfo(ItemInfo myItemInfo, bool expand)
{
EditItem child = new RTBItem(myItemInfo, MyStepPanel, this, ChildRelation.SupInfo, expand);
}
/// <summary>
/// Add a list of RNO (Contingency) children
/// </summary>
@ -1019,6 +1171,12 @@ namespace Volian.Controls.Library
foreach (ItemInfo item in myItemInfoList)
AddChildRNO(item, expand);
}
public void AddChildSupInfo(ItemInfoList myItemInfoList, bool expand)
{
if (myItemInfoList != null)
foreach (ItemInfo item in myItemInfoList)
AddChildSupInfo(item, expand);
}
/// <summary>
/// Add a child after
/// </summary>
@ -1074,6 +1232,15 @@ namespace Volian.Controls.Library
child = new RTBItem(MyItemInfo, MyStepPanel, this, ChildRelation.RNO, true, nextEditItem);
return child;
}
public EditItem AddChildSupInfo(ItemInfo MyItemInfo, EditItem nextEditItem)
{
EditItem child = null;
if (MyItemInfo.MyContent.MyGrid != null)
child = new GridItem(MyItemInfo, MyStepPanel, this, ChildRelation.SupInfo, true, nextEditItem);
else
child = new RTBItem(MyItemInfo, MyStepPanel, this, ChildRelation.SupInfo, true, nextEditItem);
return child;
}
/// <summary>
/// Adds a sibling after the current EditItem
/// </summary>
@ -1164,6 +1331,9 @@ namespace Volian.Controls.Library
case ChildRelation.RNO:
newEditItem = ActiveParent.AddChildRNO(newItemInfo, MyNextEditItem);
break;
case ChildRelation.SupInfo:
newEditItem = ActiveParent.AddChildSupInfo(newItemInfo, MyNextEditItem);
break;
default: // Need debug
break;
}
@ -1224,6 +1394,9 @@ namespace Volian.Controls.Library
case ChildRelation.RNO:
newEditItem = ActiveParent.AddChildRNO(newItemInfo, this);
break;
case ChildRelation.SupInfo:
newEditItem = ActiveParent.AddChildSupInfo(newItemInfo, this);
break;
default: // Need debug
break;
}
@ -1323,6 +1496,9 @@ namespace Volian.Controls.Library
case E_FromType.Table:
newEditItem = this.AddChildAfter(newItemInfo, nextItem);
break;
case E_FromType.SupInfo:
newEditItem = this.AddChildSupInfo(newItemInfo, nextItem);
break;
default:
newEditItem = this.AddChildAfter(newItemInfo, nextItem);
break;
@ -1425,6 +1601,9 @@ namespace Volian.Controls.Library
case ChildRelation.RNO:
newEditItem = ActiveParent.AddChildRNO(newItemInfo, this);
break;
case ChildRelation.SupInfo:
newEditItem = ActiveParent.AddChildSupInfo(newItemInfo, this);
break;
default: // Need debug
break;
}
@ -1539,6 +1718,9 @@ namespace Volian.Controls.Library
case ChildRelation.RNO:
newEditItem = ActiveParent.AddChildRNO(newItemInfo, MyNextEditItem);
break;
case ChildRelation.SupInfo:
newEditItem = ActiveParent.AddChildSupInfo(newItemInfo, MyNextEditItem);
break;
default: // Need debug
break;
}
@ -1565,6 +1747,7 @@ namespace Volian.Controls.Library
else if (MyItemInfo.IsNote) fromType = E_FromType.Note;
else if (MyItemInfo.IsTable) fromType = E_FromType.Table;
else if (MyItemInfo.IsRNOPart) fromType = E_FromType.RNO;
else if (MyItemInfo.IsSupInfoPart) fromType = E_FromType.SupInfo;
}
EditItem nextItem = GetNextItem(fromType, newItemInfo);
EditItem newEditItem;
@ -1592,6 +1775,9 @@ namespace Volian.Controls.Library
case E_FromType.Table:
newEditItem = this.AddChildAfter(newItemInfo, nextItem);
break;
case E_FromType.SupInfo:
newEditItem = this.AddChildSupInfo(newItemInfo, nextItem);
break;
default:
newEditItem = this.AddChildAfter(newItemInfo, nextItem);
break;
@ -1674,6 +1860,9 @@ namespace Volian.Controls.Library
case ChildRelation.RNO:
newEditItem = parentEditItem.AddChildRNO(newItemInfo, nextEditItem);
break;
case ChildRelation.SupInfo:
newEditItem = parentEditItem.AddChildSupInfo(newItemInfo, nextEditItem);
break;
default: // Need debug
break;
}
@ -1725,6 +1914,14 @@ namespace Volian.Controls.Library
sir.IdentifyChildren(highlight);
}
}
if (MySupInfoEditItems != null)
{
foreach (EditItem sis in MySupInfoEditItems)
{
sis.IdentifyMe(highlight);
sis.IdentifyChildren(highlight);
}
}
}
#endregion
#region Event Handlers
@ -1788,6 +1985,21 @@ namespace Volian.Controls.Library
}
}
}
protected void MoveSupInfo() // If the current item has supplemental information, be sure its top location is that of the current item.
{
if (_MySupInfoEditItems != null && _MySupInfoEditItems.Count > 0)
{
EditItem supInfoTop = _MySupInfoEditItems[0].TopMostEditItem;
if (supInfoTop.Top != Top + supInfoTop.SupInfoTopOffset)
{
MyStepPanel.ItemMoving++;
supInfoTop.LastMethodsPush(string.Format("EditItem_Move SupInfo Right {0}", supInfoTop.MyID));
supInfoTop.Top = Top + supInfoTop.SupInfoTopOffset;
supInfoTop.LastMethodsPop();
MyStepPanel.ItemMoving--;
}
}
}
private bool _TryAgainLater = false;
public bool TryAgainLater
{
@ -1813,37 +2025,22 @@ namespace Volian.Controls.Library
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
// use the following to debug if two steps are to be displayed one right after the other vertically, but they are getting separated, overwritten,
// gaps. See code below at the beginning of EditItem_Move that uses these.
//static EditItem ei_below;
//static EditItem ei_above;
private void EditItem_Move(object sender, EventArgs e)
{
//if (MyID == 205300) ei_above = this;
//if (MyID == 205306) ei_below = this;
//if (ei_below != null && ei_above != null && MyID == ei_below.MyID && ei_below.Top != ei_above.Bottom) Console.WriteLine("here");
TurnOnSpellCheckIfVisible();
int newTop = Top - MyStepPanel.TopMostEditItem.Top;
//if(_ShowChanges && _LastTop != newTop && MyItemInfo.InList(134786))
//Volian.Base.Library.vlnStackTrace.ShowStackLocal(2,10,"\"EditItem_Move\"\t\"\"\t\"{0}\"\t{1}\t{2}\t{3}",MyItemInfo.ShortPath, MyID, Top, _LastTop);
//Volian.Base.Library.vlnStackTrace.ShowStackLocal(2,10,"\"EditItem_Move\"\t\"\"\t\"{0}\"\t{1}\t{2}\t{3}",MyItemInfo.ShortPath, MyID, Top, _LastTop);
if (_LastTop == newTop) return;
_LastTop = newTop;
int watchThis = _WatchThis;
//if ((MyItemInfo.IsCaution || MyItemInfo.IsNote) && MyPreviousEditItem != null)
//{
// if (Top != MyPreviousEditItem.Bottom && MyPreviousEditItem.MyItemInfo.MyContent.Type == MyItemInfo.MyContent.Type)
// {
// if(Top != MyPreviousEditItem.Bottom || Left != MyPreviousEditItem.Left)
// {
// Volian.Base.Library.vlnStackTrace.ShowStackLocal(2,10,
// //Console.WriteLine(
// "\"EditItem_Move\"\t\"\"\t\"{0}\"\t{1}\t{2}\t{3}\t{4}\t\"{5}\"\t{6}\t{7}\t{8}",
// MyItemInfo.ShortPath, MyID, Top, Left,
// MyPreviousEditItem.Bottom, MyPreviousEditItem.MyItemInfo.ShortPath, MyPreviousEditItem.MyID, MyPreviousEditItem.Top, MyPreviousEditItem.Left);
// }
// }
//}
//if (MyID == 136)
//{
// vlnStackTrace.ShowStack("{0} Move TO {1}", MyID, Top);
// //vlnStackTrace.ShowStack("{0} Move TO {1} - {2}, BottomMost {3}", MyID, Top, MyPath, BottomMostRTBItem.MyPath);
// //Console.WriteLine("{0} Move TO {1} - {2}, BottomMost {3}", MyID, Top, MyPath, BottomMostRTBItem.MyPath);
//}
//if (MyID > _StartingID)
// Console.WriteLine("{0}--------------- {1} Top = {2} Bottom {3}", WatchThisIndent, MyID, Top, Bottom);
if (MyStepPanel.ItemMoving == 0 && !TryAgainLater)
{
//vlnStackTrace.ScrollInStack();
@ -1890,6 +2087,9 @@ namespace Volian.Controls.Library
}
Moving = false;
EditItem btm = BottomMostEditItem;
EditItem supinfo = null;
if (MySupInfoEditItems != null && MySupInfoEditItems.Count > 0) supinfo = MySupInfoEditItems[0].BottomMostEditItem;
if (supinfo != null && supinfo.Bottom > btm.Bottom) btm = supinfo;
if (this != btm)
btm.AdjustLocation();
//if (_WatchThis > 0 && MyID > _StartingID)
@ -1909,7 +2109,7 @@ namespace Volian.Controls.Library
if (_IgnoreResize) return;
AdjustLocation();
HandleResize();
AdjustAllForSupInfoHeight();
}
#endregion // Event Handlers
#region Private and Protected Methods
@ -1942,7 +2142,7 @@ namespace Volian.Controls.Library
int center = aboveForLocation.ContentLeft + aboveForLocation.ContentWidth / 2;
int rightLimit = aboveForLocation.Right;
// Then should center on the wid Limit
if (MyItemInfo.FormatStepData.Type.Contains("AER") == false && MyItemInfo.RNOLevel == 0)
if ((MyItemInfo.FormatStepData.Type.Contains("AER") == false && MyItemInfo.RNOLevel == 0 ) && !MyItemInfo.IsInSupInfo)
{
// B2017-043 COLR is used as a Width
int colR = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColRTable, MyItemInfo.ColumnMode);
@ -2054,6 +2254,7 @@ namespace Volian.Controls.Library
{
HideChildren(_MyBeforeEditItems);
HideChildren(_MyRNOEditItems);
HideChildren(_MySupInfoEditItems);
HideChildren(_MyAfterEditItems);
}
/// <summary>
@ -2079,6 +2280,7 @@ namespace Volian.Controls.Library
{
UnhideChildren(_MyBeforeEditItems, expand);
UnhideChildren(_MyRNOEditItems, expand);
UnhideChildren(_MySupInfoEditItems, expand);
UnhideChildren(_MyAfterEditItems, expand);
MatchExpanded();
@ -2109,6 +2311,7 @@ namespace Volian.Controls.Library
{
AdjustChildren(_MyBeforeEditItems);
AdjustChildren(_MyRNOEditItems);
AdjustChildren(_MySupInfoEditItems);
AdjustChildren(_MyAfterEditItems);
}
/// <summary>
@ -2152,6 +2355,7 @@ namespace Volian.Controls.Library
// Walk though Children performing Expand
ExpandChildren(_MyBeforeEditItems);
ExpandChildren(_MyRNOEditItems);
ExpandChildren(_MySupInfoEditItems);
ExpandChildren(_MyAfterEditItems);
}
private string MyPath
@ -2189,6 +2393,7 @@ namespace Volian.Controls.Library
internal void AdjustLocation()
{
if (RNORight) MoveRNO(); // This is needed when an AER is Deleted that has an RNO.
MoveSupInfo(); // If the current item has supplemental information, be sure its top location is that of the current item.
if (RNOLevel > 0 && AEREditItem != null)
AEREditItem.AdjustLocation();
EditItem nextEditItem = NextDownEditItem;
@ -2226,6 +2431,7 @@ namespace Volian.Controls.Library
// If this is a "TitleWithTextRight", don't move down on the screen but only if it has a
// child, i.e. want the child to be positioned on line, but if no child, move down on screen:
int newTop = bottom;
if (MyItemInfo.IsSupInfoPart) newTop = Math.Max(bottom, nextEditItem.BottomOfStepImmediatelyAbove());
if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format) // Deviation Document Format
if (MyItemInfo.IsStep && nextEditItem.MyItemInfo.IsStep && nextEditItem.MyItemInfo.MyHLS.ItemID != MyItemInfo.MyHLS.ItemID)// Move from one step to another
newTop = FindBottomDevDoc;// Use the bottom most caution or note
@ -2244,6 +2450,7 @@ namespace Volian.Controls.Library
// it appears that setting the top doesn't always work. The logic below checks to see if it does
// not work and trys some other things so that the EditItem will be moved to the correct place.
// As a last attempt, the EditItem is added to a list to be refreshed from a timer on MyStepPanel.
if (nextEditItem.MySupInfoEditItems != null && nextEditItem.MySupInfoEditItems.Count > 0) newTop = nextEditItem.MySupInfoEditItems[0].FindTop(newTop);
nextEditItem.Top = newTop;
if (nextEditItem.Top != newTop)
{
@ -2332,6 +2539,7 @@ namespace Volian.Controls.Library
AddChildRNO(MyItemInfo.RNOs, expand);
if (MyItemInfo.RNOs != null && ((MyItemInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds))
AddChildAfter(MyItemInfo.RNOs, expand);
AddChildSupInfo(MyItemInfo.SupInfos, expand);
AddChildAfter(MyItemInfo.Tables, expand);
// get the config item for the steps section. there is an 'editable'
// flag used in metasections to define whether the steps should print.
@ -2380,6 +2588,7 @@ namespace Volian.Controls.Library
if (_MyPreviousEditItem != null) return _MyPreviousEditItem.BottomMostEditItem;
if (_MyChildRelation == ChildRelation.After) return _MyParentEditItem;
if (_MyChildRelation == ChildRelation.RNO) return _MyParentEditItem;
if (_MyChildRelation == ChildRelation.SupInfo) return _MyParentEditItem;
return null;
}
}
@ -2430,7 +2639,23 @@ namespace Volian.Controls.Library
}
return bottom;
}
public int? BottomOfParentSupInfo()
{
int? bottom = null;
if (Colapsing) return null;
EditItem parent = this;
while (parent != null && parent.MyItemInfo.IsSection == false && parent._MyChildRelation != ChildRelation.Before)
{
if (parent._MySupInfoEditItems != null) return parent._MySupInfoEditItems[0].BottomMostEditItem.Bottom;
parent = parent.UpOneEditItem;
}
return bottom;
}
private string _NextDownEditItemPath = "None";
public string NextDownEditItemPath
{
get { return _NextDownEditItemPath; }
}
/// <summary>
/// This finds the next EditItem down.
/// </summary>
@ -2481,6 +2706,11 @@ namespace Volian.Controls.Library
if (btmNext != null)
{
int bottom = btmNext.FindTop(btm.Bottom);
if (btmNext.MySupInfoEditItems != null && btmNext.MySupInfoEditItems.Count > 0)
{
int btmSupInfo = btmNext.MySupInfoEditItems[0].FindTop(btm.Bottom);
if (btmSupInfo > bottom) bottom = btmSupInfo;
}
if (btmNext.Top != bottom)
{
MyStepPanel.ItemMoving++;
@ -2524,7 +2754,7 @@ namespace Volian.Controls.Library
}
public override string ToString()
{
return _MyItemInfo == null ? base.ToString() : string.Format("{0},'{1}'", MyID, MyPath); // + "-" + MyItemInfo.MyContent.Text;
return _MyItemInfo == null ? base.ToString() : string.Format("{0},'{1}',{2},{3}", MyID, MyPath, Top, Bottom); // + "-" + MyItemInfo.MyContent.Text;
}
#endregion
#region Abstract Methods and Properties
@ -2577,6 +2807,13 @@ namespace Volian.Controls.Library
public abstract void SetExpandAndExpander(ItemInfo itemInfo);
public abstract void SaveCurrentAndContents();
#endregion
private int SupInfoTopOffset
{
get
{
return _MyParentEditItem.MyStepRTB.Location.Y - MyStepRTB.Location.Y;
}
}
protected string _TabFormat;
private static int _WidthAdjust = 5;
protected bool _IgnoreResize = false;
@ -2707,7 +2944,19 @@ namespace Volian.Controls.Library
if (_MyPreviousEditItem != null)
ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyPreviousEditItem.BottomMostEditItem.Bottom);
else
{
ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyParentEditItem.Bottom);
// if inserting a substep within supplemental information, then may have to adjust steps too:
if (MyItemInfo.IsInSupInfo)
{
AdjustLocation();
// find parent of supinfo & adjust its location:
ItemInfo supInfoPart = MyItemInfo;
while (!supInfoPart.IsSupInfoPart) supInfoPart = supInfoPart.MyParent;
EditItem eitmp = MyStepPanel._LookupEditItems[supInfoPart.ItemID];
eitmp.MyParentEditItem.AdjustLocation();
}
}
}
bool specialTplSupport = ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DSS_PageListSpBckgrnd) == E_DocStructStyle.DSS_PageListSpBckgrnd) ||
(MyItemInfo.MyDocStyle.LandscapePageList && MyItemInfo.MyDocStyle.ComponentList);
@ -2759,6 +3008,42 @@ namespace Volian.Controls.Library
break;
}
break;
case ChildRelation.SupInfo: // on a supplemental info item
EditItem high = MyStepPanel._LookupEditItems[MyItemInfo.MyHLS.ItemID];
if (_MyParentEditItem.MyItemInfo.IsNote || _MyParentEditItem.MyItemInfo.IsCaution)
{
ContentWidth = high.ContentWidth - high.ContentLocation.X;
}
else
ContentWidth = _MyParentEditItem.ContentWidth;
// Currently on the supinfo, so MyParentEditItem is the step the supinfo is related to.
// From this MyParentEditItem, need to find what is the bottom of the 'previous step' on the screen where 'previous step' can be:
// 1) The bottom most EditItem from a caution/note, i.e. MyBeforeEditItems. This must be checked first.
// 2) If there is a MyParentEditItem, use it (only MyParentEditItem or MyPreviousEditItem can be set), if going to parent don't use
// BottomMostEditItem because that will take it onto this step or subsequent substeps. So just use its bottom. Note that there
// are special cases if on a Note/Caution (see below for comments)
// 3) If there is no MyBeforeEditItems & no MyParentEditItems, there must be a MyPreviousEditItems. Use its MyBottomMostEditItem's bottom
// since this previous may have substeps.
int btm = MyParentEditItem.BottomOfStepImmediatelyAbove();
int topp = FindTop(btm, false);
if (topp != 0)
{
MyStepPanel.ItemMoving++;
_MyParentEditItem.Top = (int)topp;
if (_MyParentEditItem.MyItemInfo.Steps != null && _MyParentEditItem.MyItemInfo.Steps.Count > 0)
{
EditItem chtmp = GetEditItemFromItemID(_MyParentEditItem.MyItemInfo.Steps[0].ItemID);
if (chtmp != null && chtmp._MyParentEditItem != null)
{
chtmp.Top = chtmp._MyParentEditItem.Bottom;
chtmp.AdjustLocation();
}
}
_MyParentEditItem.AdjustLocation();
MyStepPanel.ItemMoving--;
}
ContentLocation = new Point(high.ContentLeft + high.Width + 36, (int)_MyParentEditItem.Top + SupInfoTopOffset); // account for Caution/Note tab above caution/note
break;
case ChildRelation.RNO:
// this is set so that TextWidth command below will be correct. TextWidth uses
// the tab start & tab width to calculate the overall width.
@ -2820,7 +3105,12 @@ namespace Volian.Controls.Library
_IgnoreResize = false;
MyStepPanel.ItemMoving++;
//Location = new Point(_MyParentRTBItem.Left + 20, FindTop(_MyParentRTBItem.Top));
int myTop = MyNextEditItem == null ? _MyParentEditItem.Top : MyNextEditItem.Top;
int myTop = 0;
if (MyNextEditItem == null)
myTop = _MyParentEditItem.Top;
else
myTop = MyNextEditItem.Top;
//if (MyItemInfo.SameRowAsParent && MyItemInfo.IsCaution2)
//{
// if (MyItemInfo.WidthOverride > 0)
@ -2864,6 +3154,31 @@ namespace Volian.Controls.Library
LastMethodsPop();
}
}
private int BottomOfStepImmediatelyAbove()
{
int btm = 0;
if (MyBeforeEditItems != null && MyBeforeEditItems.Count > 0) // Notes & Cautions before
btm = MyBeforeEditItems[MyBeforeEditItems.Count - 1].BottomMostEditItem.Bottom;
else
{
// if on a caution or note, (the first one), need to go up to either previous step or the section to find its bottom
// _MyParentEditItem is a way to find that the structure supports this, i.e. there can be a caution or note:
if (_MyParentEditItem != null
&& _MyParentEditItem.MyBeforeEditItems != null && _MyParentEditItem.MyBeforeEditItems.Count > 0 // this part checks that there are cautions/notes
&& _MyParentEditItem.MyBeforeEditItems[0].MyID == MyID) // first caution or note, i.e. index of MyBeforeItems == 0
{
if (_MyParentEditItem._MyPreviousEditItem == null) // this part checks for first HLS
btm = _MyParentEditItem._MyParentEditItem.Bottom; // bottom of the section
else
btm = _MyParentEditItem._MyPreviousEditItem.BottomMostEditItem.Bottom; // bottom of previous step
}
else
{
btm = MyParentEditItem != null ? MyParentEditItem.Bottom : MyPreviousEditItem.BottomMostEditItem.Bottom;
}
}
return btm;
}
/// <summary>
/// Sets the previous item and adjusts locations
/// </summary>
@ -2936,6 +3251,7 @@ namespace Volian.Controls.Library
Location = new Point(_MyPreviousEditItem.Left, top);
// B2017-029 only do this if this is a the deviation document
AdjustForDevDocStepHeight();
AdjustAllForSupInfoHeight();
}
}
else
@ -2959,6 +3275,8 @@ namespace Volian.Controls.Library
break;
case ChildRelation.RNO:
break;
case ChildRelation.SupInfo:
break;
case ChildRelation.Before:
//MyStepPanel.ItemMoving++;
//UpOneRTBItem.Top = BottomMostRTBItem.Bottom;
@ -2969,7 +3287,147 @@ namespace Volian.Controls.Library
}
LastMethodsPop();
}
}
}
// AdjustAllForSupInfoHeight & AdjustFOrSupInfoHeight go from current edit item down, adjusting any of the edit items' top
// location to account for any supplemental informations that items may have so that either the step or its supplemental information
// does not overwrite other steps on screen.
private void AdjustAllForSupInfoHeight()
{
EditItem ei = this;
while (ei != null)
{
ei = ei.AdjustForSupInfoHeight();
}
}
private EditItem AdjustForSupInfoHeight()
{
if (MyStepPanel._LookupEditItems.ContainsKey(MyID) && MyItemInfo.IsInSupInfo) // only do this if it is displayed (in LookupEditItems and in sup info column
{
ItemInfo supInfoPart = MyItemInfo;
while (!supInfoPart.IsSupInfoPart) supInfoPart = supInfoPart.MyParent;
EditItem EIsupInfoPartAbove = MyStepPanel._LookupEditItems[supInfoPart.ItemID];
// find first edititem below this (EIWsupInfoBelow) or a sibling or child child that have sup info
// if found, adjust top of this item to the bottommost edititem above this
EditItem EIWsupInfoBelow = null;
EIWsupInfoBelow = EIsupInfoPartAbove.MyParentEditItem.FindFirstChildWithSupInfo(EIsupInfoPartAbove.MyParentEditItem.MyItemInfo);
if (EIWsupInfoBelow == null)
EIWsupInfoBelow = EIsupInfoPartAbove.MyParentEditItem.FindSiblingOrParentSiblingWithSupInfo(EIsupInfoPartAbove.MyParentEditItem.MyItemInfo);
if (EIWsupInfoBelow != null) // for editiem below, find bottom of step & subinfo column and take the max of these:
{
int bottomOfAboveSupInfoColumn = EIsupInfoPartAbove.BottomMostEditItem.Bottom;
int bottomOfImmediatelyAbove = EIWsupInfoBelow.BottomOfStepImmediatelyAbove();
MyStepPanel.ItemMoving++;
EIWsupInfoBelow.Top = Math.Max(bottomOfAboveSupInfoColumn, bottomOfImmediatelyAbove);
EIWsupInfoBelow.AdjustLocation();
MyStepPanel.ItemMoving--;
return EIWsupInfoBelow.MySupInfoEditItems==null?null:EIWsupInfoBelow.MySupInfoEditItems[0];
}
}
return null;
}
private EditItem CheckForExpanded(EditItem ei)
{
ItemInfo hls = ei.MyItemInfo.MyHLS;
EditItem hlsEI = GetEditItemFromItemID(hls.ItemID);
if (hlsEI==null) return null;
return ei;
}
// FindSiblingOrParentSiblingWithSupInfo will find the next edititem below me on the screen that has a supinfo
private EditItem FindSiblingOrParentSiblingWithSupInfo(ItemInfo itm)
{
if (itm == null || itm.IsProcedure) return null;
if (itm.NextItem == null)
{
return FindSiblingOrParentSiblingWithSupInfo(itm.ActiveParent as ItemInfo);
}
EditItem chldOfNext = null;
// if section, handle notes/cautions on section and if none, look for hls (children of section)
if (itm.NextItem.IsSection)
{
if (itm.NextItem.Steps == null || itm.NextItem.Steps.Count == 0) return null;
chldOfNext = FindFirstCautionOrNoteWithSupInfo(itm.NextItem);
if (chldOfNext != null) return CheckForExpanded(chldOfNext);
chldOfNext = FindFirstChildWithSupInfo(itm.NextItem);
if (chldOfNext != null) return CheckForExpanded(chldOfNext);
return null;
}
// Handle caution/note off of itm.nextitem. See if any of those have supinfos.
chldOfNext = FindFirstCautionOrNoteWithSupInfo(itm.NextItem);
if (chldOfNext != null) return CheckForExpanded(chldOfNext);
// this is step side (parent) of supinfo part. This step does not have any children with supinfo.
// See if any of my next siblings have supinfo
if (itm.NextItem.SupInfos != null && itm.NextItem.SupInfos.Count > 0)
{
return GetEditItemFromItemID(itm.NextItem.ItemID);
}
// no longer looking at next, go to children.
chldOfNext = FindFirstChildWithSupInfo(itm.NextItem);
if (chldOfNext != null) return CheckForExpanded(chldOfNext);
return FindSiblingOrParentSiblingWithSupInfo(itm.NextItem);
}
// FindFirstChildWithSupinfo finds the first child going down the screen that has a supinfo. It checks for cautions and
// notes first.
private EditItem FindFirstChildWithSupInfo(ItemInfo itm)
{
// If on a caution, see if there are any notes below me on the screen that have supinfo.
if (itm.IsCaution && (itm.ActiveParent as ItemInfo).Notes != null && (itm.ActiveParent as ItemInfo).Notes.Count > 0)
{
foreach (ItemInfo inote in (itm.ActiveParent as ItemInfo).Notes)
{
if (inote.SupInfos != null && inote.SupInfos.Count > 0)
return GetEditItemFromItemID(inote.ItemID);
EditItem chld = FindFirstChildWithSupInfo(inote);
if (chld != null) return CheckForExpanded(chld);
}
}
// if on a caution or note check the step below me, which is really my activeparent (cautions/notes are above their respective parent)
if ((itm.IsCaution || itm.IsNote) && (itm.NextItem == null || itm.NextItemCount == 0) && (itm.ActiveParent as ItemInfo).SupInfos != null && (itm.ActiveParent as ItemInfo).SupInfos.Count > 0)
return GetEditItemFromItemID((itm.ActiveParent as ItemInfo).ItemID);
// Finally check substeps:
if (itm.Steps == null || itm.Steps.Count == 0) return null;
foreach (ItemInfo ii in itm.Steps)
{
if (ii.SupInfos != null && ii.SupInfos.Count > 0)
return GetEditItemFromItemID(ii.ItemID);
EditItem chld = FindFirstChildWithSupInfo(ii);
if (chld != null) return CheckForExpanded(chld);
}
return null;
}
// FindFirstCautionOrNoteWithSupInfo looks for first caution or note going down the screen that has supInfo
private EditItem FindFirstCautionOrNoteWithSupInfo(ItemInfo itm)
{
if (itm.Cautions != null && itm.Cautions.Count > 0)
{
foreach (ItemInfo ii in itm.Cautions)
{
if (ii.SupInfos != null && ii.SupInfos.Count > 0)
return GetEditItemFromItemID(ii.ItemID);
EditItem chld = FindFirstChildWithSupInfo(ii);
if (chld != null) return CheckForExpanded(chld);
}
}
if (itm.Notes != null && itm.Notes.Count > 0)
{
foreach (ItemInfo ii in itm.Notes)
{
if (ii.SupInfos != null && ii.SupInfos.Count > 0)
return GetEditItemFromItemID(ii.ItemID);
EditItem chld = FindFirstChildWithSupInfo(ii);
if (chld != null) return CheckForExpanded(chld);
}
}
return null;
}
private EditItem GetEditItemFromItemID(int itemid)
{
if (!MyStepPanel._LookupEditItems.ContainsKey(itemid)) return null;
return MyStepPanel._LookupEditItems[itemid];
}
/// <summary>
/// Adjust the height of a Deviation Document Step Including the Cautions and Notes B2016-123, B2017-020, B2017-021
/// </summary>
@ -3099,7 +3557,6 @@ namespace Volian.Controls.Library
}
//// TIMING: DisplayItem.TimeIt("CSLARTB MyItem");
myStepPanel.Controls.Add(this);
switch (myChildRelation)
{
case ChildRelation.After:
@ -3112,6 +3569,9 @@ namespace Volian.Controls.Library
RNOLevel = myParentEditItem.RNOLevel + 1;
AddItem(myParentEditItem, ref myParentEditItem._MyRNOEditItems, nextEditItem, addFirstChld);
break;
case ChildRelation.SupInfo:
AddItem(myParentEditItem, ref myParentEditItem._MySupInfoEditItems, nextEditItem, addFirstChld);
break;
case ChildRelation.None:
break;
}
@ -3140,6 +3600,11 @@ namespace Volian.Controls.Library
}
//// TIMING: DisplayItem.TimeIt("CSLARTB Parent");
SetText();
if (itemInfo.IsSupInfoPart)
{
EditItem high = MyStepPanel._LookupEditItems[itemInfo.MyHLS.ItemID];
ContentLocation = new Point(high.ContentLeft + high.Width + 36, (int)_MyParentEditItem.Top + SupInfoTopOffset);
}
//// TIMING: DisplayItem.TimeIt("CSLARTB SetText");
if (itemInfo != null)
{
@ -3156,7 +3621,10 @@ namespace Volian.Controls.Library
}
//// TIMING: DisplayItem.TimeIt("CSLARTB before Controls Add");
//myStepPanel.Controls.Add(this);
int top = FindTop(0);
// If on the first Caution/Note and the parent has a previous, for example a caution off of 5th HLS, go to the
// bottom on the previous parent. In the example, the bottom of the 4th HLS.
int btm = myStepPanel.DisplayRectangle.Y;
int top = FindTop(btm);
if (MyItemInfo.ActiveFormat.MyStepSectionLayoutData.Dev_Format)
if (MyItemInfo.IsCaution || MyItemInfo.IsNote)
top = myParentEditItem.TopMostEditItem.Top;

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34209
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -970,6 +970,16 @@ namespace Volian.Controls.Library.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap SupInfo {
get {
object obj = ResourceManager.GetObject("SupInfo", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -55,10 +55,12 @@ namespace Volian.Controls.Library
{
if (_MyEditItem == value) return; // Don't do this if the value is not different
_MyEditItem = value;
SetBtnInsSupInfoVisible();
if (value != null)
{
(this.Parent as StepTabPanel).MyDisplayTabItem.SetupSecurity(MyItemInfo);
MyStepRTB = value.MyStepRTB;
if (btnInsSupInfo.Visible && btnInsSupInfo.Enabled) btnInsSupInfo.Tag = string.Format("{0} {1}", (int)E_FromTypes.SupInfos, 1040); // use 1040 to flag RNO (40) and special case handling (1000)
if (value is GridItem)
{
ToggleTableDesignButtons(true);
@ -588,6 +590,7 @@ namespace Volian.Controls.Library
set
{
_MyStepRTB = value;
SetBtnInsSupInfoVisible();
if (fiwc != null) fiwc.MyStepRTB = value;
if (value != null)
{
@ -662,7 +665,21 @@ namespace Volian.Controls.Library
}
}
}
private void SetBtnInsSupInfoVisible()
{
if (MyItemInfo == null) return;
if (!MyItemInfo.SupplementalInformation)
{
btnInsSupInfo.Visible = false;
return;
}
btnInsSupInfo.Visible = true;
// Any step type can insert supplemental information, unless within supplemental information:
if (MyItemInfo.IsSection || MyItemInfo.IsProcedure || MyItemInfo.IsInSupInfo || (MyItemInfo.SupInfos != null && MyItemInfo.SupInfos.Count > 0)) // || ParentHasSupInfo(MyItemInfo))
btnInsSupInfo.Enabled = false;
else
btnInsSupInfo.Enabled = true;
}
void _MyStepRTB_TextChanged(object sender, EventArgs e)
{
if (_MyStepRTB == null) return;
@ -854,6 +871,7 @@ namespace Volian.Controls.Library
public StepTabRibbon()
{
InitializeComponent();
this.btnInsSupInfo.Tag = string.Format("{0} {1}", (int)E_FromTypes.SupInfos, 1040); // Make type of rno (40) & special case 1000
SetChangeIdRibbon();
EnableROEdit = true;
@ -996,6 +1014,10 @@ namespace Volian.Controls.Library
hlsEditItem = hlsEditItem.ActiveParent;
hlsEditItem.AddSiblingAfter((int?)contenttype, true);
}
else if (contenttype == 21040)
{
_MyEditItem.AddChild((E_FromType)fromtype, 20040);
}
else if (InsertingTable(contenttype))
{
if (tabOrFigType.Contains("RO"))
@ -1234,7 +1256,7 @@ namespace Volian.Controls.Library
}
if (itemBefore != null)
{
Console.WriteLine("findStepBefore {0}", itemBefore.DisplayText);
//Console.WriteLine("findStepBefore {0}", itemBefore.DisplayText);
return _MyEditItem.MyStepPanel.FindItem(itemBefore);
}
return null;
@ -1353,6 +1375,7 @@ namespace Volian.Controls.Library
btnInsCaut.Enabled = btnInsNote.Enabled = btnCMInsCaution.Enabled = btnCMInsNote.Enabled = setting && !MyItemInfo.IsInCalvertConditionResponse;
// 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"));
if (MyItemInfo.IsSupInfoPart) btnInsAfter.Enabled = btnInsAftH.Enabled = btnInsBefore.Enabled = btnInsBefH.Enabled = false;
}
public void SetButtonAndMenuEnabling(bool docontextmenus)
{
@ -1774,6 +1797,7 @@ namespace Volian.Controls.Library
}
// 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"));
if (MyItemInfo.IsSupInfoPart) btnInsAfter.Enabled = btnInsAftH.Enabled = btnInsBefore.Enabled = btnInsBefH.Enabled = false;
this.Refresh();
return;
}
@ -1792,8 +1816,8 @@ namespace Volian.Controls.Library
btnInsFig.Enabled = (actable & E_AccStep.AddingTable) > 0;
btnInsTable.Enabled = (actable & E_AccStep.AddingTable) > 0;
btnInsSubstep.Enabled = (actable & E_AccStep.AddingSub) > 0;
btnInsBefore.Enabled = btnInsBefH.Enabled = !MyItemInfo.IsRNOPart && (actable & E_AccStep.AddingPrev) > 0;
btnInsAfter.Enabled = btnInsAftH.Enabled = !MyItemInfo.IsRNOPart && (actable & E_AccStep.AddingNext) > 0;
btnInsBefore.Enabled = btnInsBefH.Enabled = !MyItemInfo.IsRNOPart && !MyItemInfo.IsSupInfoPart && (actable & E_AccStep.AddingPrev) > 0;
btnInsAfter.Enabled = btnInsAftH.Enabled = !MyItemInfo.IsRNOPart && !MyItemInfo.IsSupInfoPart && (actable & E_AccStep.AddingNext) > 0;
btnInsEquation.Enabled = (actable & E_AccStep.AddingTable) > 0;
// if this step has a table, figure or equation, disable both of those buttons.

View File

@ -118,6 +118,201 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btnInsTrans.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAqVJREFUOE99kntIU1Ecx+9f/dWf/V2U9LD+0B5KoPQg05U1g4iskBRLRQORyBaIZZq9
FPNRq/nA+ZjOzMd0zuaabT7mcqahIiGCkunEB6bmnPPeb+cc2sVo9cf3wr2c7+d3zuceDgBX1WKDStuL
co0FpfVdKK41QaFuh1zVhoKKVrIEbF2SYlpCIr7TiAABvBhe4LHmErDkEOB3JpoV3OXLGSPs3R32oNNp
UWMcxNvWAVRqelFSa8HQ6BQDuMsV5jXE544iImcO0a/Xd4iAimarOH19g8dPp4D5FQF9I1MIvHibAvBK
twxVpwtPGl2IyltASPIAjT8DlGksNloua/iEoppucm4zsouN6Bmcdu/g8GnZGG4VO3EywYj9YQoExBrg
H9mYyQDK+q64DXJuxzqPxVUeMz8ETMwCm+XeL/yc4XOjH3vOvUH8w5okb6mcPxheZeOOXlPuPh6nn3C4
eOQqP+JZoQEZL1uR+kLLAO6j0YzbHfC5OcjkHrok13tLFeB2XWh4LE2sT59fcmFuWcD3BQFjMwJGJgU2
nRY9yT0Qcjd2Z1AWuG2Spuo7zzXxC0RaaZ0VRWoLkp82IOlRHf4nd19wqokArNxWSbfqepqpc2J2A1KZ
FVWGb2jrtUPXYweRy8qe5NLpJEe4LaFf0/de+fDFN1R29XzKEPyjtDgW/iCa2LcRufAkt6PfTv9OHLsH
kVmTtuymVURkDkPZvgpZpZNBzt4bjil51wFPctttDFDOAL7h1YFBiWbka1eQqnYiUs4jLG2cQXLJlpcd
/F9y9VYGIP3fN5FATvlEvEdAjJ6VvYJzcCKxz0+hNoLKTSvQISW7WZRL/fwBoCFCtnuF5LnlBNJvcpUB
9kWBSJuCuX9alNti8QCg2VymyS/TsYX/CgDuFyf/5MBm5HpaAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="superTooltipRibbon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="btnInsRO.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAGtJREFUOE/NjlEOwCAIQ7n/pdlAOzuDiB9L9ho/hLYqakgXg9lG75CBFTALZoHWr/rd
wtWC0FgtSI2/KEiYCriEZglty+a5YENzPCFTLQgoSOrIXZQd94Q6gGNDRPQyju9DHcCxoYCPfqB6Ac8q
sWuK1nmhAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnInsBefore.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAS9JREFUOE+1j7lKA1EYRvMcWgh2NmIfsBAkRFQkcRwTspjJTGaymGWMSzoVQQgIgja+
QMRSX8HeQtHGrRLFJoWIhcVxQghKuE5ibuTjFPdwOfB7gL4ilDJ8P37Z/dM7O7VXrh7eXH456ybYitXO
P0lWb9yjnYI/Y/undczDF9TtWx6fP8TRTsFGbEw9waudsVmrM7lywUjgmCHfUW/B1ibK1xh7dwyO77r8
ctZtcDR1ybDvgAHv1t+CmVIFq1DBzG+g59bQsqskrDIx0yailwhpBdSlPPOxHIFIlrlwmplFi2nVxK8Y
TqItKL1/D1rF5rnG8jrJxrnpMnHLJmrYhJNFFhI2SjxPMNo4N8NsqHnulJLCH9SdRFuwXwilDEIpg1DK
IJQyCKUMQimDUPYOni9fDipMjj4udQAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnInsAfter.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAATBJREFUOE+lkL1LAgEYxu8vaWuItoZac8tIjezyFE/z4/JOTb3DPmzrY6qlsSgQgyIa
aiwIanAKImgRl8OWFrEtaPzV4XIHZ3TJjwcenuHheV8BGEquoRe5hl7kGnqRa+hFrqEXCXm9hlqukStt
ki2uky6skVKrJHIG8axONF0mslxiMVFkIV5gPqYRkFTmIjn8ovLTMiQ2+z8EtdKfr6xukLHma1WSqoGs
GMQyFZZSBmKyRFi25ucJRvvzZ8UV/OGsvctJ7eQNaatJyLi33jUQm3Wyd9Gl8fCFT7nxVjCdvkI7eMUq
OL79JKDfMSVfMjpz6Fpks31aZo+x0Cm7DZPt8y7STpsJsc5L6/1vBRbtzgeTsTP8RpPx4BGPT+bAM2zW
SbvTY8S3T/36+ZcfIHwDzrV41u405T4AAAAASUVORK5CYII=
</value>
</data>
<data name="btnInsHLS.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAOxJREFUOE9j+P//P0UYTIQ3PNLxKT0FZGJXhA+DiZCm+/898g8AmUgSQClCGKwORASW
XdZ0SF793zFplR/MAGIxmHDN3vHfInz6f2P/DiAXu0JcGKsgKRhMBNXf+B9QfeW/S/b2LnQFhDCcEVR3
Pd0mdgGQCZUAShHCYHUgIqThoY9r1vb/tolL/WEGEIvBhGfBgf+WETP+G/m2ALnYFeLCWAVJwWDCv+ri
f9/yc/8dUlYDudgV4sJwhl/Fuf+O6ZvS4BJAKUIYrA6mwaPoyGyz4AlgQVIwmPAoPAgORJvohYHoCghh
rILE4/8MAGForseyYJRSAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnInsSubstep.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAHhJREFUOE9j+P//P0UYTBR0HyoA4v8gGl0BIQwmQJpDW578l7WuAnIhEixMLP/xYZg6
mAEFIM1ATJ4LKMFYBUnBYGI0ELFLEIvBRGLF8gIg/g+i0RUQwmACpNmz6Oh/SeNMIBcigS3gkDFMHcyA
ApBmIB5ygfifAQA+ULaoYuLc1gAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnInsRNO.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAENJREFUOE/t0DEKACAMQ9Fie/8rRxAUKekQ3cThdfhkqgG4QqNiHHdHto+iBbK5WaNT
NCpoVNCooJH5T6zRWHnyibAOGyDWBzL5cAcAAAAASUVORK5CYII=
</value>
</data>
<data name="btnInsCaut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAmVJREFUOE+lkEtME1EYhdm6Y2FiohsXLtRoTHwEJUgEjcVHpOKCEBo0NmKjoSql1oEW
2g5lCkpptdCmg30gRqoYwSg+MXZjBA0vU2xBo0UlUFSgKkSUOc6tGUNtN8bFN8n/zznfvTNJAP6LhEtC
95OHa1ysQdLMGkEp5SvvdtxITpSLWxBqK1XbvS4GfJn79pbm3A30G6+bQbuXpf7OxgwClxwMNxOiiQAI
m+Gx05gNGaJzX1dn6sJsTFHAZdV95cbr+ALzW1CvB5mb7FWw16rhYU3ZQjauTGi0lPMFE5psOmDcDKdF
A44Xuep14D8JtlqqU8jGlQlmfVH0ROd5CtyYGfaaEszzQlu1EnMjRhhUh4NCNvrgzRqnVQfCnZues4zy
IF80wVF3CnPvatBgkGHufTXOlR7BTKgSxdJ9g38E/I9Z1GQ3YOoVzb+kcdWphVomxs/RGtxvOYlIUANf
axG+vK5Ay4VCRAJlOJ6/cyDmBrxEX5y/DRODWkwPq2HTijE7wmByWI+pITUmAxQ+B5SYClIY7TkGaU7a
sxgB4TJbrYxKBhQI98ox+VKLyJAe04EKfPSXYaxfhbGeEwjey4VkT4ovTkBgLZorRPKhS4bRbjnCfOmT
vxQTL85g5Gkh+q6L8PhiOpe3e+OjhIJWrzlZdUhEE0n/rQPobRNz/o4cbqBtL557M9HVnAajPO27okBk
SygguKt0izWy/RVEcs20g3vgyOB8znTctm6ep6QbfuzauhqnC7KWCvk4AaH8qGhFuTxXIclObd+ydtns
plVLkJmyfFCStb6xJC9j3cJsTPHfQdIvpP7OSRZsuAwAAAAASUVORK5CYII=
</value>
</data>
<data name="btnInsNote.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAdxJREFUOE+l0l9IU1EcwPFFz9JbD/Vgj5Kr9EGikCiitAxJqJeiMGw5kdU2wyVaNlfT
Qg0yiAjKIoLWiGwkwyQbzgU2hvPfrcw/TRcKmijOhNn9dpLh3U2ISz18zu93OPB9Ojrgv6wcUqCJP/X7
bxPubKTnXSOhtw10v6nH53HS5nLgfWZfoQoQ/yzWoODXpMpUIGYiMNjVRDz2XqwuzSpNR8VMBAKva1ma
fSXWe5pVlOaLmQh0tlzjR/QhxG5pZis5ogR8Lx3MjdSzPOtcxfe6v7IZ85RAxws70+FymKzRzFZ8WAm0
Pbfztb2AxfEKmKhWRIVvSfck5YZDSsArAl882UR9exjx7mLIs51Q80YW+gzI41cgcnmNi4bcpIDLzlTX
cQab1zMf1DPtTyN0V0ekPQd5rBKGL61hLcpRB2IhI0PurUhPNyCHs1gKpBF+sJn4pzKQLIJVxVx4ICkg
vqXcb5IXg4WMtWTw4U4Kkfs6hoVRdzqyZIa+CzAgZsL5U/vVgeXekp+/H+I9RqKtu/n4eAsDTzbR3bAO
6VEqE+5sZlrzmO84xpxQemKfOlBjycVhOUitdS83zTu5YcrEWazn+rl0HGf1XC3SU3VmG7bTOyg7mYFF
WA38O3S/ADcvFeh5cZA8AAAAAElFTkSuQmCC
</value>
</data>
<data name="btnInsTable.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAchJREFUOE+lkN8vglEcxv1H5sKFG3Nl48Kluc7cmNm4YGNmtsaFzWxUk4WiyG8mKaWk
SCUsDcPmxxsyuZCk3upxzsubzrCxLp73PefsfJ7n+Z4CAHlJ+PROPyBX3boHdKrDaBm+R8PgHSR9t6jp
CaGqi0N5O4fSlhuUNF8TNMdA4wBG7RkorWnITSn0G3j0LiYhnUmgY/INrZpXNKliqB+KoU4WRVHdHmsg
SqoNo200jEbFR3J1dwiVHTco+0wVVShxfxlMrvqQyWSycvkvmP2a80j4J/k0ovE0pgxuFFfUfhmML7sZ
YNN3xuxX7IdIEPiFwJFoCtplF2swMr+FgxNOSN70ncO2ewrLzrGQTOElqx+zJi/0JJnCY/MO1kCp32AS
1wksrmltCkeiPEKRJM7vklDN2FgDudbMGJicwSz8Ek9Bv+oG98QLcOA6AeWUlTUY0BjhCVzCsk1qbx3B
kFubwLS2esEB1awNSr0VCp35u0Fug0WLX3jtx+cUqc1DTWYOXCXgOYvDHoxBNmH63YDWnqMzE5gjsDjz
B/wK434M9P43A4f3VKhNYfG1afIIrU1mVujWhWR690cDevBfZQ3y0Y+HfxcK3gF0tRyBhFaMKgAAAABJ
RU5ErkJggg==
</value>
</data>
<data name="btnInsFig.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAkRJREFUOE+lk11Ik3EUh3cZEUQXQdCFERFdRE0iiMKMkALJleSFIX2gVKCUlFiWy8QF
WVosQUVHKzU/KjNTy4aZqChpH9qczqS5QIvULZ3Sh835tPOGvbswiro479We5/zPOb9pgP8q5ZN3p4PA
yilrJ+tmCxcKG9HnPCYpq4Z4QyWxqeXEJBcTlWhmT4LJjwYIvDP8tj5/A/fULMPuWQY++Ohy+lizM/3v
BC6bHfuhYGwHtVjbbApcUj/I6h3n/yyQzgIzbGH66Ume711Bq93Hjdo3rAoLEMjM88HybNsB7U84O4z2
yCAs3TMU3rOycnuaKpCFzQfLzPJs6Szw/Qevqe6cIbe8k6Bt51SBbHsO7h8c4USGSamOvk/KzPJs6Sxw
RZsXY1ELy0P0qkBOJbBjyK2AjuFxrANjbI2Iw1T1itDdh5UqqO6nuNlLtqmBZVtSVYHceQ5+P+ph6OMX
nvW4qLD0Eh4dT82TLuqbe/y/1lDwyMXFvDqWbjqrCiQkAo+4JvFMTWN1TGCuecvtBif5/nl1MccoutuE
8XqtIjFcq2LJxjOqQBL23etjzDNNn3OSkocOrpb2kml+SZa5nURDOdrQKBL1OcSnXFEkizekqAKJ5+j4
V170uahsfPcLTs9tJvlyLQlppUTGGhRJ+L7jhOriWBR8WhVItu3OCcrqusnIb0VvbCA5s9oP3iI2KZ/o
o5fQ7dcTsusIazdHKLVwfYBA/hiSbYmnJExCIneWU8m2ZWEyszxbOgu8YN0pVfDvheYHcKby8SmeJsQA
AAAASUVORK5CYII=
</value>
</data>
<data name="btnInsPgBrk.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAbtJREFUOE+dkdkvQ0EUxvuneCJiizUeSBCxv+CBBxIJ/42+iIgHtaS2WNLGnpbaCbU0
5ZbbRlvUWqSWStHlM3Oa2zR674sv+fKdzJzzm8yMCgB5dlPEX+tWBUwYLBiZ2+fulHrjHSv4gJI0U+so
qOmQhcQK/ZqNhbx6Rgww7ggSRM2WEgFTy1YW8hqYXqVhyUyJgPHFQ0RYEa9IJEJroVAY/ZMmdGuXkF/d
zrcSAWPzZoTDYZycOykdLg+CbNB65kTg+weWs0voDHvKALVmFq7rO7aiguC4pBSdHsoDq51yWLeiDPiv
Y8Wc6ZBOcXseKR3uW0qb44pyyyxQ5pU1snYZwOjMFgSR3Z89nPfZRw8oiC74A984OHHh5uEd6j49UvKr
WLsMQMNeORgKsTIq/oCvH1+49X5AdL/g+PwBXUMLyCpt5tuJgN5RI4uo+OmfgR88vnziwuOD1e7FtuWG
vjG9WOEKfFMS//c3/xfun/wE2D+9g8l8RYDUwjreogzYPbJjcf0YWv0GBqfX0DtmpEHJyXmVvE0ewP84
t6INOeWtyC5vQWZJEzm9qAFpRfXs9FokZRSzdhnA/wzVLxUADyPRHEmUAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnIndent.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAKBJREFUOE+lktENgzAMRPnuT0dgBEboCBUTMEpnYRJG6SjGD0yF42IUOOkwJPLLGWhE
5Jb/LtZ4vRzrZdWpBvCx6pQBOvVkHnb3zoeARz++1U97RIwQnAEm9ReQLbEZHADWKIUZoTx9SRcAm7Tp
LAGQFHD2DvIEqvIrsBmcAThhO621CtQpA9DEz4NpppLEKQOU+s29Vw2ABKRyCoDrlmYGMFFlo7aqRrIA
AAAASUVORK5CYII=
</value>
</data>
<data name="btnInsHrdSpc.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAH1JREFUOE/tlEEKgDAMBAv9/5sjDU2I46JgPHoY6M4uUkEcZvYpUnaQsoOUHaTsIGWH
Mees2IaexI68fuCCW891kHLDjnDnmYMs9vmO2FVOr3wpH+DOcw1xzhKOcOO5hjhnCUe48VyLKGsOR7gJ
Lp9NGymBuslCbf+/TRsbB+xHoolXXKrrAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnSymbols.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAgtJREFUOE9j+P//P0UYqyApGM5wKrvD6Vp9V9G1/VWWc+/bWuvpX7eYz/p10Wzq130m
ne+7jSueZhnm37DSijsrhmGAT+0DLteG50V27W83eSdduOgXfmCNT/jhfK/Io+ku0acnWxTeOanZ8+m5
YvWzO8rBxyrVrPbwoBjgUnXX3rbl9aOggH23Y0K3+MMkkbF51uWJqqnXr0g77bunZb48EiYOJmyaXuw0
zb//3c95XQdMAhtWTbmwTcZt72cd84VrYWJgwrT66XLdmKvfnC1XZ8MksGHl9PPr5bx2fzW0nL8EJgYm
LIpv+Wv4nbmhZrjtMkwCG1YqufpGxWHjayubOTEwMTBhFndZWdX9xAF56wNf1e23eMAkkbFu9tlE5fIr
f0ysF12zsl6gCROHK9D0O2IhHnHptbTHwV0wMWSsk3/pslrIvs/WtgvckMVRFMkmX5ktmXD2qYbdZntk
caPMU06axZc+aPtuW48sDsJgQrz/80e15HPOKiEHVaVddr7Xsly5EVmRQc7pIzrZp7/r+28z1vRcnyTn
s/onTA5iQP3z9+LZl7/IWq5/omM2742B9bx7MAUgbJBz6oVe+N7P2i6r36s7Lf2p6jT/G0wOTMgHHTmh
aLz6tq75/E+a1nN+aDgt/AtTAMKGSQd+G3tv+GHkveKHjuui9zoO8x7C5OCKyMVYBYnH/xkA0xCX+LGq
wvUAAAAASUVORK5CYII=
</value>
</data>
<data name="btnPdfCreate.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@ -163,9 +358,6 @@
SUVORK5CYII=
</value>
</data>
<metadata name="superTooltipRibbon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="btnDelelete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@ -433,198 +625,6 @@
eA4CMA/59IJKpYJSqYRisQhFUWATwsjn81jcjWB+5xlzW0/ghSB41wPcvgu9oGeQR/fALLh+G7i+GXT1
TtO4ZGo6nUYikUA8HockSRSdgCwsJtfvaGReeIR9815HS4KJtVu8fabgES9pg5GmAuvqDf1p87BIL7Mg
95jN/4G52TowfQMrXAwHRYbY0gAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnInsTrans.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAqVJREFUOE99kntIU1Ecx+9f/dWf/V2U9LD+0B5KoPQg05U1g4iskBRLRQORyBaIZZq9
FPNRq/nA+ZjOzMd0zuaabT7mcqahIiGCkunEB6bmnPPeb+cc2sVo9cf3wr2c7+d3zuceDgBX1WKDStuL
co0FpfVdKK41QaFuh1zVhoKKVrIEbF2SYlpCIr7TiAABvBhe4LHmErDkEOB3JpoV3OXLGSPs3R32oNNp
UWMcxNvWAVRqelFSa8HQ6BQDuMsV5jXE544iImcO0a/Xd4iAimarOH19g8dPp4D5FQF9I1MIvHibAvBK
twxVpwtPGl2IyltASPIAjT8DlGksNloua/iEoppucm4zsouN6Bmcdu/g8GnZGG4VO3EywYj9YQoExBrg
H9mYyQDK+q64DXJuxzqPxVUeMz8ETMwCm+XeL/yc4XOjH3vOvUH8w5okb6mcPxheZeOOXlPuPh6nn3C4
eOQqP+JZoQEZL1uR+kLLAO6j0YzbHfC5OcjkHrok13tLFeB2XWh4LE2sT59fcmFuWcD3BQFjMwJGJgU2
nRY9yT0Qcjd2Z1AWuG2Spuo7zzXxC0RaaZ0VRWoLkp82IOlRHf4nd19wqokArNxWSbfqepqpc2J2A1KZ
FVWGb2jrtUPXYweRy8qe5NLpJEe4LaFf0/de+fDFN1R29XzKEPyjtDgW/iCa2LcRufAkt6PfTv9OHLsH
kVmTtuymVURkDkPZvgpZpZNBzt4bjil51wFPctttDFDOAL7h1YFBiWbka1eQqnYiUs4jLG2cQXLJlpcd
/F9y9VYGIP3fN5FATvlEvEdAjJ6VvYJzcCKxz0+hNoLKTSvQISW7WZRL/fwBoCFCtnuF5LnlBNJvcpUB
9kWBSJuCuX9alNti8QCg2VymyS/TsYX/CgDuFyf/5MBm5HpaAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnInsRO.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAGtJREFUOE/NjlEOwCAIQ7n/pdlAOzuDiB9L9ho/hLYqakgXg9lG75CBFTALZoHWr/rd
wtWC0FgtSI2/KEiYCriEZglty+a5YENzPCFTLQgoSOrIXZQd94Q6gGNDRPQyju9DHcCxoYCPfqB6Ac8q
sWuK1nmhAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnInsBefore.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAS9JREFUOE+1j7lKA1EYRvMcWgh2NmIfsBAkRFQkcRwTspjJTGaymGWMSzoVQQgIgja+
QMRSX8HeQtHGrRLFJoWIhcVxQghKuE5ibuTjFPdwOfB7gL4ilDJ8P37Z/dM7O7VXrh7eXH456ybYitXO
P0lWb9yjnYI/Y/undczDF9TtWx6fP8TRTsFGbEw9waudsVmrM7lywUjgmCHfUW/B1ibK1xh7dwyO77r8
ctZtcDR1ybDvgAHv1t+CmVIFq1DBzG+g59bQsqskrDIx0yailwhpBdSlPPOxHIFIlrlwmplFi2nVxK8Y
TqItKL1/D1rF5rnG8jrJxrnpMnHLJmrYhJNFFhI2SjxPMNo4N8NsqHnulJLCH9SdRFuwXwilDEIpg1DK
IJQyCKUMQimDUPYOni9fDipMjj4udQAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnInsAfter.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAATBJREFUOE+lkL1LAgEYxu8vaWuItoZac8tIjezyFE/z4/JOTb3DPmzrY6qlsSgQgyIa
aiwIanAKImgRl8OWFrEtaPzV4XIHZ3TJjwcenuHheV8BGEquoRe5hl7kGnqRa+hFrqEXCXm9hlqukStt
ki2uky6skVKrJHIG8axONF0mslxiMVFkIV5gPqYRkFTmIjn8ovLTMiQ2+z8EtdKfr6xukLHma1WSqoGs
GMQyFZZSBmKyRFi25ucJRvvzZ8UV/OGsvctJ7eQNaatJyLi33jUQm3Wyd9Gl8fCFT7nxVjCdvkI7eMUq
OL79JKDfMSVfMjpz6Fpks31aZo+x0Cm7DZPt8y7STpsJsc5L6/1vBRbtzgeTsTP8RpPx4BGPT+bAM2zW
SbvTY8S3T/36+ZcfIHwDzrV41u405T4AAAAASUVORK5CYII=
</value>
</data>
<data name="btnInsHLS.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAOxJREFUOE9j+P//P0UYTIQ3PNLxKT0FZGJXhA+DiZCm+/898g8AmUgSQClCGKwORASW
XdZ0SF793zFplR/MAGIxmHDN3vHfInz6f2P/DiAXu0JcGKsgKRhMBNXf+B9QfeW/S/b2LnQFhDCcEVR3
Pd0mdgGQCZUAShHCYHUgIqThoY9r1vb/tolL/WEGEIvBhGfBgf+WETP+G/m2ALnYFeLCWAVJwWDCv+ri
f9/yc/8dUlYDudgV4sJwhl/Fuf+O6ZvS4BJAKUIYrA6mwaPoyGyz4AlgQVIwmPAoPAgORJvohYHoCghh
rILE4/8MAGForseyYJRSAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnInsSubstep.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAHhJREFUOE9j+P//P0UYTBR0HyoA4v8gGl0BIQwmQJpDW578l7WuAnIhEixMLP/xYZg6
mAEFIM1ATJ4LKMFYBUnBYGI0ELFLEIvBRGLF8gIg/g+i0RUQwmACpNmz6Oh/SeNMIBcigS3gkDFMHcyA
ApBmIB5ygfifAQA+ULaoYuLc1gAAAABJRU5ErkJggg==
</value>
</data>
<data name="btnInsRNO.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAENJREFUOE/t0DEKACAMQ9Fie/8rRxAUKekQ3cThdfhkqgG4QqNiHHdHto+iBbK5WaNT
NCpoVNCooJH5T6zRWHnyibAOGyDWBzL5cAcAAAAASUVORK5CYII=
</value>
</data>
<data name="btnInsCaut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAmVJREFUOE+lkEtME1EYhdm6Y2FiohsXLtRoTHwEJUgEjcVHpOKCEBo0NmKjoSql1oEW
2g5lCkpptdCmg30gRqoYwSg+MXZjBA0vU2xBo0UlUFSgKkSUOc6tGUNtN8bFN8n/zznfvTNJAP6LhEtC
95OHa1ysQdLMGkEp5SvvdtxITpSLWxBqK1XbvS4GfJn79pbm3A30G6+bQbuXpf7OxgwClxwMNxOiiQAI
m+Gx05gNGaJzX1dn6sJsTFHAZdV95cbr+ALzW1CvB5mb7FWw16rhYU3ZQjauTGi0lPMFE5psOmDcDKdF
A44Xuep14D8JtlqqU8jGlQlmfVH0ROd5CtyYGfaaEszzQlu1EnMjRhhUh4NCNvrgzRqnVQfCnZues4zy
IF80wVF3CnPvatBgkGHufTXOlR7BTKgSxdJ9g38E/I9Z1GQ3YOoVzb+kcdWphVomxs/RGtxvOYlIUANf
axG+vK5Ay4VCRAJlOJ6/cyDmBrxEX5y/DRODWkwPq2HTijE7wmByWI+pITUmAxQ+B5SYClIY7TkGaU7a
sxgB4TJbrYxKBhQI98ox+VKLyJAe04EKfPSXYaxfhbGeEwjey4VkT4ovTkBgLZorRPKhS4bRbjnCfOmT
vxQTL85g5Gkh+q6L8PhiOpe3e+OjhIJWrzlZdUhEE0n/rQPobRNz/o4cbqBtL557M9HVnAajPO27okBk
SygguKt0izWy/RVEcs20g3vgyOB8znTctm6ep6QbfuzauhqnC7KWCvk4AaH8qGhFuTxXIclObd+ydtns
plVLkJmyfFCStb6xJC9j3cJsTPHfQdIvpP7OSRZsuAwAAAAASUVORK5CYII=
</value>
</data>
<data name="btnInsNote.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAdxJREFUOE+l0l9IU1EcwPFFz9JbD/Vgj5Kr9EGikCiitAxJqJeiMGw5kdU2wyVaNlfT
Qg0yiAjKIoLWiGwkwyQbzgU2hvPfrcw/TRcKmijOhNn9dpLh3U2ISz18zu93OPB9Ojrgv6wcUqCJP/X7
bxPubKTnXSOhtw10v6nH53HS5nLgfWZfoQoQ/yzWoODXpMpUIGYiMNjVRDz2XqwuzSpNR8VMBAKva1ma
fSXWe5pVlOaLmQh0tlzjR/QhxG5pZis5ogR8Lx3MjdSzPOtcxfe6v7IZ85RAxws70+FymKzRzFZ8WAm0
Pbfztb2AxfEKmKhWRIVvSfck5YZDSsArAl882UR9exjx7mLIs51Q80YW+gzI41cgcnmNi4bcpIDLzlTX
cQab1zMf1DPtTyN0V0ekPQd5rBKGL61hLcpRB2IhI0PurUhPNyCHs1gKpBF+sJn4pzKQLIJVxVx4ICkg
vqXcb5IXg4WMtWTw4U4Kkfs6hoVRdzqyZIa+CzAgZsL5U/vVgeXekp+/H+I9RqKtu/n4eAsDTzbR3bAO
6VEqE+5sZlrzmO84xpxQemKfOlBjycVhOUitdS83zTu5YcrEWazn+rl0HGf1XC3SU3VmG7bTOyg7mYFF
WA38O3S/ADcvFeh5cZA8AAAAAElFTkSuQmCC
</value>
</data>
<data name="btnInsTable.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAchJREFUOE+lkN8vglEcxv1H5sKFG3Nl48Kluc7cmNm4YGNmtsaFzWxUk4WiyG8mKaWk
SCUsDcPmxxsyuZCk3upxzsubzrCxLp73PefsfJ7n+Z4CAHlJ+PROPyBX3boHdKrDaBm+R8PgHSR9t6jp
CaGqi0N5O4fSlhuUNF8TNMdA4wBG7RkorWnITSn0G3j0LiYhnUmgY/INrZpXNKliqB+KoU4WRVHdHmsg
SqoNo200jEbFR3J1dwiVHTco+0wVVShxfxlMrvqQyWSycvkvmP2a80j4J/k0ovE0pgxuFFfUfhmML7sZ
YNN3xuxX7IdIEPiFwJFoCtplF2swMr+FgxNOSN70ncO2ewrLzrGQTOElqx+zJi/0JJnCY/MO1kCp32AS
1wksrmltCkeiPEKRJM7vklDN2FgDudbMGJicwSz8Ek9Bv+oG98QLcOA6AeWUlTUY0BjhCVzCsk1qbx3B
kFubwLS2esEB1awNSr0VCp35u0Fug0WLX3jtx+cUqc1DTWYOXCXgOYvDHoxBNmH63YDWnqMzE5gjsDjz
B/wK434M9P43A4f3VKhNYfG1afIIrU1mVujWhWR690cDevBfZQ3y0Y+HfxcK3gF0tRyBhFaMKgAAAABJ
RU5ErkJggg==
</value>
</data>
<data name="btnInsFig.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAkRJREFUOE+lk11Ik3EUh3cZEUQXQdCFERFdRE0iiMKMkALJleSFIX2gVKCUlFiWy8QF
WVosQUVHKzU/KjNTy4aZqChpH9qczqS5QIvULZ3Sh835tPOGvbswiro479We5/zPOb9pgP8q5ZN3p4PA
yilrJ+tmCxcKG9HnPCYpq4Z4QyWxqeXEJBcTlWhmT4LJjwYIvDP8tj5/A/fULMPuWQY++Ohy+lizM/3v
BC6bHfuhYGwHtVjbbApcUj/I6h3n/yyQzgIzbGH66Ume711Bq93Hjdo3rAoLEMjM88HybNsB7U84O4z2
yCAs3TMU3rOycnuaKpCFzQfLzPJs6Szw/Qevqe6cIbe8k6Bt51SBbHsO7h8c4USGSamOvk/KzPJs6Sxw
RZsXY1ELy0P0qkBOJbBjyK2AjuFxrANjbI2Iw1T1itDdh5UqqO6nuNlLtqmBZVtSVYHceQ5+P+ph6OMX
nvW4qLD0Eh4dT82TLuqbe/y/1lDwyMXFvDqWbjqrCiQkAo+4JvFMTWN1TGCuecvtBif5/nl1MccoutuE
8XqtIjFcq2LJxjOqQBL23etjzDNNn3OSkocOrpb2kml+SZa5nURDOdrQKBL1OcSnXFEkizekqAKJ5+j4
V170uahsfPcLTs9tJvlyLQlppUTGGhRJ+L7jhOriWBR8WhVItu3OCcrqusnIb0VvbCA5s9oP3iI2KZ/o
o5fQ7dcTsusIazdHKLVwfYBA/hiSbYmnJExCIneWU8m2ZWEyszxbOgu8YN0pVfDvheYHcKby8SmeJsQA
AAAASUVORK5CYII=
</value>
</data>
<data name="btnInsPgBrk.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAbtJREFUOE+dkdkvQ0EUxvuneCJiizUeSBCxv+CBBxIJ/42+iIgHtaS2WNLGnpbaCbU0
5ZbbRlvUWqSWStHlM3Oa2zR674sv+fKdzJzzm8yMCgB5dlPEX+tWBUwYLBiZ2+fulHrjHSv4gJI0U+so
qOmQhcQK/ZqNhbx6Rgww7ggSRM2WEgFTy1YW8hqYXqVhyUyJgPHFQ0RYEa9IJEJroVAY/ZMmdGuXkF/d
zrcSAWPzZoTDYZycOykdLg+CbNB65kTg+weWs0voDHvKALVmFq7rO7aiguC4pBSdHsoDq51yWLeiDPiv
Y8Wc6ZBOcXseKR3uW0qb44pyyyxQ5pU1snYZwOjMFgSR3Z89nPfZRw8oiC74A984OHHh5uEd6j49UvKr
WLsMQMNeORgKsTIq/oCvH1+49X5AdL/g+PwBXUMLyCpt5tuJgN5RI4uo+OmfgR88vnziwuOD1e7FtuWG
vjG9WOEKfFMS//c3/xfun/wE2D+9g8l8RYDUwjreogzYPbJjcf0YWv0GBqfX0DtmpEHJyXmVvE0ewP84
t6INOeWtyC5vQWZJEzm9qAFpRfXs9FokZRSzdhnA/wzVLxUADyPRHEmUAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnIndent.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAKBJREFUOE+lktENgzAMRPnuT0dgBEboCBUTMEpnYRJG6SjGD0yF42IUOOkwJPLLGWhE
5Jb/LtZ4vRzrZdWpBvCx6pQBOvVkHnb3zoeARz++1U97RIwQnAEm9ReQLbEZHADWKIUZoTx9SRcAm7Tp
LAGQFHD2DvIEqvIrsBmcAThhO621CtQpA9DEz4NpppLEKQOU+s29Vw2ABKRyCoDrlmYGMFFlo7aqRrIA
AAAASUVORK5CYII=
</value>
</data>
<data name="btnInsHrdSpc.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
EnEB89x6jgAAAH1JREFUOE/tlEEKgDAMBAv9/5sjDU2I46JgPHoY6M4uUkEcZvYpUnaQsoOUHaTsIGWH
Mees2IaexI68fuCCW891kHLDjnDnmYMs9vmO2FVOr3wpH+DOcw1xzhKOcOO5hjhnCUe48VyLKGsOR7gJ
Lp9NGymBuslCbf+/TRsbB+xHoolXXKrrAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnSymbols.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAK9gAA
CvYBwq9wAwAAAgtJREFUOE9j+P//P0UYqyApGM5wKrvD6Vp9V9G1/VWWc+/bWuvpX7eYz/p10Wzq130m
ne+7jSueZhnm37DSijsrhmGAT+0DLteG50V27W83eSdduOgXfmCNT/jhfK/Io+ku0acnWxTeOanZ8+m5
YvWzO8rBxyrVrPbwoBjgUnXX3rbl9aOggH23Y0K3+MMkkbF51uWJqqnXr0g77bunZb48EiYOJmyaXuw0
zb//3c95XQdMAhtWTbmwTcZt72cd84VrYWJgwrT66XLdmKvfnC1XZ8MksGHl9PPr5bx2fzW0nL8EJgYm
LIpv+Wv4nbmhZrjtMkwCG1YqufpGxWHjayubOTEwMTBhFndZWdX9xAF56wNf1e23eMAkkbFu9tlE5fIr
f0ysF12zsl6gCROHK9D0O2IhHnHptbTHwV0wMWSsk3/pslrIvs/WtgvckMVRFMkmX5ktmXD2qYbdZntk
caPMU06axZc+aPtuW48sDsJgQrz/80e15HPOKiEHVaVddr7Xsly5EVmRQc7pIzrZp7/r+28z1vRcnyTn
s/onTA5iQP3z9+LZl7/IWq5/omM2742B9bx7MAUgbJBz6oVe+N7P2i6r36s7Lf2p6jT/G0wOTMgHHTmh
aLz6tq75/E+a1nN+aDgt/AtTAMKGSQd+G3tv+GHkveKHjuui9zoO8x7C5OCKyMVYBYnH/xkA0xCX+LGq
wvUAAAAASUVORK5CYII=
</value>
</data>
<data name="btnReviewFind.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -78,6 +78,39 @@ namespace Volian.Print.Library
ShowPageBreak(1, "Page Break before empty section", "Yes", YSize, yPageSize, yWithinMargins, ManualPageBreak);
return 1;
}
// If printing a supinfo part, add an entry to the dictionary that says what page I am on.
if (MyPageHelper.PrintingSupplmentalInformation)
{
int retval = 0;
// came across a user defined preferred page break, increment the page count for the supplemental info pdf & return 1 to break the page.
// the PrefPageBreak is set when creating the paragraphs (see vlnParagraph constructor)
if (PrefPageBreak)
{
MyPromsPrinter.SupInfoPdfPageCount++;
retval = 1;
}
// Printing the supplemental information pages to a pdf: add an item to the dictionary that says what page in the supinfo pdf
// this item can be found on.
if (MyItemInfo.IsSupInfoPart)
{
MyPromsPrinter.SupInfoPdfPage.Add(MyItemInfo.ItemID, MyPromsPrinter.SupInfoPdfPageCount);
}
return retval;
}
else if (MyItemInfo.MyDocStyle.SupplementalInformation && MyItemInfo.IsStep)
{
StepConfig sci = MyItemInfo.MyConfig as StepConfig;
if (sci.Step_PreferredPagebreak)
{
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
// caution that there are notes, but check does need if on a note, are there cautions:
if (MyItemInfo.IsCaution && MyItemInfo.MyPrevious == null) return 1;
if (MyItemInfo.IsNote && (MyItemInfo.MyParent.Cautions == null || MyItemInfo.MyParent.Cautions.Count == 0) && MyItemInfo.MyPrevious == null) return 1;
return 2;
}
}
// if the EndForSingle format flag is set to false, then we do not print an End message if the section
// is a single column section.
//bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;

View File

@ -87,6 +87,14 @@ namespace Volian.Print.Library
}
public class PromsPrinter
{
// used to link supinfo steps in pdf
public int SupInfoPdfPageCount = -1;
private Dictionary<int, int> _SupInfoPdfPage;
public Dictionary<int, int> SupInfoPdfPage
{
get { return _SupInfoPdfPage; }
set { _SupInfoPdfPage = value; }
}
// used to save word sections with resolved ROs (for export file generated from approve)
private Dictionary<int, byte[]> _DocReplace;
public Dictionary<int, byte[]> DocReplace
@ -687,6 +695,7 @@ namespace Volian.Print.Library
int finalMessageSectionID = GetFinalMessageSectionID(myProcedure, doingFoldout);
string LastFmtName = null;
int lastDocStyle = -1;
bool firstStepSec = true;
foreach (SectionInfo mySection in myProcedure.Sections)
{
if (((mySection.MyContent.Number.ToUpper() == "FOLDOUT" && myProcedure.ActiveFormat.PlantFormat.FormatData.PrintData.SectionLevelFoldouts)
@ -714,6 +723,7 @@ namespace Volian.Print.Library
_MyHelper.AllowAllWatermarks = AllowAllWatermarks;
_MyHelper.MyPdfWriter = cb.PdfWriter;
_MyHelper.CreatingFoldoutPage = doingFoldout;
_MyHelper.CreatingSupInfoPage = false;
_MyHelper.MyPdfContentByte = cb;
if (!mySection.IsStepSection) _MyHelper.PageBookmarks.Add((ItemInfo)mySection, ((mySection.DisplayNumber ?? "") == "" ? "" : mySection.DisplayNumber + " - ") + mySection.DisplayText, null);
@ -808,7 +818,7 @@ namespace Volian.Print.Library
if (mySection.IsAutoTOCSection)
{
if (cb.PdfWriter.CurrentPageNumber % 2 == 0 && !_MyHelper.CreatingFoldoutPage && InsertBlankPages) // Bug Fix: B2016-181 - add blank page if page count is even
if (((cb.PdfWriter.CurrentPageNumber % 2 == 0 && !_MyHelper.CreatingFoldoutPage) || myProcedure.ProcHasSupInfoData) && InsertBlankPages) // Bug Fix: B2016-181 - add blank page if page count is even
{
_MyHelper.OnBlankPage = true;
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
@ -839,6 +849,18 @@ namespace Volian.Print.Library
//_MyLog.InfoFormat("NewPage Begin Step Sect blank {0}", cb.PdfWriter.CurrentPageNumber);
}
}
else
{
// If the procedure has supplemental facing pages, but this section does not & it's the first section,
// need a blank 'facing page'. Sections after the first will get blank 'facing page' in print's pagination logic
if (myProcedure.ProcHasSupInfoData && !mySection.HasSupInfoSteps && firstStepSec && InsertBlankPages)
{
_MyHelper.OnBlankPage = true;
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
NewPage();
firstStepSec = false;
}
}
}
CreateStepPdf(mySection, cb);
}
@ -994,7 +1016,7 @@ namespace Volian.Print.Library
OnStatusChanged("Read MSWord", PromsPrinterStatusType.ReadMSWord);
if (doimport2)
{
if (!didFoldout && cb.PdfWriter.CurrentPageNumber > 1 && _MyFoldoutReader.Count > 0 && InsertBlankPages)
if (((!didFoldout && _MyFoldoutReader.Count > 0) || mySection.MyProcedure.ProcHasSupInfoData) && cb.PdfWriter.CurrentPageNumber > 1 && InsertBlankPages)
{
// only insert a blank page if this section does not have a foldout (but the procedure as a whole does)
// and the checkbox on the print dialog to add blank pages is checked
@ -1596,6 +1618,10 @@ namespace Volian.Print.Library
float yPageStart = yTopMargin;
if (myItemInfo.HasChildren || myItemInfo.MyDocVersion.DocVersionConfig.SelectedSlave > 0 || (myItemInfo.ActiveFormat.PlantFormat.FormatData.Express && myItemInfo.MyDocStyle.OptionalSectionContent))
{
// if there is supplemental information associated with this section... generate the pdf. This pdf will be used to place
// supplemental information on facing pages
if (myParagraph.SupInfoSection != null && myParagraph.SupInfoSection.ChildrenBelow != null && myParagraph.SupInfoSection.ChildrenBelow.Count > 0)
GenerateSuppInfoPdf(myParagraph.SupInfoSection, yTopMargin, yBottomMargin);
localYPageStart = myParagraph.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
if (myParagraph.MyPlaceKeeper != null)
_MyHelper.MyPlacekeepers.Add(myParagraph.MyPlaceKeeper); // add this step text to the PlaceKeeper (Calvert Cliffs)
@ -1661,6 +1687,70 @@ namespace Volian.Print.Library
//pt.Description = "End";
ProfileTimer.Pop(profileDepth);
}
private void GenerateSuppInfoPdf(vlnParagraph vlnParagraph, float yTopMargin, float yBottomMargin)
{
ReaderHelper savMyReaderHelper = MyReaderHelper;
PdfContentByte savMyContentByte = MyContentByte;
VlnSvgPageHelper savMyHelper = _MyHelper;
if (SupInfoPdfPage == null) SupInfoPdfPage = new Dictionary<int, int>();
else SupInfoPdfPage.Clear();
string SupInfoPdfName = Volian.Base.Library.VlnSettings.TemporaryFolder + @"\SupInfo" + vlnParagraph.MyItemInfo.ItemID.ToString() + @".pdf";
PdfContentByte cb = OpenDoc(SupInfoPdfName, PageSize.LETTER);
if (cb == null) return;
VlnSvgPageHelper myPageHealper = new VlnSvgPageHelper(vlnParagraph.MyItemInfo as SectionInfo, this, null, 0);
cb.PdfWriter.PageEvent = myPageHealper;
myPageHealper.AllowAllWatermarks = AllowAllWatermarks;
myPageHealper.MyPdfWriter = cb.PdfWriter;
myPageHealper.CreatingFoldoutPage = false;
myPageHealper.CreatingSupInfoPage = true;
myPageHealper.MyPdfContentByte = cb;
myPageHealper.ChangeBarDefinition = MyChangeBarDefinition;
myPageHealper.PrintingSupplmentalInformation = true;
float yPageStart = yTopMargin;
vlnParagraph._yPageStartForSupInfo = yTopMargin;
vlnParagraph.ToPdf(cb, yPageStart, ref yTopMargin, ref yBottomMargin);
try
{
cb.PdfDocument.Close();
cb = null;
}
catch (Exception ex)
{
Console.WriteLine("{0} - {1}", ex.GetType().Name, ex.Message);
}
_MyHelper = savMyHelper;
MyContentByte = savMyContentByte;
MyReaderHelper = savMyReaderHelper;
}
public void DoSupInfoPage(PdfContentByte cb, string str, PdfLayer textLayer, VlnSvgPageHelper myPageHelper, int itemid, bool insertBlankPages)
{
// see if the ID is in the facing page pdf - if so, get the page:
if (SupInfoPdfPage == null || SupInfoPdfPage.Count < 1) return;
int getpage = 0;
if (SupInfoPdfPage.ContainsKey(itemid)) getpage = SupInfoPdfPage[itemid];
if (getpage < 0)
{
myPageHelper.OnBlankPage = true;
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
NewPage();
return;
}
PdfImportedPage sipage = null;
try
{
string SupInfoPdfName = Volian.Base.Library.VlnSettings.TemporaryFolder + @"\SupInfo" + myPageHelper.MySection.ItemID.ToString() + @".pdf";
PdfReader pdfreader = new PdfReader(SupInfoPdfName);
sipage = cb.PdfWriter.GetImportedPage(pdfreader, getpage+1);
AddImportedPageToLayer(cb.PdfWriter.DirectContent, textLayer, sipage, 0, 0);
NewPage();
pdfreader.Close();
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
public void DoFoldoutPage(PdfContentByte cb, string str, PdfLayer textLayer, VlnSvgPageHelper myPageHelper, int foldoutindx, bool insertBlankPages)
{
if (_MyFoldoutSection == null || _MyFoldoutSection.Count==0) return;

View File

@ -222,6 +222,12 @@ namespace Volian.Print.Library
get { return _PrintedSectionPage; }
set { _PrintedSectionPage = value; }
}
private bool _PrintingSupplmentalInformation = false;
public bool PrintingSupplmentalInformation
{
get { return _PrintingSupplmentalInformation; }
set { _PrintingSupplmentalInformation = value; }
}
//private bool _AddBlankPagesForDuplexPrinting = false;
//public bool AddBlankPagesForDuplexPrinting // Tells us if a the option to add a blank page is turn on (for procedures with duplex foldouts)
@ -252,7 +258,7 @@ namespace Volian.Print.Library
DrawFootnotes(writer.DirectContent);
DrawChangeBars(writer.DirectContent);
DrawMessages(writer.DirectContent);
if (!CreatingFoldoutPage)
if (!CreatingFoldoutPage && !CreatingSupInfoPage)
{
DrawRuler(writer.DirectContent);
float x = MySection == null ? 555 : (float)MySection.MyDocStyle.Layout.PageWidth;
@ -269,7 +275,7 @@ namespace Volian.Print.Library
else
MyPageCounts.CanIncrement = true;
base.OnEndPage(writer, document);
if (!CreatingFoldoutPage)
if (!CreatingFoldoutPage && !CreatingSupInfoPage)
DrawRuler(writer.DirectContent);
}
// added the check for onBlankPage and Foldouts to fix bug found in V.C. Summer auto table of contents - 03/08/2016

View File

@ -446,6 +446,8 @@ namespace Volian.Print.Library
get { return _IsWordDocPara; }
set { _IsWordDocPara = value; }
}
public static bool HasPrefPageBreak = false; // use to track page breaks for supp info
public bool PrefPageBreak = false;
private bool _ShowSectionTitles;
public bool ShowSectionTitles
{
@ -565,6 +567,8 @@ namespace Volian.Print.Library
int profileDepth = ProfileTimer.Push(">>>> vlnParagraph.DrawText");
IsCompressed = (MyPageHelper.YMultiplier != 1 && MyItemInfo != null && MyItemInfo.FormatStepData != null && MyItemInfo.FormatStepData.Font.Size >= 12 && (MyItemInfo.FormatStepData.Font.Style & E_Style.Underline) != 0);
retval = DrawText(cb, ref yPageStart, yTopMargin, yBottomMargin, ref yLocation);
// _yPageStartForSupInfo is used to move steps down the page for the supinfo pdf. Each supinfo step may not be related to previous in structure, so need this to set y location.
if (MyItemInfo.IsInSupInfo) _yPageStartForSupInfo = retval;
// Wolf Creek Training format puts a separator line after printing the section number/title
if (MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.PrintData.WCNTraining)
MyPageHelper.SectionSepLineYoffStart = retval - (SixLinesPerInch / 2);
@ -1461,6 +1465,11 @@ namespace Volian.Print.Library
ProfileTimer.Pop(profileDepth);
return yPageStart;
}
if (MyItemInfo.IsInSupInfo) // if generating the pdf for supinfos (facing page) pdf, need a different cb to go to that file.
{
MyContentByte = cb;
MyPageHelper = null;
}
bool doThreeContinues = false;
// For BGE, the very first subsection's pagelist items were not correct - the section/meta section titles were
// at the wrong level. Reset the page helper's section.
@ -1539,6 +1548,13 @@ namespace Volian.Print.Library
MyPageHelper.PageBookmarks.Add(MyItemInfo, ((si.DisplayNumber ?? "") == "" ? "" : si.DisplayNumber + " - ") + si.DisplayText, null);
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
}
// SupInfo has its own pagination and ylocation handling, reset ypagestart & ylocation if continuing on current page.
// The value used was saved when the previous SupInfo step was printed.
if (MyItemInfo.IsSupInfoPart)
{
yPageStart = _yPageStartForSupInfo - SixLinesPerInch;
yLocation = yPageStart - YTopMost;
}
if (MyItemInfo.IsHigh && MyItemInfo.MyPrevious != null && ((MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DoubleBoxHLS) == E_DocStructStyle.DoubleBoxHLS))
yPageStart -= SixLinesPerInch;
if (MyPageHelper.ParaBreaks.Count > 0 && MyPageHelper.ParaBreaks[0].CompressFirstPartOfStep)
@ -1582,6 +1598,7 @@ namespace Volian.Print.Library
{
SectionInfo si = MyItemInfo as SectionInfo;
MyPageHelper.PageBookmarks.Add(MyItemInfo, ((si.DisplayNumber ?? "") == "" ? "" : si.DisplayNumber + " - ") + si.DisplayText, null);
}
// Only do foldout page if not done for section break, i.e. check the there's a previous step.
if (MyItemInfo.MyPrevious != null && MyItemInfo.FoldoutIndex() > -1)
@ -1597,7 +1614,24 @@ namespace Volian.Print.Library
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
MyPromsPrinter.NewPage();
//_MyLog.InfoFormat("NewPage 10 blank {0}", cb.PdfWriter.CurrentPageNumber);
}
}
// If there is supplemental information to be printed on the facing page, then get the id that has supinfo
// so that it can be retrieved from the pdf for the supinfos for this section. If there is one,
// use DoSupInfoPage to put out the page, otherwise do a blank page.
if (!MyItemInfo.IsSection && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyActiveSection as SectionInfo).HasSupInfoSteps)
{
int sid = GetIdThatHasSupInfoItems(MyItemInfo, MyItemInfo.ItemID);
if (sid != -1)
{
MyPromsPrinter.DoSupInfoPage(cb, "TEMP", MyPageHelper.TextLayer, MyPageHelper, sid, true);
}
else
{
MyPageHelper.OnBlankPage = true;
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
MyPromsPrinter.NewPage();
}
}
if (MyItemInfo.MyDocStyle.LandscapePageList)
{
@ -1606,7 +1640,8 @@ namespace Volian.Print.Library
}
yPageStart = yTopMargin + YTopMost;
DoCheckOffHeader(cb, MyItemInfo, yLocation, yTopMargin, yPageStart);
SectionTopMessage(cb, yTopMargin, yLocation);
SectionTopMessage(cb, yTopMargin, yLocation); // does wcntraining & suppinfo section title
if (MyPageHelper.CreatingSupInfoPage) yPageStart -= (2 * SixLinesPerInch);
if (doSectionContinue ) DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle , null);
// If "ContinueSectionHeader" (format flag) is true then print the section title with "(Continued)" appended to it
if (!MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader && (!MyItemInfo.IsSection || MyItemInfo.IsSeparateSubsection))
@ -1688,7 +1723,20 @@ namespace Volian.Print.Library
MyPromsPrinter.NewPage();
_MyLog.InfoFormat("NewPage Break within step blank {0}", cb.PdfWriter.CurrentPageNumber);
}
if (!MyItemInfo.IsSection && !MyItemInfo.IsInSupInfo && (MyItemInfo.MyActiveSection as SectionInfo).HasSupInfoSteps)
{
int sid = GetIdThatHasSupInfoItems(MyItemInfo, MyItemInfo.ItemID);
if (sid != -1)
{
MyPromsPrinter.DoSupInfoPage(cb, "TEMP", MyPageHelper.TextLayer, MyPageHelper, sid, true);
}
else
{
MyPageHelper.OnBlankPage = true;
cb.PdfDocument.Add(new iTextSharp.text.Table(1));
MyPromsPrinter.NewPage();
}
}
// if there is a 'container vlnbox' around the HLS, flag that the drawn box must also break:
if (MyHighLevelParagraph != null && MyHighLevelParagraph.PartsContainer != null && MyHighLevelParagraph.PartsContainer.Count > 0 &&
!((MyHighLevelParagraph.MyItemInfo.MyDocStyle.StructureStyle.Style & E_DocStructStyle.DoubleBoxHLS) == E_DocStructStyle.DoubleBoxHLS))
@ -1745,7 +1793,8 @@ namespace Volian.Print.Library
doSectionTitleContinued = (sch == null || sch.Section_PrintHdr == "Y") && !MyItemInfo.MyDocStyle.CancelSectTitle;
}
}
addExtraLines = SectionTopMessage(cb, yTopMargin, yLocation); // this does wcntraining top section continue message
addExtraLines = SectionTopMessage(cb, yTopMargin, yLocation); // this does wcntraining top section continue message and supplemental info message
if (MyPageHelper.CreatingSupInfoPage) yPageStart -= (2 * SixLinesPerInch);
if (!addExtraLines && (!doSectionTitleContinued || !SectionShowTitles))
addExtraLines = DoTopContinueMsg(cb, ref yPageStart, yTopMargin, docstyle, doThreeContinues && MyItemInfo.MyParent != null && MyItemInfo.MyParent.MyTab != null ? MyItemInfo.MyParent.MyTab.CleanText : null);
@ -2043,6 +2092,44 @@ namespace Volian.Print.Library
ProfileTimer.Pop(profileDepth);
return yPageStart;
}
// Find the step that has supplemental information from this step down page until a preferred page break is found.
// It is used to determine whether there is a supinfo facing page or if there should be a blank page.
private int GetIdThatHasSupInfoItems(ItemInfo ii, int startid)
{
if (ii == null) return -1;
if (ii.SupInfos != null && ii.SupInfos.Count > 0) return ii.SupInfos[0].ItemID;
int id = GetSubThatHasSupInfoItems(ii, startid);
if (id != -1) return id;
ItemInfo sib = ii.NextItem;
while (sib != null)
{
if (sib.SupInfos != null && sib.SupInfos.Count > 0) return sib.SupInfos[0].ItemID;
id = GetSubThatHasSupInfoItems(sib, startid);
if (id != -1) return id;
sib = sib.NextItem;
}
return -1;
}
private int GetSubThatHasSupInfoItems(ItemInfo ii, int startid)
{
if (ii is StepInfo && ((ii as StepInfo).MyConfig as StepConfig).Step_PreferredPagebreak && ii.ItemID != startid) return -1;
if (ii.MyContent.ContentParts != null)
{
foreach (PartInfo pi in ii.MyContent.ContentParts)
{
if ((E_FromType)pi.FromType != E_FromType.SupInfo)
{
foreach (ItemInfo iic in pi.MyItems)
{
if (iic.SupInfos != null && iic.SupInfos.Count > 0) return iic.SupInfos[0].ItemID;
int id = GetSubThatHasSupInfoItems(iic, startid);
if (id != -1) return id;
}
}
}
}
return -1;
}
private float GetSectionTopMessageSize()
{
// B2016-134: Account for wcntraining section top continue if item has container
@ -2057,6 +2144,17 @@ namespace Volian.Print.Library
// section is continued from previous page) in the Responsibility column.
private bool SectionTopMessage(PdfContentByte cb, float yTopMargin, float yLocation)
{
if (MyPageHelper.CreatingSupInfoPage)
{
float scttopWidths = "Supplemental Information".Length * 6;
float ctrs = ((float)MyItemInfo.MyDocStyle.Layout.PageWidth - (float)MyItemInfo.MyDocStyle.Layout.LeftMargin) / 2;
float sctcntrXs = (float)MyItemInfo.MyDocStyle.Layout.LeftMargin + ctrs - (scttopWidths / 2);
VE_Font vf = MyItemInfo.MyDocStyle.Font;
E_Style sty = (E_Style)(vf.Style | E_Style.Underline);
vf = new VE_Font(vf.Family, (int)vf.Size, sty, (float)vf.CPI);
MyPageHelper.TopMessage = new vlnText(cb, this, "Supplemental Information", "Supplemental Information", sctcntrXs, yTopMargin + 0.1F, vf);
return true;
}
bool addextra = false;
if (MyItemInfo.MyDocStyle.SectTop != null && MyItemInfo.MyDocStyle.SectTop.Message != null)
{
@ -2841,6 +2939,7 @@ namespace Volian.Print.Library
get { return _MyPromsPrinter; }
set { _MyPromsPrinter = value; }
}
public static float _yPageStartForSupInfo = 0;
public vlnParagraph(vlnParagraph parent, PdfContentByte cb, ItemInfo itemInfo, float xoff, float yoff, int rnoLevel, int maxRNO, FormatInfo formatInfo, string prefix, string suffix, float yoffRightParent, bool loadChildren, PromsPrinter pp)
{
MyPromsPrinter = pp ?? parent.MyPromsPrinter;
@ -2952,6 +3051,8 @@ namespace Volian.Print.Library
if (itemInfo.IsFootnote) itemInfo.MyTab = null;
if (itemInfo.IsSupInfoPart) XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin;
//if (itemInfo.MyTab != null && itemInfo.MyTab.Text != null && itemInfo.MyTab.Text != "")
// bug fix - if the section does not have a section number, then we need to build an empty tab for the itemInfo
// so that we place the section title in the correct location. so we need to go into this IF code block
@ -2980,6 +3081,8 @@ namespace Volian.Print.Library
else
doprint = false;
}
// if printing the supplemental info facing page, don't put out the section title. ToPdf will put out 'Supplemental Information' title.
if (MyPageHelper.CreatingSupInfoPage && itemInfo.IsSection) doprint = false;
if (doprint && itemInfo.IsSection && !itemInfo.MyDocStyle.CancelSectTitle && itemInfo.MyTab.Text.ToUpper() != "FOLDOUT")
{
doSectTab = true;
@ -3059,7 +3162,16 @@ namespace Volian.Print.Library
}
if (!itemInfo.IsSection || doSectTab)
{
if (itemInfo.MyTab.AltPrintTab != null)
if (itemInfo.IsSupInfoPart) // get combined tab if on a supinfo facing page:
{
string strmytab = null;
if (itemInfo.MyParent.IsHigh)
strmytab = itemInfo.MyTab.CleanText;
else
strmytab = ItemInfo.GetCombinedTab(itemInfo.MyParent, itemInfo.MyParent.MyParent.CombinedTab);
mytab = new vlnTab(cb, this, strmytab, strmytab, localXOffset, yoff, itemInfo.MyTab.MyFont, doSectTab, StepRTB.MySymbolFontName, itemInfo.MyTab.RemovedStyleUnderline);
}
else if (itemInfo.MyTab.AltPrintTab != null)
mytab = new vlnTab(cb, this, itemInfo.MyTab.AltPrintTab, itemInfo.MyTab.AltPrintTab, localXOffset, yoff, itemInfo.MyTab.MyFont, doSectTab, StepRTB.MySymbolFontName, itemInfo.MyTab.RemovedStyleUnderline);
else
mytab = new vlnTab(cb, this, itemInfo.MyTab.Text, itemInfo.MyTab.CleanText, localXOffset, yoff, itemInfo.MyTab.MyFont, doSectTab, StepRTB.MySymbolFontName, itemInfo.MyTab.RemovedStyleUnderline);
@ -3123,6 +3235,11 @@ namespace Volian.Print.Library
}
}
if (itemInfo.IsSection && MyParent == null && itemInfo.MyDocStyle.SupplementalInformation)
{
_SupInfoSection = new vlnParagraph(this, cb, itemInfo, xoff, yoff, rnoLevel, maxRNO, formatInfo, null, null, yoffRightParent, false, pp);
MyPromsPrinter.SupInfoPdfPageCount = -1;
}
// For Calvert Alarms: if within the CONDITION/RESPONSE table, indent by 1 character.
// Sequential substeps are ok because of the tab string, but items without a tab & other step
// types were writing over the CONDITION/RESPONSE vertical table line. This code uses
@ -3196,7 +3313,13 @@ namespace Volian.Print.Library
}
}
}
if (itemInfo is StepInfo && ((itemInfo as StepInfo).MyConfig as StepConfig).Step_PreferredPagebreak) HasPrefPageBreak = true;
if (loadChildren && itemInfo.SupInfos != null)
{
SupInfoSection.ChildrenBelow.Add(cb, itemInfo.SupInfos, XOffset, 0, 0, rnoLevel, maxRNO, formatInfo);
SupInfoSection.ChildrenBelow[SupInfoSection.ChildrenBelow.Count - 1].PrefPageBreak = HasPrefPageBreak;
HasPrefPageBreak = false;
}
// Without the following, BGE had gaps in y-direction if the AER/RNO both had cautions/notes.
// The only time this needs done is if caution/notes are printed in separate columns in dual
// column mode (used the DoubleBoxHLS BGE flag for this - if another plant needs this, make it
@ -4884,6 +5007,23 @@ namespace Volian.Print.Library
if (MyItemInfo.IsHigh) return this;
return MyParent.GetHighLevelParagraph();
}
private vlnParagraph _SupInfoSection;
public vlnParagraph SupInfoSection
{
get
{
if (_SupInfoSection == null)
{
_SupInfoSection = GetSupInfoSectionParagraph();
}
return _SupInfoSection;
}
}
private vlnParagraph GetSupInfoSectionParagraph()
{
if (MyItemInfo.IsSection) return this._SupInfoSection;
return MyParent.GetSupInfoSectionParagraph();
}
// Tab, Separator, ChangeBar, Box, Circle, Checkoff
private vlnTab _MyTab;
public vlnTab MyTab
@ -5000,6 +5140,18 @@ namespace Volian.Print.Library
public void AdjustXOffsetForTab(ItemInfo itemInfo, int maxRNO, FormatInfo formatInfo, vlnTab myTab, float xMetaAdj)
{
if (itemInfo.IsSupInfoPart)
{
int addForTab = itemInfo.MyParent.IsCaution || itemInfo.MyParent.IsNote ? 72 : 36;
XOffset = (float)itemInfo.MyDocStyle.Layout.LeftMargin + addForTab; // add in an inch to allow for enough space for Note/Caution tab
if (myTab != null)
{
myTab.XOffset = XOffset - ((myTab == null) ? 0 : myTab.Width) - 12;
if (!itemInfo.MyParent.IsHigh && !itemInfo.MyParent.IsCaution && !itemInfo.MyParent.IsNote) myTab.Width = 2 * myTab.Width;
}
return;
}
float tabWidth = (myTab == null) ? 0 : myTab.Width;
if (itemInfo.IsStepSection)
{

View File

@ -1013,6 +1013,12 @@ namespace Volian.Svg.Library
get { return _CreatingFoldoutPage; }
set { _CreatingFoldoutPage = value; }
}
private bool _CreatingSupInfoPage = false;
public bool CreatingSupInfoPage
{
get { return _CreatingSupInfoPage; }
set { _CreatingSupInfoPage = value; }
}
public SvgPageHelper(Svg mySvg)
{
_MySvg = mySvg;
@ -1043,7 +1049,8 @@ namespace Volian.Svg.Library
if (!OnFoldoutPage)
{
base.OnEndPage(writer, document);
if (!CreatingFoldoutPage)
// note that pagelist items are not done for Foldout & SupInfo (facing pages) - they get merged onto pages that have this
if (!CreatingFoldoutPage && !CreatingSupInfoPage)
{
DrawBackground(writer.DirectContentUnder);
DrawPageList(writer.DirectContent);
@ -1055,7 +1062,8 @@ namespace Volian.Svg.Library
}
else
{
if (!CreatingFoldoutPage)
// note that pagelist items are not done for Foldout & SupInfo (facing pages) - they get merged onto pages that have this
if (!CreatingFoldoutPage && !CreatingSupInfoPage)
{
DrawBackground(writer.DirectContentUnder);
DrawPageList(writer.DirectContent);