Compare commits

...

28 Commits

Author SHA1 Message Date
e171aa66fe F2024-018 - Adjust ReplaceWords in the Vogtle Alarm format so that that works “Shutdown:” and “Start:” are not bolded. 2024-02-21 10:57:37 -05:00
8883ac6358 Merge pull request '~Addressed out-of-memory exception being thrown when right-clicking on a procedure with previous revisions' (#237) from B2024-008 into Development
Merging into Development.  No code review needed since part of joint developer effort.
2024-02-19 12:15:54 -05:00
92345f8f91 ~Addressed out-of-memory exception being thrown when right-clicking on a procedure with previous revisions 2024-02-19 12:09:09 -05:00
85f683371c Merge pull request 'F2024-015' (#236) from F2024-015 into Development
Merging into Development.  No code review needed due to formats in development.
2024-02-19 10:43:07 -05:00
79f6a0eeb9 ~Adjusted width of High-level RNO in 2-column format 2024-02-19 10:43:40 -05:00
19aed4e5ac ~Adjusted width of High-level RNO in 2-column format 2024-02-19 10:35:40 -05:00
719d2b5d90 Merge pull request 'B2024-007 - Added missing settings to Beaver Valley’s Transition “{Proc Num} (Procedure Number Only)” to fix a null reference error' (#234) from B2024-007_BeaverValley_Transition into Development
Reviewed-on: #234
2024-02-16 10:57:31 -05:00
e83648ec38 B2024-007 - Added missing settings to Beaver Valley’s Transition “{Proc Num} (Procedure Number Only)” to fix a null reference error 2024-02-15 14:24:50 -05:00
03f7847484 Merge pull request 'F2024-014 - In all of the Comanche Peak formats, the Table step type was set to Arial 11' (#232) from F2024-014_ComPeak_Table_Font into Development
format only changes
2024-02-14 15:52:23 -05:00
fd24f57de3 F2024-014 - In all of the Comanche Peak formats, the Table step type was set to Arial 11 2024-02-14 15:50:55 -05:00
dff3f46ad9 Merge pull request 'B2024-006 - Improved memory management when performing the Refresh Transitions Amin Tool by encasing the getting of content information in Using statements. Same change was done for the method used by the Update RO Values Amin tool.' (#230) from B2024-006_AdminTool_Memory_mangement into Development
Reviewed-on: #230
2024-02-09 15:52:56 -05:00
afad3365bd B2024-006 - Improved memory management when performing the Refresh Transitions Amin Tool by encasing the getting of content information in Using statements. Same change was done for the method used by the Update RO Values Amin tool. 2024-02-09 14:30:11 -05:00
98d94baa03 Merge pull request 'C2024-002' (#228) from C2024-002 into Development
code looks good test
2024-02-09 09:32:48 -05:00
67f965d8dd Merge remote-tracking branch 'origin/Development' into C2024-002 2024-02-09 09:10:38 -05:00
1d0642a05a C2024-002-Print-Sections 2024-02-09 09:09:12 -05:00
a132d3de22 Merge pull request 'F2024-013 - The end message for Attachment and Procedure Step sections is now bolded and have a dash before and after the end message' (#227) from GeneralDebugging into Development
format only changes for Vogtle Units 3 & 4
2024-02-08 15:30:09 -05:00
a3c14cb999 F2024-013 - The end message for Attachment and Procedure Step sections is now bolded and have a dash before and after the end message 2024-02-08 15:27:53 -05:00
b94fb7988d Merge pull request 'B2024-005: Vogtle Alarm pagination' (#225) from B2024-005 into Development
Reviewed-on: #225
2024-02-08 08:56:58 -05:00
8903d2a53e B2024-005: Vogtle Alarm pagination 2024-02-08 06:50:10 -05:00
cec3b70fbf Merge pull request 'F2024-012 - Adjusted the Cover Page title spacing in all of the Vogtle Units 3 & 4 formats' (#224) from Vogtle3&4 into Development
Code change reviewed successfully.
2024-02-07 09:17:54 -05:00
ce68bb9c42 C2024-002-Print-Sections 2024-02-06 11:30:55 -05:00
7b16478417 C2024-002-Print-Sections 2024-02-06 07:26:58 -05:00
b0479c6334 C2024-002-Print-Sections 2024-02-05 14:42:30 -05:00
54441eee06 C2024-002-Print-Sections 2024-02-02 16:02:38 -05:00
293224275d C2024-002-Print_section 2024-01-26 11:06:26 -05:00
9a546064cf C2024-002-Print-Section 2024-01-26 09:26:42 -05:00
d6cb841d46 C2024-002-Print-Section 2024-01-25 11:05:04 -05:00
0095b2883b C2024-002-Print-Section 2024-01-25 09:18:48 -05:00
32 changed files with 686 additions and 518 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -59,6 +59,13 @@ namespace VEPROMS
get { return _Automatic; }
set { _Automatic = value; }
}
private int _prtSectID = -1;
public int PrtSectID
{
get { return _prtSectID; }
set { _prtSectID = value; }
}
// C2018-033 Used to turn off using the date/time PDF file prefix and suffix when doing batch file autmatic baseline print testing (frmVEPROMS.cs RunAutomatic())
// This is needed so the the automatic baselines can compare results from different runs of PROMS
@ -768,7 +775,7 @@ namespace VEPROMS
// B2021-102 put in the using for better memory management
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, myPDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor))//;//C2018-009 print PROMS version
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor, PrtSectID))//;//C2018-009 print PROMS version
{
frmStatus.CloseWhenDone = true;
Application.DoEvents();
@ -849,8 +856,9 @@ namespace VEPROMS
// B2016-249 Output Procedure to folder associated with Parent Child
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked,
cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text,
new Point(Left, Bottom - 50), swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor)) // ;//C2018-009 print PROMS version
new Point(Left, Bottom - 50), swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, true, tbBlankPage.Text, _MergedPfd, watermarkColor, PrtSectID)) // ;//C2018-009 print PROMS version
{
frmStatus.PrtSectID = PrtSectID;
frmStatus.CloseWhenDone = true;
Application.DoEvents();
frmStatus.CancelStop = true;
@ -1001,7 +1009,7 @@ namespace VEPROMS
// B2018-124 use text of watermark form drop down list instead of enum value
using (frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNumAndDate, waterMarkText, cbxDebug.Checked, cbxOrPgBrk.Checked,
cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, GetMultiunitPDFPath(), cbd, txbPDFName.Text, new Point(Left, Bottom - 50),
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, false, tbBlankPage.Text, _MergedPfd, watermarkColor))//; //C2018-009 print PROMS version
swtbtnBlankPgsForDuplex.Value, _AllProcedures || Automatic, Prefix, SaveLinks, RemoveTrailingHardReturnsAndManualPageBreaks, swtbtnPROMSVersion.Value, false, tbBlankPage.Text, _MergedPfd, watermarkColor, PrtSectID))//; //C2018-009 print PROMS version
{
frmStatus.MakePlaceKeeper = swtbtnGeneratePlacekeeper.Value;
frmStatus.MakeContinuousActionSummary = cbxGenerateConActSum.Checked;

View File

@ -91,7 +91,13 @@ namespace VEPROMS
get { return _DidAll; }
set { _DidAll = value; }
}
public frmPDFStatusForm(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd, string pdfFile, Point newLocation, bool insertBlankPages, bool allOrAuto, string prefix, bool saveLinks, int removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer, bool didAll, string blankPageText, MergedPdf mergedPdf, string watermarkColor)
private int _prtSectID = -1;
public int PrtSectID
{
get { return _prtSectID; }
set { _prtSectID = value; }
}
public frmPDFStatusForm(ItemInfo myItem, string rev, string watermark, bool debugOutput, bool origPgBrk, bool openPDF, bool overWrite, string pdfPath, ChangeBarDefinition cbd, string pdfFile, Point newLocation, bool insertBlankPages, bool allOrAuto, string prefix, bool saveLinks, int removeTrailingHardReturnsAndManualPageBreaks, bool showPROMSVer, bool didAll, string blankPageText, MergedPdf mergedPdf, string watermarkColor, int PrtSectID = -1)
{
// B2021-088 moved this if/else from CreatePDF() so that the Approval logic will have access to this logic
ProcedureInfo MyProcedure = myItem as ProcedureInfo;
@ -116,6 +122,7 @@ namespace VEPROMS
Prefix = prefix;
OpenPDF = openPDF;
DidAll = didAll;
_prtSectID = PrtSectID;
InitializeComponent();
@ -276,7 +283,7 @@ namespace VEPROMS
cachePartInfo = PartInfo.CacheList;
}
_PdfFile = MyPromsPrinter.Print(PDFPath, MakePlaceKeeper, MakeContinuousActionSummary, MakeTimeCriticalActionSummary);
_PdfFile = MyPromsPrinter.Print(PDFPath, MakePlaceKeeper, MakeContinuousActionSummary, MakeTimeCriticalActionSummary, PrtSectID);
ProfileTimer.Pop(profileDepth);

View File

@ -515,6 +515,7 @@ namespace VEPROMS
ItemInfo.ItemDeleted += new ItemInfoEvent(RefreshDisplayHistory);
tv.PrintProcedure += new vlnTreeViewEvent(tv_PrintProcedure);
tv.PrintSection += new vlnTreeViewEvent(tv_PrintSection);
tv.QPrintProcedure += new vlnTreeViewEvent(tv_QPrintProcedure);
tv.PrintAllProcedures += new vlnTreeViewEvent(tv_PrintAllProcedures);
tv.ApproveProcedure += new vlnTreeViewEvent(tv_ApproveProcedure);
@ -1190,6 +1191,45 @@ namespace VEPROMS
}
void tv_PrintSection(object sender, vlnTreeEventArgs args) // Quick Print right click menu on Procedure name.
{
try
{
//args.Node.Parent.
SectionInfo si2 = (args.Node as VETreeNode).VEObject as SectionInfo;
int _prtSectID = si2.ItemID;
if (si2 == null) return;
tc.SaveCurrentEditItem(si2.MyProcedure);
si2.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex;
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(si2.MyProcedure))
{
prnDlg.PrtSectID = _prtSectID;
prnDlg.SelectedSlave = args.UnitIndex;
prnDlg.MySessionInfo = MySessionInfo;
prnDlg.SetupForProcedure(); // Setup filename
prnDlg.ShowDialog(this); // Create Print report
si2.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
}
}
catch (Exception ex)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("Could not create PDF Print");
sb.AppendLine();
MessageBox.Show(sb.ToString(), "Error when creating PDF Print", MessageBoxButtons.OK, MessageBoxIcon.Warning);
_MyLog.Warn("Failed to create PDF print", ex);
}
}
void tv_CreateContinuousActionSummary(object sender, vlnTreeEventArgs args)
{
DialogResult dr = System.Windows.Forms.DialogResult.Yes;

View File

@ -665,10 +665,12 @@ namespace VEPROMS.CSLA.Library
{
TranFixCount++;
itemInfo.MyContent.FixTransitionText(traninfo, itemInfo, "Reason for Change: Transition to Non-Editable Step");
Content content = Content.Get(itemInfo.MyContent.ContentID);
content.FixTransitionText(traninfo, true);
content.Save();
}
using (Content content = Content.Get(itemInfo.MyContent.ContentID)) //B2024-006 free up content memory when done
{
content.FixTransitionText(traninfo, true);
content.Save();
}
}
}
if (!forceConvertToText)
@ -682,10 +684,12 @@ namespace VEPROMS.CSLA.Library
forceConvertToText = true;
TranFixCount++;
itemInfo.MyContent.FixTransitionText(traninfo, itemInfo, "Reason for Change: Transition to External Procedure using Internal Format");
Content content = Content.Get(itemInfo.MyContent.ContentID);
content.FixTransitionText(traninfo, true);
content.Save();
}
using (Content content = Content.Get(itemInfo.MyContent.ContentID)) //B2024-006 free up content memory when done
{
content.FixTransitionText(traninfo, true);
content.Save();
}
}
}
}
}
@ -701,9 +705,11 @@ namespace VEPROMS.CSLA.Library
forceConvertToText = true;
TranFixCount++;
itemInfo.MyContent.FixTransitionText(traninfo, itemInfo, "Reason for Change: Transition to Outside Procedure using Internal Format");
Content content = Content.Get(itemInfo.MyContent.ContentID);
content.FixTransitionText(traninfo, true);
content.Save();
using (Content content = Content.Get(itemInfo.MyContent.ContentID)) //B2024-006 free up content memory when done
{
content.FixTransitionText(traninfo, true);
content.Save();
}
}
}
}
@ -719,9 +725,11 @@ namespace VEPROMS.CSLA.Library
if (newText != oldText || newValue == "?")
{
TranFixCount++;
Content content = Content.Get(itemInfo.MyContent.ContentID);
content.FixTransitionText(traninfo);
content.Save();
using (Content content = Content.Get(itemInfo.MyContent.ContentID)) //B2024-006 free up content memory when done
{
content.FixTransitionText(traninfo);
content.Save();
}
}
}
}
@ -966,24 +974,26 @@ namespace VEPROMS.CSLA.Library
{
//ShowDifference(oldText, newText); // debug - display in Visual Studio Output window
ROFixCount++;
Content content = Content.Get(itemInfo.MyContent.ContentID);
if (roval == "?")
using (Content content = Content.Get(itemInfo.MyContent.ContentID)) //B2024-006 free up content memory when done
{
oldText = content.ConvertROToText(rousage, roval, roch.type, origROFst);
using (Item myitem = content.ContentItems[0].MyItem) // so that myitem does not stay in cache B2016-153
if (roval == "?")
{
myitem.DisposeOfContent = false; // don't dispose of the contents may be needed if more than one RO needs processed - part of B2017-060
// B2016-225 (follow through) added more descriptive Annotation Type when RO is converted to text
Annotation.MakeAnnotation(myitem, AnnotationType.GetByNameOrCreate("Link Converted To Text"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(oldText)), null);
oldText = content.ConvertROToText(rousage, roval, roch.type, origROFst);
using (Item myitem = content.ContentItems[0].MyItem) // so that myitem does not stay in cache B2016-153
{
myitem.DisposeOfContent = false; // don't dispose of the contents may be needed if more than one RO needs processed - part of B2017-060
// B2016-225 (follow through) added more descriptive Annotation Type when RO is converted to text
Annotation.MakeAnnotation(myitem, AnnotationType.GetByNameOrCreate("Link Converted To Text"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(oldText)), null);
}
}
else
{
content.FixContentText(rousage, roval, roch.type, origROFst);
}
content.UserID = Volian.Base.Library.VlnSettings.UserID;
content.DTS = DateTime.Now;
content.Save();
}
else
{
content.FixContentText(rousage, roval, roch.type, origROFst);
}
content.UserID = Volian.Base.Library.VlnSettings.UserID;
content.DTS = DateTime.Now;
content.Save();
}
}
}

View File

@ -597,6 +597,13 @@ namespace VEPROMS.CSLA.Library
//if (_RevisionInfoList != null)
// return _RevisionInfoList;
RevisionInfoList tmp = DataPortal.Fetch<RevisionInfoList>(new ItemUnitCriteria(itemID, unitID));
foreach (var x in tmp)
{
x.LatestVersion.ApprovedXML = x.RevisionID.ToString();
x.LatestVersion.PDF = Encoding.ASCII.GetBytes(x.RevisionID.ToString());
x.LatestVersion.SummaryPDF = Encoding.ASCII.GetBytes(x.RevisionID.ToString());
}
RevisionInfo.AddList(tmp);
tmp.AddEvents();
//_RevisionInfoList = tmp;

View File

@ -153,6 +153,10 @@ namespace VEPROMS.CSLA.Library
CanReadProperty("PDF", true);
return _PDF;
}
set
{
_PDF = value;
}
}
private byte[] _SummaryPDF;
public byte[] SummaryPDF
@ -163,6 +167,10 @@ namespace VEPROMS.CSLA.Library
CanReadProperty("SummaryPDF", true);
return _SummaryPDF;
}
set
{
_SummaryPDF = value;
}
}
private string _ApprovedXML;
public string ApprovedXML
@ -173,6 +181,10 @@ namespace VEPROMS.CSLA.Library
CanReadProperty("ApprovedXML", true);
return _ApprovedXML;
}
set
{
_ApprovedXML = value;
}
}
private DateTime _DTS = new DateTime();
public DateTime DTS

View File

@ -208,7 +208,7 @@ namespace Volian.Controls.Library
// set other procedure related private variables.
vlnTreeComboSetsFillIn(_CurrentProcedure);
cbTranProcsFillIn(_CurrentProcedure);
if (_CurrentProcedure.Sections != null)
if (_CurrentProcedure.Sections != null && secitm != null)
{
// if the selected format is using section default, initialize with the section default (find it),
// otherwise use current section item.
@ -987,6 +987,7 @@ namespace Volian.Controls.Library
if (prcitm.Sections != null)
{
foreach (SectionInfo sio in prcitm.Sections)
{
SectionConfig sc = sio.MyConfig as SectionConfig;
if (sc != null && sc.Section_OriginalSteps == "Y")
@ -1115,6 +1116,8 @@ namespace Volian.Controls.Library
this.superToolTipDispTran.SetSuperTooltip(this.listBoxTranFmt, new DevComponents.DotNetBar.SuperTooltipInfo("", "",
"This is where transition types are selected. This also defines how the transition will look in the text.",
null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
// B2024-007 color of transition panel was not toggling properly
groupPanelTranFmt.Style.BackColor = !HasDefault && NeedsDefault ? Color.Red : Color.Orange;
//btnTranSave.Enabled = allowSave;
//if (CurTrans != null && selii != null)
//{

View File

@ -1,36 +1,36 @@
namespace Volian.Controls.Library
{
partial class vlnTreeView
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
partial class vlnTreeView
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
#endregion
}
}

View File

@ -506,6 +506,11 @@ namespace Volian.Controls.Library
{
if (QPrintProcedure != null) QPrintProcedure(sender, args);
}
public event vlnTreeViewEvent PrintSection;
private void OnPrintSection(object sender, vlnTreeEventArgs args)
{
if (PrintSection != null) PrintSection(sender, args);
}
public event vlnTreeViewEvent PrintAllProcedures;
private void OnPrintAllProcedures(object sender, vlnTreeEventArgs args)
{
@ -837,6 +842,7 @@ namespace Volian.Controls.Library
MenuItem mitcas = new MenuItem("Create Time Critical Action Summary"); //F2022-024 added menu option
MenuItem mip = new MenuItem("Print");
MenuItem miqp = new MenuItem("Quick Print");
//MenuItem mips = new MenuItem("Print Section");
MenuItem mia = new MenuItem("Approve");
int k = 0;
foreach (string s in pri.MyDocVersion.UnitNames)
@ -850,6 +856,9 @@ namespace Volian.Controls.Library
MenuItem mqp = miqp.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
mqp.Enabled = procAppl;
mqp.Tag = k;
//MenuItem mps = mips.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
//mps.Enabled = procAppl;
//mps.Tag = k;
MenuItem ma = mia.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
ma.Enabled = procAppl;
ma.Tag = k;
@ -864,6 +873,7 @@ namespace Volian.Controls.Library
cm.MenuItems.Add(mitcas);
cm.MenuItems.Add(mip);
cm.MenuItems.Add(miqp);
//cm.MenuItems.Add(mips);
AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri);
cm.MenuItems.Add(mia);
AddApprovedRevisionsMultiUnit(cm.MenuItems, pri);
@ -874,6 +884,7 @@ namespace Volian.Controls.Library
cm.MenuItems.Add("Create Time Critical Action Summary", new EventHandler(mi_Click));
cm.MenuItems.Add("Print", new EventHandler(mi_Click));
cm.MenuItems.Add("Quick Print", new EventHandler(mi_Click));
//cm.MenuItems.Add("Print Section", new EventHandler(mi_Click));
//MenuItem miqp = new MenuItem("Print");
AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri);
cm.MenuItems.Add("Approve", new EventHandler(mi_Click));
@ -945,6 +956,25 @@ namespace Volian.Controls.Library
SectionConfig sc = si.MyConfig as SectionConfig;
if (!si.IsEnhancedSection && (si.Sections == null || si.Sections.Count == 0 || (meta && sc != null && si.Sections != null && si.Sections.Count > 0 && sc.SubSection_Edit == "Y")))
cm.MenuItems.Add("New Step", new EventHandler(mi_Click));
//ProcedureInfo pri = tn as SectionInfo;
SectionInfo si2 = (tn as VETreeNode).VEObject as SectionInfo;
if (si2.MyDocVersion.MultiUnitCount > 1)
{
MenuItem mps = new MenuItem("Print Section");
int k = 0;
foreach (string s in si2.MyDocVersion.UnitNames)
{
k++;
MenuItem mp = mps.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
mp.Tag = k;
}
cm.MenuItems.Add(mps);
}
else
{
cm.MenuItems.Add("Print Section", new EventHandler(mi_Click));
}
}
}
}
@ -962,7 +992,13 @@ namespace Volian.Controls.Library
}
#endregion
//_MyLog.WarnFormat("Context Menu 2 - {0}", GC.GetTotalMemory(true));
//#region Print_Section
//if (!tn.IsExpanded && tn.VEObject as SectionInfo != null)
//{
// SectionInfo si = tn.VEObject as SectionInfo;
// if (si.IsStepSection) cm.MenuItems.Add("Print Section", new EventHandler(mi_Click));
//}
//#endregion
#region Menu_Open
if (!tn.IsExpanded && tn.VEObject as SectionInfo != null)
{
@ -1000,6 +1036,10 @@ namespace Volian.Controls.Library
// require clearing of all enhanced config data or mapping it to existing data (quite complicated)
if ((ui.IsAdministrator() || ui.IsSetAdministrator(i.MyProcedure.MyDocVersion) || ui.IsWriter(i.MyProcedure.MyDocVersion)) && (!i.IsEnhancedStep && !i.IsEnhancedProcedure && !i.IsEnhancedSection && !i.IsRtfRaw && !i.IsFigure))
cm.MenuItems.Add("Copy", new EventHandler(mi_Click));
if (i.HasWordContent)
{
cm.MenuItems.Add("Print Section", new EventHandler(mi_Click));
}
}
#endregion
//_MyLog.WarnFormat("Context Menu 4 - {0}", GC.GetTotalMemory(true));
@ -1269,25 +1309,26 @@ namespace Volian.Controls.Library
if (ri.LatestVersion.PDF != null)
{
MenuItem mirp = mir.MenuItems.Add("View Procedure");
mirp.Tag = ri;
mirp.Tag = ri.RevisionID;
mirp.Click += new EventHandler(MultiUnitApprovedRevision_Click);
}
if (ri.LatestVersion.SummaryPDF != null)
{
MenuItem mirs = mir.MenuItems.Add("View Summary of Changes");
mirs.Tag = ri;
mirs.Tag = ri.RevisionID;
mirs.Click += new EventHandler(MultiUnitSummaryOfChanges_Click);
}
if (ri.LatestVersion.ApprovedXML != null && ri.LatestVersion.ApprovedXML != "")
{
MenuItem miri = mir.MenuItems.Add("Create Procedure to Import");
miri.Tag = ri;
miri.Tag = ri.RevisionID;
miri.Click += new EventHandler(ImportProcedure_Click);
}
//end added jcb 20111031
mv.Tag = lastApprovedRevisionID;
}
ril = null;
}
}
public void AddNewNode(IVEDrillDownReadOnly o)
@ -1379,7 +1420,8 @@ namespace Volian.Controls.Library
void ImportProcedure_Click(object sender, EventArgs e)
{
RevisionInfo ri = (sender as MenuItem).Tag as RevisionInfo;
//RevisionInfo ri = (sender as MenuItem).Tag as RevisionInfo;
RevisionInfo ri = RevisionInfo.Get(int.Parse((sender as MenuItem).Tag.ToString()));
RevisionConfig rc = ri.MyConfig as RevisionConfig;
// bug fix: B2016-183 - add the child's name (ex Unit 1) to the export file name for Parent/Child procedures.
int applIdx = rc.Applicability_Index;
@ -1419,7 +1461,8 @@ namespace Volian.Controls.Library
bool superceded = false;
MenuItem mi = sender as MenuItem;
if (mi == null) return;
RevisionInfo ri = mi.Tag as RevisionInfo;
//RevisionInfo ri = mi.Tag as RevisionInfo;
RevisionInfo ri = RevisionInfo.Get(int.Parse(mi.Tag.ToString()));
{
MenuItem mip = mi.Parent as MenuItem;
//B2021-086 Added the check for the last revision stage is an Approved stage
@ -1445,7 +1488,8 @@ namespace Volian.Controls.Library
{
MenuItem mi = sender as MenuItem;
if (mi == null) return;
RevisionInfo ri = mi.Tag as RevisionInfo;
//RevisionInfo ri = mi.Tag as RevisionInfo;
RevisionInfo ri = RevisionInfo.Get(int.Parse(mi.Tag.ToString()));
ItemInfo ii = ItemInfo.Get(ri.ItemID);
ii.MyDocVersion.DocVersionConfig.SelectedSlave = ri.MyConfig.Applicability_Index;
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber + " Summary of Changes"), ri.LatestVersion.SummaryPDF, "");
@ -1747,6 +1791,9 @@ namespace Volian.Controls.Library
case "Quick Print":
OnQPrintProcedure(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break;
case "Print Section":
OnPrintSection(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break;
case "Print All Procedures for":
OnPrintAllProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0,mi.Text,(int)mi.Tag));
break;
@ -1880,6 +1927,10 @@ namespace Volian.Controls.Library
}
switch (mi.Text)
{
case "Print Section":
VETreeNode tn2 = SelectedNode as VETreeNode;
OnPrintSection(this, new vlnTreeEventArgs(tn2 as VETreeNode, null, 0));
break;
case "Open":
OpenNode();
break;

File diff suppressed because it is too large Load Diff

View File

@ -85,6 +85,12 @@ namespace Volian.Print.Library
get { return _TopMessage; }
set { _TopMessage = value; }
}
private int _prtSectID = -1;
public int PrtSectID
{
get { return _prtSectID; }
set { _prtSectID = value; }
}
private List<vlnText> _TopMessageRs=new List<vlnText>(); // Added if there are 2 messages, in AER AND RNO (for BGE)
public List<vlnText> TopMessageRs
{
@ -867,12 +873,15 @@ i = 0;
set
{
_MySection = value;
MySectionTitle = ((_MySection.DisplayNumber ?? string.Empty)==string.Empty ? string.Empty : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
MySectionTitle = ((_MySection.DisplayNumber ?? string.Empty) == string.Empty ? string.Empty : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
bool forceLoadSvg = false;
if (value.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate && value.MyDocStyle.ResetFirstPageOnSection)
DidFirstPageDocStyle = false;
if (DidFirstPageDocStyle)
forceLoadSvg = SetDocStyleAndValues(); // this method also gets the SVG (the 'else' part of this)
if (_prtSectID > -1) {
forceLoadSvg = true;
}
Volian.Svg.Library.Svg sectSvg = BuildSvg(_MySection, forceLoadSvg);
if (sectSvg != null) MySvg = sectSvg;
_YTopMargin = null;
@ -1031,9 +1040,10 @@ i = 0;
set { _MyPromsPrinter = value; }
}
private int _MyRomanPage = 1;
public VlnSvgPageHelper(VEPROMS.CSLA.Library.SectionInfo mySection, PromsPrinter myPromsPrinter, string hlsText, int hlsItemId)
public VlnSvgPageHelper(VEPROMS.CSLA.Library.SectionInfo mySection, PromsPrinter myPromsPrinter, string hlsText, int hlsItemId, int PrtSectID)
: base()
{
_prtSectID = PrtSectID;
HLSText = hlsText;
HasHLSTextId = hlsItemId;
MyPromsPrinter = myPromsPrinter;