C2024-002-Print-Section

This commit is contained in:
2024-01-25 09:18:48 -05:00
parent 9b59810c89
commit 0095b2883b
6 changed files with 278 additions and 197 deletions

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)
{
@@ -962,7 +967,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)
{
@@ -1880,6 +1891,13 @@ namespace Volian.Controls.Library
}
switch (mi.Text)
{
case "Print Section":
VETreeNode tn2 = SelectedNode as VETreeNode;
//ProcedureInfo pi2 = tn2.VEObject as ProcedureInfo;
//SectionInfo sectInfo = tn2.VEObject as SectionInfo;
//OnPrintSection(this, new vlnTreeEventArgs(sectInfo as SectionInfo, null, 0));
OnPrintSection(this, new vlnTreeEventArgs(tn2 as VETreeNode, null, 0));
break;
case "Open":
OpenNode();
break;