Compare commits

...

12 Commits

Author SHA1 Message Date
66deede936 B2025-034-Add-error-message-documents-2 2025-06-11 18:24:59 -04:00
0df5511bf7 Merge pull request 'B2025-034-Add-error-message-documents' (#567) from B2025-034-Add-error-message-documents into Development
good for testing phase
2025-06-11 08:42:44 -04:00
2e68218cfe B2025-034-Add-error-message-documents 2025-06-10 16:34:22 -04:00
80f3568dbd Merge pull request 'F2025-015 Shearon Harris add sub-steps in Notes and Cautions and to add an Open Bullet sub-step type in both the EOP and AOP formats.' (#566) from F2025-015_SharonHarris into Development
Reviewed-on: #566
2025-06-03 11:43:26 -04:00
5fd0ff9e71 F2025-015 Shearon Harris add sub-steps in Notes and Cautions and to add an Open Bullet sub-step type in both the EOP and AOP formats. 2025-06-03 10:46:41 -04:00
4dcfa05157 Merge pull request 'B2025-024-Document-Unit-Print' (#564) from B2025-024-Document-Unit-Print into Development
good for testing phase
2025-05-29 10:14:00 -04:00
42648f31a5 Merge pull request 'C2025-021 Add logic to PROMS to support a special High Level Step type that is not printed.' (#563) from C2025-021 into Development
Good for testing phase
2025-05-29 10:06:34 -04:00
e0b628dce9 B2025-024-Document-Unit-Print 2025-05-28 18:19:24 -04:00
6e9c7e28e6 C2025-021 Add logic to PROMS to support a special High Level Step type that is not printed.
Make Inactive by Default
2025-05-28 14:37:14 -04:00
ac091a7d26 C2025-021 Add logic to PROMS to support a special High Level Step type that is not printed. 2025-05-28 14:15:21 -04:00
612e7955cf Merge pull request 'F2024-089 - Barakah requested a newly formatted Cover page section style to make room for new Corporate Logo.' (#561) from F2024-089_BNPP_LOGO into Development
Looks good.
Ready for QA.
2025-05-23 09:08:51 -04:00
ce92031ff7 F2024-089 - Barakah requested a newly formatted Cover page section style to make room for new Corporate Logo. 2025-05-22 15:05:27 -04:00
21 changed files with 336 additions and 268 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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -6097,9 +6097,10 @@ namespace VEPROMS.CSLA.Library
}
private bool IsLowestLevelStep
{
//F2025-015 added check for IsInCautionOrNote for sub-step inside Notes and Cautions
get
{
return (!(IsCaution || IsNote || IsTable || IsFigure || Steps != null || MyParent.IsCaution || MyParent.IsNote));
return (!(IsCaution || IsNote || IsInCautionOrNote || IsTable || IsFigure || Steps != null || MyParent.IsCaution || MyParent.IsNote));
}
}
private bool RNOsHighHasCheckOff()

View File

@ -10,6 +10,7 @@ using Volian.Controls.Library;
using DevComponents.DotNetBar;
using JR.Utils.GUI.Forms;
using Volian.Base.Library;
using Microsoft.Win32;
namespace Volian.Controls.Library
{
@ -657,12 +658,36 @@ namespace Volian.Controls.Library
return OpenStepTabPage(myItemInfo, setFocus);
}
else // Otherwise open it in the Word editor
{
// B2025-034 Check to make sure that EDWord is installed in PROMS. If not return NULL.
object EDOfficeViewerX = GetValue<object>(@"HKEY_CLASSES_ROOT\EDOfficeViewerX.Connect\CLSID\", @"", null);
object EDWordCtrl = GetValue<object>(@"HKEY_CLASSES_ROOT\EDWORD.EDWordCtrl.1\CLSID\", @"", null);
if (EDOfficeViewerX == null || EDWordCtrl == null)
{
MessageBox.Show("Edraw needs to be installed or reinstalled on this device. " + Environment.NewLine + "" + Environment.NewLine +
"Please contact your IT Administrator to install and register Edraw that was provided with the PROMS Installation media. If additional support is needed, please contact Volian.", "Error in Word section",
MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
return null;
}
else
{
Document.ConvertWordSectionToDOCX(myItemInfo); // B2023-093 Convert a Word section to the DOCX Word format if needed before opening it for edit
return OpenDSOTabPage(myItemInfo);
}
}
}
public T GetValue<T>(string registryKeyPath, string value, T defaultValue = default(T))
{
T retVal = default(T);
retVal = (T)Registry.GetValue(registryKeyPath, value, defaultValue);
return retVal;
}
public bool PasteRTBItem(ItemInfo myItemInfo, int copyStartID, ItemInfo.EAddpingPart pasteType, int type)
{
CleanUpClosedItems();

View File

@ -57,7 +57,7 @@ namespace Volian.Controls.Library
{
_MySectionInfo = mySectionInfo;
}
public vlnTreeSectionInfoEventArgs(SectionInfo mySectionInfo,bool isDeleting)
public vlnTreeSectionInfoEventArgs(SectionInfo mySectionInfo, bool isDeleting)
{
_MySectionInfo = mySectionInfo;
_IsDeleting = isDeleting;
@ -140,7 +140,7 @@ namespace Volian.Controls.Library
get { return _Node; }
set { _Node = value; }
}
private TreeNode _Destination=null;
private TreeNode _Destination = null;
public TreeNode Destination
{
get { return _Destination; }
@ -168,7 +168,7 @@ namespace Volian.Controls.Library
//end jcb multiunit
#endregion
#region Factory Methods
private vlnTreeEventArgs() { ;}
private vlnTreeEventArgs() {; }
public vlnTreeEventArgs(TreeNode node)
{
_Node = node;
@ -192,7 +192,7 @@ namespace Volian.Controls.Library
#endregion
public override string ToString()
{
return string.Format("Node={0},Destination={1},Index={2},Unit={3},UnitIndex={4}",NodePath(this.Node),this.Destination, this.Index,this.Unit, this.UnitIndex);
return string.Format("Node={0},Destination={1},Index={2},Unit={3},UnitIndex={4}", NodePath(this.Node), this.Destination, this.Index, this.Unit, this.UnitIndex);
}
private string NodePath(TreeNode node)
@ -215,7 +215,7 @@ namespace Volian.Controls.Library
}
#endregion
#region Factory Methods
private vlnTreeItemInfoEventArgs() { ;}
private vlnTreeItemInfoEventArgs() {; }
public vlnTreeItemInfoEventArgs(ItemInfo myItemInfo)
{
_MyItemInfo = myItemInfo;
@ -231,7 +231,7 @@ namespace Volian.Controls.Library
FolderId = folderId;
}
}
public enum E_InsertType {Before, After, Child};
public enum E_InsertType { Before, After, Child };
public partial class vlnTreeItemInfoInsertEventArgs
{
#region Business Methods
@ -267,7 +267,7 @@ namespace Volian.Controls.Library
}
#endregion
#region Factory Methods
private vlnTreeItemInfoInsertEventArgs() { ;}
private vlnTreeItemInfoInsertEventArgs() {; }
public vlnTreeItemInfoInsertEventArgs(ItemInfo myItemInfo, E_InsertType insertType, string stepText)
{
_MyItemInfo = myItemInfo;
@ -314,7 +314,7 @@ namespace Volian.Controls.Library
}
#endregion
#region Factory Methods
private vlnTreeItemInfoPasteEventArgs() { ;}
private vlnTreeItemInfoPasteEventArgs() {; }
public vlnTreeItemInfoPasteEventArgs(ItemInfo myItemInfo, int copyStartId, ItemInfo.EAddpingPart pasteType, int? type)
{
_MyItemInfo = myItemInfo;
@ -364,7 +364,7 @@ namespace Volian.Controls.Library
get { return _SectionConfig; }
set { _ConfigObject = _SectionConfig = value; }
}
private vlnTreePropertyEventArgs() { ;}
private vlnTreePropertyEventArgs() {; }
public vlnTreePropertyEventArgs(string title, FolderConfig folderConfig)
{
_Title = title;
@ -724,7 +724,7 @@ namespace Volian.Controls.Library
{
if (!ui.IsAdministrator() && DoSpecificInfo) cm.MenuItems.Add("Procedure Set Specific Information", new EventHandler(mi_Click));
// B2020-111 only allow Set Administrator to add new folders inside folders they admininstrate
if (ui.IsAdministrator()||ui.IsSetAdministrator(fi.MyParent))
if (ui.IsAdministrator() || ui.IsSetAdministrator(fi.MyParent))
{
cm.MenuItems.Add("Insert Folder Before", new EventHandler(mi_Click));
cm.MenuItems.Add("Insert Folder After", new EventHandler(mi_Click));
@ -1081,12 +1081,39 @@ 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));
// cm.MenuItems.Add("Quick Print Section", new EventHandler(mi_Click));
//}
if (i.HasWordContent)
{
if (i.MyDocVersion.MultiUnitCount > 1)
{
if (!i.IsSubsection)
{
MenuItem mps = new MenuItem("Print Section");
MenuItem mqps = new MenuItem("Quick Print Section");
int k = 0;
foreach (string s in i.MyDocVersion.UnitNames)
{
k++;
MenuItem mp = mps.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
mp.Tag = k;
MenuItem mqp = mqps.MenuItems.Add(s, new EventHandler(miMultiUnit_Click));
mqp.Tag = k;
}
cm.MenuItems.Add(mps);
cm.MenuItems.Add(mqps);
}
}
else
{
cm.MenuItems.Add("Print Section", new EventHandler(mi_Click));
cm.MenuItems.Add("Quick Print Section", new EventHandler(mi_Click));
}
}
}
#endregion
//_MyLog.WarnFormat("Context Menu 4 - {0}", GC.GetTotalMemory(true));
@ -1098,7 +1125,7 @@ namespace Volian.Controls.Library
ok = true;
else if (tn.VEObject is ItemInfo && (ui.IsAdministrator() || ui.IsSetAdministrator((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion) || ui.IsWriter((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion)))
ok = true;
if(ok)
if (ok)
Menu_Paste(tn, cm);
#endregion
//_MyLog.WarnFormat("Context Menu 5 - {0}", GC.GetTotalMemory(true));
@ -1196,7 +1223,7 @@ namespace Volian.Controls.Library
// Add Properties to the menu unless at the very 'top' node or on a grouping (partinfo)
// node (RNOs, Steps, Cautions, Notes) or at the step level.
// B2020-105 Allow Set Administrators to rename folder's (sets of procedures) to which they have been given access.
if ( tn.VEObject is FolderInfo) ok = (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as FolderInfo));
if (tn.VEObject is FolderInfo) ok = (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as FolderInfo));
else ok = (tn.VEObject is DocVersionInfo) ? (ui.IsAdministrator() || ui.IsSetAdministrator(tn.VEObject as DocVersionInfo))
: (ui.IsAdministrator() || (tn.VEObject is ItemInfo) && (ui.IsSetAdministrator((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion)
|| ui.IsWriter((tn.VEObject as ItemInfo).MyProcedure.MyDocVersion)));
@ -1308,7 +1335,7 @@ namespace Volian.Controls.Library
// F2022-024 added Time Critical Action Summary option
foreach (MenuItem itm in cm.MenuItems)
{
if(itm.Text == "Procedure Specific Information" || itm.Text == "New Section" || itm.Text == "Approve" || itm.Text == "Open" ||
if (itm.Text == "Procedure Specific Information" || itm.Text == "New Section" || itm.Text == "Approve" || itm.Text == "Open" ||
itm.Text == "Copy" || itm.Text == "Delete" || itm.Text == "Properties..." || itm.Text == "Replace Existing Procedure" ||
itm.Text.StartsWith("Showing Change Bars Starting") || itm.Text == "Create Continuous Action Summary" ||
itm.Text == "Create Time Critical Action Summary" || itm.Text == "Export Procedure")
@ -1319,7 +1346,7 @@ namespace Volian.Controls.Library
{
foreach (MenuItem itm in cm.MenuItems)
{
if(!itm.Text.StartsWith("Document Checked Out"))
if (!itm.Text.StartsWith("Document Checked Out"))
itm.Enabled = false;
}
}
@ -1477,7 +1504,7 @@ namespace Volian.Controls.Library
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;
string str = (applIdx > 0)?_currentPri.MyDocVersion.UnitNames[applIdx-1] +"_":""; // if parent/child get the defined child name to inlcude the export filename
string str = (applIdx > 0) ? _currentPri.MyDocVersion.UnitNames[applIdx - 1] + "_" : ""; // if parent/child get the defined child name to inlcude the export filename
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
xd.LoadXml(ri.LatestVersion.ApprovedXML);
string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
@ -1525,12 +1552,12 @@ namespace Volian.Controls.Library
{
MenuItem mip = mi.Parent as MenuItem;
//B2021-086 Added the check for the last revision stage is an Approved stage
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved!=0)
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
superceded = true;
}
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
OnViewPDF(sender, args);
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
}
void MultiUnitApprovedRevision_Click(object sender, EventArgs e)
{
@ -1892,7 +1919,7 @@ namespace Volian.Controls.Library
OnQPrintSection(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));
OnPrintAllProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break;
case "Approve":
OnApproveProcedure(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
@ -1904,10 +1931,10 @@ namespace Volian.Controls.Library
OnApproveSomeProcedures(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break;
case "Create Continuous Action Summary":
OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0,mi.Text,(int)mi.Tag));
OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break;
case "Create Time Critical Action Summary":
OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0,mi.Text,(int)mi.Tag));
OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag));
break;
default:
if (mip.Text.StartsWith("Showing Change Bars Starting"))
@ -2197,11 +2224,11 @@ namespace Volian.Controls.Library
UpdateROValues(SelectedNode as VETreeNode);
break;
case "Create Continuous Action Summary":
OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0));
OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
break;
// F2022-024 Time Critical Action Summary
case "Create Time Critical Action Summary":
OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null,0));
OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
break;
// B2017-243 added the following two Cannot Paste items when dealing with enhanced documents
// when then user selects these menu items a message box will appear giving more information as to why it cannot be pasted
@ -2334,7 +2361,7 @@ namespace Volian.Controls.Library
swROUpdate.Write(string.Format("Fixed Referenced Object for {1}({4}){0}Old Text: {2}{0}New Text: {3}{0}{0}", Environment.NewLine, (sender as ItemInfo).ShortPath, args.OldValue, args.NewValue, (sender as ItemInfo).ItemID));
}
private ProgressBarItem _ProgressBar=null;
private ProgressBarItem _ProgressBar = null;
public ProgressBarItem ProgressBar
{
get { return _ProgressBar; }
@ -2512,7 +2539,7 @@ namespace Volian.Controls.Library
// assume that item to paste is a procedure, otherwise the menuing would not have
// included the paste options
tn = (VETreeNode) tn.Nodes[tn.Nodes.Count - 1];
tn = (VETreeNode)tn.Nodes[tn.Nodes.Count - 1];
p = "After";
}
else // this is an empty docversion:
@ -2649,8 +2676,8 @@ namespace Volian.Controls.Library
}
private ItemInfo PasteReplace(VETreeNode tn, int copyStartID)
{
VETreeNode prevtn = (VETreeNode) tn.PrevNode;
VETreeNode partn = (VETreeNode) tn.Parent;
VETreeNode prevtn = (VETreeNode)tn.PrevNode;
VETreeNode partn = (VETreeNode)tn.Parent;
ItemInfo ii = tn.VEObject as ItemInfo;
// F2021-009 display a message if pasting step will results in more sub-step levels than are defined in the format
ItemInfo.PasteStepIsWithinDefinedSubStepLevels(copyStartID, ii, true);
@ -2701,7 +2728,7 @@ namespace Volian.Controls.Library
private void SetupNodeProperties()
{
VETreeNode tn = SelectedNode as VETreeNode;
if (tn==null)return;
if (tn == null) return;
if ((tn.VEObject as FolderInfo) != null)
OpenProperties(tn.VEObject as FolderInfo);
@ -2713,7 +2740,7 @@ namespace Volian.Controls.Library
if (dvi != null && dvi.DocVersionAssociations != null && dvi.DocVersionAssociations.Count > 0) rofstid = dvi.DocVersionAssociations[0].MyROFst.ROFstID;
OpenProperties(tn.VEObject as DocVersionInfo);
if (dvi != null && dvi.DocVersionAssociations != null && dvi.DocVersionAssociations.Count > 0 && rofstid != dvi.DocVersionAssociations[0].MyROFst.ROFstID)
OnTabDisplay(this,new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST"));
OnTabDisplay(this, new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST"));
}
else if ((tn.VEObject as ProcedureInfo) != null)
OpenProperties(tn.VEObject as ProcedureInfo);
@ -2847,7 +2874,7 @@ namespace Volian.Controls.Library
}
if (f1 != -1) Folder.Delete(f1);
}
else if (newtype == MenuSelections.FolderAfter||newtype == MenuSelections.FolderBefore)
else if (newtype == MenuSelections.FolderAfter || newtype == MenuSelections.FolderBefore)
{
int f2 = -1;
string uniquename = _LastFolderInfo.MyParent.UniqueChildName("New Folder");
@ -2856,7 +2883,8 @@ namespace Volian.Controls.Library
//since before/after folder is at same level as current folder
//so need to use the parents order to determine where to place it
using (FolderInfo parfolderinfo = FolderInfo.Get(parentfolder.MyParent.FolderID))
{ double? myorder = parfolderinfo.NewManualOrder(myindex);
{
double? myorder = parfolderinfo.NewManualOrder(myindex);
using (Folder folder = Folder.MakeFolder(parentfolder.MyParent, parentfolder.MyConnection, uniquename, string.Empty, "Short Name", null, myorder, string.Empty, DateTime.Now, VlnSettings.UserID))
{
ShowBrokenRules(folder.BrokenRulesCollection);
@ -2881,7 +2909,7 @@ namespace Volian.Controls.Library
else if (newtype == MenuSelections.Procedure)
{
int p1 = -1;
using (Procedure procedure = Procedure.MakeProcedure(_LastDocVersionInfo, _LastDocVersionInfo.Procedures.Count!=0?_LastDocVersionInfo.Procedures[_LastDocVersionInfo.Procedures.Count-1]:null, null, "New Procedure", 0))
using (Procedure procedure = Procedure.MakeProcedure(_LastDocVersionInfo, _LastDocVersionInfo.Procedures.Count != 0 ? _LastDocVersionInfo.Procedures[_LastDocVersionInfo.Procedures.Count - 1] : null, null, "New Procedure", 0))
{
ShowBrokenRules(procedure.BrokenRulesCollection);
SetLastValues(ProcedureInfo.Get(procedure.ItemID));
@ -2977,7 +3005,7 @@ namespace Volian.Controls.Library
"If you would like to view or copy these hidden steps you will need to go\n" +
"into the properties of this section and check the Editable Data checkbox.\n" +
"You will then be able to view and copy those steps. When finished, open\n" +
"the properties page again and uncheck the Editable Data checkbox.\n\n"+
"the properties page again and uncheck the Editable Data checkbox.\n\n" +
"Do you want to continue creating the subsection?";
if (FlexibleMessageBox.Show(this, msgstr, "Subsection Insert", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
{
@ -2989,7 +3017,7 @@ namespace Volian.Controls.Library
if (!hasMetaSubs) doPseudo = true;
}
}
using(Section section = CreateNewSection())
using (Section section = CreateNewSection())
{
ShowBrokenRules(section.BrokenRulesCollection);
SectionInfo savLastSectionInfo = _LastSectionInfo;
@ -3013,7 +3041,7 @@ namespace Volian.Controls.Library
// may have to add a 'steps' node if a step(s) already exist...
ItemInfo ii = (SelectedNode as VETreeNode).VEObject as ItemInfo;
int cpindx = 0;
if (SelectedNode.Nodes.Count>0)
if (SelectedNode.Nodes.Count > 0)
{
VETreeNode vtn = SelectedNode.Nodes[0] as VETreeNode;
// B2017-014: removed code that was adding a 2nd section part node. and also select node to
@ -3057,8 +3085,8 @@ namespace Volian.Controls.Library
if (OnNodeOpenProperty(this, new vlnTreePropertyEventArgs("New Section", section.SectionConfig)) == DialogResult.OK)
{
int indx = tvindex + ((newtype == MenuSelections.SectionBefore) ? 0 : 1);
int itemido = (indx >= par.Nodes.Count)?-1:(((par.Nodes[indx] as VETreeNode).VEObject) as ItemInfo).ItemID;
if (indx >= par.Nodes.Count || (par.Nodes[indx] as VETreeNode).VEObject.ToString() != _LastSectionInfo.ToString() || itemido !=section.ItemID)
int itemido = (indx >= par.Nodes.Count) ? -1 : (((par.Nodes[indx] as VETreeNode).VEObject) as ItemInfo).ItemID;
if (indx >= par.Nodes.Count || (par.Nodes[indx] as VETreeNode).VEObject.ToString() != _LastSectionInfo.ToString() || itemido != section.ItemID)
{
tn = new VETreeNode(_LastSectionInfo);
par.Nodes.Insert(indx, tn);
@ -3340,7 +3368,7 @@ namespace Volian.Controls.Library
// see if enhanced related steps need created:
SectionConfig scfgE = _LastItemInfo.ActiveSection.MyConfig as SectionConfig; // C2018-003 fixed use of getting the active section
if (scfgE != null && scfgE.Section_LnkEnh=="Y")
if (scfgE != null && scfgE.Section_LnkEnh == "Y")
{
// set up which item to insert from based on whether editor was open (see comment from 11/17 above).
EnhancedDocuments enhdocs = null;
@ -3623,7 +3651,7 @@ namespace Volian.Controls.Library
// just clear enhanced links back
_LastSectionInfo.ClearEnhancedSectionLink();
}
OnSectionShouldClose(this, new vlnTreeSectionInfoEventArgs(_LastSectionInfo,true));
OnSectionShouldClose(this, new vlnTreeSectionInfoEventArgs(_LastSectionInfo, true));
// always return false because an event gets fired to delete tree nodes.
if (!DeleteItemInfoAndChildren(_LastSectionInfo))
{
@ -3724,11 +3752,11 @@ namespace Volian.Controls.Library
// do delete using RTBItem - this manages windowing from the step editor.
// If the procedure is open & you're deleting procedure, you want to close open
// window - this is done in DisplayTabControl-DeleteStepTabItem.
OnProcessing(true,"Deleting");
OnProcessing(true, "Deleting");
if (!OnDeleteItemInfo(this, new vlnTreeItemInfoEventArgs(ii)))
Item.DeleteItemAndChildren(ii);
OnProcessing(false,"Deleted");
OnProcessingComplete(dtStart,"Deleted");
OnProcessing(false, "Deleted");
OnProcessingComplete(dtStart, "Deleted");
if (deletedSection)
{
// B2020-087 if we deleted the last sub section, then clear the SubSection_Edit in the parent's config
@ -3747,8 +3775,8 @@ namespace Volian.Controls.Library
}
catch (System.Data.SqlClient.SqlException ex)
{
OnProcessing(false,"Delete Failed");
OnProcessingComplete(dtStart,"Delete Failed");
OnProcessing(false, "Delete Failed");
OnProcessingComplete(dtStart, "Delete Failed");
// C2020-033: Support delete to bring up Search/Incoming Transitions panel
if (ex.Message.Contains("has External Transitions"))
{
@ -3768,13 +3796,13 @@ namespace Volian.Controls.Library
private void OnProcessingComplete(DateTime dtStart, string message)
{
if (ProcessingComplete != null)
ProcessingComplete(this, new vlnTreeTimeEventArgs(dtStart,message));
ProcessingComplete(this, new vlnTreeTimeEventArgs(dtStart, message));
}
public event vlnTreeViewStatusEvent Processing;
private void OnProcessing(bool status, string message)
{
if (Processing != null)
Processing(this, new vlnTreeStatusEventArgs(status,message));
Processing(this, new vlnTreeStatusEventArgs(status, message));
}
#endregion
#region SetLastValuesAndSaveIfChangedStuff
@ -3865,7 +3893,7 @@ namespace Volian.Controls.Library
}
catch (Exception ex)
{
if(_MyLog.IsErrorEnabled)_MyLog.Error("tv_ItemDrag", ex);
if (_MyLog.IsErrorEnabled) _MyLog.Error("tv_ItemDrag", ex);
}
}
#endregion
@ -4045,12 +4073,12 @@ namespace Volian.Controls.Library
//if (e.Effect == DragDropEffects.None) return;
if (_dropNode != null)
{
// if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("ShowLocation1 {0} {1}", e.Effect.ToString(), DateTime.Now.Millisecond);
// if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("ShowLocation1 {0} {1}", e.Effect.ToString(), DateTime.Now.Millisecond);
DragHelper.ImageList_DragShowNolock(false);
TreeView tv = _dropNode.TreeView;
TreeNode tmp = tv.GetNodeAt(tv.PointToClient(new Point(e.X, e.Y)));
// if (!ScrollOnly)
// {
// if (!ScrollOnly)
// {
if (ScrollTreeView(tmp) || !ScrollOnly)
{
//if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("ShowLocation2 {0} {1}", e.Effect.ToString(), DateTime.Now.Millisecond);
@ -4060,11 +4088,11 @@ namespace Volian.Controls.Library
//tv.SelectedNode = dropNode;
Graphics g = tv.CreateGraphics();
TreeNodeTriangle(g);
if (_position != DropPosition.Child)InsertPointer(tmp, g);
if (_position != DropPosition.Child) InsertPointer(tmp, g);
}
}
// }
// else ScrollTreeView(tmp);
// }
// else ScrollTreeView(tmp);
DragHelper.ImageList_DragShowNolock(true);
}
}
@ -4152,7 +4180,7 @@ namespace Volian.Controls.Library
}
catch (Exception ex)
{
if(_MyLog.IsErrorEnabled)_MyLog.Error("tv_DragOver", ex);
if (_MyLog.IsErrorEnabled) _MyLog.Error("tv_DragOver", ex);
}
}
@ -4206,7 +4234,7 @@ namespace Volian.Controls.Library
}
catch (Exception ex)
{
if(_MyLog.IsErrorEnabled)_MyLog.Error("GetTreeNodeFromData", ex);
if (_MyLog.IsErrorEnabled) _MyLog.Error("GetTreeNodeFromData", ex);
}
}
return null;
@ -4232,7 +4260,7 @@ namespace Volian.Controls.Library
this.SelectedNode = dragNode;
FolderInfo fdragi = ((VETreeNode)dragNode).VEObject as FolderInfo;
FolderInfo fdropi = ((VETreeNode)_LastDropLocation.DropNode).VEObject as FolderInfo;
if (fdragi != null && fdropi != null && fdropi.FolderDocVersionCount==0)
if (fdragi != null && fdropi != null && fdropi.FolderDocVersionCount == 0)
{
using (Folder fdrag = fdragi.Get())
{
@ -4316,36 +4344,36 @@ namespace Volian.Controls.Library
}
catch (Exception ex)
{
if(_MyLog.IsErrorEnabled)_MyLog.Error("tv_DragDrop", ex);
if (_MyLog.IsErrorEnabled) _MyLog.Error("tv_DragDrop", ex);
}
}
// private void DumpMembers(object o)
// {
// Type t = o.GetType();
// //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("\r\n\r\nMembers for type {0}", t.ToString());
// MemberInfo[] mis = t.GetMembers();
// int i = 0;
// foreach (MemberInfo mi in mis)
// {
// i++;
// try
// {
// //if(mi.MemberType != MemberTypes.Method)
// //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("{0} {1} {2}", i, mi.Name, mi.MemberType);
//// if (fi.Name == "TreeView")
//// fi.SetValue(o, null);
// }
// catch (Exception ex)
// {
// if(_MyLog.IsErrorEnabled)_MyLog.Error("DumpMembers", ex);
// }
// }
// }
// private void DumpMembers(object o)
// {
// Type t = o.GetType();
// //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("\r\n\r\nMembers for type {0}", t.ToString());
// MemberInfo[] mis = t.GetMembers();
// int i = 0;
// foreach (MemberInfo mi in mis)
// {
// i++;
// try
// {
// //if(mi.MemberType != MemberTypes.Method)
// //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("{0} {1} {2}", i, mi.Name, mi.MemberType);
//// if (fi.Name == "TreeView")
//// fi.SetValue(o, null);
// }
// catch (Exception ex)
// {
// if(_MyLog.IsErrorEnabled)_MyLog.Error("DumpMembers", ex);
// }
// }
// }
private TreeNode Clone(TreeNode tn)
{
TreeNode tmp = (TreeNode)tn.Clone();
ExpandMatch(tmp,tn);
ExpandMatch(tmp, tn);
return tmp;
}
private void tv_DragDropOld(object sender, System.Windows.Forms.DragEventArgs e)

View File

@ -4390,7 +4390,8 @@ namespace Volian.Print.Library
SectionConfig sch = MyItemInfo.MyConfig as SectionConfig;
if (sch != null && sch.Section_PrintHdr != "Y") doprint = false;
}
if (doprint && !UseTemplateKeepOnCurLine(itemInfo))
//C2025-021 Add logic to PROMS to support a special High Level Step type that is not printed.
if (doprint && !UseTemplateKeepOnCurLine(itemInfo) && !itemInfo.IsType("InvisibleHigh"))
{
float tyoff = yoff;
if (itemInfo.Steps != null)
@ -5754,6 +5755,18 @@ namespace Volian.Print.Library
int profileDepth = ProfileTimer.Push(">>>> GetRtf");
_RtfSB = new StringBuilder();
DisplayText vlntxt = new DisplayText(itemInfo, E_EditPrintMode.Print, E_ViewMode.View, true, E_FieldToEdit.StepText, false, prefix, suffix, MyPageHelper.MyPromsPrinter.RemoveTrailingHardReturnsAndSpaces != null);
//C2025-021 Add logic to PROMS to support a special High Level Step type that is not printed.
if (itemInfo.IsType("InvisibleHigh"))
{
System.Drawing.Font myHighFont = vlntxt.TextFont.WindowsFont;
_RtfSB.Append(AddFontTable(myHighFont));
_RtfSB.Append("}");
string rtfHigh = _RtfSB.ToString();
ProfileTimer.Pop(profileDepth);
return rtfHigh;
}
// C2021-010: Remove trailing returns/spaces & manual page breaks & allow save.
if (DisplayText.RemoveTrailingBlankID > 0 && !MyPageHelper.MyPromsPrinter.RemoveTrailingHardReturnsAndSpaces.Contains(itemInfo.ItemID)) MyPageHelper.MyPromsPrinter.RemoveTrailingHardReturnsAndSpaces.Add(DisplayText.RemoveTrailingBlankID);
System.Drawing.Font myFont = vlntxt.TextFont.WindowsFont;

View File

@ -69,7 +69,7 @@ namespace Volian.Print.Library
private string symblsStr = "\u25CF\u0394"; // string of possible symbol character in a tab
// add symbol characters as needed
// "\u25CF" - solid bullet
// \x0394 - delta
// \u0394 - delta
private System.Drawing.FontStyle GetSysFontStyle(VE_Font f)
{
@ -268,6 +268,7 @@ namespace Volian.Print.Library
}
Rtf = GetRtf(origTab, vFont);
Rtf = Rtf.Replace("\u0394", @"\f1\u916?\f0 "); // delta 0x0394
Rtf = Rtf.Replace("\u03BF", @"\f1\u959?\f0 "); // F2025-015 lowercase omicron check with hex value replace with RTF string
if (ScriptCaution)
{
Rtf = GetRtf("\u25CFCaution ", vFont);