From 92522b1229791c3335b9d71c5b6971b56e083130 Mon Sep 17 00:00:00 2001 From: mschill Date: Mon, 30 Jun 2025 14:32:24 -0400 Subject: [PATCH 01/44] C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) Initial check-in / adding ui options / base for export --- .../VEPROMS User Interface/VEPROMS_UI.csproj | 3 + .../VEPROMS User Interface/dlgExportImport.cs | 23 +- .../dlgExportImportEP.cs | 202 +++++++++ PROMS/VEPROMS User Interface/frmVEPROMS.cs | 97 ++++- PROMS/Volian.Controls.Library/vlnTreeView.cs | 412 +++++++++++------- PROMS/Volian.Print.Library/PDFReport.cs | 2 +- 6 files changed, 552 insertions(+), 187 deletions(-) create mode 100644 PROMS/VEPROMS User Interface/dlgExportImportEP.cs diff --git a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj index 856bf9c4..eb1a7ffd 100644 --- a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj +++ b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj @@ -164,6 +164,9 @@ dlgCheckedOutProcedure.cs + + Form + Form diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 47b85a1b..e0496b3a 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -29,6 +29,7 @@ namespace VEPROMS } private bool _ConvertROsToTextDuringImport = false; private bool _ConvertROsAndTransitionsToText = false; // set to true when Approval creates an Export file + protected bool _ExportBothConvertedandNot = false; // set to true when Electronic Procedure export // B2016-225 notify user when Transitions and/or ROs are converted to text private bool _DidConvertTransitionsToText = false; @@ -64,7 +65,7 @@ namespace VEPROMS private FolderInfo MyFolder = null; private DocVersionInfo MyDocVersion = null; private ProcedureInfo MyProcedure = null; - private XmlAttribute AddAttribute(XmlDocument xd, string name, string value) + protected XmlAttribute AddAttribute(XmlDocument xd, string name, string value) { XmlAttribute xa = xd.CreateAttribute(name); xa.InnerText = value; @@ -2423,9 +2424,17 @@ namespace VEPROMS if (ii.ItemAnnotationCount > 0) foreach (AnnotationInfo ai in ii.ItemAnnotations) ExportAnnotation(xe, ai, "annotation"); + + ExportEPAnnotationInfo(xe, ii); } - private void ExportItemAudits(XmlElement xn, ItemInfo ii) + protected virtual void ExportEPAnnotationInfo(XmlElement xe, ItemInfo ii) + { + //do nothing - this will be for Electronic procedures only + //and handled/overridden in dlgExportEP.cs + } + + private void ExportItemAudits(XmlElement xn, ItemInfo ii) { if (cbxExportAudits.Checked) { @@ -2566,6 +2575,7 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ci.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff"))); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ci.UserID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatfilename", formatFileName)); + if (_ExportBothConvertedandNot) xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "textwithlinks", ci.Text)); //content audits ExportContentAudits(xe, ci); @@ -2652,6 +2662,7 @@ namespace VEPROMS MyWriter.WriteAttributeString("dts", ci.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); MyWriter.WriteAttributeString("userid", ci.UserID.ToString()); MyWriter.WriteAttributeString("formatfilename", formatFileName); + if (_ExportBothConvertedandNot) MyWriter.WriteAttributeString("textwithlinks", ci.Text); if (ci.ContentTransitionCount > 0) foreach (TransitionInfo ti in ci.ContentTransitions) @@ -2699,7 +2710,8 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "config", gi.Config)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", gi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff"))); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", gi.UserID.ToString())); - + if (_ExportBothConvertedandNot) xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "datawithlinks", gi.Data)); + //grid audits ExportGridAudits(xe, gi); xn.AppendChild(xe); @@ -2758,6 +2770,7 @@ namespace VEPROMS MyWriter.WriteAttributeString("config", gi.Config); MyWriter.WriteAttributeString("dts", gi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); MyWriter.WriteAttributeString("userid", gi.UserID.ToString()); + if (_ExportBothConvertedandNot) MyWriter.WriteAttributeString("datawithlinks", gi.Data); MyWriter.WriteEndElement(); } @@ -2932,7 +2945,8 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", di.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff"))); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", di.UserID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "fileextension", di.FileExtension)); - + if (_ExportBothConvertedandNot) xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "doccontentwithlinks", Convert.ToBase64String(di.DocContent))); + //document audits ExportDocumentAudits(xe, di); xn.AppendChild(xe); @@ -2998,6 +3012,7 @@ namespace VEPROMS MyWriter.WriteAttributeString("dts", di.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); MyWriter.WriteAttributeString("userid", di.UserID.ToString()); MyWriter.WriteAttributeString("fileextension", di.FileExtension); + if (_ExportBothConvertedandNot) MyWriter.WriteAttributeString("doccontentwithlinks", Convert.ToBase64String(di.DocContent)); MyWriter.WriteEndElement(); } diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs new file mode 100644 index 00000000..7918e448 --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -0,0 +1,202 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Xml; +using VEPROMS.CSLA.Library; + +namespace VEPROMS +{ + //C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) + //class inherits from normal import/export form + //then adds additional functionality + public partial class dlgExportImportEP : dlgExportImport + { + private readonly AnnotationTypeInfo _AnnotationType; + + private string multiseparator = ","; + + private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]"); + + public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions) 0) + { + _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); + _ExportBothConvertedandNot = true; + DocReplace = new Dictionary(); + FormClosed += OnClose; + Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}"; + } + + public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0) + { + _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); + _ExportBothConvertedandNot = true; + DocReplace = new Dictionary(); + FormClosed += OnClose; + Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}"; + } + public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0) + { + _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); + _ExportBothConvertedandNot = true; + DocReplace = new Dictionary(); + FormClosed += OnClose; + Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {procedureInfo.DisplayNumber}"; + } + + //Overridden function to handle export of EP data + protected override void ExportEPAnnotationInfo(XmlElement xe, ItemInfo ii) + { + //switch to handle customizations for different formats + switch (ii.ActiveFormat.PlantFormat.EPFormatFiles.Find(x => x.AnnotationTypeID == _AnnotationType.TypeID)?.Name) + { + default: + ExportEPAnnotationInfo_Default(xe, ii); + break; + } + + } + + //default export of EP Data + private void ExportEPAnnotationInfo_Default(XmlElement xe, ItemInfo ii) + { + //Add tab text to item + string steptab = Volian.Print.Library.PDFReport.BuildStepTab(ii); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "StepTab", steptab)); + + //get first transition in item and add it as an xml element + if (ii.MyContent.ContentTransitionCount > 0) + { + TransitionInfo ct = ii.MyContent.ContentTransitions[0]; + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "TransitionToItemID", ct.ToID.ToString())); + } + + //export EP annotation details under an EPInfo node + if (ii.ItemAnnotations != null) + { + XmlElement xepinfo = xe.OwnerDocument.CreateElement("EPInfo"); + + EPFields myEPFields = ii.GetValidEPFields(_AnnotationType.TypeID); + + ROFSTLookup lookup = ii.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(ii.MyDocVersion); + + //For each annotation in the item that is of the current EP Annotation type + foreach (var EPAnnotation in ii.ItemAnnotations.Where(x => x.TypeID == _AnnotationType.TypeID)) + { + var EPAnnotationConfig = new AnnotationConfig(EPAnnotation.Config); + + XmlElement xepdetails = xe.OwnerDocument.CreateElement("Details"); + //include the annotation ID for reference + xepdetails.Attributes.SetNamedItem(AddAttribute(xepdetails.OwnerDocument, "AnnotationID", EPAnnotation.AnnotationID.ToString())); + + //loop through each EP Field - name the xml elements the EP.name + foreach (EPField EP in myEPFields) + { + string val = EPAnnotationConfig.GetValue("EP", EP.name); + + XmlElement xindivid = xe.OwnerDocument.CreateElement(EP.name); + + //need to resolve ROs ROSingle, ROMulti, in text + //get values + //should we export blank? + // + switch (EP.type.ToLower()) + { + case "text": + + //for text, check if any embedded ROs + //if none, set the xml element to the text + //otherwise resolve the Ros + MatchCollection matches = _ROAccPageTokenPattern.Matches(val); + if (matches.Count == 0) + { + xindivid.InnerText = val; + } + else + { + //resolve ROs + //text ROs will replace the AccID key in the text + //for binary objects like images, + //we will keep the AccID in the text and output the binary as a separate child + //XML element with the same xml name as the AccID + foreach (Match m in matches) + { + ROFSTLookup.rochild roc = lookup.GetROChildByAccPageID(m.Groups[1].Value); + + + if (roc.type == 8) // Exclude replacing Images since are binary - for those, add a sub item + { + XmlElement xroid = xindivid.OwnerDocument.CreateElement(m.Groups[1].Value); + xroid.InnerText = roc.value; + xindivid.AppendChild(xroid); + } + else if (!string.IsNullOrEmpty(roc.value)) + { + bool convertCaretToDeltaSymbol = (ii.ActiveSection != null) && ii.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta; + + string rocvalue = roc.value.Replace("`", "\xB0"); + rocvalue = rocvalue.Replace("\xF8", "\xB0"); + rocvalue = rocvalue.Replace("\x7F", "\x394"); //delta + if (convertCaretToDeltaSymbol) rocvalue = rocvalue.Replace("^", "\x394"); // delta + val = val.Replace($"<{m.Groups[1].Value}>", rocvalue); + } + + } + + xindivid.InnerText = val; + } + break; + case "rosingle": + //Get the output columns from the EPFormatFile + //set the "Item" nodes value = to those resolved items + //separated by multiseparator + XmlElement xindivid_rosingle = xindivid.OwnerDocument.CreateElement("Item"); + xindivid_rosingle.Attributes.SetNamedItem(AddAttribute(xindivid_rosingle.OwnerDocument, "ROID", val)); + List ro_single_tmp = EP.getROValuesList(EPAnnotation, val); + xindivid_rosingle.InnerText = String.Join(multiseparator, ro_single_tmp.ToArray()); + xindivid.AppendChild(xindivid_rosingle); + break; + case "romulti": + //Get the output columns from the EPFormatFile + //create an "Item" subnode for each selected RO + //set the nodes value = to those resolved items + //separated by multiseparator + foreach (string ival in val.Split(multiseparator.ToCharArray())) + { + XmlElement xindivid_romulti = xindivid.OwnerDocument.CreateElement("Item"); + xindivid_romulti.Attributes.SetNamedItem(AddAttribute(xindivid_romulti.OwnerDocument, "ROID", ival)); + List ro_multi_tmp = EP.getROValuesList(EPAnnotation, ival); + xindivid_romulti.InnerText = String.Join(multiseparator, ro_multi_tmp.ToArray()); + xindivid.AppendChild(xindivid_romulti); + } + break; + case "tableinput": + xindivid.InnerText = val; + break; + default: + xindivid.InnerText = val; + break; + } + xepdetails.AppendChild(xindivid); + } + + xepinfo.AppendChild(xepdetails); + } + + xe.AppendChild(xepinfo); + } + + } + + //clear objects to release memory + private void OnClose(object sender, EventArgs e) + { + DocReplace.Clear(); + DocReplace = null; + } + + + } +} diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 840dbd6e..0ab8be76 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -708,15 +708,32 @@ namespace VEPROMS else { int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, CheckOutType.Session); - - dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter - dlg.ShowDialog(this); - MySessionInfo.CheckInItem(ownerid); - - if (args.Index == 1 && dlg.MyNewFolder != null) + //C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) + //form for exporting Electronic Procedures from FolderInfo + if (args.AnnotationTypeId > 0) { - tv.AddNewNode(dlg.MyNewFolder); + dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", fi, this, args.AnnotationTypeId); + dlg.ShowDialog(this); + + MySessionInfo.CheckInItem(ownerid); + + if (args.Index == 1 && dlg.MyNewFolder != null) + { + tv.AddNewNode(dlg.MyNewFolder); + } + } + else + { + dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter + dlg.ShowDialog(this); + + MySessionInfo.CheckInItem(ownerid); + + if (args.Index == 1 && dlg.MyNewFolder != null) + { + tv.AddNewNode(dlg.MyNewFolder); + } } } } @@ -742,18 +759,40 @@ namespace VEPROMS int ownerid = MySessionInfo.CheckOutItem(dvi.VersionID, CheckOutType.DocVersion); - dlgExportImport dlg = new dlgExportImport("Import", dvi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter - dlg.MyNewProcedure = null; - dlg.ExternalTransitionItem = null; - dlg.ShowDialog(this); + //C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) + //form for exporting Electronic Procedures from DocVersionInfo + if (args.AnnotationTypeId > 0) + { + dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", dvi, this, args.AnnotationTypeId); + dlg.MyNewProcedure = null; + dlg.ExternalTransitionItem = null; + dlg.ShowDialog(this); - MySessionInfo.CheckInItem(ownerid); + MySessionInfo.CheckInItem(ownerid); - if (dlg.MyNewProcedure != null) - tv.AddNewNode(dlg.MyNewProcedure); + if (dlg.MyNewProcedure != null) + tv.AddNewNode(dlg.MyNewProcedure); + + if (dlg.ExternalTransitionItem != null) + tc.OpenItem(dlg.ExternalTransitionItem); + } + else + { + + dlgExportImport dlg = new dlgExportImport("Import", dvi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter + dlg.MyNewProcedure = null; + dlg.ExternalTransitionItem = null; + dlg.ShowDialog(this); + + MySessionInfo.CheckInItem(ownerid); + + if (dlg.MyNewProcedure != null) + tv.AddNewNode(dlg.MyNewProcedure); + + if (dlg.ExternalTransitionItem != null) + tc.OpenItem(dlg.ExternalTransitionItem); + } - if (dlg.ExternalTransitionItem != null) - tc.OpenItem(dlg.ExternalTransitionItem); } } @@ -769,10 +808,24 @@ namespace VEPROMS else { int ownerid = MySessionInfo.CheckOutItem(pi.ItemID, CheckOutType.Procedure); - dlgExportImport dlg = new dlgExportImport("Export", pi, this, (E_UCFImportOptions)0);//Added frmVEPROMS Parameter - dlg.ShowDialog(this); - MySessionInfo.CheckInItem(ownerid); + //C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) + //form for exporting Electronic Procedures from ProcedureInfo + if (args.AnnotationTypeId > 0) + { + dlgExportImportEP dlg = new dlgExportImportEP("Export", pi, this, args.AnnotationTypeId); + dlg.ShowDialog(this); + + MySessionInfo.CheckInItem(ownerid); + } + else + { + + dlgExportImport dlg = new dlgExportImport("Export", pi, this, (E_UCFImportOptions)0);//Added frmVEPROMS Parameter + dlg.ShowDialog(this); + + MySessionInfo.CheckInItem(ownerid); + } } } } @@ -1216,7 +1269,7 @@ namespace VEPROMS //Print Section //C2025-028 Add a Quick Print Section option - + void tv_PrintSection(object sender, vlnTreeEventArgs args) { PrintSection(sender, args, false); @@ -1226,7 +1279,7 @@ namespace VEPROMS PrintSection(sender, args, true); } - void PrintSection(object sender, vlnTreeEventArgs args, bool quickprint) + void PrintSection(object sender, vlnTreeEventArgs args, bool quickprint) { try { @@ -2195,7 +2248,7 @@ namespace VEPROMS this.superTooltip1.SetSuperTooltip(btnResetSecurity, new SuperTooltipInfo("Reset Security", "", "WARNING this will \nREMOVE ALL PROMS USERS and Reset to the\nOriginal Volian Defaults", null, null, eTooltipColor.Gray)); this.superTooltip1.SetSuperTooltip(btnAdministrativeTools, new SuperTooltipInfo("Administrative Tools", "", "Open the PROMS Adminstration Tools Window", null, null, eTooltipColor.Gray)); this.superTooltip1.SetSuperTooltip(btnUpdateFormats, new SuperTooltipInfo("Update Formats", "", "Install New Formats \n or Re-Install Formats", null, null, eTooltipColor.Gray)); - + try { MyUserInfo = UserInfo.GetByUserID(VlnSettings.UserID); diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index bdd75d47..95beb6f2 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -22,11 +22,11 @@ namespace Volian.Controls.Library public delegate void vlnTreeViewEvent(object sender, vlnTreeEventArgs args); public delegate void vlnTreeViewTimeEvent(object sender, vlnTreeTimeEventArgs args); public delegate void vlnTreeViewStatusEvent(object sender, vlnTreeStatusEventArgs args); - public delegate ItemInfo vlnTreeViewClipboardStatusEvent(object sender, vlnTreeEventArgs args); - public delegate void vlnTreeViewItemInfoEvent(object sender, vlnTreeItemInfoEventArgs args); + public delegate ItemInfo vlnTreeViewClipboardStatusEvent(object sender, vlnTreeEventArgs args); + public delegate void vlnTreeViewItemInfoEvent(object sender, vlnTreeItemInfoEventArgs args); public delegate bool vlnTreeViewBoolEvent(object sender, vlnTreeEventArgs args); public delegate bool vlnTreeViewItemInfoDeleteEvent(object sender, vlnTreeItemInfoEventArgs args); - + public delegate bool vlnTreeViewItemInfoInsertEvent(object sender, vlnTreeItemInfoInsertEventArgs args); public delegate bool vlnTreeViewItemInfoDeleteFolderEvent(object sender, vlnTreeFolderDeleteEventArgs args); public delegate bool vlnTreeViewItemInfoPasteEvent(object sender, vlnTreeItemInfoPasteEventArgs args); @@ -152,6 +152,15 @@ namespace Volian.Controls.Library get { return _Index; } set { _Index = value; } } + + //C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) + //AnnotationType that would be doing an export for + private int _AnnotationTypeId = -1; + public int AnnotationTypeId + { + get { return _AnnotationTypeId; } + set { _AnnotationTypeId = value; } + } //jcb multiunit private string _Unit; public string Unit @@ -179,6 +188,13 @@ namespace Volian.Controls.Library _Destination = destination; _Index = index; } + public vlnTreeEventArgs(TreeNode node, TreeNode destination, int index, int annTypeId) + { + _Node = node; + _Destination = destination; + _Index = index; + _AnnotationTypeId = annTypeId; + } //jcb multiunit public vlnTreeEventArgs(TreeNode node, TreeNode destination, int index, string unit, int unitIndex) { @@ -188,11 +204,20 @@ namespace Volian.Controls.Library _Unit = unit; _UnitIndex = unitIndex; } + public vlnTreeEventArgs(TreeNode node, TreeNode destination, int index, string unit, int unitIndex, int annTypeId) + { + _Node = node; + _Destination = destination; + _Index = index; + _Unit = unit; + _UnitIndex = unitIndex; + _AnnotationTypeId = annTypeId; + } //end jcb multiunit #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) @@ -322,7 +347,7 @@ namespace Volian.Controls.Library _PasteType = pasteType; _Type = type; } - + #endregion } #endregion @@ -573,16 +598,16 @@ namespace Volian.Controls.Library { if (ProcedureCheckedOutTo != null) ProcedureCheckedOutTo(sender, args); } - - - - - - public event vlnTreeViewEvent ExportImportProcedureSets; - private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args) - { - if (ExportImportProcedureSets != null) ExportImportProcedureSets(sender, args); - } + + + + + + public event vlnTreeViewEvent ExportImportProcedureSets; + private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args) + { + if (ExportImportProcedureSets != null) ExportImportProcedureSets(sender, args); + } public event vlnTreeViewEvent PrintTransitionReport; private void OnPrintTransitionReport(object sender, vlnTreeEventArgs args) { @@ -634,7 +659,7 @@ namespace Volian.Controls.Library // This event was added to update the Step Properties/RO & Tools/Search RO & Reports // when an update of ro.fst is done & the ro trees on those panels needs refreshed. // (bug fix B2015-226) - public event StepPanelTabDisplayEvent TabDisplay; + public event StepPanelTabDisplayEvent TabDisplay; private void OnTabDisplay(object sender, StepPanelTabDisplayEventArgs args) { if (TabDisplay != null) TabDisplay(sender, args); @@ -711,7 +736,10 @@ namespace Volian.Controls.Library if (ui.IsAdministrator() || ui.IsSetAdministrator(fi))// && fi.MyParent == null) //VEPROMS level { if (fi.HasWorkingDraft) + { cm.MenuItems.Add("Export Procedure Set", new EventHandler(mi_Click)); + //AddEPExport(cm.MenuItems, 0, null); + } else cm.MenuItems.Add("Import Procedure Set", new EventHandler(mi_Click)); if (DoSpecificInfo) @@ -731,12 +759,12 @@ namespace Volian.Controls.Library } } // B2020-111 only allow Set Administrator to add new folders inside folders they admininstrate - if ((ui.IsAdministrator() || ui.IsSetAdministrator(fi.MyParent)) && fi.FolderDocVersionCount == 0) + if ((ui.IsAdministrator() || ui.IsSetAdministrator(fi.MyParent)) && fi.FolderDocVersionCount == 0) cm.MenuItems.Add("New Folder", new EventHandler(mi_Click)); - if (fi.ChildFolderCount == 0 && !fi.HasWorkingDraft) + if (fi.ChildFolderCount == 0 && !fi.HasWorkingDraft) cm.MenuItems.Add("Create Working Draft", new EventHandler(mi_Click)); } - if (fi.HasWorkingDraft) + if (fi.HasWorkingDraft) cm.MenuItems.Add("Print Transition Report", new EventHandler(mi_Click)); } else if (tn.VEObject as DocVersionInfo != null) // DocVersions can only contain procs @@ -745,14 +773,14 @@ namespace Volian.Controls.Library //_MyLog.WarnFormat("Context Menu 1c - {0}", GC.GetTotalMemory(true)); DocVersionInfo dvi = tn.VEObject as DocVersionInfo; if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi)) - { - cm.MenuItems.Add("Import Procedure", mi_Click); - } - if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi) || ui.IsWriter(dvi)) + { + cm.MenuItems.Add("Import Procedure", mi_Click); + } + if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi) || ui.IsWriter(dvi)) { OwnerInfoList.Reset(); oil = OwnerInfoList.GetByVersionID(dvi.VersionID); - if (dvi.ActiveFormat.PlantFormat.FormatData.SpecificInfo) + if (dvi.ActiveFormat.PlantFormat.FormatData.SpecificInfo) cm.MenuItems.Add("Procedure Set Specific Information", new EventHandler(mi_Click)); cm.MenuItems.Add("Refresh Checked Out Procedures", new EventHandler(mi_Click)); cm.MenuItems.Add("New Procedure", new EventHandler(mi_Click)); @@ -846,7 +874,8 @@ namespace Volian.Controls.Library oi = OwnerInfo.GetByItemID(pri.ItemID, CheckOutType.Procedure); if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion)) { - cm.MenuItems.Add("Export Procedure", mi_Click); + cm.MenuItems.Add("Export Procedure", mi_Click); + AddEPExport(cm.MenuItems, pri.MyDocVersion.MultiUnitCount, pri.MyDocVersion.UnitNames); } if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion) || ui.IsWriter(pri.MyDocVersion)) { @@ -898,7 +927,7 @@ namespace Volian.Controls.Library } cm.MenuItems.Add(micas); cm.MenuItems.Add(mitcas); - cm.MenuItems.Add(mip); + cm.MenuItems.Add(mip); cm.MenuItems.Add(miqp); //cm.MenuItems.Add(mips); AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri); @@ -1132,35 +1161,35 @@ namespace Volian.Controls.Library #region Menu_Delete if (ok) - - - - - - { - // Add delete to the menu unless at the very 'top' node, on a grouping (partinfo) - // node (RNOs, Steps, Cautions, Notes) or Folder/DocVersion that contains any items. - PartInfo pi = tn.VEObject as PartInfo; - if (pi == null && tn.Parent != null) // it's not a part and it's not the top.... + + + + + { - fi = tn.VEObject as FolderInfo; - if (fi == null || tn.Nodes.Count == 0) // it's not a folder or it has no children + // Add delete to the menu unless at the very 'top' node, on a grouping (partinfo) + // node (RNOs, Steps, Cautions, Notes) or Folder/DocVersion that contains any items. + PartInfo pi = tn.VEObject as PartInfo; + if (pi == null && tn.Parent != null) // it's not a part and it's not the top.... { - DocVersionInfo di = tn.VEObject as DocVersionInfo; - if (di == null || tn.Nodes.Count == 0) // it's not a docversion or it has no children + fi = tn.VEObject as FolderInfo; + if (fi == null || tn.Nodes.Count == 0) // it's not a folder or it has no children { - // if it's an enhanced step that was linked from a source, don't allow delete - bool canDoDel = true; - ItemInfo iienh = tn.VEObject as ItemInfo; - if (iienh != null && iienh.IsProcedure && iienh.IsEnhancedProcedure) canDoDel = false; - if (iienh != null && iienh.IsSection && iienh.IsEnhancedSection && !iienh.IsEnhancedSectionTitleOnly) canDoDel = false; - if (iienh != null && iienh.IsEnhancedStep) canDoDel = false; - if (canDoDel) cm.MenuItems.Add("Delete", new EventHandler(mi_Click)); + DocVersionInfo di = tn.VEObject as DocVersionInfo; + if (di == null || tn.Nodes.Count == 0) // it's not a docversion or it has no children + { + // if it's an enhanced step that was linked from a source, don't allow delete + bool canDoDel = true; + ItemInfo iienh = tn.VEObject as ItemInfo; + if (iienh != null && iienh.IsProcedure && iienh.IsEnhancedProcedure) canDoDel = false; + if (iienh != null && iienh.IsSection && iienh.IsEnhancedSection && !iienh.IsEnhancedSectionTitleOnly) canDoDel = false; + if (iienh != null && iienh.IsEnhancedStep) canDoDel = false; + if (canDoDel) cm.MenuItems.Add("Delete", new EventHandler(mi_Click)); + } } } } - } - + #endregion //_MyLog.WarnFormat("Context Menu 6 - {0}", GC.GetTotalMemory(true)); #region Menu_ExternalTransitions @@ -1224,8 +1253,8 @@ namespace Volian.Controls.Library // 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)); - 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) + 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))); PartInfo pia = tn.VEObject as PartInfo; ItemInfo ii = tn.VEObject as ItemInfo; @@ -1306,7 +1335,7 @@ namespace Volian.Controls.Library itm.Text == "Procedure Set Specific Information" || itm.Text == "Approve All Procedures for" || itm.Text == "Approve Some Procedures" || itm.Text == "Approve Some Procedures for") itm.Enabled = false; - + } } } @@ -1335,9 +1364,9 @@ 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.StartsWith("Showing Change Bars Starting") || itm.Text == "Create Continuous Action Summary" || itm.Text == "Create Time Critical Action Summary" || itm.Text == "Export Procedure") itm.Enabled = false; } @@ -1359,7 +1388,53 @@ namespace Volian.Controls.Library } } - private void AddApprovedRevisionsMultiUnit(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri) + //C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) + // Add context menu for exporting Electronic Procedures + // if has an Electronic procedure + // then loop through and add an Export for each EP Viewer + private void AddEPExport(Menu.MenuItemCollection menuItems, int MultiUnitCount, string[] UnitNames) + { + //get EP Annotations + AnnotationTypeInfoList annotations = AnnotationTypeInfoList.Get(); + List epAnnotations = new List(); + foreach (AnnotationTypeInfo tmp in annotations) + { + if (tmp.IsEPAnnotationType) epAnnotations.Add(tmp); + } + + if (epAnnotations.Count == 0) return; // no Electronic Procedures + + //add outer menu + MenuItem mi = menuItems.Add("Electronic Procedure Viewer Export"); + foreach (AnnotationTypeInfo epAnn in epAnnotations) + { + //Add item for each individual EP Viewer + MenuItem mv = mi.MenuItems.Add(epAnn.Name); + + //tag will be of format: + //{EP Annotation Type ID},{Unit} + //if not multi-unit, unit will be zero. + if (MultiUnitCount > 1) + { + //if multi-unit, add menu item for each unit + int k = 0; + foreach (string s in UnitNames) + { + k++; + MenuItem multiunit_mv = mv.MenuItems.Add(s); + multiunit_mv.Tag = $"{epAnn.TypeID},{k}"; + multiunit_mv.Click += new EventHandler(miEP_Click); + } + } + else + { + mv.Tag = $"{epAnn.TypeID},0"; + mv.Click += new EventHandler(miEP_Click); + } + } + } + + private void AddApprovedRevisionsMultiUnit(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri) { _currentPri = pri; RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID); @@ -1410,11 +1485,11 @@ namespace Volian.Controls.Library ril = null; } } - public void AddNewNode(IVEDrillDownReadOnly o) - { - VETreeNode tn = new VETreeNode(o); - SelectedNode.Nodes.Add(tn); - } + public void AddNewNode(IVEDrillDownReadOnly o) + { + VETreeNode tn = new VETreeNode(o); + SelectedNode.Nodes.Add(tn); + } private void AddApprovedRevisions(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri) { try @@ -1423,7 +1498,7 @@ namespace Volian.Controls.Library _currentPri = pri; using (RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID)) { - //_MyLog.WarnFormat("Context Menu 1 After GET - {0}", GC.GetTotalMemory(true)); + //_MyLog.WarnFormat("Context Menu 1 After GET - {0}", GC.GetTotalMemory(true)); if (ril.Count == 0) return; // no versions to list MenuItem mi = menuItemCollection.Add("Versions"); int lastApprovedRevisionID = 0; @@ -1557,7 +1632,7 @@ namespace Volian.Controls.Library } 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) { @@ -1680,7 +1755,7 @@ namespace Volian.Controls.Library // 3) 'to' docversion is 'source' and 'from' procedure is within this docversion // 4) 'to' docVersion is 'enhanced' and 'from' procedure is not bool canPaste = false; - + DocVersionInfo dvi = tn.VEObject as DocVersionInfo; DocVersionConfig dvc = dvi.DocVersionConfig; bool docVersionIsEnhanced = dvc.MyEnhancedDocuments != null && dvc.MyEnhancedDocuments.Count > 0 && dvc.MyEnhancedDocuments[0].Type == 0; @@ -1701,7 +1776,7 @@ namespace Volian.Controls.Library if (iiClipboard.IsRtfRaw) canPaste = false; // never paste an equation. if (canPaste) cm.MenuItems.Add("Paste Procedure", new EventHandler(mi_Click)); } - #endregion + #endregion } else { @@ -1919,7 +1994,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)); @@ -1980,7 +2055,7 @@ namespace Volian.Controls.Library if (hasValidConnectingProc) { ItemInfo lprc = ItemInfo.Get(seleds[0].ItemID); - lprc.DoUnlinkEnhanced(lprc, 0, !hasValidConnectingProc); + lprc.DoUnlinkEnhanced(lprc, 0, !hasValidConnectingProc); } else selprc.DoUnlinkEnhanced(selprc, seleds[0].Type, !hasValidConnectingProc); @@ -2000,7 +2075,7 @@ namespace Volian.Controls.Library { ItemInfo lprc = ItemInfo.Get(ed.ItemID); bool hasValidConnectingProc = CheckForValidEnhLink(lprc); - // if there is a valid connection, unlink both. Otherwise, just unlink this selected procedure. + // if there is a valid connection, unlink both. Otherwise, just unlink this selected procedure. if (hasValidConnectingProc) lprc.DoUnlinkEnhanced(lprc, ed.Type, !hasValidConnectingProc); else @@ -2024,37 +2099,37 @@ namespace Volian.Controls.Library OnNodeSI(this, new vlnTreeEventArgs(tn, null, 0)); return; } - if (mi.Text.StartsWith("Collapse")) - { + if (mi.Text.StartsWith("Collapse")) + { CollapseProcedures(); - return; - } + return; + } if (mi.Text == "Print Transition Report") { OnPrintTransitionReport(this, new vlnTreeEventArgs(SelectedNode as VETreeNode)); return; } - - - - - - - - - - - if (mi.Text == "Export Procedure Set" || mi.Text == "Export Procedure") - { - OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); - return; - } - if (mi.Text == "Import Procedure Set" || mi.Text == "Import Procedure") - { - OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 1)); - return; - } - if (mi.Text.StartsWith("Procedure Checked Out to") || mi.Text.StartsWith("Document Checked Out to")) + + + + + + + + + + + if (mi.Text == "Export Procedure Set" || mi.Text == "Export Procedure") + { + OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); + return; + } + if (mi.Text == "Import Procedure Set" || mi.Text == "Import Procedure") + { + OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 1)); + return; + } + if (mi.Text.StartsWith("Procedure Checked Out to") || mi.Text.StartsWith("Document Checked Out to")) { OnProcedureCheckedOutTo(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); return; @@ -2080,7 +2155,7 @@ namespace Volian.Controls.Library break; case "New Folder": SelectedNode.Expand(); - tv_NodeNew(MenuSelections.Folder); + tv_NodeNew(MenuSelections.Folder); break; case "Create Working Draft": SelectedNode.Expand(); @@ -2124,7 +2199,7 @@ namespace Volian.Controls.Library tv_NodeCopy(); break; // lots of paste options: - case "Paste Procedure": + case "Paste Procedure": case "Paste Procedure Before": case "Paste Procedure After": case "Paste Section": @@ -2158,7 +2233,7 @@ namespace Volian.Controls.Library break; } - + case "Delete": if (tv_NodeDelete()) { @@ -2226,12 +2301,12 @@ namespace Volian.Controls.Library case "Create Continuous Action Summary": OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); break; - // F2022-024 Time Critical Action Summary + // F2022-024 Time Critical Action Summary case "Create Time Critical Action Summary": 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 + // 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 case "CANNOT PASTE HERE. Click for more information...": FlexibleMessageBox.Show("You have copied a document that is linked to an Enhanced Document.\n\n" + "It can only be pasted before or after another document, within the set, that is linked to an Enhanced Document.", "Cannot Paste Here"); @@ -2255,6 +2330,23 @@ namespace Volian.Controls.Library break; } } + + //C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) + // Handles clicking of items in the context menu + // for exporting Electronic Procedures + // tag will be of format: + // {EP Annotation Type ID},{Unit} + // if not multi-unit, unit will be zero. + void miEP_Click(object sender, EventArgs e) + { + MenuItem mi = sender as MenuItem; + int annTypeid = int.Parse(((string)mi.Tag).Split(',')[0]); + int unit = int.Parse(((string)mi.Tag).Split(',')[1]); + if (unit == 0) + OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, annTypeid)); + else + OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, "", unit, annTypeid)); + } private bool _doingCollapseNode = false; // B2016-058 when collapse is done, it always calls the drag node event which doesn't appear to be needed private void CollapseProcedures() { @@ -2273,7 +2365,7 @@ namespace Volian.Controls.Library foreach (VETreeNode tnc in tn.Nodes) CollapseProcedures(tnc); if (tn.VEObject as DocVersionInfo == null && tn.VEObject as FolderInfo == null) - tn.Collapse(); + tn.Collapse(); _doingCollapseNode = true; // B2016-058 this will prevent a Drag Node error when collapsing an RNOs, Cautions, or Notes tree node } private void tv_RemoveChgIds() @@ -2333,7 +2425,7 @@ namespace Volian.Controls.Library using (DocVersion dv = DocVersion.Get(MyDVI.VersionID)) { swROUpdate = new System.IO.StreamWriter(ROFstInfo.ROUpdateResultsPath(MyDVI)); // RO changes placed in file in the Documents\VEPROMS folder - // B2022-026 RO Memory Reduction code - first load the new ro.fst so that we can assign the ROTableUpdate event to the correct roFstInfo + // B2022-026 RO Memory Reduction code - first load the new ro.fst so that we can assign the ROTableUpdate event to the correct roFstInfo if (dv.ROfstLoadingFigures || dv.NewerRoFst) // B2017-125 see if loading figures was completed { // only load the RO.fst @@ -2474,7 +2566,7 @@ namespace Volian.Controls.Library return; } // C2017-003: ro data in sql server, check for sql connection string - if (MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString != "cstring") + if (MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString != "cstring") roloc = roloc + " \"" + MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString + "\""; // C2021-026 pass in Parent/Child information (list of the children) // B2022-019 look at all DocVersions to find ParentChild information @@ -2525,7 +2617,7 @@ namespace Volian.Controls.Library } } VETreeNode tn = SelectedNode as VETreeNode; - + DocVersionInfo dvi = tn.VEObject as DocVersionInfo; // Check for paste into a docversion - queries/code is different than paste related to an item (into a proc or section) if (dvi != null) @@ -2575,7 +2667,7 @@ namespace Volian.Controls.Library if (OnlyProc && repitem != null && tmp != null) { VETreeNode tn1 = new VETreeNode(repitem); - tmp.Nodes.Add(tn1); + tmp.Nodes.Add(tn1); SelectedNode = tn1; } } @@ -2584,7 +2676,7 @@ namespace Volian.Controls.Library //if (p.IndexOf("Replace") <= -1) - this.Cursor = Cursors.Default; + this.Cursor = Cursors.Default; } public void PasteAsDocVersionChild(VETreeNode tn, int copyStartID) @@ -2653,7 +2745,7 @@ namespace Volian.Controls.Library // the item to be pasted in the step editor and the tree. ItemInfo newItemInfo = null; // F2021-009 display a message if pasting step will results in more sub-step levels than are defined in the format - if (!ii.IsProcedure) + if (!ii.IsProcedure) ItemInfo.PasteStepIsWithinDefinedSubStepLevels(copyStartID, ii, false); if (ii.IsProcedure || !OnPasteItemInfo(this, new vlnTreeItemInfoPasteEventArgs(ii, copyStartID, pasteOpt, ii.MyContent.Type))) { @@ -2716,7 +2808,7 @@ namespace Volian.Controls.Library SelectedNode.Nodes.Add(tn1); // add tree node to end of list. SelectedNode = tn1; } - private void tv_NodeCopy() + private void tv_NodeCopy() { if (SelectedNode == null) return; VETreeNode tn = SelectedNode as VETreeNode; @@ -2754,7 +2846,7 @@ namespace Volian.Controls.Library { using (Folder folder = folderInfo.Get()) { - OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} Properties", folder.FolderConfig.Name), folder.FolderConfig)); + OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} Properties", folder.FolderConfig.Name), folder.FolderConfig)); } } private void OpenProperties(DocVersionInfo dvInfo) @@ -2768,7 +2860,7 @@ namespace Volian.Controls.Library { using (Procedure proc = procInfo.Get()) { - OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} {1} Properties", proc.ProcedureConfig.Number, proc.ProcedureConfig.Title), proc.ProcedureConfig)); + OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} {1} Properties", proc.ProcedureConfig.Number, proc.ProcedureConfig.Title), proc.ProcedureConfig)); } } private void OpenProperties(SectionInfo sectInfo) @@ -2781,7 +2873,7 @@ namespace Volian.Controls.Library title = string.Format("{0} {1} Properties", sectInfo.SectionConfig.Number, sectInfo.SectionConfig.Title); else title = string.Format("{0} Properties", sectInfo.SectionConfig.Title); - OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(title, sect.SectionConfig)); + OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(title, sect.SectionConfig)); } } private void OpenProperties(StepInfo stpinfo) @@ -2919,7 +3011,7 @@ namespace Volian.Controls.Library procedure.Save(); tn = new VETreeNode(_LastProcedureInfo); SelectedNode.Nodes.Add(tn); // add tree node to end of list. - // The following line will allow for a refresh of the procedure list on the Working Draft's treenodes docversion (B2016-034) + // The following line will allow for a refresh of the procedure list on the Working Draft's treenodes docversion (B2016-034) if (((SelectedNode as VETreeNode).VEObject as DocVersionInfo) != null) ((SelectedNode as VETreeNode).VEObject as DocVersionInfo).ResetProcedures(); if (procedure.MyProcedureInfo.CreateEnhanced) { @@ -2961,7 +3053,7 @@ namespace Volian.Controls.Library else p2 = procedure.ItemID; } - if (p2 != -1) + if (p2 != -1) DeleteItemInfoAndChildren(_LastProcedureInfo); // Delete Item and reset Previous and Next } #endregion @@ -2971,11 +3063,11 @@ namespace Volian.Controls.Library string message = string.Empty; if (_LastProcedureInfo != null) if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message)) - { - FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning); - OnUnPauseRefresh(this, null); - return; - } + { + FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning); + OnUnPauseRefresh(this, null); + return; + } int s1 = -1; if (!(_LastProcedureInfo == null) || !(_LastSectionInfo == null)) { @@ -3028,8 +3120,8 @@ namespace Volian.Controls.Library { tn = new VETreeNode(_LastSectionInfo); SelectedNode.Nodes.Add(tn); // add tree node to end of list. - // if the new section was flagged as either having an enhanced link for Title or Contents, create the - // Enhanced section: + // if the new section was flagged as either having an enhanced link for Title or Contents, create the + // Enhanced section: Section sectiontmp = Section.Get(section.ItemID); // need to do this because of 'caching' problem. if (sectiontmp.SectionConfig.LinkEnhanced == "T" || sectiontmp.SectionConfig.LinkEnhanced == "Y") CreateEnhancedForSection(newtype, sectiontmp, savLastSectionInfo, sectiontmp.DisplayNumber, sectiontmp.MyContent.Text); @@ -3057,7 +3149,7 @@ namespace Volian.Controls.Library if (s1 != -1) { DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next - // B2020-087 refresh the tree node after canceling the creation of the subsection + // B2020-087 refresh the tree node after canceling the creation of the subsection _LastTreeNode.ChildrenLoaded = false; _LastTreeNode.RefreshNode(); _LastTreeNode.Collapse(); @@ -3104,7 +3196,7 @@ namespace Volian.Controls.Library if (s2 != -1) { DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next - // B2020-087 refresh the tree node after canceling the creation of the subsection + // B2020-087 refresh the tree node after canceling the creation of the subsection _LastTreeNode.ChildrenLoaded = false; _LastTreeNode.RefreshNode(); _LastTreeNode.Collapse(); @@ -3301,7 +3393,7 @@ namespace Volian.Controls.Library cs.Save(); } } - + private Section CreateNewSection() { // B2020-087 the config for SubSection_Edit was sometimes set even when there wasn't any subsections, @@ -3341,7 +3433,7 @@ namespace Volian.Controls.Library // The parent step was not open in the step editor, just create new step(s) and add treenode. int newId = -1; // B2020-076: if this step has a template, insert template steps. - int topType = ii.GetSmartTemplateTopLevelIndxOfThisType(20002); + int topType = ii.GetSmartTemplateTopLevelIndxOfThisType(20002); if (topType != -1) { ItemInfo tmp = null; @@ -3561,7 +3653,7 @@ namespace Volian.Controls.Library { foreach (DVEnhancedDocument dve in dvc.MyEnhancedDocuments) { - if (dve.Type != 0) + if (dve.Type != 0) DocVersion.Delete(dve.VersionID); else { @@ -3607,7 +3699,7 @@ namespace Volian.Controls.Library if (ed.Type != 0) enhIds.Add(ed.ItemID); // always return false because an event gets fired to delete tree nodes. if (!DeleteItemInfoAndChildren(_LastProcedureInfo)) return false; - + _LastProcedureInfo = null; foreach (int enhId in enhIds) { @@ -3706,7 +3798,7 @@ namespace Volian.Controls.Library } return false; } - + public void RemoveFolder(int folderId) { TreeNode nodeToRemove = FindNodeById(folderId, this.Nodes); @@ -3780,7 +3872,7 @@ namespace Volian.Controls.Library // C2020-033: Support delete to bring up Search/Incoming Transitions panel if (ex.Message.Contains("has External Transitions")) { - ItemInfo iis = ItemInfo.Get(ii.ItemID); + ItemInfo iis = ItemInfo.Get(ii.ItemID); OnSearchIncTransIn(this, new vlnTreeItemInfoEventArgs(iis)); iis = ii.HandleSqlExceptionOnDelete(ex); } @@ -3878,7 +3970,7 @@ namespace Volian.Controls.Library ItemInfo iidrag = ((VETreeNode)dragNode).VEObject as ItemInfo; FolderInfo fdrag = ((VETreeNode)dragNode).VEObject as FolderInfo; DocVersionInfo ddrag = ((VETreeNode)dragNode).VEObject as DocVersionInfo; - if ((iidrag == null && fdrag == null && ddrag == null)) + if ((iidrag == null && fdrag == null && ddrag == null)) { FlexibleMessageBox.Show("Cannot drag/drop a grouping node."); return; @@ -3929,7 +4021,7 @@ namespace Volian.Controls.Library { get { return _lastScroll; } } - private string _location = string.Empty; + private string _location = string.Empty; #endregion #region Constructors public DropLocation(TreeView tv, System.Windows.Forms.DragEventArgs e, DateTime lastScroll) @@ -4046,7 +4138,7 @@ namespace Volian.Controls.Library { return; } - //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("Line at {0} Node {1}[{2}] {3}", _location, _dropNode.Text, _index, _position.ToString()); + //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("Line at {0} Node {1}[{2}] {3}", _location, _dropNode.Text, _index, _position.ToString()); // Changed the color of the drag indicator to always be red Color lc = (_position == DropPosition.After ? Color.Red : Color.Red); Brush lb = (_position == DropPosition.After ? Brushes.Red : Brushes.Red); @@ -4073,12 +4165,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); @@ -4091,8 +4183,8 @@ namespace Volian.Controls.Library if (_position != DropPosition.Child) InsertPointer(tmp, g); } } - // } - // else ScrollTreeView(tmp); +// } +// else ScrollTreeView(tmp); DragHelper.ImageList_DragShowNolock(true); } } @@ -4115,10 +4207,10 @@ namespace Volian.Controls.Library tn.NextVisibleNode.EnsureVisible();// Make sure that the next node is visible else if (tn.PrevVisibleNode != null && tn.PrevVisibleNode.PrevVisibleNode != null && tn.PrevVisibleNode.PrevVisibleNode.IsVisible == false) - tn.PrevVisibleNode.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible } - else + tn.PrevVisibleNode.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible } + else if (tn.PrevVisibleNode != null && tn.PrevVisibleNode.IsVisible == false) - tn.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible + tn.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible retval = (top != tn.Bounds.Top); // if (retval) if(_MyLog.IsInfoEnabled)_MyLog.Info("Scroll"); } @@ -4151,7 +4243,7 @@ namespace Volian.Controls.Library { DragDropEffects ee = e.Effect; if (e.KeyState == 13) // Shift and Control Keys to do a move. - ee = DragDropEffects.Move; + ee = DragDropEffects.Move; else ee = DragDropEffects.None; // Default - Do nothing if (IsChild(dragNode, dl.DropNode)) // Don't copy or move to a child node @@ -4347,28 +4439,28 @@ namespace Volian.Controls.Library 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) { diff --git a/PROMS/Volian.Print.Library/PDFReport.cs b/PROMS/Volian.Print.Library/PDFReport.cs index 39bf29f8..e660630e 100644 --- a/PROMS/Volian.Print.Library/PDFReport.cs +++ b/PROMS/Volian.Print.Library/PDFReport.cs @@ -1688,7 +1688,7 @@ namespace Volian.Print.Library System.Windows.Forms.MessageBox.Show(msg.ToString(), "Error during PDF creation for search:", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation); } - private static string BuildStepTab(ItemInfo item) + public static string BuildStepTab(ItemInfo item) { if (item == null) return string.Empty; -- 2.49.1 From ec8e4c36a4edac5f8277f16443c4ad40298acf0c Mon Sep 17 00:00:00 2001 From: mschill Date: Fri, 11 Jul 2025 15:26:22 -0400 Subject: [PATCH 02/44] C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) RO image resolution for Annotations --- PROMS/Formats/fmtall/EPTST1all.xml | Bin 62412 -> 62450 bytes .../dlgExportImportEP.cs | 273 ++++++++++++------ .../VEPROMS.CSLA.Library/Extension/ItemExt.cs | 240 +++++++-------- .../Format/EPFormatFile.cs | 12 + 4 files changed, 325 insertions(+), 200 deletions(-) diff --git a/PROMS/Formats/fmtall/EPTST1all.xml b/PROMS/Formats/fmtall/EPTST1all.xml index 0c3557429df9140891079c371b19bba5178b941e..148469dde4b4730181ff02c6960ffb2d10d9f3eb 100644 GIT binary patch delta 46 zcmX@}ocYsp<_#`P(y0s;3-]+-[^<>]+[>]"); @@ -66,11 +69,16 @@ namespace VEPROMS string steptab = Volian.Print.Library.PDFReport.BuildStepTab(ii); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "StepTab", steptab)); + //Add db sequence to item + string dbsequence = dbSeq(ii); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dbsequence", dbsequence)); + //get first transition in item and add it as an xml element if (ii.MyContent.ContentTransitionCount > 0) { TransitionInfo ct = ii.MyContent.ContentTransitions[0]; xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "TransitionToItemID", ct.ToID.ToString())); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "TransitionTodbsequence", dbSeq(ct.ToID))); } //export EP annotation details under an EPInfo node @@ -79,110 +87,143 @@ namespace VEPROMS XmlElement xepinfo = xe.OwnerDocument.CreateElement("EPInfo"); EPFields myEPFields = ii.GetValidEPFields(_AnnotationType.TypeID); - ROFSTLookup lookup = ii.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(ii.MyDocVersion); + bool epexportblank = ii.EPexportblank(_AnnotationType.TypeID); //should blank xml elements export? - //For each annotation in the item that is of the current EP Annotation type - foreach (var EPAnnotation in ii.ItemAnnotations.Where(x => x.TypeID == _AnnotationType.TypeID)) - { - var EPAnnotationConfig = new AnnotationConfig(EPAnnotation.Config); - - XmlElement xepdetails = xe.OwnerDocument.CreateElement("Details"); - //include the annotation ID for reference - xepdetails.Attributes.SetNamedItem(AddAttribute(xepdetails.OwnerDocument, "AnnotationID", EPAnnotation.AnnotationID.ToString())); - - //loop through each EP Field - name the xml elements the EP.name - foreach (EPField EP in myEPFields) + //grab the current RO db so will know location of RO files and default graphics ext. + using (RODbInfo myRODB = (RODbInfoList.Get()).FirstOrDefault(x => x.RODbID == ii.MyDocVersion.DocVersionAssociations[0].MyROFst.RODbID)) + { + //For each annotation in the item that is of the current EP Annotation type + foreach (var EPAnnotation in ii.ItemAnnotations.Where(x => x.TypeID == _AnnotationType.TypeID)) { - string val = EPAnnotationConfig.GetValue("EP", EP.name); + var EPAnnotationConfig = new AnnotationConfig(EPAnnotation.Config); - XmlElement xindivid = xe.OwnerDocument.CreateElement(EP.name); + XmlElement xepdetails = xe.OwnerDocument.CreateElement("Details"); + //include the annotation ID for reference + xepdetails.Attributes.SetNamedItem(AddAttribute(xepdetails.OwnerDocument, "AnnotationID", EPAnnotation.AnnotationID.ToString())); - //need to resolve ROs ROSingle, ROMulti, in text - //get values - //should we export blank? - // - switch (EP.type.ToLower()) + //loop through each EP Field - name the xml elements the EP.name + foreach (EPField EP in myEPFields) { - case "text": + string val = EPAnnotationConfig.GetValue("EP", EP.name); - //for text, check if any embedded ROs - //if none, set the xml element to the text - //otherwise resolve the Ros - MatchCollection matches = _ROAccPageTokenPattern.Matches(val); - if (matches.Count == 0) + if (epexportblank || !string.IsNullOrEmpty(val)) + { + XmlElement xindivid = xe.OwnerDocument.CreateElement(EP.name); + + //need to resolve ROs ROSingle, ROMulti, in text + //get values + switch (EP.type.ToLower()) { - xindivid.InnerText = val; - } - else - { - //resolve ROs - //text ROs will replace the AccID key in the text - //for binary objects like images, - //we will keep the AccID in the text and output the binary as a separate child - //XML element with the same xml name as the AccID - foreach (Match m in matches) - { - ROFSTLookup.rochild roc = lookup.GetROChildByAccPageID(m.Groups[1].Value); + case "text": - - if (roc.type == 8) // Exclude replacing Images since are binary - for those, add a sub item + //for text, check if any embedded ROs + //if none, set the xml element to the text + //otherwise resolve the ROs + MatchCollection matches = _ROAccPageTokenPattern.Matches(val); + if (matches.Count == 0) { - XmlElement xroid = xindivid.OwnerDocument.CreateElement(m.Groups[1].Value); - xroid.InnerText = roc.value; - xindivid.AppendChild(xroid); + xindivid.InnerText = val; } - else if (!string.IsNullOrEmpty(roc.value)) + else { - bool convertCaretToDeltaSymbol = (ii.ActiveSection != null) && ii.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta; + //resolve ROs + //text ROs will replace the AccID key in the text + //for binary objects like images, + //we will keep the AccID in the text and output the binary as a separate child + //XML element with the same xml name as the AccID + foreach (Match m in matches) + { + ROFSTLookup.rochild roc = lookup.GetROChildByAccPageID(m.Groups[1].Value); - string rocvalue = roc.value.Replace("`", "\xB0"); - rocvalue = rocvalue.Replace("\xF8", "\xB0"); - rocvalue = rocvalue.Replace("\x7F", "\x394"); //delta - if (convertCaretToDeltaSymbol) rocvalue = rocvalue.Replace("^", "\x394"); // delta - val = val.Replace($"<{m.Groups[1].Value}>", rocvalue); + // Exclude replacing Images since are binary - for those, add a sub item + if (Enumerable.Range(8, 15).Contains(roc.type)) + { + xindivid.InnerText = val; + + XmlElement xroid = AddGraphic(xindivid, m.Groups[1].Value, roc, myRODB, roc.type != 8); + + xindivid.AppendChild(xroid); + } + else if (!string.IsNullOrEmpty(roc.value)) + { + bool convertCaretToDeltaSymbol = (ii.ActiveSection != null) && ii.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta; + + string rocvalue = roc.value.Replace("`", "\xB0"); + rocvalue = rocvalue.Replace("\xF8", "\xB0"); + rocvalue = rocvalue.Replace("\x7F", "\x394"); //delta + if (convertCaretToDeltaSymbol) rocvalue = rocvalue.Replace("^", "\x394"); // delta + val = val.Replace($"<{m.Groups[1].Value}>", rocvalue); + xindivid.InnerText = val; + } + } + } + break; + case "rosingle": + //Get the output columns from the EPFormatFile + //set the "Item" nodes value = to those resolved items + //separated by multiseparator + XmlElement xindivid_rosingle = xindivid.OwnerDocument.CreateElement("Item"); + xindivid_rosingle.Attributes.SetNamedItem(AddAttribute(xindivid_rosingle.OwnerDocument, "ROID", val)); + + //add values specified in EP input list + List ro_single_tmp = EP.getROValuesList(EPAnnotation, val); + xindivid_rosingle.InnerText = String.Join(multiseparator, ro_single_tmp.ToArray()); + + //if image, add location and binary of image + // - images are type 8 + // but if multiple return values could combine + // for example an text (1) + image (8) would be 9 + ROFSTLookup.rochild roc_single = lookup.GetRoChild(val); + if (Enumerable.Range(8, 15).Contains(roc_single.type)) + { + XmlElement xroid = AddGraphic(xindivid, val, roc_single, myRODB, roc_single.type != 8); + xindivid_rosingle.AppendChild(xroid); } - } + xindivid.AppendChild(xindivid_rosingle); + break; + case "romulti": + //Get the output columns from the EPFormatFile + //create an "Item" subnode for each selected RO + //set the nodes value = to those resolved items + //separated by multiseparator + foreach (string ival in val.Split(multiseparator.ToCharArray())) + { + XmlElement xindivid_romulti = xindivid.OwnerDocument.CreateElement("Item"); + xindivid_romulti.Attributes.SetNamedItem(AddAttribute(xindivid_romulti.OwnerDocument, "ROID", ival)); - xindivid.InnerText = val; + //add values specified in EP input list + List ro_multi_tmp = EP.getROValuesList(EPAnnotation, ival); + xindivid_romulti.InnerText = String.Join(multiseparator, ro_multi_tmp.ToArray()); + + //if image, add location and binary of image + // - images are type 8 + // but if multiple return values could combine + // for example an text (1) + image (8) would be 9 + ROFSTLookup.rochild roc_multi = lookup.GetRoChild(ival); + if (Enumerable.Range(8, 15).Contains(roc_multi.type)) + { + XmlElement xroid = AddGraphic(xindivid, ival, roc_multi, myRODB, roc_multi.type != 8); + xindivid_romulti.AppendChild(xroid); + } + + xindivid.AppendChild(xindivid_romulti); + } + break; + case "tableinput": + xindivid.InnerText = val; + break; + default: + xindivid.InnerText = val; + break; } - break; - case "rosingle": - //Get the output columns from the EPFormatFile - //set the "Item" nodes value = to those resolved items - //separated by multiseparator - XmlElement xindivid_rosingle = xindivid.OwnerDocument.CreateElement("Item"); - xindivid_rosingle.Attributes.SetNamedItem(AddAttribute(xindivid_rosingle.OwnerDocument, "ROID", val)); - List ro_single_tmp = EP.getROValuesList(EPAnnotation, val); - xindivid_rosingle.InnerText = String.Join(multiseparator, ro_single_tmp.ToArray()); - xindivid.AppendChild(xindivid_rosingle); - break; - case "romulti": - //Get the output columns from the EPFormatFile - //create an "Item" subnode for each selected RO - //set the nodes value = to those resolved items - //separated by multiseparator - foreach (string ival in val.Split(multiseparator.ToCharArray())) - { - XmlElement xindivid_romulti = xindivid.OwnerDocument.CreateElement("Item"); - xindivid_romulti.Attributes.SetNamedItem(AddAttribute(xindivid_romulti.OwnerDocument, "ROID", ival)); - List ro_multi_tmp = EP.getROValuesList(EPAnnotation, ival); - xindivid_romulti.InnerText = String.Join(multiseparator, ro_multi_tmp.ToArray()); - xindivid.AppendChild(xindivid_romulti); - } - break; - case "tableinput": - xindivid.InnerText = val; - break; - default: - xindivid.InnerText = val; - break; + xepdetails.AppendChild(xindivid); + } } - xepdetails.AppendChild(xindivid); + xepinfo.AppendChild(xepdetails); } - xepinfo.AppendChild(xepdetails); } xe.AppendChild(xepinfo); @@ -190,6 +231,68 @@ namespace VEPROMS } + //return a db sequence string from an Item ID + private string dbSeq(int itemID) + { + using (ItemInfo ii = ItemInfo.Get(itemID)) + { + return dbSeq(ii); + } + } + //return a db sequence string from an ItemInfo + private string dbSeq(ItemInfo ii) + { + return $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.DBSequence}"; + } + + //For Exporting an RO that is an image + //returns an xmlElement + // - that is a child to xindivid + // - that has a name of Name + // - that has a value of the binary representation of the image + // - that has an attribute designating the location of the image file + private XmlElement AddGraphic(XmlElement xindivid, string Name, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) + { + XmlElement xroid = xindivid.OwnerDocument.CreateElement(Name); + string rodbpath = rodb.FolderPath; + + string rocval = roc.value; + if (rocval == null) rocval = Array.Find(roc.children, x => x.value.Contains('.')).value; + + if (rocval == null) return xroid; + string imgname; + if (isMulti) + { + imgname = rocval.Substring(rocval.IndexOf(' ') + 1, rocval.IndexOf("\r\n") - rocval.IndexOf(' ') - 1); + } + else + { + imgname = rocval.Substring(0, rocval.IndexOf('\n')); + } + int thedot = imgname.LastIndexOf('.'); + string fname = imgname; + if (thedot == -1 || (thedot != (imgname.Length - 4))) + { + RODbConfig roDbCfg = new RODbConfig(rodb.Config); + fname += string.Format(".{0}", roDbCfg.GetDefaultGraphicExtension()); + } + + string imgfile = Path.Combine(rodbpath, fname); + xroid.Attributes.SetNamedItem(AddAttribute(xroid.OwnerDocument, "Location", imgfile)); + + if (File.Exists(imgfile)) + { + using (FileStream fsIn = new FileStream(imgfile, FileMode.Open, FileAccess.Read, FileShare.Read)) + { + // Create an instance of StreamReader that can read characters from the FileStream. + using (BinaryReader r = new BinaryReader(fsIn)) + xroid.InnerText = Encoding.Default.GetString(r.ReadBytes((int)fsIn.Length)); + } + } + + return xroid; + } + //clear objects to release memory private void OnClose(object sender, EventArgs e) { diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index b0649cc6..1f1e9a7c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -346,21 +346,21 @@ namespace VEPROMS.CSLA.Library { var ii = _CacheByPrimaryKey.FirstOrDefault(); - while (ii.Value.Count > 0) - { - if (ii.Value[0]?.MyContent?.ContentParts != null) - { foreach (PartInfo pi in ii.Value[0]?.MyContent?.ContentParts) pi.Dispose(); } - ii.Value[0].Dispose(); - } + while (ii.Value.Count > 0) + { + if (ii.Value[0]?.MyContent?.ContentParts != null) + { foreach (PartInfo pi in ii.Value[0]?.MyContent?.ContentParts) pi.Dispose(); } + ii.Value[0].Dispose(); + } _CacheByPrimaryKey.Remove(ii.Key); } while (_CacheList.Count > 0) - { - if (_CacheList[0]?.MyContent?.ContentParts != null) - {foreach (PartInfo pi in _CacheList[0]?.MyContent?.ContentParts) pi.Dispose(); } - _CacheList[0].Dispose(); - } + { + if (_CacheList[0]?.MyContent?.ContentParts != null) + {foreach (PartInfo pi in _CacheList[0]?.MyContent?.ContentParts) pi.Dispose(); } + _CacheList[0].Dispose(); + } } private bool _PrintAllAtOnce = false; @@ -450,86 +450,86 @@ namespace VEPROMS.CSLA.Library StringBuilder sret = new StringBuilder(); ItemInfo pitem = this; while (!pitem.IsSection && !pitem.IsHigh) - { + { using (StepInfo stpinfo = StepInfo.Get(pitem.ItemID)) - { - string thisTab = stpinfo.MyTab.CleanText; + { + string thisTab = stpinfo.MyTab.CleanText; - string typeName = stpinfo.FormatStepData.StepEditData.TypeMenu.MenuItem; + string typeName = stpinfo.FormatStepData.StepEditData.TypeMenu.MenuItem; - if (!string.IsNullOrEmpty(thisTab)) - { - thisTab = thisTab.Trim(); - } + if (!string.IsNullOrEmpty(thisTab)) + { + thisTab = thisTab.Trim(); + } - // if the tab is null or - // if the the tab is not a letter or number OR - // the tab is an AND or OR type and is the letter "o" - // then reset the tab an empty string so that the type name along with the count of that type - // (ex. "AND 2", "OR 3") - if (string.IsNullOrEmpty(thisTab) || (thisTab != string.Empty && (!(char.IsLetterOrDigit(thisTab[0])) || ((pitem.IsAnd || pitem.IsOr || pitem.IsCaution || pitem.IsNote) && thisTab.Contains("o"))))) - { - thisTab = string.Empty; - } + // if the tab is null or + // if the the tab is not a letter or number OR + // the tab is an AND or OR type and is the letter "o" + // then reset the tab an empty string so that the type name along with the count of that type + // (ex. "AND 2", "OR 3") + if (string.IsNullOrEmpty(thisTab) || (thisTab != string.Empty && (!(char.IsLetterOrDigit(thisTab[0])) || ((pitem.IsAnd || pitem.IsOr || pitem.IsCaution || pitem.IsNote) && thisTab.Contains("o"))))) + { + thisTab = string.Empty; + } - if (pitem.IsRNOPart) - { - if (string.IsNullOrEmpty(thisTab)) - { - sret.Insert(0, "RNO."); - } - else - { - thisTab = thisTab.Trim(); + if (pitem.IsRNOPart) + { + if (string.IsNullOrEmpty(thisTab)) + { + sret.Insert(0, "RNO."); + } + else + { + thisTab = thisTab.Trim(); - if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")")) - { - thisTab += "."; - } + if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")")) + { + thisTab += "."; + } - sret.Insert(0, "RNO." + thisTab); - } - } - else if (pitem.IsCaution || pitem.IsNote) - { - // add the Caution or Note count to the tab (ex "Caution 1", "Note 2") - if (string.IsNullOrEmpty(thisTab)) - { - sret.Append("{" + typeName + " " + pitem.Ordinal.ToString() + "}"); - } - else - { - thisTab = thisTab.Trim(" ".ToCharArray()); - sret.Append(thisTab + " " + pitem.Ordinal.ToString() + sret); - } - } - else - { - if (!string.IsNullOrEmpty(thisTab)) - { - thisTab = thisTab.Trim(" ".ToCharArray()); + sret.Insert(0, "RNO." + thisTab); + } + } + else if (pitem.IsCaution || pitem.IsNote) + { + // add the Caution or Note count to the tab (ex "Caution 1", "Note 2") + if (string.IsNullOrEmpty(thisTab)) + { + sret.Append("{" + typeName + " " + pitem.Ordinal.ToString() + "}"); + } + else + { + thisTab = thisTab.Trim(" ".ToCharArray()); + sret.Append(thisTab + " " + pitem.Ordinal.ToString() + sret); + } + } + else + { + if (!string.IsNullOrEmpty(thisTab)) + { + thisTab = thisTab.Trim(" ".ToCharArray()); - if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")")) - { - thisTab += "."; - } - } - else - { - thisTab = "{" + typeName + " " + pitem.Ordinal.ToString() + "}."; - } + if (!thisTab.EndsWith(".") && !thisTab.EndsWith(")")) + { + thisTab += "."; + } + } + else + { + thisTab = "{" + typeName + " " + pitem.Ordinal.ToString() + "}."; + } - sret.Insert(0, thisTab); - } - } + sret.Insert(0, thisTab); + } + } - pitem = pitem.ActiveParent as ItemInfo; + pitem = pitem.ActiveParent as ItemInfo; - if (pitem == null) - break; - } + if (pitem == null) + break; + } - return sret.ToString().Trim(" .)".ToCharArray()); + return sret.ToString().Trim(" .)".ToCharArray()); } public void SetHeader(VE_Font myFont, string myText) @@ -574,11 +574,11 @@ namespace VEPROMS.CSLA.Library } _MyPrevious = null; // Reset list so that the next line gets a new list if (MyPrevious != null) MyPrevious.RefreshNextItems(); // Update List for new value - //if (_ContentID != tmp.ContentID) - //{ + //if (_ContentID != tmp.ContentID) + //{ if (MyContent != null) MyContent.RefreshContentItems(); // Update List for old value _ContentID = tmp.ContentID; // Update the value - //} + //} _MyContent = null; // Reset list so that the next line gets a new list if (MyContent != null) MyContent.RefreshContentItems(); // Update List for new value _DTS = tmp.DTS; @@ -674,12 +674,12 @@ namespace VEPROMS.CSLA.Library } } } - + internal static void SetParentSectionAndDocVersion(ItemInfo itemInfo, IVEDrillDownReadOnly itemParent, SectionInfo sectionInfo, ProcedureInfo procInfo, DocVersionInfo docVersionInfo, bool isAutomatic = false) { // B2022-107: Display Progress Bar Messages/Statuses when a new ROFST binary file is loaded into the database // Added Optional Parameter "bool isAutomatic = false" to disable the RofstLoadingStatus pop-up screen when printing baselines - + if (itemInfo == null) return; itemInfo.LoadAllAtOnce = true; itemInfo.ActiveParent = itemParent; @@ -721,7 +721,7 @@ namespace VEPROMS.CSLA.Library } } } - + /// /// The following method is used only in print because the 'printed' data is loaded into /// memory before printing. Find the next item from memory (do not go out to database). @@ -784,7 +784,7 @@ namespace VEPROMS.CSLA.Library { bool forceConvertToText = false; TranCheckCount++; - + if (!forceConvertToText) { if (traninfo.MyItemToID.ActiveSection != null) @@ -802,7 +802,7 @@ namespace VEPROMS.CSLA.Library content.FixTransitionText(traninfo, true); content.Save(); } - } + } } // B2025-020 Null Reference fix. Added check for valid index into the TransitionTypeList if (!forceConvertToText) @@ -812,7 +812,7 @@ namespace VEPROMS.CSLA.Library forceConvertToText = true; TranFixCount++; itemInfo.MyContent.FixTransitionText(traninfo, itemInfo, "Reason for Change: Transition type is not available"); - using (Content content = Content.Get(itemInfo.MyContent.ContentID)) + using (Content content = Content.Get(itemInfo.MyContent.ContentID)) { content.FixTransitionText(traninfo, true); content.Save(); @@ -835,14 +835,14 @@ namespace VEPROMS.CSLA.Library content.FixTransitionText(traninfo, true); content.Save(); } - } + } } } } if (!forceConvertToText) { - if (itemInfo.MyDocVersion != null && traninfo.MyItemToID.MyDocVersion != null && itemInfo.MyDocVersion.VersionID != traninfo.MyItemToID.MyDocVersion.VersionID) //different doc version + if (itemInfo.MyDocVersion != null && traninfo.MyItemToID.MyDocVersion != null && itemInfo.MyDocVersion.VersionID != traninfo.MyItemToID.MyDocVersion.VersionID) //different doc version { if (!itemInfo.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[traninfo.TranType].TransMenu.Contains("Proc")) //internal format { @@ -903,7 +903,7 @@ namespace VEPROMS.CSLA.Library if (itemInfo.MyContent.Text.Contains("Link:Transition")) { Content content = Content.Get(itemInfo.MyContent.ContentID); - + if (itemInfo.MyContent.ContentTransitions != null) { foreach (TransitionInfo ct in itemInfo.MyContent.ContentTransitions) @@ -913,7 +913,7 @@ namespace VEPROMS.CSLA.Library } itemInfo.MyContent.RefreshContentTransitions(); - + while (content.Text.Contains("Link:Transition")) { TranCheckCount++; @@ -931,7 +931,7 @@ namespace VEPROMS.CSLA.Library else // B2018-043 Eliminate infinite loop for invalid transition structure { // Add annotation for Invalid Transition - AddInvalidTransitionAnnotation(itemInfo,"Invalid Transition Format"); + AddInvalidTransitionAnnotation(itemInfo, "Invalid Transition Format"); break; } } @@ -984,16 +984,16 @@ namespace VEPROMS.CSLA.Library ContentInfo myContent = itemInfo.MyContent; string txt = myContent.Text; string regDelete = @"(\\v |)\(\\v0 |)"; - string txt2=txt; + string txt2 = txt; - do{ + do { txt = txt2; txt2 = Regex.Replace(txt, regDelete, ""); - } while(txt2 != txt); + } while (txt2 != txt); - if(txt2 != myContent.Text) + if (txt2 != myContent.Text) { - using(Content tmp = myContent.Get()) + using (Content tmp = myContent.Get()) { tmp.Text = txt2; tmp.Save(); @@ -1001,7 +1001,7 @@ namespace VEPROMS.CSLA.Library AddInvalidTransitionAnnotation(itemInfo, "Removed Empty Transition Text"); } } - + private static bool IsTransitionToNonEditable(TransitionInfo ti) { foreach (TransitionInfo til in TransitionsToNonEditable) @@ -1032,7 +1032,7 @@ namespace VEPROMS.CSLA.Library public static int ROCheckCount = 0; public static int ROFixCount = 0; private static AnnotationType _VolianCommentType = null; // Using this to flag ro value issues with byron to braidwood - + public static AnnotationType VolianCommentType { get @@ -1065,7 +1065,7 @@ namespace VEPROMS.CSLA.Library string roval = lookup.GetTranslatedRoValue(rousage.ROID, this.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, this.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false, this); ROFSTLookup.rochild roch = lookup.GetRoChild(rousage.ROID); - + this.MyContent.FixContentText(rousage, roval, roch.type, rofstinfo, this); string newText = this.MyContent.Text; @@ -1263,7 +1263,7 @@ namespace VEPROMS.CSLA.Library } } } - + public static string GetCombinedTab(ItemInfo itemInfo, string parTab) { string pTab = parTab == null ? "" : parTab; @@ -1276,7 +1276,7 @@ namespace VEPROMS.CSLA.Library // for supplemental information, bulleted tabs need to be included in the tab. The 'isletterordigit' should not occur for supinfo items - // and this includes the parent of the supinfo since that is the tab used for supinfo concatenated with its parent. (B2017-120) // // B2020-154: Added check for the tab to start with '(', tabs that started with this were not included in the combined tab - if (thisTab != null && thisTab != "" && (!char.IsLetterOrDigit(thisTab[0]) && thisTab[0] != '(') && !vcbHeaderCheck && !itemInfo.IsInSupInfo && (itemInfo.SupInfos == null || itemInfo.SupInfos.Count <= 0 )) return pTab; + if (thisTab != null && thisTab != "" && (!char.IsLetterOrDigit(thisTab[0]) && thisTab[0] != '(') && !vcbHeaderCheck && !itemInfo.IsInSupInfo && (itemInfo.SupInfos == null || itemInfo.SupInfos.Count <= 0)) return pTab; if (itemInfo.FormatStepData.NumberWithLevel) pTab = itemInfo.MyHLS.MyTab.CleanText.Trim(); // if the parent tab ends with a alphanumeric and this tab is alphanumeric, add a '.' to separate them // also, include use the separator for bullets if doing the supplemental information tab (B2017-120) @@ -1285,7 +1285,7 @@ namespace VEPROMS.CSLA.Library if (ms && mn) pTab = pTab.TrimEnd() + "."; // remove ending '.' (if this is a hls, don't remove the '.') if (!itemInfo.IsHigh && thisTab.EndsWith(".")) thisTab = thisTab.Substring(0, thisTab.Length - 1); - if (itemInfo.HasParentTab) return thisTab.Trim(); // F2020-023: if tab includes parent tab already, don't concatenate it + if (itemInfo.HasParentTab) return thisTab.Trim(); // F2020-023: if tab includes parent tab already, don't concatenate it return pTab + thisTab.Trim(); } @@ -1341,8 +1341,8 @@ namespace VEPROMS.CSLA.Library // B2023-037: loading print text, resolve the RO symbols bool GTLT = !itemInfo.IsTable && sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertGTELTEPMinROValue; - bool GLTArrows = !itemInfo.IsTable && sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseDashGreaterLessThenForArrowsInROValue; - string roval = lookup.GetTranslatedRoValue(rousage.ROID, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, GTLT || GLTArrows, itemInfo); + bool GLTArrows = !itemInfo.IsTable && sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseDashGreaterLessThenForArrowsInROValue; + string roval = lookup.GetTranslatedRoValue(rousage.ROID, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, sectionInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, GTLT || GLTArrows, itemInfo); ROFSTLookup.rochild roch = lookup.GetRoChild(rousage.ROID); itemInfo.MyContent.FixContentText(rousage, roval, roch.type, rofstinfo, itemInfo); } @@ -1367,7 +1367,7 @@ namespace VEPROMS.CSLA.Library } } } - + if (itemInfo.MyContent.ContentTransitionCount > 0) { foreach (TransitionInfo traninfo in itemInfo.MyContent.ContentTransitions) @@ -1440,14 +1440,14 @@ namespace VEPROMS.CSLA.Library private float _MSWordPageCount = 0; public float MSWordPageCount { - get { + get { if (_MSWordPageCount == 0) // C2018-011 Get the proper word page count from the saved pdf attachment if (MyContent.MyEntry != null && MyContent.MyEntry.MyDocument != null) { PdfInfo pi = PdfInfo.Get(this, false); - if(pi != null) _MSWordPageCount = (float)pi.PageCount;// B2018-071 Don't crash on invalid MS Word section + if (pi != null) _MSWordPageCount = (float)pi.PageCount;// B2018-071 Don't crash on invalid MS Word section } - return _MSWordPageCount; + return _MSWordPageCount; } set { _MSWordPageCount = value; } } @@ -1649,7 +1649,7 @@ namespace VEPROMS.CSLA.Library // the addition of the parent.IsNote, the note was breaking between 2 ANDs (the 1st AND was a // steplevel of 5, but the 2nd was a steplevel of 4). If something similar is seen with Cautions, // that check could be added. - if (!item.IsRNOPart && !item.IsHigh && (item.MyPrevious == null || (((item.ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.EnhancedBackgrounds) != E_PurchaseOptions.EnhancedBackgrounds) + if (!item.IsRNOPart && !item.IsHigh && (item.MyPrevious == null || (((item.ActiveFormat.PlantFormat.FormatData.PurchaseOptions & E_PurchaseOptions.EnhancedBackgrounds) != E_PurchaseOptions.EnhancedBackgrounds) && item.MyParent != null && item.MyParent.IsNote))) level += firstInc; else @@ -1716,7 +1716,7 @@ namespace VEPROMS.CSLA.Library } return maxRNOLevel; } - + } private bool ParentAndOr { @@ -1767,7 +1767,7 @@ namespace VEPROMS.CSLA.Library RemoveEnhancedFromConfig(false); } - public void RemoveEnhancedFromConfig(bool doOneStepOnly) + public void RemoveEnhancedFromConfig(bool doOneStepOnly) { XmlDocument xd = new XmlDocument(); if (this.MyContent.Config == null || this.MyContent.Config == "") return; // B2017-164 & B2017-172 check for null or empty config @@ -1782,7 +1782,7 @@ namespace VEPROMS.CSLA.Library ctmp.Config = config; ctmp.Save(); ContentInfo.Refresh(ctmp); - _MyConfig = null; // refresh the memory value + _MyConfig = null; // refresh the memory value } } if (doOneStepOnly) return; @@ -2071,7 +2071,7 @@ namespace VEPROMS.CSLA.Library { bool rval = false; ItemInfo itm = this; - while (itm != null &&!itm.IsHigh && !rval) + while (itm != null && !itm.IsHigh && !rval) { rval = itm.IsCautionOrNotePart; if (!rval) itm = itm.MyParent; @@ -2111,6 +2111,16 @@ namespace VEPROMS.CSLA.Library return (sd.Type == type); } + // C2025-024 - Electronic Procedures - Export + //return if should export blanks + public bool EPexportblank(int AnnTypeID) + { + if (ActiveFormat.PlantFormat.EPFormatFiles.Count == 0 || !ActiveFormat.PlantFormat.EPFormatFiles.Exists(x => x.AnnotationTypeID == AnnTypeID)) + return true; + else + return ActiveFormat.PlantFormat.EPFormatFiles.Find(x => x.AnnotationTypeID == AnnTypeID).exportblank; + } + // C2025-023 - Electronic Procedures - Modifications to PROMS //return EPFields that match this step type or a parent step type public EPFields GetValidEPFields(int AnnTypeID) diff --git a/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs b/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs index 0d2253d2..84b71cc6 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs @@ -61,6 +61,18 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _AnnotationTypeID, "@AnnotationTypeID"); } } + //if xml value is blank, should element export? + //defaults to true + private LazyLoad _exportblank; + [DisplayName("exportblank")] + [Description("if xml value is blank, should element export?")] + public bool exportblank + { + get + { + return LazyLoad(ref _exportblank, "@exportblank"); + } + } // returns a list of fields that are defined in the EP format's structure private EPFields _FieldList; public EPFields FieldList -- 2.49.1 From e08b5cde69f63265bc56a64917fc169cfbebbc86 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Fri, 11 Jul 2025 16:08:14 -0400 Subject: [PATCH 03/44] C2025-027-AnnotationsTypeSelect --- .../DlgAnnotationsSelect.cs | 178 ++ .../DlgAnnotationsSelect.resx | 120 + PROMS/VEPROMS User Interface/PROMSFixes.Sql | 124 +- .../VEPROMS User Interface/VEPROMS_UI.csproj | 11 + .../dlgAnnotationsSelect.Designer.cs | 190 ++ .../frmSysOptions.Designer.cs | 2574 +++++++++-------- PROMS/VEPROMS User Interface/frmSysOptions.cs | 21 +- .../frmVEPROMS.Designer.cs | 9 +- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 33 +- .../Generated/AnnotationAuditInfoList.cs | 2 +- .../Generated/AnnotationAuditInfoList_bak.cs | 226 ++ .../Minimal/AnnotationstypeSections.cs | 463 +++ .../VEPROMS.CSLA.Library.csproj | 1 + .../AnnotationDetails.cs | 9 +- PROMS/Volian.Controls.Library/vlnTreeView.cs | 29 +- 15 files changed, 2717 insertions(+), 1273 deletions(-) create mode 100644 PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs create mode 100644 PROMS/VEPROMS User Interface/DlgAnnotationsSelect.resx create mode 100644 PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs create mode 100644 PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList_bak.cs create mode 100644 PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs new file mode 100644 index 00000000..3dadbffd --- /dev/null +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using VEPROMS.CSLA.Library; + +namespace VEPROMS +{ + // C2025-027 Annotation Type Filtering + public partial class DlgAnnotationsSelect : Form + { + int AnnotationTypeID; + string AnnotationNameStr = ""; + + public DlgAnnotationsSelect() + { + InitializeComponent(); + } + + public DlgAnnotationsSelect(string userid) + { + InitializeComponent(); + //MyItemID = pi.ItemID; + UserID = userid; + } + + private int _MyItemID; + public int MyItemID + { + get { return _MyItemID; } + set { _MyItemID = value; } + } + + private string _UserID; + public string UserID + { + get { return _UserID; } + set { _UserID = value; } + } + + private void btnSelect_Click(object sender, EventArgs e) + { + MoveSelectedItems(lstUnselected, lstSelected); + } + + // Move selected items to lstUnselected. + private void btnDeselect_Click(object sender, EventArgs e) + { + MoveSelectedItems(lstSelected, lstUnselected); + } + + // Move selected items from one ListBox to another. + private void MoveSelectedItems(ListBox lstFrom, ListBox lstTo) + { + while (lstFrom.SelectedItems.Count > 0) + { + lstSelected.DisplayMember = "NameStr"; + lstSelected.ValueMember = "TypeID"; + + AnnotataionItem item = (AnnotataionItem)lstFrom.SelectedItems[0]; + lstTo.Items.Add(new AnnotataionItem(item.NameStr, item.TypeID)); + lstFrom.Items.Remove(item); + } + SetButtonsEditable(); + } + + // Move all items to lstSelected. + private void btnSelectAll_Click(object sender, EventArgs e) + { + MoveAllItems(lstUnselected, lstSelected); + } + + // Move all items to lstUnselected. + private void btnDeselectAll_Click(object sender, EventArgs e) + { + MoveAllItems(lstSelected, lstUnselected); + } + + // Move all items from one ListBox to another. + private void MoveAllItems(ListBox lstFrom, ListBox lstTo) + { + lstTo.Items.AddRange(lstFrom.Items); + lstFrom.Items.Clear(); + SetButtonsEditable(); + } + + // Enable and disable buttons. + private void lst_SelectedIndexChanged(object sender, EventArgs e) + { + SetButtonsEditable(); + } + // Save selected list to DB. + private void btnUpdate_Click(object sender, EventArgs e) + { + int dltFlg = 1; + + foreach (AnnotataionItem item in lstSelected.Items.OfType()) + { + lstSelected.DisplayMember = "NameStr"; + lstSelected.ValueMember = "TypeID"; + + AnnotationTypeID = item.TypeID; + AnnotationNameStr = item.NameStr; + + VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(UserID, AnnotationTypeID, dltFlg, AnnotationNameStr); + dltFlg = 0; + } + } + public class AnnotataionItem + { + private string _NameStr; + private int _TypeID; + + public AnnotataionItem(string NameStr, int TypeID) + { + this._NameStr = NameStr; + this._TypeID = TypeID; + } + public string NameStr + { + get + { + return _NameStr; + } + } + public int TypeID + { + get + { + return _TypeID; + } + } + } + + // Enable and disable buttons. + private void SetButtonsEditable() + { + btnSelect.Enabled = (lstUnselected.SelectedItems.Count > 0); + btnSelectAll.Enabled = (lstUnselected.Items.Count > 0); + btnDeselect.Enabled = (lstSelected.SelectedItems.Count > 0); + btnDeselectAll.Enabled = (lstSelected.Items.Count > 0); + } + + private void DlgAnnotationsSelect_Load(object sender, EventArgs e) + { + lstUnselected.DisplayMember = "NameStr"; + lstUnselected.ValueMember = "TypeID"; + SetButtonsEditable(); + DataTable AnnoType = AnnotationstypeSelections.GetAnnoTypes(UserID); + foreach (DataRow dr in AnnoType.Rows) + { + lstUnselected.Items.Add(new AnnotataionItem(dr["Name"].ToString(), (int)dr["TypeID"])); + } + + lstSelected.DisplayMember = "NameStr"; + lstSelected.ValueMember = "TypeID"; + DataTable lstSelectedTbl = VEPROMS.CSLA.Library.AnnotationstypeSelections.Retrieve(UserID); + if (lstSelectedTbl.Rows.Count > 0) + { + foreach (DataRow lstSelectedRow in lstSelectedTbl.Rows) + { + lstSelected.Items.Add(new AnnotataionItem(lstSelectedRow["Name"].ToString(), (int)lstSelectedRow["TypeID"])); + } + } + } + + private void btnCancel_Click_1(object sender, EventArgs e) + { + this.Close(); + } + } +} + diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.resx b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index d97734f5..0beebdf6 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24035,6 +24035,7 @@ Begin -- Rofst Tables End Go + IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[vesp_UpdateEPFormat]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) DROP PROCEDURE [vesp_UpdateEPFormat]; GO @@ -24075,6 +24076,125 @@ ELSE GO +-- C2025-027 Annotation Type Filtering +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAnnotationSelectListTypes]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getAnnotationSelectListTypes]; +GO + +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO + +-- ============================================= +-- Author: Paul Larsen +-- Create date: 7/10/2025 +-- Description: Retrieve Annotation Types not added to Annotation type filtering by user. +-- ============================================= +CREATE PROCEDURE [dbo].[getAnnotationSelectListTypes] +( + @UserID varchar(50) +) +WITH EXECUTE AS OWNER +AS + SELECT + [TypeID], + [Name], + [Config], + [DTS], + [UserID], + [LastChanged], + (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount] + --[IsEPAnnotationType] + FROM [AnnotationTypes] --A + --JOIN AnnotationTypeSelections S ON S.TypeID = A.TypeID + WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections WHERE UsrID = @UserID) --S.ItemID = @ItemID AND S.TypeID != A.TypeID + + RETURN + +GO + +-- C2025-027 Annotation Type Filtering +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAnnotationstypeSelections]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getAnnotationstypeSelections]; +GO + +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +-- ============================================= +-- Author: Paul Larsen +-- Create date: 07/10/2025 +-- Description: Retrieve Current Annotation Types +-- ============================================= + +CREATE PROC [dbo].[getAnnotationstypeSelections] +( + @UsrID varchar(50) +) +AS +BEGIN + IF((SELECT TypeID FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0) + BEGIN + SELECT [ASTypeID] + ,[TypeID] + ,[UsrID] + ,[Name] + ,[Config] + ,[DTS] + ,[UserID] + ,[IsEPAnnotationType] + FROM [dbo].[AnnotationTypeSelections] + WHERE UsrID = @UsrID + END + ELSE + BEGIN + SELECT + [TypeID], + [Name], + [Config], + [DTS], + [UserID], + [LastChanged], + (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]=[AnnotationTypes].[TypeID]) [AnnotationCount], + [IsEPAnnotationType] + FROM [AnnotationTypes] + END +END +GO + +-- C2025-027 Annotation Type Filtering +IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AnnotationTypeSelections]') AND type in (N'U')) +DROP TABLE [dbo].[AnnotationTypeSelections] +GO + +/****** Object: Table [dbo].[AnnotationTypeSelections] Script Date: 7/10/2025 2:38:23 PM ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +-- ============================================= +-- Author: Paul Larsen +-- Create date: 07/10/2025 +-- Description: Store user Annotation selections for annotation filter. +-- ============================================= + +CREATE TABLE [dbo].[AnnotationTypeSelections]( + [ASTypeID] [int] IDENTITY(1,1) NOT NULL, + [TypeID] [int] NULL, + [UsrID] [varchar](50) NULL, + [Name] [nvarchar](100) NOT NULL, + [Config] [nvarchar](max) NULL, + [DTS] [datetime] NOT NULL, + [UserID] [nvarchar](100) NOT NULL, + [LastChanged] [timestamp] NOT NULL, + [IsEPAnnotationType] [bit] NOT NULL +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + IF (@@Error = 0) PRINT 'Running vesp_UpdateEPFormat Succeeded' ELSE PRINT 'Running vesp_UpdateEPFormat Failed to Execute' GO @@ -24117,8 +24237,8 @@ BEGIN TRY -- Try Block DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '6/20/2025 3:07 PM' - set @RevDescription = 'Annotation Support' + set @RevDate = '07/10/2025 2:30 PM' + set @RevDescription = 'C2025-027 Annotation Type Filtering' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription diff --git a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj index 856bf9c4..69f53336 100644 --- a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj +++ b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj @@ -152,6 +152,12 @@ AboutVEPROMS.cs + + Form + + + DlgAnnotationsSelect.cs + Form @@ -337,6 +343,11 @@ Designer AboutVEPROMS.cs + + DlgAnnotationsSelect.cs + ResXFileCodeGenerator + DlgAnnotationsSelect1.Designer.cs + dlgMSWordMessage.cs diff --git a/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs new file mode 100644 index 00000000..b3d06b00 --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs @@ -0,0 +1,190 @@ + +namespace VEPROMS +{ + partial class DlgAnnotationsSelect + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lstUnselected = new System.Windows.Forms.ListBox(); + this.lstSelected = new System.Windows.Forms.ListBox(); + this.btnSelect = new System.Windows.Forms.Button(); + this.btnSelectAll = new System.Windows.Forms.Button(); + this.btnDeselectAll = new System.Windows.Forms.Button(); + this.btnDeselect = new System.Windows.Forms.Button(); + this.btnUpdate = new System.Windows.Forms.Button(); + this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.btnCancel = new System.Windows.Forms.Button(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // lstUnselected + // + this.lstUnselected.Dock = System.Windows.Forms.DockStyle.Fill; + this.lstUnselected.FormattingEnabled = true; + this.lstUnselected.IntegralHeight = false; + this.lstUnselected.Location = new System.Drawing.Point(3, 3); + this.lstUnselected.Name = "lstUnselected"; + this.tableLayoutPanel1.SetRowSpan(this.lstUnselected, 4); + this.lstUnselected.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; + this.lstUnselected.Size = new System.Drawing.Size(287, 394); + this.lstUnselected.TabIndex = 0; + this.lstUnselected.SelectedIndexChanged += new System.EventHandler(this.lst_SelectedIndexChanged); + // + // lstSelected + // + this.lstSelected.Dock = System.Windows.Forms.DockStyle.Fill; + this.lstSelected.FormattingEnabled = true; + this.lstSelected.IntegralHeight = false; + this.lstSelected.Location = new System.Drawing.Point(334, 3); + this.lstSelected.Name = "lstSelected"; + this.tableLayoutPanel1.SetRowSpan(this.lstSelected, 4); + this.lstSelected.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; + this.lstSelected.Size = new System.Drawing.Size(288, 394); + this.lstSelected.TabIndex = 1; + this.lstSelected.SelectedIndexChanged += new System.EventHandler(this.lst_SelectedIndexChanged); + // + // btnSelect + // + this.btnSelect.Anchor = System.Windows.Forms.AnchorStyles.None; + this.btnSelect.Location = new System.Drawing.Point(298, 38); + this.btnSelect.Name = "btnSelect"; + this.btnSelect.Size = new System.Drawing.Size(28, 23); + this.btnSelect.TabIndex = 2; + this.btnSelect.Text = ">"; + this.btnSelect.UseVisualStyleBackColor = true; + this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click); + // + // btnSelectAll + // + this.btnSelectAll.Anchor = System.Windows.Forms.AnchorStyles.None; + this.btnSelectAll.Location = new System.Drawing.Point(298, 138); + this.btnSelectAll.Name = "btnSelectAll"; + this.btnSelectAll.Size = new System.Drawing.Size(28, 23); + this.btnSelectAll.TabIndex = 3; + this.btnSelectAll.Text = ">>"; + this.btnSelectAll.UseVisualStyleBackColor = true; + this.btnSelectAll.Click += new System.EventHandler(this.btnSelectAll_Click); + // + // btnDeselectAll + // + this.btnDeselectAll.Anchor = System.Windows.Forms.AnchorStyles.None; + this.btnDeselectAll.Location = new System.Drawing.Point(298, 238); + this.btnDeselectAll.Name = "btnDeselectAll"; + this.btnDeselectAll.Size = new System.Drawing.Size(28, 23); + this.btnDeselectAll.TabIndex = 5; + this.btnDeselectAll.Text = "<<"; + this.btnDeselectAll.UseVisualStyleBackColor = true; + this.btnDeselectAll.Click += new System.EventHandler(this.btnDeselectAll_Click); + // + // btnDeselect + // + this.btnDeselect.Anchor = System.Windows.Forms.AnchorStyles.None; + this.btnDeselect.Location = new System.Drawing.Point(298, 338); + this.btnDeselect.Name = "btnDeselect"; + this.btnDeselect.Size = new System.Drawing.Size(28, 23); + this.btnDeselect.TabIndex = 4; + this.btnDeselect.Text = "<"; + this.btnDeselect.UseVisualStyleBackColor = true; + this.btnDeselect.Click += new System.EventHandler(this.btnDeselect_Click); + // + // btnUpdate + // + this.btnUpdate.Anchor = System.Windows.Forms.AnchorStyles.None; + this.btnUpdate.Location = new System.Drawing.Point(536, 422); + this.btnUpdate.Name = "btnUpdate"; + this.btnUpdate.Size = new System.Drawing.Size(100, 35); + this.btnUpdate.TabIndex = 8; + this.btnUpdate.Text = "Update"; + this.btnUpdate.UseVisualStyleBackColor = true; + this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel1.ColumnCount = 3; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 38F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); + this.tableLayoutPanel1.Controls.Add(this.lstUnselected, 0, 0); + this.tableLayoutPanel1.Controls.Add(this.lstSelected, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.btnDeselect, 1, 3); + this.tableLayoutPanel1.Controls.Add(this.btnDeselectAll, 1, 2); + this.tableLayoutPanel1.Controls.Add(this.btnSelect, 1, 0); + this.tableLayoutPanel1.Controls.Add(this.btnSelectAll, 1, 1); + this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 4; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(625, 400); + this.tableLayoutPanel1.TabIndex = 6; + // + // btnCancel + // + this.btnCancel.Location = new System.Drawing.Point(411, 422); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(100, 35); + this.btnCancel.TabIndex = 9; + this.btnCancel.Text = "Close"; + this.btnCancel.UseVisualStyleBackColor = true; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click_1); + // + // DlgAnnotationsSelect + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(653, 466); + this.Controls.Add(this.btnCancel); + this.Controls.Add(this.tableLayoutPanel1); + this.Controls.Add(this.btnUpdate); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "DlgAnnotationsSelect"; + this.Text = "Select Annotation Types"; + this.Load += new System.EventHandler(this.DlgAnnotationsSelect_Load); + this.tableLayoutPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.ListBox lstUnselected; + private System.Windows.Forms.ListBox lstSelected; + private System.Windows.Forms.Button btnSelect; + private System.Windows.Forms.Button btnSelectAll; + private System.Windows.Forms.Button btnDeselectAll; + private System.Windows.Forms.Button btnDeselect; + private System.Windows.Forms.Button btnUpdate; + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Button btnCancel; + + } +} \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs index d86ed122..bbb2e6cc 100644 --- a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs @@ -28,1267 +28,1324 @@ namespace VEPROMS /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSysOptions)); - this.btnCancel = new DevComponents.DotNetBar.ButtonX(); - this.btnOK = new DevComponents.DotNetBar.ButtonX(); - this.gpSystemColor = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbRibonBlack = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbRibonSilver = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbRibonBlue = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.panButtons = new DevComponents.DotNetBar.PanelEx(); - this.btnIntrFaceStngs = new DevComponents.DotNetBar.ButtonX(); - this.btnStartMsg = new DevComponents.DotNetBar.ButtonX(); - this.btnGeneral = new DevComponents.DotNetBar.ButtonX(); - this.tcSysOpts = new DevComponents.DotNetBar.TabControl(); - this.tabControlPanel3 = new DevComponents.DotNetBar.TabControlPanel(); - this.gpOpenTabs = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbOTRemember = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbOTAutoOpen = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpShwRplWords = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbShwRplWrdsColor = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpVisioPath = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.txbxVisioPath = new DevComponents.DotNetBar.Controls.TextBoxX(); - this.gpSeparateWindows = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbSeparateWindows = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpEnhancedDocs = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbEnhancedDocumentSync = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpPasteSettings = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbPastePlainText = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbPasteNoReturns = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpTreeView = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbTVExpand = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpStepTypeToolTip = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbStepTypeToolTip = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpAnnotationSettings = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbAnnotationPopup = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpTransRangeColor = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.colorPickerButton1 = new DevComponents.DotNetBar.ColorPickerButton(); - this.gpPropPageStyle = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.cbPropGrid = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbTabbedIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbButtonIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.tiIntrFaceStngs = new DevComponents.DotNetBar.TabItem(this.components); - this.tabControlPanel1 = new DevComponents.DotNetBar.TabControlPanel(); - this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components); - this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel(); - this.tiStUpMsg = new DevComponents.DotNetBar.TabItem(this.components); - this.cbUCFLForSetOnly = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbUCFLUseAll = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbUCFLOnlyImport = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbUCFLNotUsed = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.cbUCFIgnore = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.btnReset = new DevComponents.DotNetBar.ButtonX(); - this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip(); - this.cbMSWordPrompt = new DevComponents.DotNetBar.Controls.CheckBoxX(); - this.gpMSWordSum = new DevComponents.DotNetBar.Controls.GroupPanel(); - this.gpSystemColor.SuspendLayout(); - this.panButtons.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).BeginInit(); - this.tcSysOpts.SuspendLayout(); - this.tabControlPanel3.SuspendLayout(); - this.gpOpenTabs.SuspendLayout(); - this.gpShwRplWords.SuspendLayout(); - this.gpVisioPath.SuspendLayout(); - this.gpSeparateWindows.SuspendLayout(); - this.gpEnhancedDocs.SuspendLayout(); - this.gpPasteSettings.SuspendLayout(); - this.gpTreeView.SuspendLayout(); - this.gpStepTypeToolTip.SuspendLayout(); - this.gpAnnotationSettings.SuspendLayout(); - this.gpTransRangeColor.SuspendLayout(); - this.gpPropPageStyle.SuspendLayout(); - this.gpMSWordSum.SuspendLayout(); - this.SuspendLayout(); - // - // btnCancel - // - this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(616, 591); - this.btnCancel.Margin = new System.Windows.Forms.Padding(2); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(56, 19); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "Cancel"; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); - // - // btnOK - // - this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnOK.Location = new System.Drawing.Point(542, 591); - this.btnOK.Margin = new System.Windows.Forms.Padding(2); - this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(56, 19); - this.btnOK.TabIndex = 1; - this.btnOK.Text = "OK"; - this.btnOK.Click += new System.EventHandler(this.btnOK_Click); - // - // gpSystemColor - // - this.gpSystemColor.BackColor = System.Drawing.Color.Transparent; - this.gpSystemColor.CanvasColor = System.Drawing.Color.Transparent; - this.gpSystemColor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpSystemColor.Controls.Add(this.cbRibonBlack); - this.gpSystemColor.Controls.Add(this.cbRibonSilver); - this.gpSystemColor.Controls.Add(this.cbRibonBlue); - this.gpSystemColor.DisabledBackColor = System.Drawing.Color.Empty; - this.gpSystemColor.Location = new System.Drawing.Point(39, 13); - this.gpSystemColor.Margin = new System.Windows.Forms.Padding(2); - this.gpSystemColor.Name = "gpSystemColor"; - this.gpSystemColor.Size = new System.Drawing.Size(82, 97); - // - // - // - this.gpSystemColor.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpSystemColor.Style.BackColorGradientAngle = 90; - this.gpSystemColor.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpSystemColor.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSystemColor.Style.BorderBottomWidth = 1; - this.gpSystemColor.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpSystemColor.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSystemColor.Style.BorderLeftWidth = 1; - this.gpSystemColor.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSystemColor.Style.BorderRightWidth = 1; - this.gpSystemColor.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSystemColor.Style.BorderTopWidth = 1; - this.gpSystemColor.Style.CornerDiameter = 4; - this.gpSystemColor.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpSystemColor.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpSystemColor.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpSystemColor.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpSystemColor.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpSystemColor.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpSystemColor.TabIndex = 1; - this.gpSystemColor.Text = "System Color"; - // - // cbRibonBlack - // - this.cbRibonBlack.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbRibonBlack.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbRibonBlack.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbRibonBlack.Location = new System.Drawing.Point(7, 54); - this.cbRibonBlack.Margin = new System.Windows.Forms.Padding(2); - this.cbRibonBlack.Name = "cbRibonBlack"; - this.cbRibonBlack.Size = new System.Drawing.Size(67, 19); - this.cbRibonBlack.TabIndex = 2; - this.cbRibonBlack.Text = "Black"; - this.cbRibonBlack.CheckedChanged += new System.EventHandler(this.cbRibonBlack_CheckedChanged); - // - // cbRibonSilver - // - this.cbRibonSilver.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbRibonSilver.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbRibonSilver.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbRibonSilver.Location = new System.Drawing.Point(7, 30); - this.cbRibonSilver.Margin = new System.Windows.Forms.Padding(2); - this.cbRibonSilver.Name = "cbRibonSilver"; - this.cbRibonSilver.Size = new System.Drawing.Size(67, 19); - this.cbRibonSilver.TabIndex = 1; - this.cbRibonSilver.Text = "Silver"; - this.cbRibonSilver.CheckedChanged += new System.EventHandler(this.cbRibonSilver_CheckedChanged); - // - // cbRibonBlue - // - this.cbRibonBlue.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbRibonBlue.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbRibonBlue.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbRibonBlue.Location = new System.Drawing.Point(7, 6); - this.cbRibonBlue.Margin = new System.Windows.Forms.Padding(2); - this.cbRibonBlue.Name = "cbRibonBlue"; - this.cbRibonBlue.Size = new System.Drawing.Size(67, 19); - this.cbRibonBlue.TabIndex = 0; - this.cbRibonBlue.Text = "Blue"; - this.cbRibonBlue.CheckedChanged += new System.EventHandler(this.cbRibonBlue_CheckedChanged); - // - // panButtons - // - this.panButtons.CanvasColor = System.Drawing.SystemColors.Control; - this.panButtons.Controls.Add(this.btnIntrFaceStngs); - this.panButtons.Controls.Add(this.btnStartMsg); - this.panButtons.Controls.Add(this.btnGeneral); - this.panButtons.DisabledBackColor = System.Drawing.Color.Empty; - this.panButtons.Location = new System.Drawing.Point(14, 14); - this.panButtons.Margin = new System.Windows.Forms.Padding(2); - this.panButtons.Name = "panButtons"; - this.panButtons.Size = new System.Drawing.Size(168, 460); - this.panButtons.Style.Alignment = System.Drawing.StringAlignment.Center; - this.panButtons.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.panButtons.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.panButtons.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.panButtons.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.panButtons.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.panButtons.Style.GradientAngle = 90; - this.panButtons.TabIndex = 2; - this.panButtons.Text = "panelEx1"; - this.panButtons.ThemeAware = true; - this.panButtons.Visible = false; - // - // btnIntrFaceStngs - // - this.btnIntrFaceStngs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnIntrFaceStngs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnIntrFaceStngs.Dock = System.Windows.Forms.DockStyle.Top; - this.btnIntrFaceStngs.Location = new System.Drawing.Point(0, 38); - this.btnIntrFaceStngs.Margin = new System.Windows.Forms.Padding(2); - this.btnIntrFaceStngs.Name = "btnIntrFaceStngs"; - this.btnIntrFaceStngs.Size = new System.Drawing.Size(168, 19); - this.btnIntrFaceStngs.TabIndex = 2; - this.btnIntrFaceStngs.Text = "My Interface Settings"; - this.btnIntrFaceStngs.Click += new System.EventHandler(this.btnIntrFaceStngs_Click); - // - // btnStartMsg - // - this.btnStartMsg.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnStartMsg.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnStartMsg.Dock = System.Windows.Forms.DockStyle.Top; - this.btnStartMsg.Location = new System.Drawing.Point(0, 19); - this.btnStartMsg.Margin = new System.Windows.Forms.Padding(2); - this.btnStartMsg.Name = "btnStartMsg"; - this.btnStartMsg.Size = new System.Drawing.Size(168, 19); - this.btnStartMsg.TabIndex = 1; - this.btnStartMsg.Text = "Startup Message"; - this.btnStartMsg.Visible = false; - this.btnStartMsg.Click += new System.EventHandler(this.btnStartMsg_Click); - // - // btnGeneral - // - this.btnGeneral.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnGeneral.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnGeneral.Dock = System.Windows.Forms.DockStyle.Top; - this.btnGeneral.Location = new System.Drawing.Point(0, 0); - this.btnGeneral.Margin = new System.Windows.Forms.Padding(2); - this.btnGeneral.Name = "btnGeneral"; - this.btnGeneral.Size = new System.Drawing.Size(168, 19); - this.btnGeneral.TabIndex = 0; - this.btnGeneral.Text = "General"; - this.btnGeneral.Visible = false; - this.btnGeneral.Click += new System.EventHandler(this.btnGeneral_Click); - // - // tcSysOpts - // - this.tcSysOpts.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247))))); - this.tcSysOpts.CanReorderTabs = true; - this.tcSysOpts.Controls.Add(this.tabControlPanel3); - this.tcSysOpts.Controls.Add(this.tabControlPanel1); - this.tcSysOpts.Controls.Add(this.tabControlPanel2); - this.tcSysOpts.Location = new System.Drawing.Point(27, 17); - this.tcSysOpts.Margin = new System.Windows.Forms.Padding(2); - this.tcSysOpts.Name = "tcSysOpts"; - this.tcSysOpts.SelectedTabFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold); - this.tcSysOpts.SelectedTabIndex = 2; - this.tcSysOpts.Size = new System.Drawing.Size(645, 555); - this.tcSysOpts.TabIndex = 3; - this.tcSysOpts.TabLayoutType = DevComponents.DotNetBar.eTabLayoutType.FixedWithNavigationBox; - this.tcSysOpts.Tabs.Add(this.tiGeneral); - this.tcSysOpts.Tabs.Add(this.tiStUpMsg); - this.tcSysOpts.Tabs.Add(this.tiIntrFaceStngs); - this.tcSysOpts.TabsVisible = false; - this.tcSysOpts.Text = "tabControl1"; - this.tcSysOpts.ThemeAware = true; - // - // tabControlPanel3 - // - this.tabControlPanel3.Controls.Add(this.gpMSWordSum); - this.tabControlPanel3.Controls.Add(this.gpOpenTabs); - this.tabControlPanel3.Controls.Add(this.gpShwRplWords); - this.tabControlPanel3.Controls.Add(this.gpVisioPath); - this.tabControlPanel3.Controls.Add(this.gpSeparateWindows); - this.tabControlPanel3.Controls.Add(this.gpEnhancedDocs); - this.tabControlPanel3.Controls.Add(this.gpPasteSettings); - this.tabControlPanel3.Controls.Add(this.gpTreeView); - this.tabControlPanel3.Controls.Add(this.gpStepTypeToolTip); - this.tabControlPanel3.Controls.Add(this.gpAnnotationSettings); - this.tabControlPanel3.Controls.Add(this.gpTransRangeColor); - this.tabControlPanel3.Controls.Add(this.gpPropPageStyle); - this.tabControlPanel3.Controls.Add(this.gpSystemColor); - this.tabControlPanel3.DisabledBackColor = System.Drawing.Color.Empty; - this.tabControlPanel3.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControlPanel3.Location = new System.Drawing.Point(0, 27); - this.tabControlPanel3.Margin = new System.Windows.Forms.Padding(2); - this.tabControlPanel3.Name = "tabControlPanel3"; - this.tabControlPanel3.Padding = new System.Windows.Forms.Padding(1); - this.tabControlPanel3.Size = new System.Drawing.Size(645, 528); - this.tabControlPanel3.Style.BackColor1.Color = System.Drawing.SystemColors.Control; - this.tabControlPanel3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.tabControlPanel3.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSysOptions)); + this.btnCancel = new DevComponents.DotNetBar.ButtonX(); + this.btnOK = new DevComponents.DotNetBar.ButtonX(); + this.gpSystemColor = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbRibonBlack = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbRibonSilver = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbRibonBlue = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.panButtons = new DevComponents.DotNetBar.PanelEx(); + this.btnIntrFaceStngs = new DevComponents.DotNetBar.ButtonX(); + this.btnStartMsg = new DevComponents.DotNetBar.ButtonX(); + this.btnGeneral = new DevComponents.DotNetBar.ButtonX(); + this.tcSysOpts = new DevComponents.DotNetBar.TabControl(); + this.tabControlPanel3 = new DevComponents.DotNetBar.TabControlPanel(); + this.gpMSWordSum = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbMSWordPrompt = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpOpenTabs = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbOTRemember = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbOTAutoOpen = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpShwRplWords = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbShwRplWrdsColor = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpAnnoTypeFilter = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.gpVisioPath = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.txbxVisioPath = new DevComponents.DotNetBar.Controls.TextBoxX(); + this.gpSeparateWindows = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbSeparateWindows = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpEnhancedDocs = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbEnhancedDocumentSync = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpPasteSettings = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbPastePlainText = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbPasteNoReturns = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpTreeView = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbTVExpand = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpStepTypeToolTip = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbStepTypeToolTip = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpAnnotationSettings = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbAnnotationPopup = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.gpTransRangeColor = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.colorPickerButton1 = new DevComponents.DotNetBar.ColorPickerButton(); + this.gpPropPageStyle = new DevComponents.DotNetBar.Controls.GroupPanel(); + this.cbPropGrid = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbTabbedIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbButtonIntrFace = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.tiIntrFaceStngs = new DevComponents.DotNetBar.TabItem(this.components); + this.tabControlPanel1 = new DevComponents.DotNetBar.TabControlPanel(); + this.tiGeneral = new DevComponents.DotNetBar.TabItem(this.components); + this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel(); + this.tiStUpMsg = new DevComponents.DotNetBar.TabItem(this.components); + this.cbUCFLForSetOnly = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbUCFLUseAll = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbUCFLOnlyImport = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbUCFLNotUsed = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.cbUCFIgnore = new DevComponents.DotNetBar.Controls.CheckBoxX(); + this.btnReset = new DevComponents.DotNetBar.ButtonX(); + this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip(); + this.cbShwAnnoFilter = new DevComponents.DotNetBar.ButtonX(); + this.gpSystemColor.SuspendLayout(); + this.panButtons.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).BeginInit(); + this.tcSysOpts.SuspendLayout(); + this.tabControlPanel3.SuspendLayout(); + this.gpMSWordSum.SuspendLayout(); + this.gpOpenTabs.SuspendLayout(); + this.gpShwRplWords.SuspendLayout(); + this.gpAnnoTypeFilter.SuspendLayout(); + this.gpVisioPath.SuspendLayout(); + this.gpSeparateWindows.SuspendLayout(); + this.gpEnhancedDocs.SuspendLayout(); + this.gpPasteSettings.SuspendLayout(); + this.gpTreeView.SuspendLayout(); + this.gpStepTypeToolTip.SuspendLayout(); + this.gpAnnotationSettings.SuspendLayout(); + this.gpTransRangeColor.SuspendLayout(); + this.gpPropPageStyle.SuspendLayout(); + this.SuspendLayout(); + // + // btnCancel + // + this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnCancel.Location = new System.Drawing.Point(616, 591); + this.btnCancel.Margin = new System.Windows.Forms.Padding(2); + this.btnCancel.Name = "btnCancel"; + this.btnCancel.Size = new System.Drawing.Size(56, 19); + this.btnCancel.TabIndex = 0; + this.btnCancel.Text = "Cancel"; + this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + // + // btnOK + // + this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnOK.Location = new System.Drawing.Point(542, 591); + this.btnOK.Margin = new System.Windows.Forms.Padding(2); + this.btnOK.Name = "btnOK"; + this.btnOK.Size = new System.Drawing.Size(56, 19); + this.btnOK.TabIndex = 1; + this.btnOK.Text = "OK"; + this.btnOK.Click += new System.EventHandler(this.btnOK_Click); + // + // gpSystemColor + // + this.gpSystemColor.BackColor = System.Drawing.Color.Transparent; + this.gpSystemColor.CanvasColor = System.Drawing.Color.Transparent; + this.gpSystemColor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpSystemColor.Controls.Add(this.cbRibonBlack); + this.gpSystemColor.Controls.Add(this.cbRibonSilver); + this.gpSystemColor.Controls.Add(this.cbRibonBlue); + this.gpSystemColor.DisabledBackColor = System.Drawing.Color.Empty; + this.gpSystemColor.Location = new System.Drawing.Point(39, 13); + this.gpSystemColor.Margin = new System.Windows.Forms.Padding(2); + this.gpSystemColor.Name = "gpSystemColor"; + this.gpSystemColor.Size = new System.Drawing.Size(82, 97); + // + // + // + this.gpSystemColor.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpSystemColor.Style.BackColorGradientAngle = 90; + this.gpSystemColor.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpSystemColor.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSystemColor.Style.BorderBottomWidth = 1; + this.gpSystemColor.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpSystemColor.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSystemColor.Style.BorderLeftWidth = 1; + this.gpSystemColor.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSystemColor.Style.BorderRightWidth = 1; + this.gpSystemColor.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSystemColor.Style.BorderTopWidth = 1; + this.gpSystemColor.Style.CornerDiameter = 4; + this.gpSystemColor.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpSystemColor.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpSystemColor.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpSystemColor.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpSystemColor.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpSystemColor.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpSystemColor.TabIndex = 1; + this.gpSystemColor.Text = "System Color"; + // + // cbRibonBlack + // + this.cbRibonBlack.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbRibonBlack.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbRibonBlack.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbRibonBlack.Location = new System.Drawing.Point(7, 54); + this.cbRibonBlack.Margin = new System.Windows.Forms.Padding(2); + this.cbRibonBlack.Name = "cbRibonBlack"; + this.cbRibonBlack.Size = new System.Drawing.Size(67, 19); + this.cbRibonBlack.TabIndex = 2; + this.cbRibonBlack.Text = "Black"; + this.cbRibonBlack.CheckedChanged += new System.EventHandler(this.cbRibonBlack_CheckedChanged); + // + // cbRibonSilver + // + this.cbRibonSilver.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbRibonSilver.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbRibonSilver.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbRibonSilver.Location = new System.Drawing.Point(7, 30); + this.cbRibonSilver.Margin = new System.Windows.Forms.Padding(2); + this.cbRibonSilver.Name = "cbRibonSilver"; + this.cbRibonSilver.Size = new System.Drawing.Size(67, 19); + this.cbRibonSilver.TabIndex = 1; + this.cbRibonSilver.Text = "Silver"; + this.cbRibonSilver.CheckedChanged += new System.EventHandler(this.cbRibonSilver_CheckedChanged); + // + // cbRibonBlue + // + this.cbRibonBlue.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbRibonBlue.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbRibonBlue.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbRibonBlue.Location = new System.Drawing.Point(7, 6); + this.cbRibonBlue.Margin = new System.Windows.Forms.Padding(2); + this.cbRibonBlue.Name = "cbRibonBlue"; + this.cbRibonBlue.Size = new System.Drawing.Size(67, 19); + this.cbRibonBlue.TabIndex = 0; + this.cbRibonBlue.Text = "Blue"; + this.cbRibonBlue.CheckedChanged += new System.EventHandler(this.cbRibonBlue_CheckedChanged); + // + // panButtons + // + this.panButtons.CanvasColor = System.Drawing.SystemColors.Control; + this.panButtons.Controls.Add(this.btnIntrFaceStngs); + this.panButtons.Controls.Add(this.btnStartMsg); + this.panButtons.Controls.Add(this.btnGeneral); + this.panButtons.DisabledBackColor = System.Drawing.Color.Empty; + this.panButtons.Location = new System.Drawing.Point(14, 14); + this.panButtons.Margin = new System.Windows.Forms.Padding(2); + this.panButtons.Name = "panButtons"; + this.panButtons.Size = new System.Drawing.Size(168, 460); + this.panButtons.Style.Alignment = System.Drawing.StringAlignment.Center; + this.panButtons.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.panButtons.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.panButtons.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.panButtons.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.panButtons.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.panButtons.Style.GradientAngle = 90; + this.panButtons.TabIndex = 2; + this.panButtons.Text = "panelEx1"; + this.panButtons.ThemeAware = true; + this.panButtons.Visible = false; + // + // btnIntrFaceStngs + // + this.btnIntrFaceStngs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnIntrFaceStngs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnIntrFaceStngs.Dock = System.Windows.Forms.DockStyle.Top; + this.btnIntrFaceStngs.Location = new System.Drawing.Point(0, 38); + this.btnIntrFaceStngs.Margin = new System.Windows.Forms.Padding(2); + this.btnIntrFaceStngs.Name = "btnIntrFaceStngs"; + this.btnIntrFaceStngs.Size = new System.Drawing.Size(168, 19); + this.btnIntrFaceStngs.TabIndex = 2; + this.btnIntrFaceStngs.Text = "My Interface Settings"; + this.btnIntrFaceStngs.Click += new System.EventHandler(this.btnIntrFaceStngs_Click); + // + // btnStartMsg + // + this.btnStartMsg.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnStartMsg.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnStartMsg.Dock = System.Windows.Forms.DockStyle.Top; + this.btnStartMsg.Location = new System.Drawing.Point(0, 19); + this.btnStartMsg.Margin = new System.Windows.Forms.Padding(2); + this.btnStartMsg.Name = "btnStartMsg"; + this.btnStartMsg.Size = new System.Drawing.Size(168, 19); + this.btnStartMsg.TabIndex = 1; + this.btnStartMsg.Text = "Startup Message"; + this.btnStartMsg.Visible = false; + this.btnStartMsg.Click += new System.EventHandler(this.btnStartMsg_Click); + // + // btnGeneral + // + this.btnGeneral.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnGeneral.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnGeneral.Dock = System.Windows.Forms.DockStyle.Top; + this.btnGeneral.Location = new System.Drawing.Point(0, 0); + this.btnGeneral.Margin = new System.Windows.Forms.Padding(2); + this.btnGeneral.Name = "btnGeneral"; + this.btnGeneral.Size = new System.Drawing.Size(168, 19); + this.btnGeneral.TabIndex = 0; + this.btnGeneral.Text = "General"; + this.btnGeneral.Visible = false; + this.btnGeneral.Click += new System.EventHandler(this.btnGeneral_Click); + // + // tcSysOpts + // + this.tcSysOpts.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(194)))), ((int)(((byte)(217)))), ((int)(((byte)(247))))); + this.tcSysOpts.CanReorderTabs = true; + this.tcSysOpts.Controls.Add(this.tabControlPanel3); + this.tcSysOpts.Controls.Add(this.tabControlPanel2); + this.tcSysOpts.Controls.Add(this.tabControlPanel1); + this.tcSysOpts.Location = new System.Drawing.Point(27, 17); + this.tcSysOpts.Margin = new System.Windows.Forms.Padding(2); + this.tcSysOpts.Name = "tcSysOpts"; + this.tcSysOpts.SelectedTabFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold); + this.tcSysOpts.SelectedTabIndex = 2; + this.tcSysOpts.Size = new System.Drawing.Size(645, 555); + this.tcSysOpts.TabIndex = 3; + this.tcSysOpts.TabLayoutType = DevComponents.DotNetBar.eTabLayoutType.FixedWithNavigationBox; + this.tcSysOpts.Tabs.Add(this.tiGeneral); + this.tcSysOpts.Tabs.Add(this.tiStUpMsg); + this.tcSysOpts.Tabs.Add(this.tiIntrFaceStngs); + this.tcSysOpts.TabsVisible = false; + this.tcSysOpts.Text = "tabControl1"; + this.tcSysOpts.ThemeAware = true; + // + // tabControlPanel3 + // + this.tabControlPanel3.Controls.Add(this.gpMSWordSum); + this.tabControlPanel3.Controls.Add(this.gpOpenTabs); + this.tabControlPanel3.Controls.Add(this.gpShwRplWords); + this.tabControlPanel3.Controls.Add(this.gpAnnoTypeFilter); + this.tabControlPanel3.Controls.Add(this.gpVisioPath); + this.tabControlPanel3.Controls.Add(this.gpSeparateWindows); + this.tabControlPanel3.Controls.Add(this.gpEnhancedDocs); + this.tabControlPanel3.Controls.Add(this.gpPasteSettings); + this.tabControlPanel3.Controls.Add(this.gpTreeView); + this.tabControlPanel3.Controls.Add(this.gpStepTypeToolTip); + this.tabControlPanel3.Controls.Add(this.gpAnnotationSettings); + this.tabControlPanel3.Controls.Add(this.gpTransRangeColor); + this.tabControlPanel3.Controls.Add(this.gpPropPageStyle); + this.tabControlPanel3.Controls.Add(this.gpSystemColor); + this.tabControlPanel3.DisabledBackColor = System.Drawing.Color.Empty; + this.tabControlPanel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControlPanel3.Location = new System.Drawing.Point(0, 27); + this.tabControlPanel3.Margin = new System.Windows.Forms.Padding(2); + this.tabControlPanel3.Name = "tabControlPanel3"; + this.tabControlPanel3.Padding = new System.Windows.Forms.Padding(1); + this.tabControlPanel3.Size = new System.Drawing.Size(645, 528); + this.tabControlPanel3.Style.BackColor1.Color = System.Drawing.SystemColors.Control; + this.tabControlPanel3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.tabControlPanel3.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) | DevComponents.DotNetBar.eBorderSide.Bottom))); - this.tabControlPanel3.Style.GradientAngle = 90; - this.tabControlPanel3.TabIndex = 3; - this.tabControlPanel3.TabItem = this.tiIntrFaceStngs; - this.tabControlPanel3.ThemeAware = true; - // - // gpOpenTabs - // - this.gpOpenTabs.BackColor = System.Drawing.Color.Transparent; - this.gpOpenTabs.CanvasColor = System.Drawing.SystemColors.Control; - this.gpOpenTabs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpOpenTabs.Controls.Add(this.cbOTRemember); - this.gpOpenTabs.Controls.Add(this.cbOTAutoOpen); - this.gpOpenTabs.DisabledBackColor = System.Drawing.Color.Empty; - this.gpOpenTabs.Location = new System.Drawing.Point(462, 252); - this.gpOpenTabs.Margin = new System.Windows.Forms.Padding(2); - this.gpOpenTabs.Name = "gpOpenTabs"; - this.gpOpenTabs.Size = new System.Drawing.Size(139, 81); - // - // - // - this.gpOpenTabs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpOpenTabs.Style.BackColorGradientAngle = 90; - this.gpOpenTabs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpOpenTabs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpOpenTabs.Style.BorderBottomWidth = 1; - this.gpOpenTabs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpOpenTabs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpOpenTabs.Style.BorderLeftWidth = 1; - this.gpOpenTabs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpOpenTabs.Style.BorderRightWidth = 1; - this.gpOpenTabs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpOpenTabs.Style.BorderTopWidth = 1; - this.gpOpenTabs.Style.CornerDiameter = 4; - this.gpOpenTabs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpOpenTabs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpOpenTabs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpOpenTabs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpOpenTabs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpOpenTabs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpOpenTabs.TabIndex = 13; - this.gpOpenTabs.Text = "Open Tabs"; - // - // cbOTRemember - // - // - // - // - this.cbOTRemember.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbOTRemember.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbOTRemember.Location = new System.Drawing.Point(8, 5); - this.cbOTRemember.Margin = new System.Windows.Forms.Padding(2); - this.cbOTRemember.Name = "cbOTRemember"; - this.cbOTRemember.Size = new System.Drawing.Size(119, 19); - this.cbOTRemember.TabIndex = 9; - this.cbOTRemember.Text = "Remember Setting"; - this.cbOTRemember.CheckedChanged += new System.EventHandler(this.cbOTRemember_CheckedChanged); - // - // cbOTAutoOpen - // - // - // - // - this.cbOTAutoOpen.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbOTAutoOpen.Enabled = false; - this.cbOTAutoOpen.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbOTAutoOpen.Location = new System.Drawing.Point(8, 28); - this.cbOTAutoOpen.Margin = new System.Windows.Forms.Padding(2); - this.cbOTAutoOpen.Name = "cbOTAutoOpen"; - this.cbOTAutoOpen.Size = new System.Drawing.Size(92, 19); - this.cbOTAutoOpen.TabIndex = 10; - this.cbOTAutoOpen.Text = "Auto Open"; - this.cbOTAutoOpen.Visible = false; - // - // gpShwRplWords - // - this.gpShwRplWords.BackColor = System.Drawing.Color.Transparent; - this.gpShwRplWords.CanvasColor = System.Drawing.SystemColors.Control; - this.gpShwRplWords.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpShwRplWords.Controls.Add(this.cbShwRplWrdsColor); - this.gpShwRplWords.DisabledBackColor = System.Drawing.Color.Empty; - this.gpShwRplWords.Location = new System.Drawing.Point(462, 165); - this.gpShwRplWords.Margin = new System.Windows.Forms.Padding(2); - this.gpShwRplWords.Name = "gpShwRplWords"; - this.gpShwRplWords.Size = new System.Drawing.Size(139, 72); - // - // - // - this.gpShwRplWords.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpShwRplWords.Style.BackColorGradientAngle = 90; - this.gpShwRplWords.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpShwRplWords.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpShwRplWords.Style.BorderBottomWidth = 1; - this.gpShwRplWords.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpShwRplWords.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpShwRplWords.Style.BorderLeftWidth = 1; - this.gpShwRplWords.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpShwRplWords.Style.BorderRightWidth = 1; - this.gpShwRplWords.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpShwRplWords.Style.BorderTopWidth = 1; - this.gpShwRplWords.Style.CornerDiameter = 4; - this.gpShwRplWords.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpShwRplWords.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpShwRplWords.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpShwRplWords.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpShwRplWords.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpShwRplWords.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpShwRplWords.TabIndex = 13; - this.gpShwRplWords.Text = "Replace Words"; - // - // cbShwRplWrdsColor - // - // - // - // - this.cbShwRplWrdsColor.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbShwRplWrdsColor.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbShwRplWrdsColor.Location = new System.Drawing.Point(8, 5); - this.cbShwRplWrdsColor.Margin = new System.Windows.Forms.Padding(2); - this.cbShwRplWrdsColor.Name = "cbShwRplWrdsColor"; - this.cbShwRplWrdsColor.Size = new System.Drawing.Size(119, 19); - this.cbShwRplWrdsColor.TabIndex = 9; - this.cbShwRplWrdsColor.Text = "Color Replace Words"; - this.cbShwRplWrdsColor.CheckedChanged += new System.EventHandler(this.cbShwRplWrdsColor_CheckedChanged); - // - // gpVisioPath - // - this.gpVisioPath.BackColor = System.Drawing.Color.Transparent; - this.gpVisioPath.CanvasColor = System.Drawing.SystemColors.Control; - this.gpVisioPath.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpVisioPath.Controls.Add(this.txbxVisioPath); - this.gpVisioPath.DisabledBackColor = System.Drawing.Color.Empty; - this.gpVisioPath.Location = new System.Drawing.Point(25, 432); - this.gpVisioPath.Margin = new System.Windows.Forms.Padding(2); - this.gpVisioPath.Name = "gpVisioPath"; - this.gpVisioPath.Size = new System.Drawing.Size(285, 69); - // - // - // - this.gpVisioPath.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpVisioPath.Style.BackColorGradientAngle = 90; - this.gpVisioPath.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpVisioPath.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpVisioPath.Style.BorderBottomWidth = 1; - this.gpVisioPath.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpVisioPath.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpVisioPath.Style.BorderLeftWidth = 1; - this.gpVisioPath.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpVisioPath.Style.BorderRightWidth = 1; - this.gpVisioPath.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpVisioPath.Style.BorderTopWidth = 1; - this.gpVisioPath.Style.CornerDiameter = 4; - this.gpVisioPath.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpVisioPath.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpVisioPath.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpVisioPath.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpVisioPath.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpVisioPath.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpVisioPath.TabIndex = 11; - this.gpVisioPath.Text = "Visio Path"; - // - // txbxVisioPath - // - // - // - // - this.txbxVisioPath.Border.Class = "TextBoxBorder"; - this.txbxVisioPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.txbxVisioPath.Location = new System.Drawing.Point(8, 13); - this.txbxVisioPath.Name = "txbxVisioPath"; - this.txbxVisioPath.PreventEnterBeep = true; - this.txbxVisioPath.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; - this.txbxVisioPath.ShortcutsEnabled = false; - this.txbxVisioPath.Size = new System.Drawing.Size(263, 20); - this.superTooltip1.SetSuperTooltip(this.txbxVisioPath, new DevComponents.DotNetBar.SuperTooltipInfo("Visio Path", "", "PROMS wil use this specified path to open Visio for use with inserting the Equati" + + this.tabControlPanel3.Style.GradientAngle = 90; + this.tabControlPanel3.TabIndex = 3; + this.tabControlPanel3.TabItem = this.tiIntrFaceStngs; + this.tabControlPanel3.ThemeAware = true; + // + // gpMSWordSum + // + this.gpMSWordSum.BackColor = System.Drawing.Color.Transparent; + this.gpMSWordSum.CanvasColor = System.Drawing.SystemColors.Control; + this.gpMSWordSum.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpMSWordSum.Controls.Add(this.cbMSWordPrompt); + this.gpMSWordSum.DisabledBackColor = System.Drawing.Color.Empty; + this.gpMSWordSum.Location = new System.Drawing.Point(25, 347); + this.gpMSWordSum.Margin = new System.Windows.Forms.Padding(2); + this.gpMSWordSum.Name = "gpMSWordSum"; + this.gpMSWordSum.Size = new System.Drawing.Size(119, 81); + // + // + // + this.gpMSWordSum.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpMSWordSum.Style.BackColorGradientAngle = 90; + this.gpMSWordSum.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpMSWordSum.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpMSWordSum.Style.BorderBottomWidth = 1; + this.gpMSWordSum.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpMSWordSum.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpMSWordSum.Style.BorderLeftWidth = 1; + this.gpMSWordSum.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpMSWordSum.Style.BorderRightWidth = 1; + this.gpMSWordSum.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpMSWordSum.Style.BorderTopWidth = 1; + this.gpMSWordSum.Style.CornerDiameter = 4; + this.gpMSWordSum.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpMSWordSum.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpMSWordSum.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpMSWordSum.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpMSWordSum.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpMSWordSum.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpMSWordSum.TabIndex = 14; + this.gpMSWordSum.Text = "Opening in MS Word"; + // + // cbMSWordPrompt + // + // + // + // + this.cbMSWordPrompt.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbMSWordPrompt.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbMSWordPrompt.Location = new System.Drawing.Point(8, 5); + this.cbMSWordPrompt.Margin = new System.Windows.Forms.Padding(2); + this.cbMSWordPrompt.Name = "cbMSWordPrompt"; + this.cbMSWordPrompt.Size = new System.Drawing.Size(92, 44); + this.cbMSWordPrompt.TabIndex = 9; + this.cbMSWordPrompt.Text = "Show Prompt For Summaries"; + // + // gpOpenTabs + // + this.gpOpenTabs.BackColor = System.Drawing.Color.Transparent; + this.gpOpenTabs.CanvasColor = System.Drawing.SystemColors.Control; + this.gpOpenTabs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpOpenTabs.Controls.Add(this.cbOTRemember); + this.gpOpenTabs.Controls.Add(this.cbOTAutoOpen); + this.gpOpenTabs.DisabledBackColor = System.Drawing.Color.Empty; + this.gpOpenTabs.Location = new System.Drawing.Point(462, 252); + this.gpOpenTabs.Margin = new System.Windows.Forms.Padding(2); + this.gpOpenTabs.Name = "gpOpenTabs"; + this.gpOpenTabs.Size = new System.Drawing.Size(139, 81); + // + // + // + this.gpOpenTabs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpOpenTabs.Style.BackColorGradientAngle = 90; + this.gpOpenTabs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpOpenTabs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpOpenTabs.Style.BorderBottomWidth = 1; + this.gpOpenTabs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpOpenTabs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpOpenTabs.Style.BorderLeftWidth = 1; + this.gpOpenTabs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpOpenTabs.Style.BorderRightWidth = 1; + this.gpOpenTabs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpOpenTabs.Style.BorderTopWidth = 1; + this.gpOpenTabs.Style.CornerDiameter = 4; + this.gpOpenTabs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpOpenTabs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpOpenTabs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpOpenTabs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpOpenTabs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpOpenTabs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpOpenTabs.TabIndex = 13; + this.gpOpenTabs.Text = "Open Tabs"; + // + // cbOTRemember + // + // + // + // + this.cbOTRemember.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbOTRemember.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbOTRemember.Location = new System.Drawing.Point(8, 5); + this.cbOTRemember.Margin = new System.Windows.Forms.Padding(2); + this.cbOTRemember.Name = "cbOTRemember"; + this.cbOTRemember.Size = new System.Drawing.Size(119, 19); + this.cbOTRemember.TabIndex = 9; + this.cbOTRemember.Text = "Remember Setting"; + this.cbOTRemember.CheckedChanged += new System.EventHandler(this.cbOTRemember_CheckedChanged); + // + // cbOTAutoOpen + // + // + // + // + this.cbOTAutoOpen.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbOTAutoOpen.Enabled = false; + this.cbOTAutoOpen.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbOTAutoOpen.Location = new System.Drawing.Point(8, 28); + this.cbOTAutoOpen.Margin = new System.Windows.Forms.Padding(2); + this.cbOTAutoOpen.Name = "cbOTAutoOpen"; + this.cbOTAutoOpen.Size = new System.Drawing.Size(92, 19); + this.cbOTAutoOpen.TabIndex = 10; + this.cbOTAutoOpen.Text = "Auto Open"; + this.cbOTAutoOpen.Visible = false; + // + // gpShwRplWords + // + this.gpShwRplWords.BackColor = System.Drawing.Color.Transparent; + this.gpShwRplWords.CanvasColor = System.Drawing.SystemColors.Control; + this.gpShwRplWords.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpShwRplWords.Controls.Add(this.cbShwRplWrdsColor); + this.gpShwRplWords.DisabledBackColor = System.Drawing.Color.Empty; + this.gpShwRplWords.Location = new System.Drawing.Point(462, 165); + this.gpShwRplWords.Margin = new System.Windows.Forms.Padding(2); + this.gpShwRplWords.Name = "gpShwRplWords"; + this.gpShwRplWords.Size = new System.Drawing.Size(139, 72); + // + // + // + this.gpShwRplWords.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpShwRplWords.Style.BackColorGradientAngle = 90; + this.gpShwRplWords.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpShwRplWords.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpShwRplWords.Style.BorderBottomWidth = 1; + this.gpShwRplWords.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpShwRplWords.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpShwRplWords.Style.BorderLeftWidth = 1; + this.gpShwRplWords.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpShwRplWords.Style.BorderRightWidth = 1; + this.gpShwRplWords.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpShwRplWords.Style.BorderTopWidth = 1; + this.gpShwRplWords.Style.CornerDiameter = 4; + this.gpShwRplWords.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpShwRplWords.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpShwRplWords.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpShwRplWords.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpShwRplWords.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpShwRplWords.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpShwRplWords.TabIndex = 13; + this.gpShwRplWords.Text = "Replace Words"; + // + // cbShwRplWrdsColor + // + // + // + // + this.cbShwRplWrdsColor.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbShwRplWrdsColor.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbShwRplWrdsColor.Location = new System.Drawing.Point(8, 5); + this.cbShwRplWrdsColor.Margin = new System.Windows.Forms.Padding(2); + this.cbShwRplWrdsColor.Name = "cbShwRplWrdsColor"; + this.cbShwRplWrdsColor.Size = new System.Drawing.Size(119, 19); + this.cbShwRplWrdsColor.TabIndex = 9; + this.cbShwRplWrdsColor.Text = "Color Replace Words"; + this.cbShwRplWrdsColor.CheckedChanged += new System.EventHandler(this.cbShwRplWrdsColor_CheckedChanged); + // + // gpAnnoTypeFilter + // + this.gpAnnoTypeFilter.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpAnnoTypeFilter.Controls.Add(this.cbShwAnnoFilter); + this.gpAnnoTypeFilter.DisabledBackColor = System.Drawing.Color.Empty; + this.gpAnnoTypeFilter.Location = new System.Drawing.Point(324, 12); + this.gpAnnoTypeFilter.Margin = new System.Windows.Forms.Padding(2); + this.gpAnnoTypeFilter.Name = "gpAnnoTypeFilter"; + this.gpAnnoTypeFilter.Size = new System.Drawing.Size(150, 72); + // + // + // + this.gpAnnoTypeFilter.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpAnnoTypeFilter.Style.BackColorGradientAngle = 90; + this.gpAnnoTypeFilter.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpAnnoTypeFilter.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnoTypeFilter.Style.BorderBottomWidth = 1; + this.gpAnnoTypeFilter.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpAnnoTypeFilter.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnoTypeFilter.Style.BorderLeftWidth = 1; + this.gpAnnoTypeFilter.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnoTypeFilter.Style.BorderRightWidth = 1; + this.gpAnnoTypeFilter.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnoTypeFilter.Style.BorderTopWidth = 1; + this.gpAnnoTypeFilter.Style.CornerDiameter = 4; + this.gpAnnoTypeFilter.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpAnnoTypeFilter.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpAnnoTypeFilter.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpAnnoTypeFilter.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpAnnoTypeFilter.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpAnnoTypeFilter.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpAnnoTypeFilter.TabIndex = 13; + this.gpAnnoTypeFilter.Text = "Select Annotation Types"; + // + // gpVisioPath + // + this.gpVisioPath.BackColor = System.Drawing.Color.Transparent; + this.gpVisioPath.CanvasColor = System.Drawing.SystemColors.Control; + this.gpVisioPath.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpVisioPath.Controls.Add(this.txbxVisioPath); + this.gpVisioPath.DisabledBackColor = System.Drawing.Color.Empty; + this.gpVisioPath.Location = new System.Drawing.Point(25, 432); + this.gpVisioPath.Margin = new System.Windows.Forms.Padding(2); + this.gpVisioPath.Name = "gpVisioPath"; + this.gpVisioPath.Size = new System.Drawing.Size(285, 69); + // + // + // + this.gpVisioPath.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpVisioPath.Style.BackColorGradientAngle = 90; + this.gpVisioPath.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpVisioPath.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpVisioPath.Style.BorderBottomWidth = 1; + this.gpVisioPath.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpVisioPath.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpVisioPath.Style.BorderLeftWidth = 1; + this.gpVisioPath.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpVisioPath.Style.BorderRightWidth = 1; + this.gpVisioPath.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpVisioPath.Style.BorderTopWidth = 1; + this.gpVisioPath.Style.CornerDiameter = 4; + this.gpVisioPath.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpVisioPath.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpVisioPath.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpVisioPath.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpVisioPath.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpVisioPath.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpVisioPath.TabIndex = 11; + this.gpVisioPath.Text = "Visio Path"; + // + // txbxVisioPath + // + // + // + // + this.txbxVisioPath.Border.Class = "TextBoxBorder"; + this.txbxVisioPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.txbxVisioPath.Location = new System.Drawing.Point(8, 13); + this.txbxVisioPath.Name = "txbxVisioPath"; + this.txbxVisioPath.PreventEnterBeep = true; + this.txbxVisioPath.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal; + this.txbxVisioPath.ShortcutsEnabled = false; + this.txbxVisioPath.Size = new System.Drawing.Size(263, 20); + this.superTooltip1.SetSuperTooltip(this.txbxVisioPath, new DevComponents.DotNetBar.SuperTooltipInfo("Visio Path", "", "PROMS wil use this specified path to open Visio for use with inserting the Equati" + "on sub step type.\r\n\r\nIf this is blank, then PROMS will look in the registry for " + "the path to Visio.\r\n\r\n", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(300, 115))); - this.txbxVisioPath.TabIndex = 0; - this.txbxVisioPath.WordWrap = false; - this.txbxVisioPath.Leave += new System.EventHandler(this.txbxVisioPath_Leave_1); - // - // gpSeparateWindows - // - this.gpSeparateWindows.BackColor = System.Drawing.Color.Transparent; - this.gpSeparateWindows.CanvasColor = System.Drawing.SystemColors.Control; - this.gpSeparateWindows.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpSeparateWindows.Controls.Add(this.cbSeparateWindows); - this.gpSeparateWindows.DisabledBackColor = System.Drawing.Color.Empty; - this.gpSeparateWindows.Location = new System.Drawing.Point(313, 252); - this.gpSeparateWindows.Margin = new System.Windows.Forms.Padding(2); - this.gpSeparateWindows.Name = "gpSeparateWindows"; - this.gpSeparateWindows.Size = new System.Drawing.Size(127, 81); - // - // - // - this.gpSeparateWindows.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpSeparateWindows.Style.BackColorGradientAngle = 90; - this.gpSeparateWindows.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpSeparateWindows.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSeparateWindows.Style.BorderBottomWidth = 1; - this.gpSeparateWindows.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpSeparateWindows.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSeparateWindows.Style.BorderLeftWidth = 1; - this.gpSeparateWindows.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSeparateWindows.Style.BorderRightWidth = 1; - this.gpSeparateWindows.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpSeparateWindows.Style.BorderTopWidth = 1; - this.gpSeparateWindows.Style.CornerDiameter = 4; - this.gpSeparateWindows.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpSeparateWindows.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpSeparateWindows.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpSeparateWindows.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpSeparateWindows.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpSeparateWindows.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpSeparateWindows.TabIndex = 10; - this.gpSeparateWindows.Text = "Separate Windows"; - // - // cbSeparateWindows - // - // - // - // - this.cbSeparateWindows.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbSeparateWindows.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbSeparateWindows.Location = new System.Drawing.Point(8, 8); - this.cbSeparateWindows.Margin = new System.Windows.Forms.Padding(2); - this.cbSeparateWindows.Name = "cbSeparateWindows"; - this.cbSeparateWindows.Size = new System.Drawing.Size(107, 19); - this.cbSeparateWindows.TabIndex = 9; - this.cbSeparateWindows.Text = "By Procedure Set"; - this.cbSeparateWindows.CheckedChanged += new System.EventHandler(this.cbSeparateWindows_CheckedChanged); - // - // gpEnhancedDocs - // - this.gpEnhancedDocs.BackColor = System.Drawing.Color.Transparent; - this.gpEnhancedDocs.CanvasColor = System.Drawing.SystemColors.Control; - this.gpEnhancedDocs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpEnhancedDocs.Controls.Add(this.cbEnhancedDocumentSync); - this.gpEnhancedDocs.DisabledBackColor = System.Drawing.Color.Empty; - this.gpEnhancedDocs.Location = new System.Drawing.Point(167, 252); - this.gpEnhancedDocs.Margin = new System.Windows.Forms.Padding(2); - this.gpEnhancedDocs.Name = "gpEnhancedDocs"; - this.gpEnhancedDocs.Size = new System.Drawing.Size(127, 81); - // - // - // - this.gpEnhancedDocs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpEnhancedDocs.Style.BackColorGradientAngle = 90; - this.gpEnhancedDocs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpEnhancedDocs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpEnhancedDocs.Style.BorderBottomWidth = 1; - this.gpEnhancedDocs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpEnhancedDocs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpEnhancedDocs.Style.BorderLeftWidth = 1; - this.gpEnhancedDocs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpEnhancedDocs.Style.BorderRightWidth = 1; - this.gpEnhancedDocs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpEnhancedDocs.Style.BorderTopWidth = 1; - this.gpEnhancedDocs.Style.CornerDiameter = 4; - this.gpEnhancedDocs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpEnhancedDocs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpEnhancedDocs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpEnhancedDocs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpEnhancedDocs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpEnhancedDocs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpEnhancedDocs.TabIndex = 9; - this.gpEnhancedDocs.Text = "Enhanced Documents"; - // - // cbEnhancedDocumentSync - // - // - // - // - this.cbEnhancedDocumentSync.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbEnhancedDocumentSync.Checked = true; - this.cbEnhancedDocumentSync.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbEnhancedDocumentSync.CheckValue = "Y"; - this.cbEnhancedDocumentSync.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbEnhancedDocumentSync.Location = new System.Drawing.Point(8, 8); - this.cbEnhancedDocumentSync.Margin = new System.Windows.Forms.Padding(2); - this.cbEnhancedDocumentSync.Name = "cbEnhancedDocumentSync"; - this.cbEnhancedDocumentSync.Size = new System.Drawing.Size(99, 19); - this.cbEnhancedDocumentSync.TabIndex = 9; - this.cbEnhancedDocumentSync.Text = "Sync Navigation"; - // - // gpPasteSettings - // - this.gpPasteSettings.BackColor = System.Drawing.Color.Transparent; - this.gpPasteSettings.CanvasColor = System.Drawing.SystemColors.Control; - this.gpPasteSettings.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpPasteSettings.Controls.Add(this.cbPastePlainText); - this.gpPasteSettings.Controls.Add(this.cbPasteNoReturns); - this.gpPasteSettings.DisabledBackColor = System.Drawing.Color.Empty; - this.gpPasteSettings.Location = new System.Drawing.Point(25, 252); - this.gpPasteSettings.Margin = new System.Windows.Forms.Padding(2); - this.gpPasteSettings.Name = "gpPasteSettings"; - this.gpPasteSettings.Size = new System.Drawing.Size(119, 81); - // - // - // - this.gpPasteSettings.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpPasteSettings.Style.BackColorGradientAngle = 90; - this.gpPasteSettings.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpPasteSettings.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPasteSettings.Style.BorderBottomWidth = 1; - this.gpPasteSettings.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpPasteSettings.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPasteSettings.Style.BorderLeftWidth = 1; - this.gpPasteSettings.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPasteSettings.Style.BorderRightWidth = 1; - this.gpPasteSettings.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPasteSettings.Style.BorderTopWidth = 1; - this.gpPasteSettings.Style.CornerDiameter = 4; - this.gpPasteSettings.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpPasteSettings.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpPasteSettings.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpPasteSettings.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpPasteSettings.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpPasteSettings.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpPasteSettings.TabIndex = 8; - this.gpPasteSettings.Text = "Paste Settings"; - // - // cbPastePlainText - // - // - // - // - this.cbPastePlainText.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbPastePlainText.Checked = true; - this.cbPastePlainText.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbPastePlainText.CheckValue = "Y"; - this.cbPastePlainText.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbPastePlainText.Location = new System.Drawing.Point(8, 8); - this.cbPastePlainText.Margin = new System.Windows.Forms.Padding(2); - this.cbPastePlainText.Name = "cbPastePlainText"; - this.cbPastePlainText.Size = new System.Drawing.Size(92, 19); - this.cbPastePlainText.TabIndex = 9; - this.cbPastePlainText.Text = "Plain Text"; - this.cbPastePlainText.CheckedChanged += new System.EventHandler(this.cbPastePlainText_CheckedChanged); - // - // cbPasteNoReturns - // - // - // - // - this.cbPasteNoReturns.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbPasteNoReturns.Checked = true; - this.cbPasteNoReturns.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbPasteNoReturns.CheckValue = "Y"; - this.cbPasteNoReturns.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbPasteNoReturns.Location = new System.Drawing.Point(8, 28); - this.cbPasteNoReturns.Margin = new System.Windows.Forms.Padding(2); - this.cbPasteNoReturns.Name = "cbPasteNoReturns"; - this.cbPasteNoReturns.Size = new System.Drawing.Size(92, 19); - this.cbPasteNoReturns.TabIndex = 10; - this.cbPasteNoReturns.Text = "No Returns"; - this.cbPasteNoReturns.CheckedChanged += new System.EventHandler(this.cbPasteNoReturns_CheckedChanged); - // - // gpTreeView - // - this.gpTreeView.BackColor = System.Drawing.Color.Transparent; - this.gpTreeView.CanvasColor = System.Drawing.SystemColors.Control; - this.gpTreeView.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpTreeView.Controls.Add(this.cbTVExpand); - this.gpTreeView.DisabledBackColor = System.Drawing.Color.Empty; - this.gpTreeView.Location = new System.Drawing.Point(312, 165); - this.gpTreeView.Margin = new System.Windows.Forms.Padding(2); - this.gpTreeView.Name = "gpTreeView"; - this.gpTreeView.Size = new System.Drawing.Size(119, 72); - // - // - // - this.gpTreeView.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpTreeView.Style.BackColorGradientAngle = 90; - this.gpTreeView.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpTreeView.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTreeView.Style.BorderBottomWidth = 1; - this.gpTreeView.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpTreeView.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTreeView.Style.BorderLeftWidth = 1; - this.gpTreeView.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTreeView.Style.BorderRightWidth = 1; - this.gpTreeView.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTreeView.Style.BorderTopWidth = 1; - this.gpTreeView.Style.CornerDiameter = 4; - this.gpTreeView.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpTreeView.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpTreeView.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpTreeView.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpTreeView.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpTreeView.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpTreeView.TabIndex = 6; - this.gpTreeView.Text = "Tree View"; - // - // cbTVExpand - // - // - // - // - this.cbTVExpand.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbTVExpand.Checked = true; - this.cbTVExpand.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbTVExpand.CheckValue = "Y"; - this.cbTVExpand.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbTVExpand.Location = new System.Drawing.Point(8, 13); - this.cbTVExpand.Margin = new System.Windows.Forms.Padding(2); - this.cbTVExpand.Name = "cbTVExpand"; - this.cbTVExpand.Size = new System.Drawing.Size(92, 19); - this.superTooltip1.SetSuperTooltip(this.cbTVExpand, new DevComponents.DotNetBar.SuperTooltipInfo("Remember Last", "", "When checked, PROMS will remember the last procedure you had seleced from the tre" + + this.txbxVisioPath.TabIndex = 0; + this.txbxVisioPath.WordWrap = false; + this.txbxVisioPath.Leave += new System.EventHandler(this.txbxVisioPath_Leave_1); + // + // gpSeparateWindows + // + this.gpSeparateWindows.BackColor = System.Drawing.Color.Transparent; + this.gpSeparateWindows.CanvasColor = System.Drawing.SystemColors.Control; + this.gpSeparateWindows.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpSeparateWindows.Controls.Add(this.cbSeparateWindows); + this.gpSeparateWindows.DisabledBackColor = System.Drawing.Color.Empty; + this.gpSeparateWindows.Location = new System.Drawing.Point(313, 252); + this.gpSeparateWindows.Margin = new System.Windows.Forms.Padding(2); + this.gpSeparateWindows.Name = "gpSeparateWindows"; + this.gpSeparateWindows.Size = new System.Drawing.Size(127, 81); + // + // + // + this.gpSeparateWindows.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpSeparateWindows.Style.BackColorGradientAngle = 90; + this.gpSeparateWindows.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpSeparateWindows.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSeparateWindows.Style.BorderBottomWidth = 1; + this.gpSeparateWindows.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpSeparateWindows.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSeparateWindows.Style.BorderLeftWidth = 1; + this.gpSeparateWindows.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSeparateWindows.Style.BorderRightWidth = 1; + this.gpSeparateWindows.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpSeparateWindows.Style.BorderTopWidth = 1; + this.gpSeparateWindows.Style.CornerDiameter = 4; + this.gpSeparateWindows.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpSeparateWindows.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpSeparateWindows.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpSeparateWindows.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpSeparateWindows.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpSeparateWindows.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpSeparateWindows.TabIndex = 10; + this.gpSeparateWindows.Text = "Separate Windows"; + // + // cbSeparateWindows + // + // + // + // + this.cbSeparateWindows.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbSeparateWindows.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbSeparateWindows.Location = new System.Drawing.Point(8, 8); + this.cbSeparateWindows.Margin = new System.Windows.Forms.Padding(2); + this.cbSeparateWindows.Name = "cbSeparateWindows"; + this.cbSeparateWindows.Size = new System.Drawing.Size(107, 19); + this.cbSeparateWindows.TabIndex = 9; + this.cbSeparateWindows.Text = "By Procedure Set"; + this.cbSeparateWindows.CheckedChanged += new System.EventHandler(this.cbSeparateWindows_CheckedChanged); + // + // gpEnhancedDocs + // + this.gpEnhancedDocs.BackColor = System.Drawing.Color.Transparent; + this.gpEnhancedDocs.CanvasColor = System.Drawing.SystemColors.Control; + this.gpEnhancedDocs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpEnhancedDocs.Controls.Add(this.cbEnhancedDocumentSync); + this.gpEnhancedDocs.DisabledBackColor = System.Drawing.Color.Empty; + this.gpEnhancedDocs.Location = new System.Drawing.Point(167, 252); + this.gpEnhancedDocs.Margin = new System.Windows.Forms.Padding(2); + this.gpEnhancedDocs.Name = "gpEnhancedDocs"; + this.gpEnhancedDocs.Size = new System.Drawing.Size(127, 81); + // + // + // + this.gpEnhancedDocs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpEnhancedDocs.Style.BackColorGradientAngle = 90; + this.gpEnhancedDocs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpEnhancedDocs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpEnhancedDocs.Style.BorderBottomWidth = 1; + this.gpEnhancedDocs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpEnhancedDocs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpEnhancedDocs.Style.BorderLeftWidth = 1; + this.gpEnhancedDocs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpEnhancedDocs.Style.BorderRightWidth = 1; + this.gpEnhancedDocs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpEnhancedDocs.Style.BorderTopWidth = 1; + this.gpEnhancedDocs.Style.CornerDiameter = 4; + this.gpEnhancedDocs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpEnhancedDocs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpEnhancedDocs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpEnhancedDocs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpEnhancedDocs.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpEnhancedDocs.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpEnhancedDocs.TabIndex = 9; + this.gpEnhancedDocs.Text = "Enhanced Documents"; + // + // cbEnhancedDocumentSync + // + // + // + // + this.cbEnhancedDocumentSync.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbEnhancedDocumentSync.Checked = true; + this.cbEnhancedDocumentSync.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbEnhancedDocumentSync.CheckValue = "Y"; + this.cbEnhancedDocumentSync.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbEnhancedDocumentSync.Location = new System.Drawing.Point(8, 8); + this.cbEnhancedDocumentSync.Margin = new System.Windows.Forms.Padding(2); + this.cbEnhancedDocumentSync.Name = "cbEnhancedDocumentSync"; + this.cbEnhancedDocumentSync.Size = new System.Drawing.Size(99, 19); + this.cbEnhancedDocumentSync.TabIndex = 9; + this.cbEnhancedDocumentSync.Text = "Sync Navigation"; + // + // gpPasteSettings + // + this.gpPasteSettings.BackColor = System.Drawing.Color.Transparent; + this.gpPasteSettings.CanvasColor = System.Drawing.SystemColors.Control; + this.gpPasteSettings.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpPasteSettings.Controls.Add(this.cbPastePlainText); + this.gpPasteSettings.Controls.Add(this.cbPasteNoReturns); + this.gpPasteSettings.DisabledBackColor = System.Drawing.Color.Empty; + this.gpPasteSettings.Location = new System.Drawing.Point(25, 252); + this.gpPasteSettings.Margin = new System.Windows.Forms.Padding(2); + this.gpPasteSettings.Name = "gpPasteSettings"; + this.gpPasteSettings.Size = new System.Drawing.Size(119, 81); + // + // + // + this.gpPasteSettings.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpPasteSettings.Style.BackColorGradientAngle = 90; + this.gpPasteSettings.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpPasteSettings.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPasteSettings.Style.BorderBottomWidth = 1; + this.gpPasteSettings.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpPasteSettings.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPasteSettings.Style.BorderLeftWidth = 1; + this.gpPasteSettings.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPasteSettings.Style.BorderRightWidth = 1; + this.gpPasteSettings.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPasteSettings.Style.BorderTopWidth = 1; + this.gpPasteSettings.Style.CornerDiameter = 4; + this.gpPasteSettings.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpPasteSettings.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpPasteSettings.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpPasteSettings.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpPasteSettings.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpPasteSettings.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpPasteSettings.TabIndex = 8; + this.gpPasteSettings.Text = "Paste Settings"; + // + // cbPastePlainText + // + // + // + // + this.cbPastePlainText.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbPastePlainText.Checked = true; + this.cbPastePlainText.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbPastePlainText.CheckValue = "Y"; + this.cbPastePlainText.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbPastePlainText.Location = new System.Drawing.Point(8, 8); + this.cbPastePlainText.Margin = new System.Windows.Forms.Padding(2); + this.cbPastePlainText.Name = "cbPastePlainText"; + this.cbPastePlainText.Size = new System.Drawing.Size(92, 19); + this.cbPastePlainText.TabIndex = 9; + this.cbPastePlainText.Text = "Plain Text"; + this.cbPastePlainText.CheckedChanged += new System.EventHandler(this.cbPastePlainText_CheckedChanged); + // + // cbPasteNoReturns + // + // + // + // + this.cbPasteNoReturns.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbPasteNoReturns.Checked = true; + this.cbPasteNoReturns.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbPasteNoReturns.CheckValue = "Y"; + this.cbPasteNoReturns.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbPasteNoReturns.Location = new System.Drawing.Point(8, 28); + this.cbPasteNoReturns.Margin = new System.Windows.Forms.Padding(2); + this.cbPasteNoReturns.Name = "cbPasteNoReturns"; + this.cbPasteNoReturns.Size = new System.Drawing.Size(92, 19); + this.cbPasteNoReturns.TabIndex = 10; + this.cbPasteNoReturns.Text = "No Returns"; + this.cbPasteNoReturns.CheckedChanged += new System.EventHandler(this.cbPasteNoReturns_CheckedChanged); + // + // gpTreeView + // + this.gpTreeView.BackColor = System.Drawing.Color.Transparent; + this.gpTreeView.CanvasColor = System.Drawing.SystemColors.Control; + this.gpTreeView.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpTreeView.Controls.Add(this.cbTVExpand); + this.gpTreeView.DisabledBackColor = System.Drawing.Color.Empty; + this.gpTreeView.Location = new System.Drawing.Point(312, 165); + this.gpTreeView.Margin = new System.Windows.Forms.Padding(2); + this.gpTreeView.Name = "gpTreeView"; + this.gpTreeView.Size = new System.Drawing.Size(119, 72); + // + // + // + this.gpTreeView.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpTreeView.Style.BackColorGradientAngle = 90; + this.gpTreeView.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpTreeView.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTreeView.Style.BorderBottomWidth = 1; + this.gpTreeView.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpTreeView.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTreeView.Style.BorderLeftWidth = 1; + this.gpTreeView.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTreeView.Style.BorderRightWidth = 1; + this.gpTreeView.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTreeView.Style.BorderTopWidth = 1; + this.gpTreeView.Style.CornerDiameter = 4; + this.gpTreeView.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpTreeView.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpTreeView.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpTreeView.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpTreeView.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpTreeView.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpTreeView.TabIndex = 6; + this.gpTreeView.Text = "Tree View"; + // + // cbTVExpand + // + // + // + // + this.cbTVExpand.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbTVExpand.Checked = true; + this.cbTVExpand.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbTVExpand.CheckValue = "Y"; + this.cbTVExpand.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbTVExpand.Location = new System.Drawing.Point(8, 13); + this.cbTVExpand.Margin = new System.Windows.Forms.Padding(2); + this.cbTVExpand.Name = "cbTVExpand"; + this.cbTVExpand.Size = new System.Drawing.Size(92, 19); + this.superTooltip1.SetSuperTooltip(this.cbTVExpand, new DevComponents.DotNetBar.SuperTooltipInfo("Remember Last", "", "When checked, PROMS will remember the last procedure you had seleced from the tre" + "e and expand the tree to that location the next time PROMS is started.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 130))); - this.cbTVExpand.TabIndex = 7; - this.cbTVExpand.Text = "Remember Last"; - this.cbTVExpand.CheckedChanged += new System.EventHandler(this.cbTVExpand_CheckedChanged); - // - // gpStepTypeToolTip - // - this.gpStepTypeToolTip.BackColor = System.Drawing.Color.Transparent; - this.gpStepTypeToolTip.CanvasColor = System.Drawing.SystemColors.Control; - this.gpStepTypeToolTip.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpStepTypeToolTip.Controls.Add(this.cbStepTypeToolTip); - this.gpStepTypeToolTip.DisabledBackColor = System.Drawing.Color.Empty; - this.gpStepTypeToolTip.Location = new System.Drawing.Point(167, 165); - this.gpStepTypeToolTip.Margin = new System.Windows.Forms.Padding(2); - this.gpStepTypeToolTip.Name = "gpStepTypeToolTip"; - this.gpStepTypeToolTip.Size = new System.Drawing.Size(119, 72); - // - // - // - this.gpStepTypeToolTip.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpStepTypeToolTip.Style.BackColorGradientAngle = 90; - this.gpStepTypeToolTip.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpStepTypeToolTip.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpStepTypeToolTip.Style.BorderBottomWidth = 1; - this.gpStepTypeToolTip.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpStepTypeToolTip.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpStepTypeToolTip.Style.BorderLeftWidth = 1; - this.gpStepTypeToolTip.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpStepTypeToolTip.Style.BorderRightWidth = 1; - this.gpStepTypeToolTip.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpStepTypeToolTip.Style.BorderTopWidth = 1; - this.gpStepTypeToolTip.Style.CornerDiameter = 4; - this.gpStepTypeToolTip.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpStepTypeToolTip.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpStepTypeToolTip.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpStepTypeToolTip.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpStepTypeToolTip.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpStepTypeToolTip.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpStepTypeToolTip.TabIndex = 5; - this.gpStepTypeToolTip.Text = "Step Type Tool Tip"; - // - // cbStepTypeToolTip - // - // - // - // - this.cbStepTypeToolTip.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbStepTypeToolTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbStepTypeToolTip.Location = new System.Drawing.Point(8, 13); - this.cbStepTypeToolTip.Margin = new System.Windows.Forms.Padding(2); - this.cbStepTypeToolTip.Name = "cbStepTypeToolTip"; - this.cbStepTypeToolTip.Size = new System.Drawing.Size(92, 19); - this.cbStepTypeToolTip.TabIndex = 7; - this.cbStepTypeToolTip.Text = "Show Tool Tip"; - this.cbStepTypeToolTip.CheckedChanged += new System.EventHandler(this.cbStepTypeToolTip_CheckedChanged); - // - // gpAnnotationSettings - // - this.gpAnnotationSettings.BackColor = System.Drawing.Color.Transparent; - this.gpAnnotationSettings.CanvasColor = System.Drawing.SystemColors.Control; - this.gpAnnotationSettings.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpAnnotationSettings.Controls.Add(this.cbAnnotationPopup); - this.gpAnnotationSettings.DisabledBackColor = System.Drawing.Color.Empty; - this.gpAnnotationSettings.Location = new System.Drawing.Point(25, 165); - this.gpAnnotationSettings.Margin = new System.Windows.Forms.Padding(2); - this.gpAnnotationSettings.Name = "gpAnnotationSettings"; - this.gpAnnotationSettings.Size = new System.Drawing.Size(119, 72); - // - // - // - this.gpAnnotationSettings.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpAnnotationSettings.Style.BackColorGradientAngle = 90; - this.gpAnnotationSettings.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpAnnotationSettings.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpAnnotationSettings.Style.BorderBottomWidth = 1; - this.gpAnnotationSettings.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpAnnotationSettings.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpAnnotationSettings.Style.BorderLeftWidth = 1; - this.gpAnnotationSettings.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpAnnotationSettings.Style.BorderRightWidth = 1; - this.gpAnnotationSettings.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpAnnotationSettings.Style.BorderTopWidth = 1; - this.gpAnnotationSettings.Style.CornerDiameter = 4; - this.gpAnnotationSettings.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpAnnotationSettings.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpAnnotationSettings.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpAnnotationSettings.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpAnnotationSettings.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpAnnotationSettings.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpAnnotationSettings.TabIndex = 4; - this.gpAnnotationSettings.Text = "Annotation Settings"; - // - // cbAnnotationPopup - // - // - // - // - this.cbAnnotationPopup.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbAnnotationPopup.Checked = true; - this.cbAnnotationPopup.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbAnnotationPopup.CheckValue = "Y"; - this.cbAnnotationPopup.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbAnnotationPopup.Location = new System.Drawing.Point(8, 13); - this.cbAnnotationPopup.Margin = new System.Windows.Forms.Padding(2); - this.cbAnnotationPopup.Name = "cbAnnotationPopup"; - this.cbAnnotationPopup.Size = new System.Drawing.Size(92, 19); - this.cbAnnotationPopup.TabIndex = 7; - this.cbAnnotationPopup.Text = "Auto Popup"; - this.cbAnnotationPopup.CheckedChanged += new System.EventHandler(this.cbAnnotationPopup_CheckedChanged); - // - // gpTransRangeColor - // - this.gpTransRangeColor.BackColor = System.Drawing.Color.Transparent; - this.gpTransRangeColor.CanvasColor = System.Drawing.SystemColors.Control; - this.gpTransRangeColor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpTransRangeColor.Controls.Add(this.colorPickerButton1); - this.gpTransRangeColor.DisabledBackColor = System.Drawing.Color.Empty; - this.gpTransRangeColor.Location = new System.Drawing.Point(488, 13); - this.gpTransRangeColor.Name = "gpTransRangeColor"; - this.gpTransRangeColor.Size = new System.Drawing.Size(146, 62); - // - // - // - this.gpTransRangeColor.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpTransRangeColor.Style.BackColorGradientAngle = 90; - this.gpTransRangeColor.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpTransRangeColor.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTransRangeColor.Style.BorderBottomWidth = 1; - this.gpTransRangeColor.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpTransRangeColor.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTransRangeColor.Style.BorderLeftWidth = 1; - this.gpTransRangeColor.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTransRangeColor.Style.BorderRightWidth = 1; - this.gpTransRangeColor.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpTransRangeColor.Style.BorderTopWidth = 1; - this.gpTransRangeColor.Style.CornerDiameter = 4; - this.gpTransRangeColor.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpTransRangeColor.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpTransRangeColor.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpTransRangeColor.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpTransRangeColor.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpTransRangeColor.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpTransRangeColor.TabIndex = 3; - this.gpTransRangeColor.Text = "Transition Range Color"; - this.gpTransRangeColor.Visible = false; - // - // colorPickerButton1 - // - this.colorPickerButton1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.colorPickerButton1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.colorPickerButton1.Image = ((System.Drawing.Image)(resources.GetObject("colorPickerButton1.Image"))); - this.colorPickerButton1.Location = new System.Drawing.Point(7, 12); - this.colorPickerButton1.Name = "colorPickerButton1"; - this.colorPickerButton1.SelectedColorImageRectangle = new System.Drawing.Rectangle(2, 2, 12, 12); - this.colorPickerButton1.Size = new System.Drawing.Size(103, 23); - this.colorPickerButton1.TabIndex = 0; - this.colorPickerButton1.SelectedColorChanged += new System.EventHandler(this.colorPickerButton1_SelectedColorChanged); - // - // gpPropPageStyle - // - this.gpPropPageStyle.BackColor = System.Drawing.Color.Transparent; - this.gpPropPageStyle.CanvasColor = System.Drawing.SystemColors.Control; - this.gpPropPageStyle.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpPropPageStyle.Controls.Add(this.cbPropGrid); - this.gpPropPageStyle.Controls.Add(this.cbTabbedIntrFace); - this.gpPropPageStyle.Controls.Add(this.cbButtonIntrFace); - this.gpPropPageStyle.DisabledBackColor = System.Drawing.Color.Empty; - this.gpPropPageStyle.Location = new System.Drawing.Point(155, 12); - this.gpPropPageStyle.Margin = new System.Windows.Forms.Padding(2); - this.gpPropPageStyle.Name = "gpPropPageStyle"; - this.gpPropPageStyle.Size = new System.Drawing.Size(127, 107); - // - // - // - this.gpPropPageStyle.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpPropPageStyle.Style.BackColorGradientAngle = 90; - this.gpPropPageStyle.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpPropPageStyle.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPropPageStyle.Style.BorderBottomWidth = 1; - this.gpPropPageStyle.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpPropPageStyle.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPropPageStyle.Style.BorderLeftWidth = 1; - this.gpPropPageStyle.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPropPageStyle.Style.BorderRightWidth = 1; - this.gpPropPageStyle.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpPropPageStyle.Style.BorderTopWidth = 1; - this.gpPropPageStyle.Style.CornerDiameter = 4; - this.gpPropPageStyle.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpPropPageStyle.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpPropPageStyle.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpPropPageStyle.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpPropPageStyle.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpPropPageStyle.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpPropPageStyle.TabIndex = 2; - this.gpPropPageStyle.Text = "Property Page Style"; - // - // cbPropGrid - // - // - // - // - this.cbPropGrid.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbPropGrid.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbPropGrid.Location = new System.Drawing.Point(8, 59); - this.cbPropGrid.Margin = new System.Windows.Forms.Padding(2); - this.cbPropGrid.Name = "cbPropGrid"; - this.cbPropGrid.Size = new System.Drawing.Size(97, 20); - this.cbPropGrid.TabIndex = 2; - this.cbPropGrid.Text = "Property Grid"; - this.cbPropGrid.Visible = false; - // - // cbTabbedIntrFace - // - // - // - // - this.cbTabbedIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbTabbedIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbTabbedIntrFace.Location = new System.Drawing.Point(8, 34); - this.cbTabbedIntrFace.Margin = new System.Windows.Forms.Padding(2); - this.cbTabbedIntrFace.Name = "cbTabbedIntrFace"; - this.cbTabbedIntrFace.Size = new System.Drawing.Size(111, 20); - this.cbTabbedIntrFace.TabIndex = 1; - this.cbTabbedIntrFace.Text = "Tabbed Interface"; - // - // cbButtonIntrFace - // - // - // - // - this.cbButtonIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbButtonIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbButtonIntrFace.Location = new System.Drawing.Point(8, 10); - this.cbButtonIntrFace.Margin = new System.Windows.Forms.Padding(2); - this.cbButtonIntrFace.Name = "cbButtonIntrFace"; - this.cbButtonIntrFace.Size = new System.Drawing.Size(97, 20); - this.cbButtonIntrFace.TabIndex = 0; - this.cbButtonIntrFace.Text = "Button Interface"; - // - // tiIntrFaceStngs - // - this.tiIntrFaceStngs.AttachedControl = this.tabControlPanel3; - this.tiIntrFaceStngs.Name = "tiIntrFaceStngs"; - this.tiIntrFaceStngs.Text = "My Interface Settings"; - // - // tabControlPanel1 - // - this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty; - this.tabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControlPanel1.Location = new System.Drawing.Point(0, 27); - this.tabControlPanel1.Margin = new System.Windows.Forms.Padding(2); - this.tabControlPanel1.Name = "tabControlPanel1"; - this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1); - this.tabControlPanel1.Size = new System.Drawing.Size(645, 430); - this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.SystemColors.Control; - this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.tabControlPanel1.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) + this.cbTVExpand.TabIndex = 7; + this.cbTVExpand.Text = "Remember Last"; + this.cbTVExpand.CheckedChanged += new System.EventHandler(this.cbTVExpand_CheckedChanged); + // + // gpStepTypeToolTip + // + this.gpStepTypeToolTip.BackColor = System.Drawing.Color.Transparent; + this.gpStepTypeToolTip.CanvasColor = System.Drawing.SystemColors.Control; + this.gpStepTypeToolTip.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpStepTypeToolTip.Controls.Add(this.cbStepTypeToolTip); + this.gpStepTypeToolTip.DisabledBackColor = System.Drawing.Color.Empty; + this.gpStepTypeToolTip.Location = new System.Drawing.Point(167, 165); + this.gpStepTypeToolTip.Margin = new System.Windows.Forms.Padding(2); + this.gpStepTypeToolTip.Name = "gpStepTypeToolTip"; + this.gpStepTypeToolTip.Size = new System.Drawing.Size(119, 72); + // + // + // + this.gpStepTypeToolTip.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpStepTypeToolTip.Style.BackColorGradientAngle = 90; + this.gpStepTypeToolTip.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpStepTypeToolTip.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpStepTypeToolTip.Style.BorderBottomWidth = 1; + this.gpStepTypeToolTip.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpStepTypeToolTip.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpStepTypeToolTip.Style.BorderLeftWidth = 1; + this.gpStepTypeToolTip.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpStepTypeToolTip.Style.BorderRightWidth = 1; + this.gpStepTypeToolTip.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpStepTypeToolTip.Style.BorderTopWidth = 1; + this.gpStepTypeToolTip.Style.CornerDiameter = 4; + this.gpStepTypeToolTip.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpStepTypeToolTip.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpStepTypeToolTip.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpStepTypeToolTip.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpStepTypeToolTip.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpStepTypeToolTip.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpStepTypeToolTip.TabIndex = 5; + this.gpStepTypeToolTip.Text = "Step Type Tool Tip"; + // + // cbStepTypeToolTip + // + // + // + // + this.cbStepTypeToolTip.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbStepTypeToolTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbStepTypeToolTip.Location = new System.Drawing.Point(8, 13); + this.cbStepTypeToolTip.Margin = new System.Windows.Forms.Padding(2); + this.cbStepTypeToolTip.Name = "cbStepTypeToolTip"; + this.cbStepTypeToolTip.Size = new System.Drawing.Size(92, 19); + this.cbStepTypeToolTip.TabIndex = 7; + this.cbStepTypeToolTip.Text = "Show Tool Tip"; + this.cbStepTypeToolTip.CheckedChanged += new System.EventHandler(this.cbStepTypeToolTip_CheckedChanged); + // + // gpAnnotationSettings + // + this.gpAnnotationSettings.BackColor = System.Drawing.Color.Transparent; + this.gpAnnotationSettings.CanvasColor = System.Drawing.SystemColors.Control; + this.gpAnnotationSettings.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpAnnotationSettings.Controls.Add(this.cbAnnotationPopup); + this.gpAnnotationSettings.DisabledBackColor = System.Drawing.Color.Empty; + this.gpAnnotationSettings.Location = new System.Drawing.Point(25, 165); + this.gpAnnotationSettings.Margin = new System.Windows.Forms.Padding(2); + this.gpAnnotationSettings.Name = "gpAnnotationSettings"; + this.gpAnnotationSettings.Size = new System.Drawing.Size(119, 72); + // + // + // + this.gpAnnotationSettings.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpAnnotationSettings.Style.BackColorGradientAngle = 90; + this.gpAnnotationSettings.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpAnnotationSettings.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnotationSettings.Style.BorderBottomWidth = 1; + this.gpAnnotationSettings.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpAnnotationSettings.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnotationSettings.Style.BorderLeftWidth = 1; + this.gpAnnotationSettings.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnotationSettings.Style.BorderRightWidth = 1; + this.gpAnnotationSettings.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpAnnotationSettings.Style.BorderTopWidth = 1; + this.gpAnnotationSettings.Style.CornerDiameter = 4; + this.gpAnnotationSettings.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpAnnotationSettings.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpAnnotationSettings.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpAnnotationSettings.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpAnnotationSettings.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpAnnotationSettings.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpAnnotationSettings.TabIndex = 4; + this.gpAnnotationSettings.Text = "Annotation Settings"; + // + // cbAnnotationPopup + // + // + // + // + this.cbAnnotationPopup.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbAnnotationPopup.Checked = true; + this.cbAnnotationPopup.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbAnnotationPopup.CheckValue = "Y"; + this.cbAnnotationPopup.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbAnnotationPopup.Location = new System.Drawing.Point(8, 13); + this.cbAnnotationPopup.Margin = new System.Windows.Forms.Padding(2); + this.cbAnnotationPopup.Name = "cbAnnotationPopup"; + this.cbAnnotationPopup.Size = new System.Drawing.Size(92, 19); + this.cbAnnotationPopup.TabIndex = 7; + this.cbAnnotationPopup.Text = "Auto Popup"; + this.cbAnnotationPopup.CheckedChanged += new System.EventHandler(this.cbAnnotationPopup_CheckedChanged); + // + // gpTransRangeColor + // + this.gpTransRangeColor.BackColor = System.Drawing.Color.Transparent; + this.gpTransRangeColor.CanvasColor = System.Drawing.SystemColors.Control; + this.gpTransRangeColor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpTransRangeColor.Controls.Add(this.colorPickerButton1); + this.gpTransRangeColor.DisabledBackColor = System.Drawing.Color.Empty; + this.gpTransRangeColor.Location = new System.Drawing.Point(488, 13); + this.gpTransRangeColor.Name = "gpTransRangeColor"; + this.gpTransRangeColor.Size = new System.Drawing.Size(146, 62); + // + // + // + this.gpTransRangeColor.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpTransRangeColor.Style.BackColorGradientAngle = 90; + this.gpTransRangeColor.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpTransRangeColor.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTransRangeColor.Style.BorderBottomWidth = 1; + this.gpTransRangeColor.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpTransRangeColor.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTransRangeColor.Style.BorderLeftWidth = 1; + this.gpTransRangeColor.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTransRangeColor.Style.BorderRightWidth = 1; + this.gpTransRangeColor.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpTransRangeColor.Style.BorderTopWidth = 1; + this.gpTransRangeColor.Style.CornerDiameter = 4; + this.gpTransRangeColor.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpTransRangeColor.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpTransRangeColor.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpTransRangeColor.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpTransRangeColor.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpTransRangeColor.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpTransRangeColor.TabIndex = 3; + this.gpTransRangeColor.Text = "Transition Range Color"; + this.gpTransRangeColor.Visible = false; + // + // colorPickerButton1 + // + this.colorPickerButton1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.colorPickerButton1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.colorPickerButton1.Image = ((System.Drawing.Image)(resources.GetObject("colorPickerButton1.Image"))); + this.colorPickerButton1.Location = new System.Drawing.Point(7, 12); + this.colorPickerButton1.Name = "colorPickerButton1"; + this.colorPickerButton1.SelectedColorImageRectangle = new System.Drawing.Rectangle(2, 2, 12, 12); + this.colorPickerButton1.Size = new System.Drawing.Size(103, 23); + this.colorPickerButton1.TabIndex = 0; + this.colorPickerButton1.SelectedColorChanged += new System.EventHandler(this.colorPickerButton1_SelectedColorChanged); + // + // gpPropPageStyle + // + this.gpPropPageStyle.BackColor = System.Drawing.Color.Transparent; + this.gpPropPageStyle.CanvasColor = System.Drawing.SystemColors.Control; + this.gpPropPageStyle.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; + this.gpPropPageStyle.Controls.Add(this.cbPropGrid); + this.gpPropPageStyle.Controls.Add(this.cbTabbedIntrFace); + this.gpPropPageStyle.Controls.Add(this.cbButtonIntrFace); + this.gpPropPageStyle.DisabledBackColor = System.Drawing.Color.Empty; + this.gpPropPageStyle.Location = new System.Drawing.Point(155, 12); + this.gpPropPageStyle.Margin = new System.Windows.Forms.Padding(2); + this.gpPropPageStyle.Name = "gpPropPageStyle"; + this.gpPropPageStyle.Size = new System.Drawing.Size(127, 107); + // + // + // + this.gpPropPageStyle.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; + this.gpPropPageStyle.Style.BackColorGradientAngle = 90; + this.gpPropPageStyle.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; + this.gpPropPageStyle.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPropPageStyle.Style.BorderBottomWidth = 1; + this.gpPropPageStyle.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; + this.gpPropPageStyle.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPropPageStyle.Style.BorderLeftWidth = 1; + this.gpPropPageStyle.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPropPageStyle.Style.BorderRightWidth = 1; + this.gpPropPageStyle.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; + this.gpPropPageStyle.Style.BorderTopWidth = 1; + this.gpPropPageStyle.Style.CornerDiameter = 4; + this.gpPropPageStyle.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; + this.gpPropPageStyle.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; + this.gpPropPageStyle.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; + this.gpPropPageStyle.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; + // + // + // + this.gpPropPageStyle.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; + // + // + // + this.gpPropPageStyle.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.gpPropPageStyle.TabIndex = 2; + this.gpPropPageStyle.Text = "Property Page Style"; + // + // cbPropGrid + // + // + // + // + this.cbPropGrid.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbPropGrid.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbPropGrid.Location = new System.Drawing.Point(8, 59); + this.cbPropGrid.Margin = new System.Windows.Forms.Padding(2); + this.cbPropGrid.Name = "cbPropGrid"; + this.cbPropGrid.Size = new System.Drawing.Size(97, 20); + this.cbPropGrid.TabIndex = 2; + this.cbPropGrid.Text = "Property Grid"; + this.cbPropGrid.Visible = false; + // + // cbTabbedIntrFace + // + // + // + // + this.cbTabbedIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbTabbedIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbTabbedIntrFace.Location = new System.Drawing.Point(8, 34); + this.cbTabbedIntrFace.Margin = new System.Windows.Forms.Padding(2); + this.cbTabbedIntrFace.Name = "cbTabbedIntrFace"; + this.cbTabbedIntrFace.Size = new System.Drawing.Size(111, 20); + this.cbTabbedIntrFace.TabIndex = 1; + this.cbTabbedIntrFace.Text = "Tabbed Interface"; + // + // cbButtonIntrFace + // + // + // + // + this.cbButtonIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbButtonIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbButtonIntrFace.Location = new System.Drawing.Point(8, 10); + this.cbButtonIntrFace.Margin = new System.Windows.Forms.Padding(2); + this.cbButtonIntrFace.Name = "cbButtonIntrFace"; + this.cbButtonIntrFace.Size = new System.Drawing.Size(97, 20); + this.cbButtonIntrFace.TabIndex = 0; + this.cbButtonIntrFace.Text = "Button Interface"; + // + // tiIntrFaceStngs + // + this.tiIntrFaceStngs.AttachedControl = this.tabControlPanel3; + this.tiIntrFaceStngs.Name = "tiIntrFaceStngs"; + this.tiIntrFaceStngs.Text = "My Interface Settings"; + // + // tabControlPanel1 + // + this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty; + this.tabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControlPanel1.Location = new System.Drawing.Point(0, 27); + this.tabControlPanel1.Margin = new System.Windows.Forms.Padding(2); + this.tabControlPanel1.Name = "tabControlPanel1"; + this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1); + this.tabControlPanel1.Size = new System.Drawing.Size(645, 528); + this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.SystemColors.Control; + this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.tabControlPanel1.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) | DevComponents.DotNetBar.eBorderSide.Bottom))); - this.tabControlPanel1.Style.GradientAngle = 90; - this.tabControlPanel1.TabIndex = 1; - this.tabControlPanel1.TabItem = this.tiGeneral; - this.tabControlPanel1.ThemeAware = true; - // - // tiGeneral - // - this.tiGeneral.AttachedControl = this.tabControlPanel1; - this.tiGeneral.Name = "tiGeneral"; - this.tiGeneral.Text = "General"; - this.tiGeneral.Visible = false; - // - // tabControlPanel2 - // - this.tabControlPanel2.DisabledBackColor = System.Drawing.Color.Empty; - this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControlPanel2.Location = new System.Drawing.Point(0, 27); - this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(2); - this.tabControlPanel2.Name = "tabControlPanel2"; - this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1); - this.tabControlPanel2.Size = new System.Drawing.Size(645, 528); - this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.SystemColors.Control; - this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; - this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) + this.tabControlPanel1.Style.GradientAngle = 90; + this.tabControlPanel1.TabIndex = 1; + this.tabControlPanel1.TabItem = this.tiGeneral; + this.tabControlPanel1.ThemeAware = true; + // + // tiGeneral + // + this.tiGeneral.AttachedControl = this.tabControlPanel1; + this.tiGeneral.Name = "tiGeneral"; + this.tiGeneral.Text = "General"; + this.tiGeneral.Visible = false; + // + // tabControlPanel2 + // + this.tabControlPanel2.DisabledBackColor = System.Drawing.Color.Empty; + this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControlPanel2.Location = new System.Drawing.Point(0, 27); + this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(2); + this.tabControlPanel2.Name = "tabControlPanel2"; + this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1); + this.tabControlPanel2.Size = new System.Drawing.Size(645, 528); + this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.SystemColors.Control; + this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine; + this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right) | DevComponents.DotNetBar.eBorderSide.Bottom))); - this.tabControlPanel2.Style.GradientAngle = 90; - this.tabControlPanel2.TabIndex = 2; - this.tabControlPanel2.TabItem = this.tiStUpMsg; - this.tabControlPanel2.ThemeAware = true; - // - // tiStUpMsg - // - this.tiStUpMsg.AttachedControl = this.tabControlPanel2; - this.tiStUpMsg.Name = "tiStUpMsg"; - this.tiStUpMsg.Text = "Startup Message"; - this.tiStUpMsg.Visible = false; - // - // cbUCFLForSetOnly - // - this.cbUCFLForSetOnly.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbUCFLForSetOnly.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbUCFLForSetOnly.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbUCFLForSetOnly.Location = new System.Drawing.Point(2, 89); - this.cbUCFLForSetOnly.Margin = new System.Windows.Forms.Padding(2); - this.cbUCFLForSetOnly.Name = "cbUCFLForSetOnly"; - this.cbUCFLForSetOnly.Size = new System.Drawing.Size(105, 19); - this.cbUCFLForSetOnly.TabIndex = 5; - this.cbUCFLForSetOnly.Text = "Load For Set Only"; - this.cbUCFLForSetOnly.CheckedChanged += new System.EventHandler(this.cbUCFLForSetOnly_CheckedChanged); - // - // cbUCFLUseAll - // - this.cbUCFLUseAll.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbUCFLUseAll.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbUCFLUseAll.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbUCFLUseAll.Location = new System.Drawing.Point(2, 67); - this.cbUCFLUseAll.Margin = new System.Windows.Forms.Padding(2); - this.cbUCFLUseAll.Name = "cbUCFLUseAll"; - this.cbUCFLUseAll.Size = new System.Drawing.Size(105, 19); - this.cbUCFLUseAll.TabIndex = 4; - this.cbUCFLUseAll.Text = "Load Use All"; - this.cbUCFLUseAll.CheckedChanged += new System.EventHandler(this.cbUCFLUseAll_CheckedChanged); - // - // cbUCFLOnlyImport - // - this.cbUCFLOnlyImport.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbUCFLOnlyImport.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbUCFLOnlyImport.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbUCFLOnlyImport.Location = new System.Drawing.Point(2, 46); - this.cbUCFLOnlyImport.Margin = new System.Windows.Forms.Padding(2); - this.cbUCFLOnlyImport.Name = "cbUCFLOnlyImport"; - this.cbUCFLOnlyImport.Size = new System.Drawing.Size(105, 19); - this.cbUCFLOnlyImport.TabIndex = 3; - this.cbUCFLOnlyImport.Text = "Load Only Imported"; - this.cbUCFLOnlyImport.CheckedChanged += new System.EventHandler(this.cbUCFLOnlyImport_CheckedChanged); - // - // cbUCFLNotUsed - // - this.cbUCFLNotUsed.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbUCFLNotUsed.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbUCFLNotUsed.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbUCFLNotUsed.Location = new System.Drawing.Point(2, 24); - this.cbUCFLNotUsed.Margin = new System.Windows.Forms.Padding(2); - this.cbUCFLNotUsed.Name = "cbUCFLNotUsed"; - this.cbUCFLNotUsed.Size = new System.Drawing.Size(88, 19); - this.cbUCFLNotUsed.TabIndex = 2; - this.cbUCFLNotUsed.Text = "Load Not Used"; - this.cbUCFLNotUsed.CheckedChanged += new System.EventHandler(this.cbUCFLNotUsed_CheckedChanged); - // - // cbUCFIgnore - // - this.cbUCFIgnore.BackColor = System.Drawing.Color.Transparent; - // - // - // - this.cbUCFIgnore.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbUCFIgnore.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; - this.cbUCFIgnore.Location = new System.Drawing.Point(2, 2); - this.cbUCFIgnore.Margin = new System.Windows.Forms.Padding(2); - this.cbUCFIgnore.Name = "cbUCFIgnore"; - this.cbUCFIgnore.Size = new System.Drawing.Size(67, 19); - this.cbUCFIgnore.TabIndex = 1; - this.cbUCFIgnore.Text = "Ignore"; - this.cbUCFIgnore.CheckedChanged += new System.EventHandler(this.cbUCFIgnore_CheckedChanged); - // - // btnReset - // - this.btnReset.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnReset.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; - this.btnReset.Location = new System.Drawing.Point(194, 591); - this.btnReset.Margin = new System.Windows.Forms.Padding(2); - this.btnReset.Name = "btnReset"; - this.btnReset.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.btnReset.Size = new System.Drawing.Size(79, 19); - this.superTooltip1.SetSuperTooltip(this.btnReset, new DevComponents.DotNetBar.SuperTooltipInfo("Default Settings", "", "This will reset saved user settings back to the Proms system default.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(140, 95))); - this.btnReset.TabIndex = 3; - this.btnReset.Text = "Default Settings"; - this.btnReset.Click += new System.EventHandler(this.btnReset_Click); - // - // superTooltip1 - // - this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray); - this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F"; - // - // cbMSWordPrompt - // - // - // - // - this.cbMSWordPrompt.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.cbMSWordPrompt.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.cbMSWordPrompt.Location = new System.Drawing.Point(8, 5); - this.cbMSWordPrompt.Margin = new System.Windows.Forms.Padding(2); - this.cbMSWordPrompt.Name = "cbMSWordPrompt"; - this.cbMSWordPrompt.Size = new System.Drawing.Size(92, 44); - this.cbMSWordPrompt.TabIndex = 9; - this.cbMSWordPrompt.Text = "Show Prompt For Summaries"; - // - // gpMSWordSum - // - this.gpMSWordSum.BackColor = System.Drawing.Color.Transparent; - this.gpMSWordSum.CanvasColor = System.Drawing.SystemColors.Control; - this.gpMSWordSum.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; - this.gpMSWordSum.Controls.Add(this.cbMSWordPrompt); - this.gpMSWordSum.DisabledBackColor = System.Drawing.Color.Empty; - this.gpMSWordSum.Location = new System.Drawing.Point(25, 347); - this.gpMSWordSum.Margin = new System.Windows.Forms.Padding(2); - this.gpMSWordSum.Name = "gpMSWordSum"; - this.gpMSWordSum.Size = new System.Drawing.Size(119, 81); - // - // - // - this.gpMSWordSum.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; - this.gpMSWordSum.Style.BackColorGradientAngle = 90; - this.gpMSWordSum.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; - this.gpMSWordSum.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpMSWordSum.Style.BorderBottomWidth = 1; - this.gpMSWordSum.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder; - this.gpMSWordSum.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpMSWordSum.Style.BorderLeftWidth = 1; - this.gpMSWordSum.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpMSWordSum.Style.BorderRightWidth = 1; - this.gpMSWordSum.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; - this.gpMSWordSum.Style.BorderTopWidth = 1; - this.gpMSWordSum.Style.CornerDiameter = 4; - this.gpMSWordSum.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; - this.gpMSWordSum.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; - this.gpMSWordSum.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; - this.gpMSWordSum.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; - // - // - // - this.gpMSWordSum.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square; - // - // - // - this.gpMSWordSum.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; - this.gpMSWordSum.TabIndex = 14; - this.gpMSWordSum.Text = "Opening in MS Word"; - // - // frmSysOptions - // - this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(699, 620); - this.ControlBox = false; - this.Controls.Add(this.btnReset); - this.Controls.Add(this.tcSysOpts); - this.Controls.Add(this.panButtons); - this.Controls.Add(this.btnOK); - this.Controls.Add(this.btnCancel); - this.DoubleBuffered = true; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Margin = new System.Windows.Forms.Padding(2); - this.Name = "frmSysOptions"; - this.Text = "Proms System Options"; - this.Load += new System.EventHandler(this.frmSysOptions_Load); - this.gpSystemColor.ResumeLayout(false); - this.panButtons.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).EndInit(); - this.tcSysOpts.ResumeLayout(false); - this.tabControlPanel3.ResumeLayout(false); - this.gpOpenTabs.ResumeLayout(false); - this.gpShwRplWords.ResumeLayout(false); - this.gpVisioPath.ResumeLayout(false); - this.gpSeparateWindows.ResumeLayout(false); - this.gpEnhancedDocs.ResumeLayout(false); - this.gpPasteSettings.ResumeLayout(false); - this.gpTreeView.ResumeLayout(false); - this.gpStepTypeToolTip.ResumeLayout(false); - this.gpAnnotationSettings.ResumeLayout(false); - this.gpTransRangeColor.ResumeLayout(false); - this.gpPropPageStyle.ResumeLayout(false); - this.gpMSWordSum.ResumeLayout(false); - this.ResumeLayout(false); + this.tabControlPanel2.Style.GradientAngle = 90; + this.tabControlPanel2.TabIndex = 2; + this.tabControlPanel2.TabItem = this.tiStUpMsg; + this.tabControlPanel2.ThemeAware = true; + // + // tiStUpMsg + // + this.tiStUpMsg.AttachedControl = this.tabControlPanel2; + this.tiStUpMsg.Name = "tiStUpMsg"; + this.tiStUpMsg.Text = "Startup Message"; + this.tiStUpMsg.Visible = false; + // + // cbUCFLForSetOnly + // + this.cbUCFLForSetOnly.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFLForSetOnly.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFLForSetOnly.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFLForSetOnly.Location = new System.Drawing.Point(2, 89); + this.cbUCFLForSetOnly.Margin = new System.Windows.Forms.Padding(2); + this.cbUCFLForSetOnly.Name = "cbUCFLForSetOnly"; + this.cbUCFLForSetOnly.Size = new System.Drawing.Size(105, 19); + this.cbUCFLForSetOnly.TabIndex = 5; + this.cbUCFLForSetOnly.Text = "Load For Set Only"; + this.cbUCFLForSetOnly.CheckedChanged += new System.EventHandler(this.cbUCFLForSetOnly_CheckedChanged); + // + // cbUCFLUseAll + // + this.cbUCFLUseAll.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFLUseAll.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFLUseAll.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFLUseAll.Location = new System.Drawing.Point(2, 67); + this.cbUCFLUseAll.Margin = new System.Windows.Forms.Padding(2); + this.cbUCFLUseAll.Name = "cbUCFLUseAll"; + this.cbUCFLUseAll.Size = new System.Drawing.Size(105, 19); + this.cbUCFLUseAll.TabIndex = 4; + this.cbUCFLUseAll.Text = "Load Use All"; + this.cbUCFLUseAll.CheckedChanged += new System.EventHandler(this.cbUCFLUseAll_CheckedChanged); + // + // cbUCFLOnlyImport + // + this.cbUCFLOnlyImport.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFLOnlyImport.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFLOnlyImport.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFLOnlyImport.Location = new System.Drawing.Point(2, 46); + this.cbUCFLOnlyImport.Margin = new System.Windows.Forms.Padding(2); + this.cbUCFLOnlyImport.Name = "cbUCFLOnlyImport"; + this.cbUCFLOnlyImport.Size = new System.Drawing.Size(105, 19); + this.cbUCFLOnlyImport.TabIndex = 3; + this.cbUCFLOnlyImport.Text = "Load Only Imported"; + this.cbUCFLOnlyImport.CheckedChanged += new System.EventHandler(this.cbUCFLOnlyImport_CheckedChanged); + // + // cbUCFLNotUsed + // + this.cbUCFLNotUsed.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFLNotUsed.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFLNotUsed.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFLNotUsed.Location = new System.Drawing.Point(2, 24); + this.cbUCFLNotUsed.Margin = new System.Windows.Forms.Padding(2); + this.cbUCFLNotUsed.Name = "cbUCFLNotUsed"; + this.cbUCFLNotUsed.Size = new System.Drawing.Size(88, 19); + this.cbUCFLNotUsed.TabIndex = 2; + this.cbUCFLNotUsed.Text = "Load Not Used"; + this.cbUCFLNotUsed.CheckedChanged += new System.EventHandler(this.cbUCFLNotUsed_CheckedChanged); + // + // cbUCFIgnore + // + this.cbUCFIgnore.BackColor = System.Drawing.Color.Transparent; + // + // + // + this.cbUCFIgnore.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; + this.cbUCFIgnore.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton; + this.cbUCFIgnore.Location = new System.Drawing.Point(2, 2); + this.cbUCFIgnore.Margin = new System.Windows.Forms.Padding(2); + this.cbUCFIgnore.Name = "cbUCFIgnore"; + this.cbUCFIgnore.Size = new System.Drawing.Size(67, 19); + this.cbUCFIgnore.TabIndex = 1; + this.cbUCFIgnore.Text = "Ignore"; + this.cbUCFIgnore.CheckedChanged += new System.EventHandler(this.cbUCFIgnore_CheckedChanged); + // + // btnReset + // + this.btnReset.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.btnReset.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.btnReset.Location = new System.Drawing.Point(194, 591); + this.btnReset.Margin = new System.Windows.Forms.Padding(2); + this.btnReset.Name = "btnReset"; + this.btnReset.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.btnReset.Size = new System.Drawing.Size(79, 19); + this.superTooltip1.SetSuperTooltip(this.btnReset, new DevComponents.DotNetBar.SuperTooltipInfo("Default Settings", "", "This will reset saved user settings back to the Proms system default.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(140, 95))); + this.btnReset.TabIndex = 3; + this.btnReset.Text = "Default Settings"; + this.btnReset.Click += new System.EventHandler(this.btnReset_Click); + // + // superTooltip1 + // + this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray); + this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F"; + // + // cbShwAnnoFilter + // + this.cbShwAnnoFilter.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + this.cbShwAnnoFilter.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground; + this.cbShwAnnoFilter.Location = new System.Drawing.Point(25, 13); + this.cbShwAnnoFilter.Name = "cbShwAnnoFilter"; + this.cbShwAnnoFilter.Size = new System.Drawing.Size(91, 23); + this.cbShwAnnoFilter.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; + this.cbShwAnnoFilter.TabIndex = 0; + this.cbShwAnnoFilter.Text = "Select"; + this.cbShwAnnoFilter.Click += new System.EventHandler(this.buttonX1_Click); + // + // frmSysOptions + // + this.AcceptButton = this.btnOK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnCancel; + this.ClientSize = new System.Drawing.Size(699, 620); + this.ControlBox = false; + this.Controls.Add(this.btnReset); + this.Controls.Add(this.tcSysOpts); + this.Controls.Add(this.panButtons); + this.Controls.Add(this.btnOK); + this.Controls.Add(this.btnCancel); + this.DoubleBuffered = true; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(2); + this.Name = "frmSysOptions"; + this.Text = "Proms System Options"; + this.Load += new System.EventHandler(this.frmSysOptions_Load); + this.gpSystemColor.ResumeLayout(false); + this.panButtons.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).EndInit(); + this.tcSysOpts.ResumeLayout(false); + this.tabControlPanel3.ResumeLayout(false); + this.gpMSWordSum.ResumeLayout(false); + this.gpOpenTabs.ResumeLayout(false); + this.gpShwRplWords.ResumeLayout(false); + this.gpAnnoTypeFilter.ResumeLayout(false); + this.gpVisioPath.ResumeLayout(false); + this.gpSeparateWindows.ResumeLayout(false); + this.gpEnhancedDocs.ResumeLayout(false); + this.gpPasteSettings.ResumeLayout(false); + this.gpTreeView.ResumeLayout(false); + this.gpStepTypeToolTip.ResumeLayout(false); + this.gpAnnotationSettings.ResumeLayout(false); + this.gpTransRangeColor.ResumeLayout(false); + this.gpPropPageStyle.ResumeLayout(false); + this.ResumeLayout(false); } @@ -1342,11 +1399,14 @@ namespace VEPROMS private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLNotUsed; private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFIgnore; private DevComponents.DotNetBar.Controls.GroupPanel gpOpenTabs; - private DevComponents.DotNetBar.Controls.GroupPanel gpShwRplWords; + private DevComponents.DotNetBar.Controls.GroupPanel gpShwRplWords; + private DevComponents.DotNetBar.Controls.GroupPanel gpAnnoTypeFilter; private DevComponents.DotNetBar.Controls.CheckBoxX cbOTRemember; private DevComponents.DotNetBar.Controls.CheckBoxX cbOTAutoOpen; private DevComponents.DotNetBar.Controls.CheckBoxX cbShwRplWrdsColor; + //private DevComponents.DotNetBar.ButtonItem cbShwAnnoFilter; private DevComponents.DotNetBar.Controls.GroupPanel gpMSWordSum; private DevComponents.DotNetBar.Controls.CheckBoxX cbMSWordPrompt; - } + private DevComponents.DotNetBar.ButtonX cbShwAnnoFilter; + } } diff --git a/PROMS/VEPROMS User Interface/frmSysOptions.cs b/PROMS/VEPROMS User Interface/frmSysOptions.cs index 2c9afd49..c3364284 100644 --- a/PROMS/VEPROMS User Interface/frmSysOptions.cs +++ b/PROMS/VEPROMS User Interface/frmSysOptions.cs @@ -365,5 +365,24 @@ namespace VEPROMS Properties.Settings.Default.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked; // update setting value Properties.Settings.Default.Save(); // save settings } - } + private void cbShwAnnoFilter_Click(object sender, EventArgs e) + { + + //OnSelectAnnotations(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); + + //Settings.Default.cbShwAnnoFilter = cbShwAnnoFilter.Checked; + //VlnSettings.cbShwAnnoFilter = cbShwAnnoFilter.Checked; + //Properties.Settings.Default.cbShwAnnoFilter = cbShwAnnoFilter.Checked; // update setting value + //Properties.Settings.Default.Save(); // save settings + } + + private void buttonX1_Click(object sender, EventArgs e) + { + frmVEPROMS.tv_SelectAnnotations(); + } + //private void OnSelectAnnotations(object sender, vlnTreeEventArgs args) + //{ + // if (SelectAnnotations != null) SelectAnnotations(sender, args); + //} + } } \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs index 030f4070..18e3b2bf 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs @@ -723,9 +723,8 @@ namespace VEPROMS this.epAnnotations.Expanded = false; this.epAnnotations.ExpandedBounds = new System.Drawing.Rectangle(4, 544, 1187, 202); this.epAnnotations.ExpandOnTitleClick = true; - this.epAnnotations.Location = new System.Drawing.Point(5, 547); - this.epAnnotations.Name = "epAnnotations"; - this.epAnnotations.Size = new System.Drawing.Size(1185, 26); + this.epAnnotations.Location = new System.Drawing.Point(5, 324); + this.epAnnotations.Size = new System.Drawing.Size(1185, 249); this.epAnnotations.Style.Alignment = System.Drawing.StringAlignment.Center; this.epAnnotations.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; this.epAnnotations.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; @@ -765,7 +764,7 @@ namespace VEPROMS this.ctrlAnnotationDetails.MyUserInfo = null; this.ctrlAnnotationDetails.Name = "ctrlAnnotationDetails"; this.ctrlAnnotationDetails.ProcItem = null; - this.ctrlAnnotationDetails.Size = new System.Drawing.Size(1185, 0); + this.ctrlAnnotationDetails.Size = new System.Drawing.Size(1185, 223); this.ctrlAnnotationDetails.TabIndex = 15; // // btnAnnoDetailsPushPin @@ -799,7 +798,7 @@ namespace VEPROMS this.epProcedures.ExpandOnTitleClick = true; this.epProcedures.Location = new System.Drawing.Point(5, 57); this.epProcedures.Name = "epProcedures"; - this.epProcedures.Size = new System.Drawing.Size(326, 490); + this.epProcedures.Size = new System.Drawing.Size(326, 267); this.epProcedures.Style.Alignment = System.Drawing.StringAlignment.Center; this.epProcedures.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; this.epProcedures.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 840dbd6e..8e0178e9 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -543,7 +543,7 @@ namespace VEPROMS tv.RefreshCheckedOutProcedures += new vlnTreeViewEvent(tv_RefreshCheckedOutProcedures); tv.ProcedureCheckedOutTo += new vlnTreeViewEvent(tv_ProcedureCheckedOutTo); tv.ViewPDF += new vlnTreeViewPdfEvent(tv_ViewPDF); - + //tv.SelectAnnotations += new (tv_SelectAnnotations); displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged); tv.ExportImportProcedureSets += new vlnTreeViewEvent(tv_ExportImportProcedureSets); @@ -1296,7 +1296,38 @@ namespace VEPROMS pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0; } + //void tv_SelectAnnotations(object sender, vlnTreeEventArgs args) + //{ + // ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo; + // if (pi == null) return; + // tc.SaveCurrentEditItem(pi); + + // //pi.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex; + + // DlgAnnotationsSelect sannoDlg = new DlgAnnotationsSelect(pi, MyUserInfo.UserID); + // //sannoDlg.SelectedSlave = args.UnitIndex; + // //sannoDlg.MySessionInfo = MySessionInfo; + // sannoDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window + + // //pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0; + //} + public static void tv_SelectAnnotations() + { + //ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo; + //if (pi == null) return; + + //tc.SaveCurrentEditItem(pi); + + //pi.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex; + + DlgAnnotationsSelect sannoDlg = new DlgAnnotationsSelect(VlnSettings.UserID); + //sannoDlg.SelectedSlave = args.UnitIndex; + //sannoDlg.MySessionInfo = MySessionInfo; + sannoDlg.ShowDialog(); // RHM 20120925 - Center dialog over PROMS window + + //pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0; + } void tv_CreateTimeCriticalActionSummary(object sender, vlnTreeEventArgs args) { DialogResult dr = System.Windows.Forms.DialogResult.Yes; diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList.cs index a804a4fe..f444303b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList.cs @@ -206,7 +206,7 @@ namespace VEPROMS.CSLA.Library public partial class AnnotationAuditInfoListPropertyDescriptor : vlnListPropertyDescriptor { private AnnotationAuditInfo Item { get { return (AnnotationAuditInfo)_Item; } } - public AnnotationAuditInfoListPropertyDescriptor(AnnotationAuditInfoList collection, int index) : base(collection, index) { ;} + public AnnotationAuditInfoListPropertyDescriptor(AnnotationAuditInfoList collection, int index) : base(collection, index) {; } } #endregion #region Converter diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList_bak.cs b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList_bak.cs new file mode 100644 index 00000000..a804a4fe --- /dev/null +++ b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList_bak.cs @@ -0,0 +1,226 @@ +// ======================================================================== +// Copyright 2007 - Volian Enterprises, Inc. All rights reserved. +// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE +// ------------------------------------------------------------------------ +// $Workfile: $ $Revision: $ +// $Author: $ $Date: $ +// +// $History: $ +// ======================================================================== + +using System; +using System.Data; +using System.Data.SqlClient; +using Csla; +using Csla.Data; +using System.Configuration; +using System.IO; +using System.ComponentModel; +using System.Collections.Generic; +namespace VEPROMS.CSLA.Library +{ + /// + /// AnnotationAuditInfoList Generated by MyGeneration using the CSLA Object Mapping template + /// + [Serializable()] + [TypeConverter(typeof(AnnotationAuditInfoListConverter))] + public partial class AnnotationAuditInfoList : ReadOnlyListBase, ICustomTypeDescriptor, IDisposable + { + #region Log4Net + private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + #endregion + #region Business Methods + internal new IList Items + { get { return base.Items; } } + public void AddEvents() + { + foreach (AnnotationAuditInfo tmp in this) + { + tmp.Changed += new AnnotationAuditInfoEvent(tmp_Changed); + } + } + void tmp_Changed(object sender) + { + for (int i = 0; i < Count; i++) + { + if (base[i] == sender) + this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); + } + } + private bool _Disposed = false; + private static int _CountCreated = 0; + private static int _CountDisposed = 0; + private static int _CountFinalized = 0; + private static int IncrementCountCreated + { get { return ++_CountCreated; } } + private int _CountWhenCreated = IncrementCountCreated; + public static int CountCreated + { get { return _CountCreated; } } + public static int CountNotDisposed + { get { return _CountCreated - _CountDisposed; } } + public static int CountNotFinalized + { get { return _CountCreated - _CountFinalized; } } + ~AnnotationAuditInfoList() + { + _CountFinalized++; + } + public void Dispose() + { + if (_Disposed) return; + _CountDisposed++; + _Disposed = true; + foreach (AnnotationAuditInfo tmp in this) + { + tmp.Changed -= new AnnotationAuditInfoEvent(tmp_Changed); + } + } + #endregion + #region Factory Methods + public static AnnotationAuditInfoList _AnnotationAuditInfoList = null; + /// + /// Return a list of all AnnotationAuditInfo. + /// + public static AnnotationAuditInfoList Get() + { + try + { + if (_AnnotationAuditInfoList != null) + return _AnnotationAuditInfoList; + AnnotationAuditInfoList tmp = DataPortal.Fetch(); + AnnotationAuditInfo.AddList(tmp); + tmp.AddEvents(); + _AnnotationAuditInfoList = tmp; + return tmp; + } + catch (Exception ex) + { + throw new DbCslaException("Error on AnnotationAuditInfoList.Get", ex); + } + } + /// + /// Reset the list of all AnnotationAuditInfo. + /// + public static void Reset() + { + _AnnotationAuditInfoList = null; + } + // CSLATODO: Add alternative gets - + //public static AnnotationAuditInfoList Get() + //{ + // try + // { + // return DataPortal.Fetch(new FilteredCriteria()); + // } + // catch (Exception ex) + // { + // throw new DbCslaException("Error on AnnotationAuditInfoList.Get", ex); + // } + //} + private AnnotationAuditInfoList() + { /* require use of factory methods */ } + #endregion + #region Data Access Portal + private void DataPortal_Fetch() + { + this.RaiseListChangedEvents = false; + if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfoList.DataPortal_Fetch", GetHashCode()); + try + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "getAnnotationAudits"; + cm.CommandTimeout = Database.DefaultTimeout; + using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) + { + IsReadOnly = false; + while (dr.Read()) this.Add(new AnnotationAuditInfo(dr)); + IsReadOnly = true; + } + } + } + } + catch (Exception ex) + { + if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfoList.DataPortal_Fetch", ex); + throw new DbCslaException("AnnotationAuditInfoList.DataPortal_Fetch", ex); + } + this.RaiseListChangedEvents = true; + } + #endregion + #region ICustomTypeDescriptor impl + public String GetClassName() + { return TypeDescriptor.GetClassName(this, true); } + public AttributeCollection GetAttributes() + { return TypeDescriptor.GetAttributes(this, true); } + public String GetComponentName() + { return TypeDescriptor.GetComponentName(this, true); } + public TypeConverter GetConverter() + { return TypeDescriptor.GetConverter(this, true); } + public EventDescriptor GetDefaultEvent() + { return TypeDescriptor.GetDefaultEvent(this, true); } + public PropertyDescriptor GetDefaultProperty() + { return TypeDescriptor.GetDefaultProperty(this, true); } + public object GetEditor(Type editorBaseType) + { return TypeDescriptor.GetEditor(this, editorBaseType, true); } + public EventDescriptorCollection GetEvents(Attribute[] attributes) + { return TypeDescriptor.GetEvents(this, attributes, true); } + public EventDescriptorCollection GetEvents() + { return TypeDescriptor.GetEvents(this, true); } + public object GetPropertyOwner(PropertyDescriptor pd) + { return this; } + /// + /// Called to get the properties of this type. Returns properties with certain + /// attributes. this restriction is not implemented here. + /// + /// + /// + public PropertyDescriptorCollection GetProperties(Attribute[] attributes) + { return GetProperties(); } + /// + /// Called to get the properties of this type. + /// + /// + public PropertyDescriptorCollection GetProperties() + { + // Create a collection object to hold property descriptors + PropertyDescriptorCollection pds = new PropertyDescriptorCollection(null); + // Iterate the list + for (int i = 0; i < this.Items.Count; i++) + { + // Create a property descriptor for the item and add to the property descriptor collection + AnnotationAuditInfoListPropertyDescriptor pd = new AnnotationAuditInfoListPropertyDescriptor(this, i); + pds.Add(pd); + } + // return the property descriptor collection + return pds; + } + #endregion + } // Class + #region Property Descriptor + /// + /// Summary description for CollectionPropertyDescriptor. + /// + public partial class AnnotationAuditInfoListPropertyDescriptor : vlnListPropertyDescriptor + { + private AnnotationAuditInfo Item { get { return (AnnotationAuditInfo)_Item; } } + public AnnotationAuditInfoListPropertyDescriptor(AnnotationAuditInfoList collection, int index) : base(collection, index) { ;} + } + #endregion + #region Converter + internal class AnnotationAuditInfoListConverter : ExpandableObjectConverter + { + public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) + { + if (destType == typeof(string) && value is AnnotationAuditInfoList) + { + // Return department and department role separated by comma. + return ((AnnotationAuditInfoList)value).Items.Count.ToString() + " AnnotationAudits"; + } + return base.ConvertTo(context, culture, value, destType); + } + } + #endregion +} // Namespace diff --git a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs new file mode 100644 index 00000000..7df44168 --- /dev/null +++ b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs @@ -0,0 +1,463 @@ +using System; +using System.Collections.Generic; +using System.Collections; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Data; +using System.Data.SqlClient; +using System.Text.RegularExpressions; +using Csla; +using Csla.Data; +using System.Configuration; +using System.IO; +using System.ComponentModel; + + +//namespace VEPROMS.CSLA.Library; + +// C2025-027 this new file is used to support (data retrival) for selecting Annotation types to display on the Annotation screen. + +namespace VEPROMS.CSLA.Library +{ + public class AnnotationstypeSelections + { + public static DataTable Get(string UserID, int ItemID) + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + try + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "getAnnotationstypeSelections"; + cm.CommandTimeout = Database.DefaultTimeout; + cm.Parameters.AddWithValue("@UsrID", UserID); + SqlDataAdapter da = new SqlDataAdapter(cm); + SqlDataReader reader = cm.ExecuteReader(); + DataTable dt = new DataTable(); + dt.Load(reader); + // if the user has not created a annotation sub-set list saved to AnnotationTypeSelections table. + if (dt.Rows.Count < 1) + { + //dt.Rows.Add(DataPortal.Fetch()); + //DataPortal.Fetch(); + DataRow row; + int rowflg = 0; + foreach (AnnotationTypeInfo annosel in DataPortal.Fetch()) + { + // C2025-027 need to use a datatable instead of AnnotationTypeInfoList so the global search Annotations will not be effected by the Annotation select list selections + if (rowflg == 0) + { + row = dt.NewRow(); + dt.Rows.Add(row); + rowflg = 1; + } + else + { + row = dt.NewRow(); + row["TypeID"] = annosel.TypeID; + row["ItemID"] = ItemID; + row["Name"] = annosel.Name; + row["Config"] = annosel.Config; + row["DTS"] = annosel.DTS; + row["UserID"] = annosel.UserID; + row["IsEPAnnotationType"] = annosel.IsEPAnnotationType; + dt.Rows.Add(row); + } + + //row = dt.NewRow(); + //row["TypeID"] = annosel.TypeID; + //row["ItemID"] = ItemID; + //row["Name"] = annosel.Name; + //row["Config"] = annosel.Config; + //row["DTS"] = annosel.DTS; + //row["UserID"] = annosel.UserID; + //row["IsEPAnnotationType"] = annosel.IsEPAnnotationType; + + //dt.Rows.Add(row); + + //dt.Rows.Add(0,annosel.TypeID, ItemID, annosel.Name, annosel.Config, annosel.DTS, annosel.UserID, 0x0000000000000000, annosel.IsEPAnnotationType); + }; + } + return dt; + + } + catch (Exception ex) + { + //B2025-004 + //if it fails loading previously open tabs, simply treat it as if no tabs were open + //instead of crashing + return new DataTable(); + } + + } + } + } + public static DataTable Retrieve(string UserID) + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + try + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "getAnnotationstypeSelections"; + cm.CommandTimeout = Database.DefaultTimeout; + cm.Parameters.AddWithValue("@UsrID", UserID); + SqlDataAdapter da = new SqlDataAdapter(cm); + SqlDataReader reader = cm.ExecuteReader(); + DataTable dt = new DataTable(); + dt.Load(reader); + + return dt; + + } + catch (Exception ex) + { + //B2025-004 + //if it fails loading previously open tabs, simply treat it as if no tabs were open + //instead of crashing + return new DataTable(); + } + + } + } + } + public static DataTable GetAnnoTypes(string UserID) + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + try + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "getAnnotationSelectListTypes"; + cm.CommandTimeout = Database.DefaultTimeout; + SqlDataAdapter da = new SqlDataAdapter(cm); + cm.Parameters.AddWithValue("@UserID", UserID); + SqlDataReader reader = cm.ExecuteReader(); + DataTable dt = new DataTable(); + dt.Load(reader); + + return dt; + + } + catch (Exception ex) + { + //B2025-004 + //if it fails loading previously open tabs, simply treat it as if no tabs were open + //instead of crashing + return new DataTable(); + } + + } + } + } + public static void Update(string UserID, int TypeID, int dltFlg, string Name = "") + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + try + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "UpdateAnnotationstypeSelections"; + cm.CommandTimeout = Database.DefaultTimeout; + cm.Parameters.AddWithValue("@UserID", UserID); + cm.Parameters.AddWithValue("@TypeID", TypeID); + cm.Parameters.AddWithValue("@dltFlg", dltFlg); + cm.Parameters.AddWithValue("@Name", Name); + + cm.ExecuteNonQuery(); + } + catch (Exception ex) + { + + } + } + } + } + + public static AnnotationTypeInfoList AnnotationSelectByItem(int itemID) + { + try + { + //if (_AnnotationTypeInfoList != null) + // return _AnnotationTypeInfoList; + AnnotationTypeInfoList tmp = (AnnotationTypeInfoList)DataPortal.Fetch(new AnnotationSelectByItemIDCriteria(itemID)); + if (tmp.Count < 1) + { + tmp = DataPortal.Fetch(); + } + AnnotationTypeInfo.AddList(tmp); + tmp.AddEvents(); + return tmp; + + } + catch (Exception ex) + { + throw new DbCslaException("Error on AnnotationTypeInfoList.Get", ex); + } + } + private int _TypeID; + [System.ComponentModel.DataObjectField(true, true)] + public int TypeID + { + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + get + { + return _TypeID; + } + } + private int _ItemID; + [System.ComponentModel.DataObjectField(true, true)] + public int ItemID + { + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + get + { + return _ItemID; + } + } + private string _Name = string.Empty; + public string Name + { + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + get + { + return _Name; + } + } + private string _Config = string.Empty; + public string Config + { + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + get + { + return _Config; + } + } + private DateTime _DTS = new DateTime(); + public DateTime DTS + { + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + get + { + return _DTS; + } + } + private string _UserID = string.Empty; + public string UserID + { + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + get + { + return _UserID; + } + } + private int _AnnotationTypeAnnotationCount = 0; + public int AnnotationTypeAnnotationCount + { + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + get + { + return _AnnotationTypeAnnotationCount; + } + } + //C2025-023 - Electronic Procedures - Modifications to PROMS + // Is Annotation Type an EP Annotation? + private bool _IsEPAnnotationType = false; + public bool IsEPAnnotationType + { + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + get + { + return _IsEPAnnotationType; + } + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + set + { + if (_IsEPAnnotationType != value) + { + _IsEPAnnotationType = value; + //PropertyHasChanged(); + } + } + } + + #region Log4Net + private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + #endregion + private string _ErrorMessage = string.Empty; + public string ErrorMessage + { + get { return _ErrorMessage; } + } + [Serializable()] + protected class retrieveAnnotSelections + { + private int _itemID; + public int itemID { get { return _itemID; } } + + public retrieveAnnotSelections(int itemID) + { + _itemID = itemID; + } + } + [Serializable()] + public class retrieveAnnotSelectionsList + { + private int _TypeID; + public int TypeID + { + get { return _TypeID; } + set { _TypeID = value; } + } + private int _ItemID; + public int ItemID + { + get { return _ItemID; } + set { _ItemID = value; } + } + private string _Name; + public string Name + { + get { return _Name; } + set { _Name = value; } + } + private string _Config; + public string Config + { + get { return _Config; } + set { _Config = value; } + } + private DateTime _DTS; + public DateTime DTS + { + get { return _DTS; } + set { _DTS = value; } + } + private string _UserID; + public string UserID + { + get { return _UserID; } + set { _UserID = value; } + } + private bool _IsEPAnnotationType; + public bool IsEPAnnotationType + { + get { return _IsEPAnnotationType; } + set { _IsEPAnnotationType = value; } + } + private string _ErrorMessage = string.Empty; + public string ErrorMessage + { + get { return _ErrorMessage; } + } + } + + private void DataPortal_Fetch(retrieveAnnotSelections criteria) + { + try + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "getAnnotationstypeSelections"; + cm.CommandTimeout = Database.DefaultTimeout; + cm.Parameters.AddWithValue("@itemID", criteria.itemID); + using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) + { + if (!dr.Read()) + { + _ErrorMessage = "No Record Found"; + return; + } + ReadData(dr); + } + } + } + } + catch (Exception ex) + { + if (_MyLog.IsErrorEnabled) _MyLog.Error("retrieveAnnotSelectionsList.DataPortal_Fetch", ex); + throw new DbCslaException("retrieveAnnotSelectionsList.DataPortal_Fetch", ex); + } + //this.RaiseListChangedEvents = true; + } + [Serializable()] + protected class AnnotationSelectByItemIDCriteria + { + private int _itemID; + public int ItemID + { get { return _itemID; } } + + public AnnotationSelectByItemIDCriteria(int itemID) + { + _itemID = itemID; + } + } + private void DataPortal_Fetch(AnnotationSelectByItemIDCriteria criteria) + { + //this.RaiseListChangedEvents = false; + if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationTypeInfoList.DataPortal_Fetch", GetHashCode()); + try + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "getAnnotationTypes2"; + cm.Parameters.AddWithValue("@itemID", criteria.ItemID); + cm.CommandTimeout = Database.DefaultTimeout; + using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) + { + //IsReadOnly = false; + //while (dr.Read()) this.Add(new AnnotationTypeInfo(dr)); + //IsReadOnly = true; + } + } + } + } + catch (Exception ex) + { + if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationTypeInfoList.DataPortal_Fetch", ex); + throw new DbCslaException("AnnotationTypeInfoList.DataPortal_Fetch", ex); + } + //this.RaiseListChangedEvents = true; + } + + private void ReadData(SafeDataReader dr) + { + if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] retrieveAnnotSelectionsList.ReadData", GetHashCode()); + try + { + _TypeID = dr.GetInt32("TypeID"); + _ItemID = dr.GetInt32("ItemID"); + _Name = dr.GetString("Name"); + _Config = dr.GetString("Config"); + _DTS = dr.GetDateTime("DTS"); + _UserID = dr.GetString("UserID"); + _AnnotationTypeAnnotationCount = dr.GetInt32("AnnotationCount"); + if (dr.GetSchemaTable().Rows.OfType().Any(row => row["ColumnName"].ToString() == "IsEPAnnotationType")) + _IsEPAnnotationType = (bool)dr.GetValue("IsEPAnnotationType"); + } + catch (Exception ex) + { + if (_MyLog.IsErrorEnabled) _MyLog.Error("retrieveAnnotSelectionsList.ReadData", ex); + _ErrorMessage = ex.Message; + throw new DbCslaException("retrieveAnnotSelectionsList.ReadData", ex); + } + } + + } +} + diff --git a/PROMS/VEPROMS.CSLA.Library/VEPROMS.CSLA.Library.csproj b/PROMS/VEPROMS.CSLA.Library/VEPROMS.CSLA.Library.csproj index 3af1e207..27379637 100644 --- a/PROMS/VEPROMS.CSLA.Library/VEPROMS.CSLA.Library.csproj +++ b/PROMS/VEPROMS.CSLA.Library/VEPROMS.CSLA.Library.csproj @@ -387,6 +387,7 @@ + diff --git a/PROMS/Volian.Controls.Library/AnnotationDetails.cs b/PROMS/Volian.Controls.Library/AnnotationDetails.cs index d001d92e..2506f1a1 100644 --- a/PROMS/Volian.Controls.Library/AnnotationDetails.cs +++ b/PROMS/Volian.Controls.Library/AnnotationDetails.cs @@ -120,7 +120,14 @@ namespace Volian.Controls.Library if (CurrentItem.MyDocVersion.DocVersionAssociationCount > 0) _ROPath = CurrentItem.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath; ProcItem = CurrentItem.MyProcedure; - } + // C2025-027 + //cbGridAnnoType.DataSource = VEPROMS.CSLA.Library.AnnotationstypeSelections.Get(ProcItem.ItemID); + cbGridAnnoType.DataSource = VEPROMS.CSLA.Library.AnnotationstypeSelections.Get(MyUserInfo.UserID, ProcItem.ItemID); + cbGridAnnoType.WatermarkText = "Select Annotation Type"; + + + + } public AnnotationInfo FirstExeAnnotation(ItemInfo ii) { if (ii == null) return null; diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index bdd75d47..212fafdf 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -573,11 +573,12 @@ namespace Volian.Controls.Library { if (ProcedureCheckedOutTo != null) ProcedureCheckedOutTo(sender, args); } - - - - - + // C2025-027 + public event vlnTreeViewEvent SelectAnnotations; + private void OnSelectAnnotations(object sender, vlnTreeEventArgs args) + { + if (SelectAnnotations != null) SelectAnnotations(sender, args); + } public event vlnTreeViewEvent ExportImportProcedureSets; private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args) { @@ -871,6 +872,8 @@ namespace Volian.Controls.Library MenuItem miqp = new MenuItem("Quick Print"); //MenuItem mips = new MenuItem("Print Section"); MenuItem mia = new MenuItem("Approve"); + MenuItem misa = new MenuItem("Select Annotations"); //C2025-027 + int k = 0; foreach (string s in pri.MyDocVersion.UnitNames) { @@ -895,12 +898,16 @@ namespace Volian.Controls.Library MenuItem mtc = mitcas.MenuItems.Add(s, new EventHandler(miMultiUnit_Click)); mtc.Enabled = procAppl; mtc.Tag = k; + MenuItem msa = misa.MenuItems.Add(s, new EventHandler(miMultiUnit_Click)); + msa.Enabled = procAppl; + msa.Tag = k; } cm.MenuItems.Add(micas); cm.MenuItems.Add(mitcas); cm.MenuItems.Add(mip); cm.MenuItems.Add(miqp); //cm.MenuItems.Add(mips); + cm.MenuItems.Add(misa); AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri); cm.MenuItems.Add(mia); AddApprovedRevisionsMultiUnit(cm.MenuItems, pri); @@ -916,6 +923,7 @@ namespace Volian.Controls.Library AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri); cm.MenuItems.Add("Approve", new EventHandler(mi_Click)); //_MyLog.WarnFormat("Context Menu 1 before - {0}", GC.GetTotalMemory(true)); + cm.MenuItems.Add("Select Annotations", new EventHandler(mi_Click)); //C2025-027 AddApprovedRevisions(cm.MenuItems, pri); //_MyLog.WarnFormat("Context Menu 1 after - {0}", GC.GetTotalMemory(true)); } @@ -928,6 +936,7 @@ namespace Volian.Controls.Library { MenuItem mip = new MenuItem("Print"); MenuItem miqp = new MenuItem("Quick Print"); + MenuItem misa = new MenuItem("Select Annotations"); //C2025-027 int k = 0; foreach (string s in pri.MyDocVersion.UnitNames) { @@ -936,15 +945,19 @@ namespace Volian.Controls.Library mp.Tag = k; MenuItem mqp = miqp.MenuItems.Add(s, new EventHandler(miMultiUnit_Click)); mqp.Tag = k; + MenuItem msa = misa.MenuItems.Add(s, new EventHandler(miMultiUnit_Click)); + msa.Tag = k; } cm.MenuItems.Add(mip); cm.MenuItems.Add(miqp); + cm.MenuItems.Add(misa); AddApprovedRevisionsMultiUnit(cm.MenuItems, pri); } else { cm.MenuItems.Add("Print", new EventHandler(mi_Click)); cm.MenuItems.Add("Quick Print", new EventHandler(mi_Click)); + cm.MenuItems.Add("Select Annotations", new EventHandler(mi_Click)); //C2025-027 AddApprovedRevisions(cm.MenuItems, pri); } } @@ -1936,6 +1949,9 @@ namespace Volian.Controls.Library case "Create Time Critical Action Summary": OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag)); break; + case "Select Annotations": // C2025-027 + OnSelectAnnotations(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); + break; default: if (mip.Text.StartsWith("Showing Change Bars Starting")) OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); @@ -2241,6 +2257,9 @@ namespace Volian.Controls.Library FlexibleMessageBox.Show("You have copied a document that is NOT linked to an Enhanced Document.\n\n" + "You cannot paste a Non-Enhanced Procedure into an Enhanced Procedure Set.", "Cannot Paste Here"); break; + case "Select Annotations": // C2025-027 + OnSelectAnnotations(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); + break; //case "Check Out Procedure Set": // CheckOutDocVersion(SelectedNode as VETreeNode); // break; -- 2.49.1 From 00283b4f2822f60c55be10dfc91fb8764e94f38a Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 15 Jul 2025 13:31:12 -0400 Subject: [PATCH 04/44] C2025-024 Electronic Procedures Phase 2 - XML Export Export code cleanup and initial set RO Location code --- .../VEPROMS User Interface/dlgExportImport.cs | 1451 +---------------- .../dlgExportImportEP.cs | 36 +- 2 files changed, 76 insertions(+), 1411 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index e0496b3a..a644d255 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -13,9 +13,12 @@ using System.IO; using Ionic.Zip; using System.Text.RegularExpressions; using JR.Utils.GUI.Forms; +using System.Linq; namespace VEPROMS { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Major Code Smell", "S6580:Use a format provider when parsing date and time", Justification = "dts formatting may be different time per plant")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Major Code Smell", "S6561:Avoid using \"DateTime.Now\" for benchmarking or timing operations", Justification = "Rough Time estimate on ProgressBars")] public partial class dlgExportImport : Form { #region Log4Net @@ -110,15 +113,6 @@ namespace VEPROMS PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database; if (!Directory.Exists(PEIPath)) Directory.CreateDirectory(PEIPath); - if (_MyMode == "Import") - { - //If you try to import a procedure into an empty PROMS folder, the code was deleting the File System Folder including the import file. This happened during D.C. Cook training (12/3/2015). - //if (MyFolder != null && MyFolder.ChildFolderCount == 0 ) - //{ - // Directory.Delete(PEIPath, true); - // Directory.CreateDirectory(PEIPath); - //} - } pnlExport.Dock = DockStyle.Fill; pnlImport.Dock = DockStyle.Fill; int formsize = 2; @@ -160,8 +154,6 @@ namespace VEPROMS } if (MyFolder != null) { - //Database.SelectedDatabase - //sfd.FileName = string.Format("{0}.expx", MyFolder.Name); sfd.FileName = string.Format("{0}-{1}.expx", Database.ActiveDatabase, MyFolder.Name); if (sfd.ShowDialog(this) == DialogResult.OK) { @@ -189,12 +181,12 @@ namespace VEPROMS else lblExportStatus.Text = "Awaiting Export File Name:"; } - private XmlWriter MyWriter = null; private ZipFile MyExpxZipFile = null; private ZipFile MyImpxZipFile = null; private DateTime MyStart; private bool successfullExport = true; - private void btnDoExport_Click(object sender, EventArgs e) + + private void btnDoExport_Click(object sender, EventArgs e) { @@ -219,7 +211,6 @@ namespace VEPROMS btnDoExport.Enabled = false; lblExportStatus.Text = "Performing Export"; SaveExportData(); - //SaveExportDataWriter(); TimeSpan elapsed = DateTime.Now.Subtract(MyStart); lblExportStatus.Text = "Export Completed in " + elapsed.ToString(); @@ -231,7 +222,7 @@ namespace VEPROMS var fileLocation = txtExport.Text; if (File.Exists(fileLocation)) { // C2022-029 if an existing export of the same name is found, provide option to overwrite it - DialogResult ovewriteEx = FlexibleMessageBox.ShowCustom(null, "There is already another export file with the same name. You can choose to either overwrite the existing file or have the existing file renamed with the original creation date appended.\r\n\r\nSelecting 'Cancel' will cancel the export.", "What would you like to do?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);// == DialogResult.Yes; + DialogResult ovewriteEx = FlexibleMessageBox.ShowCustom(null, "There is already another export file with the same name. You can choose to either overwrite the existing file or have the existing file renamed with the original creation date appended.\r\n\r\nSelecting 'Cancel' will cancel the export.", "What would you like to do?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); // Extract directory, filename, and extension string directory = Path.GetDirectoryName(fileLocation); @@ -316,18 +307,6 @@ namespace VEPROMS MyFrmVEPROMS.DisablePing = false;//B2018-030 turn on ping Export is done } - // appears to not be used -jsj 4-29-2016 - //private void SaveExportDataWriter() - //{ - // XmlWriterSettings ws = new XmlWriterSettings(); - // ws.Indent = true; - // ws.NewLineHandling = NewLineHandling.Entitize; - // ws.CheckCharacters = false; - // MyWriter = XmlWriter.Create(txtExport.Text, ws); - // ExportFolder(MyFolder, "folder"); - // MyWriter.Close(); - //} - private void btnDoImport_Click(object sender, EventArgs e) { bool isImported = false; @@ -341,7 +320,6 @@ namespace VEPROMS _DidConvertROsToText = false; _DidProcessTransitions = false; // B2017-076 to know if we processed any transition (used in status message at the end of importing) _DidProcessROs = false; // B2017-076 to know if we processed any transition (used in status message at the end of importing) - //LoadImportDataReader(); if (_MyMode.ToUpper().Contains("FORMAT")) { TurnChangeManagerOff.Execute(); @@ -424,7 +402,6 @@ namespace VEPROMS } // B2016-225 added more information to the finish import message to tell the user when ROs or Transitions are converted to text. MessageBox.Show(msg, "Import Completed", MessageBoxButtons.OK, MessageBoxIcon.Information); // C2020-042 changed mesage box title - //MessageBox.Show(string.Format("Finished Importing:\n\n{0}", txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\") + 1)), "Import", MessageBoxButtons.OK, MessageBoxIcon.Information); } if (canceledPressed || !isImported) { @@ -433,7 +410,7 @@ namespace VEPROMS } } - private bool TryToImportUCFs(ref bool isImported, ref bool canceledPressed) + private bool TryToImportUCFs(ref bool isImported, ref bool canceledPressed) { try { @@ -630,7 +607,7 @@ namespace VEPROMS fstInfo = tmp; using (DocVersion dv = MyDocVersion.Get()) { - using (ROFst fst = fstInfo.Get()) + using (ROFst fst = fstInfo?.Get()) { dv.DocVersionAssociations.Add(fst); dv.Save(); @@ -660,7 +637,7 @@ namespace VEPROMS // use resolvedProcNum to determine if procedure is 'unique', i.e. if the procedure number exists // and user does not overwrite or copy, then the procedure should NOT be imported. Fix for B2016-045 bool resolvedProcNum = true; - foreach (ProcedureInfo pi in MyDocVersion.Procedures) + foreach (ProcedureInfo pi in MyDocVersion.Procedures.OfType()) { // procedure numbers that contain a hyphen may have the hyphen represented as the unicode character // '\u8209?' or the '-' character. If proc number is same except for hyphen representation, they @@ -677,7 +654,7 @@ namespace VEPROMS if (hyphenNum == hyphenImpNum) { - string msg = string.Format("The procedure you are importing{0}already exists in this procedure set.\n\nDo you want to OVERWRITE the existing procedure?", !hyphenImpNum.Equals("") ? string.Format(" ({0}) ", hyphenImpNum) : " "); + string msg = string.Format("The procedure you are importing{0}already exists in this procedure set.\n\nDo you want to OVERWRITE the existing procedure?", !string.IsNullOrEmpty(hyphenImpNum) ? string.Format(" ({0}) ", hyphenImpNum) : " "); DialogResult dr = MessageBox.Show(this, msg, "Overwrite Existing Procedure", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop); if (dr == DialogResult.Yes) { @@ -693,7 +670,7 @@ namespace VEPROMS } if (dr == DialogResult.No) { - msg = string.Format("Do you want to import {0} as a COPY of the existing procedure?\n\nThis will prefix the procedure number with \"Copy of\"", !hyphenImpNum.Equals("") ? string.Format("({0})", hyphenImpNum) : "the procedure"); + msg = string.Format("Do you want to import {0} as a COPY of the existing procedure?\n\nThis will prefix the procedure number with \"Copy of\"", !string.IsNullOrEmpty(hyphenImpNum) ? string.Format("({0})", hyphenImpNum) : "the procedure"); dr = MessageBox.Show(this, msg, "Create Copy Of Existing Procedure", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop); if (dr == DialogResult.Yes) { @@ -777,14 +754,13 @@ namespace VEPROMS string fn = PEIPath + @"\transitions.xml"; PendingTransitions.Save(fn); ProcedureInfo lastProcedure = null; - foreach (ProcedureInfo pi in MyDocVersion.Procedures) + foreach (ProcedureInfo pi in MyDocVersion.Procedures.OfType()) lastProcedure = pi; _MyNewProcedure = AddProcedure(xd.DocumentElement, MyDocVersion, lastProcedure); //update transitions AddTransitions(PendingTransitions); PendingTransitions.Save(fn); FixFloatingFoldouts(); - //File.Delete(fn); } private void ImportProcedureCopy(XmlDocument xd) { @@ -812,7 +788,7 @@ namespace VEPROMS // kbr - could replace '-' with unicode in number, here. int count = 0; - foreach (ProcedureInfo pi in MyDocVersion.Procedures) + foreach (ProcedureInfo pi in MyDocVersion.Procedures.OfType()) { lastProcedure = pi; if (pi.MyContent.Number.EndsWith(number)) @@ -848,7 +824,7 @@ namespace VEPROMS PendingTransitions.Save(fn); ProcedureInfo lastProcedure = null; //delete old procedure - foreach (ProcedureInfo lp in MyDocVersion.Procedures) + foreach (ProcedureInfo lp in MyDocVersion.Procedures.OfType()) lastProcedure = lp; //delete opi try @@ -865,7 +841,7 @@ namespace VEPROMS { using (TransitionInfoList exTrans = TransitionInfoList.GetExternalTransitionsToChildren(pi.ItemID)) { - DialogResult ans = MessageBox.Show("Transitions exist to this procedure and cannot be adjusted automatically." + + MessageBox.Show("Transitions exist to this procedure and cannot be adjusted automatically." + "\r\nSteps with Problem Transitions:" + exTrans.Summarize(), "Cannot Overwrite Procedure", MessageBoxButtons.OK, MessageBoxIcon.Question); @@ -932,11 +908,6 @@ namespace VEPROMS ff = AddFolder(Folder.Get(MyFolder.FolderID), xd, name); } - //else if (dr == System.Windows.Forms.DialogResult.Cancel) - //{ - // //canceledPressed = true; - // //resolvedProcNum = false; - //} else return false; } @@ -1139,9 +1110,8 @@ namespace VEPROMS // need to add this format - name must be unique so add 'COPY(x) of 'original name'' where x is unique number: if (UCFImportCase == E_UCFImportOptions.LoadNotUsed || UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) { - int count = 0; - foreach (FormatInfo fi in fil) if (fi.Name.EndsWith(name)) count++; - if (count > 0) + int count = (fil.Where(fi => fi.Name.EndsWith(name))).Count(); + if (count > 0) { string origname = name; name = string.Format("Copy {0} of {1}", count.ToString(), name); @@ -1158,9 +1128,8 @@ namespace VEPROMS if (UCFImportCase == E_UCFImportOptions.LoadUseAll) { string savname = name; - int count = 0; - foreach (FormatInfo fi in fil) if (fi.Name.EndsWith(name)) count++; - if (count > 0) + int count = (fil.Where(fi => fi.Name.EndsWith(name))).Count(); + if (count > 0) { name = string.Format("Old {0} of {1}", count.ToString(), name); } @@ -1240,239 +1209,18 @@ namespace VEPROMS // See if there is an existing format file that was created as a copy. If so, check if the passed in format's // config is the same as an existing 'Copy of' format - if so, use rather than importing the same format as // defined by config. - foreach (var existname in existingFormat) + foreach (var existname in existingFormat.Where(existname => existname.Key.Contains(name))) { - if (existname.Key.Contains(name)) - { string cpy = existname.Key; if (cpy.StartsWith("Copy") && cpy.Contains("of " + name)) { FormatInfo exFI = FormatInfo.Get(existingFormat[cpy]); if (exFI.Config == config) return cpy; } - } } return null; } - //jsj 4-29-2016 appears to not be used - //Dictionary dicParentItem = null; - //private void UpdateParentItem(int depth, ItemInfo ii) - //{ - // if (dicParentItem == null) dicParentItem = new Dictionary(); - // if (!dicParentItem.ContainsKey(depth)) dicParentItem.Add(depth, null); - // dicParentItem[depth] = ii; - //} - - //jsj 4-29-2016 appears to not be used - //Dictionary dicPreviousItem = null; - //private void UpdatePreviousItem(int depth, ItemInfo ii) - //{ - // if (dicPreviousItem == null) dicPreviousItem = new Dictionary(); - // if (!dicPreviousItem.ContainsKey(depth)) dicPreviousItem.Add(depth, null); - // dicPreviousItem[depth] = ii; - //} - - Dictionary dicItemDepth = null; - - // jsj 4-29-2016 appears to not be used - //private void UpdateItemDepth(int depth, int id) - //{ - // if (dicItemDepth == null) dicItemDepth = new Dictionary(); - // if (!dicItemDepth.ContainsKey(depth)) dicItemDepth.Add(depth, 0); - // dicItemDepth[depth] = id; - //} - // jsj 2016Feb17 - this appears to not be used - //private void LoadImportDataReader() - //{ - // int pCount = 0; - // int sCount = 0; - // Folder folder = null; - // DocVersion docversion = null; - // Dictionary dicRofst = null; - // Dictionary dicEntry = null; - // ROFst rofst = null; - // GetImportDataCounts(); - // pbImportProcedure.Maximum = MyCounts.Count; - // pbImportProcedure.Value = 0; - // Application.DoEvents(); - // FileStream fs = File.OpenRead(txtImport.Text); - // XmlReaderSettings rs = new XmlReaderSettings(); - // rs.CheckCharacters = false; - // XmlReader xr = XmlReader.Create(fs, rs); - // while (xr.Read()) - // { - // if (xr.IsStartElement()) - // { - // switch (xr.Name) - // { - // case "annotation": - // AddAnnotation(xr); - // break; - // //case "association": - // // break; - // case "content": - // { - // if (xr.Depth == 3) //content for procedure - // { - // ItemInfo ii = AddProcedure(xr, docversion, dicPreviousItem[xr.Depth], dicItemDepth[xr.Depth]); - // UpdatePreviousItem(xr.Depth, ii); - // UpdateParentItem(xr.Depth, ii); - // } - // else - // { - - // int fromtype = dicItemDepth.ContainsKey(xr.Depth - 2) ? dicItemDepth[xr.Depth - 2] : 0; - // switch (fromtype) - // { - // case 2: - // { //sections - // ItemInfo ii = AddSection(xr, dicParentItem[xr.Depth], dicPreviousItem[xr.Depth], dicItemDepth[xr.Depth]); - // UpdatePreviousItem(xr.Depth, ii); - // UpdateParentItem(xr.Depth, ii); - // break; - // } - // case 3: - // { //cautions - // ItemInfo ii = AddCaution(xr, dicParentItem[xr.Depth], dicPreviousItem[xr.Depth], dicItemDepth[xr.Depth]); - // UpdatePreviousItem(xr.Depth, ii); - // UpdateParentItem(xr.Depth, ii); - // break; - // } - // case 4: - // { //notes - // ItemInfo ii = AddNote(xr, dicParentItem[xr.Depth], dicPreviousItem[xr.Depth], dicItemDepth[xr.Depth]); - // UpdatePreviousItem(xr.Depth, ii); - // UpdateParentItem(xr.Depth, ii); - // break; - // } - // case 5: - // { //rnos - // ItemInfo ii = AddRNO(xr, dicParentItem[xr.Depth], dicPreviousItem[xr.Depth], dicItemDepth[xr.Depth]); - // UpdatePreviousItem(xr.Depth, ii); - // UpdateParentItem(xr.Depth, ii); - // break; - // } - // case 6: - // { //steps - // ItemInfo ii = AddStep(xr, dicParentItem[xr.Depth], dicPreviousItem[xr.Depth], dicItemDepth[xr.Depth]); - // UpdatePreviousItem(xr.Depth, ii); - // UpdateParentItem(xr.Depth, ii); - // break; - // } - // case 7: - // { //tables - // ItemInfo ii = AddTable(xr, dicParentItem[xr.Depth], dicPreviousItem[xr.Depth], dicItemDepth[xr.Depth]); - // UpdatePreviousItem(xr.Depth, ii); - // UpdateParentItem(xr.Depth, ii); - // break; - // } - // default: - // break; - // } - // } - // break; - // } - // case "document": - // AddDocument(xr, dicEntry); - // break; - // case "docversion": - // { - // docversion = AddDocVersion(folder, xr); - // UpdatePreviousItem(xr.Depth + 2, null); - // break; - // } - // case "entry": - // dicEntry = AddEntry(xr); - // break; - // case "folder": - // folder = AddFolder(Folder.Get(MyFolder.FolderID), xr); - // break; - // case "grid": - // AddGrid(xr); - // break; - // case "procedure": - // { - // UpdateItemDepth(xr.Depth + 1, int.Parse(xr.GetAttribute("itemid"))); - // pbImportProcedure.PerformStep(); - // lblImportProcedure.Text = string.Format("{0} of {1} Procedures", pbImportProcedure.Value.ToString(), pbImportProcedure.Maximum.ToString()); - // pCount++; - // pbImportSection.Maximum = MyCounts[pCount].Count; - // pbImportSection.Value = 0; - // sCount = 0; - // Application.DoEvents(); - // break; - // } - // case "section": - // { - // UpdateItemDepth(xr.Depth + 1, int.Parse(xr.GetAttribute("itemid"))); - // pbImportSection.PerformStep(); - // lblImportSection.Text = string.Format("{0} of {1} Sections", pbImportSection.Value.ToString(), pbImportSection.Maximum.ToString()); - // sCount++; - // pbImportStep.Maximum = MyCounts[pCount][sCount]; - // pbImportStep.Value = 0; - // Application.DoEvents(); - // break; - // } - // case "step": - // { - // UpdateItemDepth(xr.Depth + 1, int.Parse(xr.GetAttribute("itemid"))); - // if (xr.Depth == 8) - // { - // pbImportStep.PerformStep(); - // lblImportStep.Text = string.Format("{0} of {1} Steps", pbImportStep.Value.ToString(), pbImportStep.Maximum.ToString()); - // Application.DoEvents(); - // } - // break; - // } - // case "caution": - // case "note": - // case "rno": - // case "table": - // UpdateItemDepth(xr.Depth + 1, int.Parse(xr.GetAttribute("itemid"))); - // break; - // case "cautions": - // case "notes": - // case "rnos": - // case "sections": - // case "steps": - // case "tables": - // { - // UpdateItemDepth(xr.Depth, int.Parse(xr.GetAttribute("fromtype"))); - // UpdatePreviousItem(xr.Depth + 2, null); - // UpdateParentItem(xr.Depth + 2, dicParentItem[xr.Depth - 1]); - // break; - // } - // case "rodb": - // { - // MyRODb = AddRODb(xr); - // rofst = AddROFst(dicRofst); - // docversion.DocVersionAssociations.Add(rofst); - // docversion.Save(); - // break; - // } - // case "rofst": - // dicRofst = GetROFstData(xr); - // break; - // case "rousage": - // AddROUsage(xr); - // break; - // //case "transition": - // // break; - // default: - // break; - // } - // Console.WriteLine("{0} - {1}", xr.Name, xr.Depth.ToString()); - // } - // } - // pbImportProcedure.PerformStep(); - // Application.DoEvents(); - // fs.Close(); - // FixImportDataTransitions(); - // StoreItemContentIDs(); - // ResolveExternalTransitions(folder); - //} - // This is called only when we are importing an entire folder. // if there is a .impx file (a zip file generated from the last folder export file and based on location -folder name- of the export file you are importing), then it updates it with new values, // else it will create a .impx file, and saves the id information listed below. @@ -1536,78 +1284,6 @@ namespace VEPROMS MyImpxZipFile.Save(); File.Delete(fn); } - // appears to not be used - jsj 4-28-2016 - //private void StoreItemContentIDs() - //{ - // XmlDocument xd = new XmlDocument(); - // string fn = PEIPath + @"\ExternalTransitions.xml"; - // xd.Load(fn); - // XmlElement xe = (XmlElement)xd.SelectSingleNode("externaltransitions/oldtonewitem"); - // foreach (int key in Old2NewItem.Keys) - // { - // XmlElement xee = xd.CreateElement("item"); - // XmlAttribute xa = AddAttribute(xd, "old", key.ToString()); - // xee.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "new", Old2NewItem[key].ToString()); - // xee.Attributes.SetNamedItem(xa); - // xe.AppendChild(xee); - // } - // xd.Save(fn); - // xe = (XmlElement)xd.SelectSingleNode("externaltransitions/oldtonewcontent"); - // foreach (int key in Old2NewContent.Keys) - // { - // XmlElement xee = xd.CreateElement("content"); - // XmlAttribute xa = AddAttribute(xd, "old", key.ToString()); - // xee.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "new", Old2NewContent[key].ToString()); - // xee.Attributes.SetNamedItem(xa); - // xe.AppendChild(xee); - // } - // xd.Save(fn); - //} - //private void ResolveExternalTransitions(Folder folder) - //{ - // XmlDocument xd = new XmlDocument(); - // string fn = PEIPath + @"\ExternalTransitions.xml"; - // xd.Load(fn); - // AddStoredItemContentIDs(xd); - // XmlNodeList nl = xd.SelectNodes("//transition[@folder!='']"); - // foreach (XmlNode nd in nl) - // { - // int transitionid = int.Parse(nd.Attributes.GetNamedItem("transitionid").InnerText); - // int fromid = int.Parse(nd.Attributes.GetNamedItem("fromid").InnerText); - // int toid = int.Parse(nd.Attributes.GetNamedItem("toid").InnerText); - // int rangeid = int.Parse(nd.Attributes.GetNamedItem("rangeid").InnerText); - // if (Old2NewContent.ContainsKey(fromid) && Old2NewItem.ContainsKey(toid) && Old2NewItem.ContainsKey(rangeid)) - // { - // int isrange = int.Parse(nd.Attributes.GetNamedItem("isrange").InnerText); - // int trantype = int.Parse(nd.Attributes.GetNamedItem("trantype").InnerText); - // string config = nd.Attributes.GetNamedItem("config").InnerText; - // string userid = nd.Attributes.GetNamedItem("userid").InnerText; - // DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText); - // string lookfor; - // if (isrange == 0) - // lookfor = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid); - // else - // lookfor = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid); - // fromid = Old2NewContent[fromid]; - // toid = Old2NewItem[toid]; - // rangeid = Old2NewItem[rangeid]; - // Content cc = Content.Get(fromid); - // Transition tt = Transition.MakeTransition(cc, Item.Get(toid), Item.Get(rangeid), isrange, trantype, config, dts, userid); - // transitionid = tt.TransitionID; - // string replacewith; - // if (isrange == 0) - // replacewith = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid); - // else - // replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid); - // cc.Text = cc.Text.Replace(lookfor, replacewith); - // cc.Save(); - // nd.Attributes.GetNamedItem("folder").InnerText = ""; - // } - // } - // xd.Save(fn); - //} // This is called only when we are importing an entire folder and there is a .impx file (a zip file) // the name of the .impx file is based on the folder name containing the export file being imported @@ -1620,14 +1296,6 @@ namespace VEPROMS XmlDocument xd = new XmlDocument(); xd.Load(fn); // B2016-176, B2016-197 Transitions were no always properly resolved - don't load in the old item ids - //XmlNodeList nl = xd.SelectNodes("//item"); - //foreach (XmlNode nd in nl) - //{ - // int oldid = int.Parse(nd.Attributes.GetNamedItem("old").InnerText); - // int newid = int.Parse(nd.Attributes.GetNamedItem("new").InnerText); - // //if (!Old2NewItem.ContainsKey(oldid)) - // Old2NewItem.Add(oldid, newid); - //} File.Delete(fn); ze = MyImpxZipFile["contents.xml"]; ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently); @@ -1635,14 +1303,6 @@ namespace VEPROMS xd = new XmlDocument(); xd.Load(fn); // B2016-176, B2016-197 Transitions were no always properly resolved - don't load in the old content ids - //nl = xd.SelectNodes("//content"); - //foreach (XmlNode nd in nl) - //{ - // int oldid = int.Parse(nd.Attributes.GetNamedItem("old").InnerText); - // int newid = int.Parse(nd.Attributes.GetNamedItem("new").InnerText); - // //if (!Old2NewContent.ContainsKey(oldid)) - // Old2NewContent.Add(oldid, newid); - //} File.Delete(fn); ze = MyImpxZipFile["libdocs.xml"]; ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently); @@ -1650,7 +1310,6 @@ namespace VEPROMS xd = new XmlDocument(); xd.Load(fn); XmlNodeList nl = xd.SelectNodes("//libdoc"); - //nl = xd.SelectNodes("//libdoc"); foreach (XmlNode nd in nl) { int oldid = int.Parse(nd.Attributes.GetNamedItem("old").InnerText); @@ -1665,133 +1324,6 @@ namespace VEPROMS PendingTransitions.Load(fn); File.Delete(fn); } - // appears not to be used - jsj 4-28-2016 - //private void AddStoredItemContentIDs(XmlDocument xd) - //{ - // XmlNodeList nl = xd.SelectNodes("//item"); - // foreach (XmlNode nd in nl) - // { - // int oldid = int.Parse(nd.Attributes.GetNamedItem("old").InnerText); - // int newid = int.Parse(nd.Attributes.GetNamedItem("new").InnerText); - // if (!Old2NewItem.ContainsKey(oldid)) - // Old2NewItem.Add(oldid, newid); - // } - // nl = xd.SelectNodes("//content"); - // foreach (XmlNode nd in nl) - // { - // int oldid = int.Parse(nd.Attributes.GetNamedItem("old").InnerText); - // int newid = int.Parse(nd.Attributes.GetNamedItem("new").InnerText); - // if (!Old2NewContent.ContainsKey(oldid)) - // Old2NewContent.Add(oldid, newid); - // } - //} - - // appears not to be used - jsj 4-28-2016 - //private void FixImportDataTransitions() - //{ - // XmlDocument xd = new XmlDocument(); - // string fn = PEIPath + @"\ExternalTransitions.xml"; - // if (!File.Exists(fn)) - // { - // XmlElement xe = xd.CreateElement("externaltransitions"); - // XmlElement xee = xd.CreateElement("oldtonewitem"); - // xe.AppendChild(xee); - // xee = xd.CreateElement("oldtonewcontent"); - // xe.AppendChild(xee); - // xee = xd.CreateElement("transitions"); - // xe.AppendChild(xee); - // xd.AppendChild(xe); - // xd.Save(fn); - // } - // else - // { - // xd.Load(fn); - // } - // FileStream fs = File.OpenRead(txtImport.Text); - // XmlReaderSettings rs = new XmlReaderSettings(); - // rs.CheckCharacters = false; - // XmlReader xr = XmlReader.Create(fs, rs); - // while (xr.Read()) - // { - // if (xr.IsStartElement()) - // { - // switch (xr.Name) - // { - // case "transition": - // AddTransitions(xr); - // break; - // case "externaltransition": - // { - // AddExternalTransition(xr, xd); - // break; - // } - // default: - // break; - // } - // } - // } - // fs.Close(); - // xd.Save(fn); - //} - - // jsj 4-29-2016 appears to not be used - //private Dictionary> MyCounts = null; - //private Dictionary MySubCounts = null; - //private void GetImportDataCounts() - //{ - // int pCount = 0; - // int sCount = 0; - // int tCount = 0; - // MyCounts = new Dictionary>(); - // MySubCounts = new Dictionary(); - // FileStream fs = File.OpenRead(txtImport.Text); - // XmlReaderSettings rs = new XmlReaderSettings(); - // rs.CheckCharacters = false; - // XmlReader xr = XmlReader.Create(fs, rs); - // while (xr.Read()) - // { - // if (xr.IsStartElement()) - // { - // switch (xr.Name) - // { - // case "procedure": - // { - // if (pCount > 0) - // { - // MySubCounts.Add(sCount, tCount); - // MyCounts.Add(pCount, MySubCounts); - // sCount = 0; - // tCount = 0; - // MySubCounts = new Dictionary(); - // } - // pCount++; - // break; - // } - // case "section": - // { - // if (sCount > 0) - // { - // MySubCounts.Add(sCount, tCount); - // tCount = 0; - // } - // sCount++; - // break; - // } - // case "step": - // { - // if (xr.Depth == 8) - // tCount++; - // break; - // } - // default: - // break; - // } - // } - // } - // MySubCounts.Add(sCount, tCount); - // MyCounts.Add(pCount, MySubCounts); - // fs.Close(); - //} private void btnImport_Click(object sender, EventArgs e) { @@ -1981,46 +1513,6 @@ namespace VEPROMS xn.AppendChild(xe); } - // jsj 4-29-2016 appears to not be used - //private void ExportFolder(FolderInfo fi, string nodename) - //{ - // /* - // FolderID - // ParentID - // DBID - // Name - // Title - // ShortName - // FormatID - // ManualOrder - // Config - // DTS - // UsrID - // */ - // string formatFileName = (fi.MyFormat != null) ? fi.MyFormat.Name : ""; - // FromFolderName = fi.Name; - // MyWriter.WriteStartDocument(); - // MyWriter.WriteStartElement(nodename); - // MyWriter.WriteAttributeString("folderid", fi.FolderID.ToString()); - // MyWriter.WriteAttributeString("parentid", fi.ParentID.ToString()); - // MyWriter.WriteAttributeString("dbid", fi.DBID.ToString()); - // MyWriter.WriteAttributeString("name", fi.Name); - // MyWriter.WriteAttributeString("title", fi.Title); - // MyWriter.WriteAttributeString("shortname", fi.ShortName); - // MyWriter.WriteAttributeString("formatid", fi.FormatID.ToString()); - // MyWriter.WriteAttributeString("manualorder", fi.ManualOrder.ToString()); - // MyWriter.WriteAttributeString("config", fi.Config); - // MyWriter.WriteAttributeString("dts", fi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - // MyWriter.WriteAttributeString("usrid", fi.UsrID.ToString()); - // MyWriter.WriteAttributeString("formatfilename", formatFileName); - - // if (fi.FolderDocVersionCount > 0) - // foreach (DocVersionInfo dvi in fi.FolderDocVersions) - // ExportDocVersion(dvi, "docversion"); - // MyWriter.WriteEndElement(); - // MyWriter.WriteEndDocument(); - //} - // bug fix: B2017-082 don't export if no RO Path - display an message to the user to assign a RO Path private bool ValidDocVersionAssociation(DocVersionInfo dvi) { @@ -2070,7 +1562,7 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "name", dvi.Name)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "title", dvi.Title)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "itemid", dvi.ItemID.ToString())); - xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", tmpFormatID.ToString()));//dvi.FormatID.ToString())); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", tmpFormatID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "config", dvi.Config)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", dvi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff"))); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", dvi.UserID.ToString())); @@ -2107,48 +1599,6 @@ namespace VEPROMS } } } - private void ExportDocVersion(DocVersionInfo dvi, string nodename) - { - /* - VersionID - FolderID - VersionType - Name - Title - ItemID - FormatID - Config - DTS - UserID - */ - string formatFileName = (dvi.MyFormat != null) ? dvi.MyFormat.Name : ""; - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("versionid", dvi.VersionID.ToString()); - MyWriter.WriteAttributeString("folderid", dvi.FolderID.ToString()); - MyWriter.WriteAttributeString("versiontype", dvi.VersionType.ToString()); - MyWriter.WriteAttributeString("name", dvi.Name); - MyWriter.WriteAttributeString("title", dvi.Title); - MyWriter.WriteAttributeString("itemid", dvi.ItemID.ToString()); - MyWriter.WriteAttributeString("formatid", dvi.FormatID.ToString()); - MyWriter.WriteAttributeString("config", dvi.Config); - MyWriter.WriteAttributeString("dts", dvi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", dvi.UserID.ToString()); - MyWriter.WriteAttributeString("formatfilename", formatFileName); - if (dvi.DocVersionAssociationCount > 0) - foreach (AssociationInfo ai in dvi.DocVersionAssociations) - ExportAssociation(ai, "association"); - if (dvi.Procedures.Count > 0) - { - pbExportProcedure.Value = 0; - pbExportProcedure.Maximum = dvi.Procedures.Count; - lblExportProcedure.Text = pbExportProcedure.Maximum.ToString() + " Procedures"; - foreach (ItemInfo ii in dvi.Procedures) - { - ExportItem(ii, "procedure"); - } - } - MyWriter.WriteEndElement(); - } private void ExportAssociation(XmlElement xn, AssociationInfo ai, string nodename) { /* @@ -2171,27 +1621,6 @@ namespace VEPROMS xn.AppendChild(xe); ExportROFst(xe, ai.MyROFst, "rofst"); } - private void ExportAssociation(AssociationInfo ai, string nodename) - { - /* - AssociationID - VersionID - ROFstID - Config - DTS - UserID - */ - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("associationid", ai.AssociationID.ToString()); - MyWriter.WriteAttributeString("versionid", ai.VersionID.ToString()); - MyWriter.WriteAttributeString("rofstid", ai.ROFstID.ToString()); - MyWriter.WriteAttributeString("config", ai.Config); - MyWriter.WriteAttributeString("dts", ai.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", ai.UserID.ToString()); - ExportROFst(ai.MyROFst, "rofst"); - MyWriter.WriteEndElement(); - } - private void ExportROFst(XmlElement xn, ROFstInfo fst, string nodename) { /* @@ -2218,28 +1647,6 @@ namespace VEPROMS ExportRODb(xe, fst.MyRODb, "rodb"); } - private void ExportROFst(ROFstInfo fst, string nodename) - { - /* - ROFstID - RODbID - ROLookup - Config - DTS - UserID - */ - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("rofstid", fst.ROFstID.ToString()); - MyWriter.WriteAttributeString("rodbid", fst.RODbID.ToString()); - MyWriter.WriteAttributeString("rolookup", Convert.ToBase64String(ROFSTLookup.GetRofstLookupBytes(fst.ROFstID))); // B2022-026 RO Memory reduction - new calls - MyWriter.WriteAttributeString("config", fst.Config); - MyWriter.WriteAttributeString("dts", fst.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", fst.UserID.ToString()); - - ExportRODb(fst.MyRODb, "rodb"); - MyWriter.WriteEndElement(); - } - private void ExportFigures(XmlElement xn, ROFstInfo fst) { if (fst.ROFstFigureCount > 0) @@ -2306,28 +1713,6 @@ namespace VEPROMS xn.AppendChild(xe); } - private void ExportRODb(RODbInfo db, string nodename) - { - /* - RODbID - ROName - FolderPath - DBConnectionString - Config - DTS - UserID - */ - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("rodbid", db.RODbID.ToString()); - MyWriter.WriteAttributeString("roname", db.ROName); - MyWriter.WriteAttributeString("folderpath", db.FolderPath); - MyWriter.WriteAttributeString("dbconnectionstring", db.DBConnectionString); - MyWriter.WriteAttributeString("config", db.Config); - MyWriter.WriteAttributeString("dts", db.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", db.UserID.ToString()); - MyWriter.WriteEndElement(); - } - public void ExportItem(XmlDocument xd, ItemInfo ii, string nodename) { XmlElement xe = xd.CreateElement(nodename); @@ -2434,7 +1819,28 @@ namespace VEPROMS //and handled/overridden in dlgExportEP.cs } - private void ExportItemAudits(XmlElement xn, ItemInfo ii) + protected virtual void SetROLocation(ref XmlElement xindivid, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) + { + //do nothing - this will be for Electronic procedures only + //and handled/overridden in dlgExportEP.cs + } + + //C2025-024 Electronic Procedures Phase 2 - XML Export + //use overridden method to set the location for ROs + protected void SetROLocation(ref XmlElement xindivid, string roid, int rodbid) + { + ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); + + using (RODbInfo myRODB = RODbInfoList.Get().FirstOrDefault(x => x.RODbID == rodbid)) + { + roid = ROFSTLookup.FormatRoidKey(roid, true); + ROFSTLookup.rochild roc = lookup.GetRoChild(roid); + SetROLocation(ref xindivid, roc, myRODB, roc.type != 8); + } + + } + + private void ExportItemAudits(XmlElement xn, ItemInfo ii) { if (cbxExportAudits.Checked) { @@ -2479,76 +1885,6 @@ namespace VEPROMS } } - private void ExportItem(ItemInfo ii, string nodename) - { - /* - ItemID - PreviousID - ContentID - DTS - */ - if (ii.IsProcedure) - { - pbExportProcedure.PerformStep(); - lblExportProcedure.Text = string.Format("{0} of {1} Procedures", pbExportProcedure.Value.ToString(), pbExportProcedure.Maximum.ToString()); - Application.DoEvents(); - - pbExportSection.Value = 0; - pbExportStep.Value = 0; - pbExportSection.Maximum = ii.Sections.Count; - - if (ii.Sections != null) - pbExportSection.Maximum = ii.Sections.Count; - else - { - pbExportSection.Maximum = 1; - pbExportSection.PerformStep(); - pbExportStep.Maximum = 1; - pbExportStep.PerformStep(); - lblExportSection.Text = "Sections"; - lblExportStep.Text = "Steps"; - Application.DoEvents(); - } - } - - if (ii.IsSection) - { - pbExportSection.PerformStep(); - lblExportSection.Text = string.Format("{0} of {1} Sections", pbExportSection.Value.ToString(), pbExportSection.Maximum.ToString()); - Application.DoEvents(); - pbExportStep.Value = 0; - if (ii.Steps != null) - pbExportStep.Maximum = ii.Steps.Count; - else - { - pbExportStep.Maximum = 1; - pbExportStep.PerformStep(); - lblExportStep.Text = "Word Section Data"; - Application.DoEvents(); - } - } - - if (ii.IsStep) - { - pbExportStep.PerformStep(); - lblExportStep.Text = string.Format("{0} of {1} Steps", pbExportStep.Value.ToString(), pbExportStep.Maximum.ToString()); - Application.DoEvents(); - } - - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("itemid", ii.ItemID.ToString()); - MyWriter.WriteAttributeString("previousid", ii.PreviousID.ToString()); - MyWriter.WriteAttributeString("contentid", ii.ContentID.ToString()); - MyWriter.WriteAttributeString("dts", ii.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - - ExportContent(ii.MyContent, "content"); - if (ii.ItemAnnotationCount > 0) - foreach (AnnotationInfo ai in ii.ItemAnnotations) - ExportAnnotation(ai, "annotation"); - - MyWriter.WriteEndElement(); - } - private void ExportContent(XmlElement xn, ContentInfo ci, string nodename) { /* @@ -2587,7 +1923,7 @@ namespace VEPROMS if (ci.ContentRoUsageCount > 0) foreach (RoUsageInfo ri in ci.ContentRoUsages) - ExportROUsage(xe, ri, "rousage"); + ExportROUsage(xe, ri, "rousage"); if (ci.ContentEntryCount > 0) ExportEntry(xe, ci.MyEntry, "entry"); @@ -2636,58 +1972,6 @@ namespace VEPROMS } } - private void ExportContent(ContentInfo ci, string nodename) - { - /* - ContentID - Number - Text - Type - FormatID - Config - DTS - UserID - */ - // strip the link information if we are convertinga the ROs and Transitions to text - string ciText = (_ConvertROsAndTransitionsToText) ? ItemInfo.StripLinks(ci.Text) : ci.Text; - string formatFileName = (ci.MyFormat != null) ? ci.MyFormat.Name : ""; - - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("contentid", ci.ContentID.ToString()); - MyWriter.WriteAttributeString("number", ci.Number); - MyWriter.WriteAttributeString("text", ciText); - MyWriter.WriteAttributeString("type", ci.Type.ToString()); - MyWriter.WriteAttributeString("formatid", ci.FormatID.ToString()); - MyWriter.WriteAttributeString("config", ci.Config); - MyWriter.WriteAttributeString("dts", ci.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", ci.UserID.ToString()); - MyWriter.WriteAttributeString("formatfilename", formatFileName); - if (_ExportBothConvertedandNot) MyWriter.WriteAttributeString("textwithlinks", ci.Text); - - if (ci.ContentTransitionCount > 0) - foreach (TransitionInfo ti in ci.ContentTransitions) - ExportTransition(ti, "transition"); - - if (ci.ContentRoUsageCount > 0) - foreach (RoUsageInfo ri in ci.ContentRoUsages) - ExportROUsage(ri, "rousage"); - - if (ci.ContentEntryCount > 0) - ExportEntry(ci.MyEntry, "entry"); - - if (ci.ContentGridCount > 0) - ExportGrid(ci.MyGrid, "grid"); - - if (ci.ContentImageCount > 0) - ExportImage(ci.MyImage, "image"); - - if (ci.ContentPartCount > 0) - foreach (PartInfo pi in ci.ContentParts) - ExportPart(pi, ((E_FromTypes)pi.FromType).ToString().ToLower()); - - MyWriter.WriteEndElement(); - } - private void ExportGrid(XmlElement xn, GridInfo gi, string nodename) { /* @@ -2748,32 +2032,6 @@ namespace VEPROMS } } - private void ExportGrid(GridInfo gi, string nodename) - { - /* - ContentID - Data - Config - DTS - UserID - */ - string giData = gi.Data; - if (_ConvertROsAndTransitionsToText) - { - giData = giData.Replace("IsRoTable>True", "IsRoTable>False"); // converts a RO table to regular table - giData = ItemInfo.StripLinks(giData); // converts ROs and Transitions to text - } - - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("contentid", gi.ContentID.ToString()); - MyWriter.WriteAttributeString("data", giData); - MyWriter.WriteAttributeString("config", gi.Config); - MyWriter.WriteAttributeString("dts", gi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", gi.UserID.ToString()); - if (_ExportBothConvertedandNot) MyWriter.WriteAttributeString("datawithlinks", gi.Data); - MyWriter.WriteEndElement(); - } - private void ExportEntry(XmlElement xn, EntryInfo ei, string nodename) { /* @@ -2822,23 +2080,6 @@ namespace VEPROMS } } - private void ExportEntry(EntryInfo ei, string nodename) - { - /* - ContentID - DocID - DTS - UserID - */ - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("contentid", ei.ContentID.ToString()); - MyWriter.WriteAttributeString("docid", ei.DocID.ToString()); - MyWriter.WriteAttributeString("dts", ei.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", ei.UserID.ToString()); - ExportDocument(ei.MyDocument, "document"); - MyWriter.WriteEndElement(); - } - private void ExportImage(XmlElement xn, ImageInfo ii, string nodename) { /* @@ -2894,28 +2135,6 @@ namespace VEPROMS } } - private void ExportImage(ImageInfo ii, string nodename) - { - /* - ContentID - ImageType - FileName - Data - Config - DTS - UserID - */ - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("contentid", ii.ContentID.ToString()); - MyWriter.WriteAttributeString("imagetype", ii.ImageType.ToString()); - MyWriter.WriteAttributeString("filename", ii.FileName); - MyWriter.WriteAttributeString("data", Convert.ToBase64String(ii.Data)); - MyWriter.WriteAttributeString("config", ii.Config); - MyWriter.WriteAttributeString("dts", ii.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", ii.UserID.ToString()); - MyWriter.WriteEndElement(); - } - private void ExportDocument(XmlElement xn, DocumentInfo di, string nodename) { /* @@ -2938,7 +2157,7 @@ namespace VEPROMS XmlElement xe = xn.OwnerDocument.CreateElement(nodename); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "docid", di.DocID.ToString())); - xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "libtitle", libDocTitle)); // di.LibTitle)); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "libtitle", libDocTitle)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "doccontent", Convert.ToBase64String(buf))); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "docascii", di.DocAscii)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "config", di.Config)); @@ -2983,38 +2202,6 @@ namespace VEPROMS } } } - private void ExportDocument(DocumentInfo di, string nodename) - { - /* - DocID - LibTitle - DocContent - DocAscii - Config - DTS - UserID - FileExtension - */ - byte[] buf = di.DocContent; - string libDocTitle = di.LibTitle; - if (DocReplace != null && DocReplace.ContainsKey(di.DocID) && _ConvertROsAndTransitionsToText) - { - buf = DocReplace[di.DocID]; - libDocTitle = null; // unlink the word section from the library document - } - - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("docid", di.DocID.ToString()); - MyWriter.WriteAttributeString("libtitle", libDocTitle);// di.LibTitle); - MyWriter.WriteAttributeString("doccontent", Convert.ToBase64String(buf)); - MyWriter.WriteAttributeString("docascii", di.DocAscii); - MyWriter.WriteAttributeString("config", di.Config); - MyWriter.WriteAttributeString("dts", di.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", di.UserID.ToString()); - MyWriter.WriteAttributeString("fileextension", di.FileExtension); - if (_ExportBothConvertedandNot) MyWriter.WriteAttributeString("doccontentwithlinks", Convert.ToBase64String(di.DocContent)); - MyWriter.WriteEndElement(); - } private void ExportROUsage(XmlElement xn, RoUsageInfo ri, string nodename) { @@ -3035,7 +2222,8 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ri.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff"))); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ri.UserID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rodbid", ri.RODbID.ToString())); - + if (_ExportBothConvertedandNot) SetROLocation(ref xe, ri.ROID, ri.RODbID); + //rousage audits ExportROUsageAudits(xe, ri); xn.AppendChild(xe); @@ -3046,28 +2234,6 @@ namespace VEPROMS if (cbxExportAudits.Checked) { }; } - private void ExportROUsage(RoUsageInfo ri, string nodename) - { - /* - ROUsageID - ContentID - ROID - Config - DTS - UserID - RODbID - */ - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("rousageid", ri.ROUsageID.ToString()); - MyWriter.WriteAttributeString("contentid", ri.ContentID.ToString()); - MyWriter.WriteAttributeString("roid", ri.ROID); - MyWriter.WriteAttributeString("config", ri.Config); - MyWriter.WriteAttributeString("dts", ri.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", ri.UserID.ToString()); - MyWriter.WriteAttributeString("rodbid", ri.RODbID.ToString()); - MyWriter.WriteEndElement(); - } - private void ExportPart(XmlElement xn, PartInfo pi, string nodename) { /* @@ -3120,26 +2286,6 @@ namespace VEPROMS } } - private void ExportPart(PartInfo pi, string nodename) - { - /* - ContentID - FromType - ItemID - DTS - UserID - */ - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("contentid", pi.ContentID.ToString()); - MyWriter.WriteAttributeString("fromtype", pi.FromType.ToString()); - MyWriter.WriteAttributeString("itemid", pi.ItemID.ToString()); - MyWriter.WriteAttributeString("dts", pi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", pi.UserID.ToString()); - foreach (ItemInfo ii in pi.MyItems) - ExportItem(ii, pi.PartType.ToString().ToLower()); - MyWriter.WriteEndElement(); - } - private void ExportTransition(XmlElement xn, TransitionInfo ti, string nodename) { /* @@ -3174,48 +2320,6 @@ namespace VEPROMS if (cbxExportAudits.Checked) { }; } - private void ExportTransition(TransitionInfo ti, string nodename) - { - /* - TransitionID - FromID - ToID - RangeID - IsRange - TranType - Config - DTS - UserID - */ - string folder = string.Empty; - if (ti.MyItemToID.MyDocVersion != null && ti.MyItemToID.MyDocVersion.MyFolder.Name != MyFolder.Name) - { - nodename = "external" + nodename; - folder = ti.MyItemToID.MyDocVersion.MyFolder.Name; - } - else - { - nodename = "external" + nodename; - folder = "UNKNOWN"; - } - - MyWriter.WriteStartElement(nodename); - - if (folder != string.Empty) - MyWriter.WriteAttributeString("folder", folder); - - MyWriter.WriteAttributeString("transitionid", ti.TransitionID.ToString()); - MyWriter.WriteAttributeString("fromid", ti.FromID.ToString()); - MyWriter.WriteAttributeString("toid", ti.ToID.ToString()); - MyWriter.WriteAttributeString("rangeid", ti.RangeID.ToString()); - MyWriter.WriteAttributeString("isrange", ti.IsRange.ToString()); - MyWriter.WriteAttributeString("trantype", ti.TranType.ToString()); - MyWriter.WriteAttributeString("config", ti.Config); - MyWriter.WriteAttributeString("dts", ti.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", ti.UserID.ToString()); - MyWriter.WriteEndElement(); - } - private void ExportAnnotation(XmlElement xn, AnnotationInfo ai, string nodename) { /* @@ -3232,7 +2336,6 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "annotationid", ai.AnnotationID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "itemid", ai.ItemID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "typeid", ai.TypeID.ToString())); - //if(ai.TypeID > 6) xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "typename", ai.MyAnnotationType.Name)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rtftext", ai.RtfText)); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "searchtext", ai.SearchText)); @@ -3278,93 +2381,10 @@ namespace VEPROMS } } - private void ExportAnnotation(AnnotationInfo ai, string nodename) - { - /* - AnnotationID - ItemID - TypeID - RtfText - SearchText - Config - DTS - UserID - */ - MyWriter.WriteStartElement(nodename); - MyWriter.WriteAttributeString("annotationid", ai.AnnotationID.ToString()); - MyWriter.WriteAttributeString("itemid", ai.ItemID.ToString()); - MyWriter.WriteAttributeString("typeid", ai.TypeID.ToString()); - MyWriter.WriteAttributeString("rtftext", ai.RtfText); - MyWriter.WriteAttributeString("searchtext", ai.SearchText); - MyWriter.WriteAttributeString("config", ai.Config); - MyWriter.WriteAttributeString("dts", ai.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")); - MyWriter.WriteAttributeString("userid", ai.UserID.ToString()); - MyWriter.WriteEndElement(); - } - #endregion #region Import for Merge - // jsj 4-29-2016 appears to not be used - //private void AddExternalTransition(XmlReader xr, XmlDocument xd) - //{ - // XmlElement xe = xd.CreateElement("transition"); - // XmlAttribute xa = AddAttribute(xd, "folder", xr.GetAttribute("folder")); - // xe.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "transitionid", xr.GetAttribute("transitionid")); - // xe.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "fromid", xr.GetAttribute("fromid")); - // xe.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "toid", xr.GetAttribute("toid")); - // xe.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "rangeid", xr.GetAttribute("rangeid")); - // xe.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "isrange", xr.GetAttribute("isrange")); - // xe.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "trantype", xr.GetAttribute("trantype")); - // xe.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "config", xr.GetAttribute("config")); - // xe.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "userid", xr.GetAttribute("userid")); - // xe.Attributes.SetNamedItem(xa); - // xa = AddAttribute(xd, "dts", xr.GetAttribute("dts")); - // xe.Attributes.SetNamedItem(xa); - // xd.SelectSingleNode("externaltransitions/transitions").AppendChild(xe); - //} - - // jsj 4-29-2016 appears to not be used - //private void AddTransitions(XmlReader xr) - //{ - // int transitionid = int.Parse(xr.GetAttribute("transitionid")); - // int fromid = int.Parse(xr.GetAttribute("fromid")); - // int toid = int.Parse(xr.GetAttribute("toid")); - // int rangeid = int.Parse(xr.GetAttribute("rangeid")); - // int isrange = int.Parse(xr.GetAttribute("isrange")); - // int trantype = int.Parse(xr.GetAttribute("trantype")); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // string lookfor; - // if (isrange == 0) - // lookfor = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid); - // else - // lookfor = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid); - // fromid = Old2NewContent[fromid]; - // toid = Old2NewItem[toid]; - // rangeid = Old2NewItem[rangeid]; - // Content cc = Content.Get(fromid); - // Transition tt = Transition.MakeTransition(cc, Item.Get(toid), Item.Get(rangeid), isrange, trantype, config, dts, userid); - // transitionid = tt.TransitionID; - // string replacewith; - // if (isrange == 0) - // replacewith = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid); - // else - // replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid); - // cc.Text = cc.Text.Replace(lookfor, replacewith); - // cc.Save(); - //} - private bool _DidProcessTransitions = false; // B2017-076 keep track whether we procrocessed Transitions private void AddTransitions(Content content, XmlNode xn) @@ -3408,7 +2428,6 @@ namespace VEPROMS else lookfor = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid); - //fromid = content.ContentID; toid = Old2NewItem[toid]; rangeid = Old2NewItem[rangeid]; Transition tt = Transition.MakeTransition(content, Item.Get(toid), Item.Get(rangeid), isrange, trantype, config, dts, userid); @@ -3574,24 +2593,6 @@ namespace VEPROMS // B2016-176, B2016-197 - external transitions should be converted to text forceConvertToText = true; - //if (TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection != null) - //{ - // SectionConfig sc = TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection.MyConfig as SectionConfig; - // forceConvertToText = (sc.SubSection_Edit == "N"); - //} - //if (!forceConvertToText) //check to see if external with internal format - //{ - // TransitionInfo tran = TransitionInfo.Get(transitionid); - // if (tran.MyContent.ContentItems[0].MyProcedure.ItemID != tran.MyItemToID.MyProcedure.ItemID) - // if (!tran.MyContent.ContentItems[0].ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList[tran.TranType].TransMenu.Contains("Proc")) - // forceConvertToText = true; - //} - //if (!forceConvertToText) //check to see if external to different doc version - //{ - // TransitionInfo tran = TransitionInfo.Get(transitionid); - // if (tran.MyContent.ContentItems[0].MyDocVersion.VersionID != tran.MyItemToID.MyDocVersion.VersionID) - // forceConvertToText = true; - //} _DidProcessTransitions |= cc.FixTransitionText(TransitionInfo.Get(tt.TransitionID), forceConvertToText); // B2017-076 FixTransitionText will tell us if transitions were processed/changed // B2017=003 make sure any grid changes are saved. // done here because FixTransitionText() could update the transitions in the grid @@ -3613,32 +2614,12 @@ namespace VEPROMS private XmlDocument PendingTransitions; private RODb MyRODb = null; - // jsj 4-29-2016 appears to not be used - //private Folder AddFolder(Folder folder, XmlReader xr) - //{ - // Old2NewItem = new Dictionary(); - // Old2NewContent = new Dictionary(); - // Old2NewLibDoc = new Dictionary(); - // string title = xr.GetAttribute("title"); - // string name = xr.GetAttribute("name"); - // string shortname = xr.GetAttribute("shortname"); - // string usrid = xr.GetAttribute("usrid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // string formatid = xr.GetAttribute("formatid"); - // string formatfilename = xr.GetAttribute("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - // Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid),formatfilename); - // folder = Folder.MakeFolder(folder, folder.MyConnection, name, title, shortname, format, null, dts, usrid); - // //f.Save(); - // return folder; - //} - private Folder AddFolder(Folder p, XmlDocument xd, string name) { lblImportStatus.Text = "Creating Folder..."; Application.DoEvents(); string title = xd.DocumentElement.Attributes.GetNamedItem("title").InnerText; - //string name = xd.DocumentElement.Attributes.GetNamedItem("name").InnerText; string shortname = xd.DocumentElement.Attributes.GetNamedItem("shortname").InnerText; string usrid = xd.DocumentElement.Attributes.GetNamedItem("usrid").InnerText; DateTime dts = DateTime.Parse(xd.DocumentElement.Attributes.GetNamedItem("dts").InnerText); @@ -3677,22 +2658,6 @@ namespace VEPROMS } } - private DocVersion AddDocVersion(Folder f, XmlReader xr) - { - int versiontype = int.Parse(xr.GetAttribute("versiontype")); - string name = xr.GetAttribute("name"); - string config = xr.GetAttribute("config"); - string userid = xr.GetAttribute("userid"); - DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - string formatid = xr.GetAttribute("formatid"); - string formatfilename = xr.GetAttribute("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - Format format = formatid == string.Empty ? null : OldToNewFormat(int.Parse(formatid), formatfilename); - - DocVersion dv = DocVersion.MakeDocVersion(f, versiontype, name, null, null, format, config, dts, userid); - - return dv; - } - private void AddAnnotationTypes(XmlDocument xd) { XmlNodeList nl = xd.SelectNodes("folder/annotationtypes/annotationtype"); @@ -3739,31 +2704,6 @@ namespace VEPROMS return DocVersionInfo.Get(dv.VersionID); } - // jsj 4-29-2016 appears to not be used - //private Dictionary GetROFstData(XmlReader xr) - //{ - // Dictionary rv = new Dictionary(); - // rv.Add("rolookup", xr.GetAttribute("rolookup")); - // rv.Add("config", xr.GetAttribute("config")); - // rv.Add("userid", xr.GetAttribute("userid")); - // rv.Add("dts", xr.GetAttribute("dts")); - // return rv; - //} - - // jsj 4-29-2016 appears to not be used - //private ROFst AddROFst(Dictionary dic) - //{ - // byte[] rolookup = Convert.FromBase64String(dic["rolookup"]); - // string config = dic["config"]; - // string userid = dic["userid"]; - // DateTime dts = DateTime.Parse(dic["dts"]); - // ROFst rv = null; - // rv = ROFst.GetByRODbID_DTS(MyRODb.RODbID, dts); //MyRODb.DTS); - // if (rv == null) - // rv = ROFst.MakeROFst(MyRODb, rolookup, config, dts, userid); - // return rv; - //} - private ROFst AddROFst(XmlNode xrofst) { lblImportStatus.Text = "Creating ROFst..."; @@ -3855,24 +2795,6 @@ namespace VEPROMS } } - // jsj 4-29-2016 appears to not be used - //private RODb AddRODb(XmlReader xr) - //{ - // oldRODbID = int.Parse(xr.GetAttribute("rodbid")); - // string roname = xr.GetAttribute("roname"); - // string folderpath = xr.GetAttribute("folderpath"); - // string dbconnectionstring = xr.GetAttribute("dbconnectionstring"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // RODb rv = null; - // rv = RODb.GetByFolderPath(folderpath); - // if (rv == null) - // rv = RODb.MakeRODb(roname, folderpath, dbconnectionstring, config, dts, userid); - // newRODbID = rv.RODbID; - // return rv; - //} - private RODb AddRODb(XmlNode xrodb) { lblImportStatus.Text = "Creating RODb..."; @@ -3918,38 +2840,6 @@ namespace VEPROMS return rv; } - // jsj 4-29-2016 appears to not be used - //private int GetProcedureData(XmlReader xr) - //{ - // return int.Parse(xr.GetAttribute("itemid")); - //} - - // jsj 4-29-2016 appears to not be used - //private ItemInfo AddProcedure(XmlReader xr, DocVersion dv, ItemInfo procInfo, int oldid) - //{ - // DocVersionInfo dvInfo = DocVersionInfo.Get(dv.VersionID); - // string number = xr.GetAttribute("number"); - // string text = xr.GetAttribute("text"); - // int proctype = int.Parse(xr.GetAttribute("type")); - // string formatid = xr.GetAttribute("formatid"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // Procedure p = Procedure.MakeProcedure(dvInfo, procInfo, number, text, proctype); - // p.DTS = dts; - // p.UserID = userid; - // string formatfilename = xr.GetAttribute("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - // if (formatid != string.Empty) - // p.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid),formatfilename); - // p.MyContent.Config = config; - // p.MyContent.DTS = dts; - // p.MyContent.UserID = userid; - // p.Save(); - // Old2NewItem.Add(oldid, p.ItemID); - // Old2NewContent.Add(int.Parse(xr.GetAttribute("contentid")), p.MyContent.ContentID); - // procInfo = ProcedureInfo.Get(p.ItemID); - // return procInfo; - //} private ProcedureInfo AddProcedure(XmlNode xn, DocVersionInfo dvInfo, ProcedureInfo procInfo) { pbImportProcedure.PerformStep(); @@ -4015,27 +2905,6 @@ namespace VEPROMS return procInfo; } - // jsj 2016Feb16 - This appears to not be used - //private void AddROUsage(XmlReader xr) - //{ - // int contentid = int.Parse(xr.GetAttribute("contentid")); - // contentid = Old2NewContent[contentid]; - // Content content = Content.Get(contentid); - // string rousageid = xr.GetAttribute("rousageid"); - // string roid = xr.GetAttribute("roid"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // RoUsage rou = RoUsage.MakeRoUsage(content, roid, config, dts, userid, MyRODb); - // rou.Save(); - // string lookFor = string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rousageid, roid, oldRODbID.ToString()); - // string replaceWith = (cbxCvrtROsToText.Checked) ? "" : string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rou.ROUsageID.ToString(), roid, newRODbID.ToString()); - // if (lookFor != replaceWith) - // { - // content.Text = content.Text.Replace(lookFor, replaceWith); - // content.Save(); - // } - //} private string GetMyPrefix(string text, int start, int lastIndex) { string defPrefix = text.Substring(start - 3, 3); @@ -4158,10 +3027,7 @@ namespace VEPROMS txtRO = txtRO.Replace(@"\u8595?", "\x19"); // Down Arrow - changes to \xd6 Item myitem = content.ContentItems[0].MyItem; // The Using statement caused the content.text to disappear - //using (Item myitem = content.ContentItems[0].MyItem) // so that myitem does not stay in cache - //{ Annotation.MakeAnnotation(myitem, AnnotationType.GetByNameOrCreate("Link Converted To Text"), "", string.Format("RO value ({0}) converted to text", txtRO), null); - //} _DidConvertROsToText |= true; } @@ -4208,7 +3074,7 @@ namespace VEPROMS if (roval == "?") { RoUsageInfo roui = RoUsageInfo.Get(int.Parse(rousageid)); - content.FixContentText(roui, roval, 0, MyDocVersion.DocVersionAssociations[0].MyROFst, null, rousageid); // + " " + roid); + content.FixContentText(roui, roval, 0, MyDocVersion.DocVersionAssociations[0].MyROFst, null, rousageid); _DidConvertROsToText |= true; // B2016-225 (follow through) add annotation when RO is converted to text _DidProcessROs = true; // B2017-076 flag that ROs where processed } @@ -4262,20 +3128,6 @@ namespace VEPROMS } } - // jsj 4-29-2016 appears to not be used - //private void AddAnnotation(XmlReader xr) - //{ - // int itemid = int.Parse(xr.GetAttribute("itemid")); - // itemid = Old2NewItem[itemid]; - // Item itm = Item.Get(itemid); - // int typeid = int.Parse(xr.GetAttribute("typeid")); - // string rtftext = xr.GetAttribute("rtftext"); - // string searchtext = xr.GetAttribute("searchtext"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // Annotation ann = Annotation.MakeAnnotation(itm, AnnotationType.Get(typeid), rtftext, searchtext, config, dts, userid); - //} private void AddImage(Content content, XmlNode xc) { XmlNode xn = xc.SelectSingleNode("image"); @@ -4368,30 +3220,6 @@ namespace VEPROMS prevInfo = AddTable(nd, parentInfo, prevInfo); } - // jsj 2016Feb16 - This appears to not be used - //private ItemInfo AddTable(XmlReader xr, ItemInfo parentInfo, ItemInfo prevInfo, int oldid) - //{ - // string number = xr.GetAttribute("number"); - // string text = xr.GetAttribute("text"); - // int steptype = int.Parse(xr.GetAttribute("type")); - // string formatid = xr.GetAttribute("formatid"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // Step step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Table); - // step.DTS = dts; - // step.UserID = userid; - // if (formatid != string.Empty) - // step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid)); - // step.MyContent.Config = config; - // step.MyContent.DTS = dts; - // step.MyContent.UserID = userid; - // step.Save(); - // Old2NewItem.Add(oldid, step.ItemID); - // Old2NewContent.Add(int.Parse(xr.GetAttribute("contentid")), step.MyContent.ContentID); - // prevInfo = StepInfo.Get(step.ItemID); - // return prevInfo; - //} private ItemInfo AddTable(XmlNode xn, ItemInfo parentInfo, ItemInfo prevInfo) { pbImportStep.PerformStep(); @@ -4480,31 +3308,6 @@ namespace VEPROMS prevInfo = AddStep(nd, parentInfo, prevInfo); } - // jsj 4-29-2016 appears to not be used - //private ItemInfo AddStep(XmlReader xr, ItemInfo parentInfo, ItemInfo prevInfo, int oldid) - //{ - // string number = xr.GetAttribute("number"); - // string text = xr.GetAttribute("text"); - // int steptype = int.Parse(xr.GetAttribute("type")); - // string formatid = xr.GetAttribute("formatid"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // Step step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Step); - // step.DTS = dts; - // step.UserID = userid; - // string formatfilename = xr.GetAttribute("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - // if (formatid != string.Empty) - // step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid),formatfilename); - // step.MyContent.Config = config; - // step.MyContent.DTS = dts; - // step.MyContent.UserID = userid; - // step.Save(); - // Old2NewItem.Add(oldid, step.ItemID); - // Old2NewContent.Add(int.Parse(xr.GetAttribute("contentid")), step.MyContent.ContentID); - // prevInfo = StepInfo.Get(step.ItemID); - // return prevInfo; - //} private ItemInfo AddStep(XmlNode xn, ItemInfo parentInfo, ItemInfo prevInfo) { pbImportStep.PerformStep(); @@ -4605,32 +3408,6 @@ namespace VEPROMS prevInfo = AddSupInfo(nd, parentInfo, prevInfo); } - // jsj 4-29-2016 appears to not be used - //private ItemInfo AddRNO(XmlReader xr, ItemInfo parentInfo, ItemInfo prevInfo, int oldid) - //{ - // string number = xr.GetAttribute("number"); - // string text = xr.GetAttribute("text"); - // int steptype = int.Parse(xr.GetAttribute("type")); - // string formatid = xr.GetAttribute("formatid"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // Step step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.RNO); - // step.DTS = dts; - // step.UserID = userid; - // string formatfilename = xr.GetAttribute("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - // if (formatid != string.Empty) - // step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid), formatfilename); - // step.MyContent.Config = config; - // step.MyContent.DTS = dts; - // step.MyContent.UserID = userid; - // step.Save(); - // Old2NewItem.Add(oldid, step.ItemID); - // Old2NewContent.Add(int.Parse(xr.GetAttribute("contentid")), step.MyContent.ContentID); - // prevInfo = StepInfo.Get(step.ItemID); - // return prevInfo; - //} - private ItemInfo AddRNO(XmlNode xn, ItemInfo parentInfo, ItemInfo prevInfo) { pbImportStep.PerformStep(); @@ -4745,32 +3522,6 @@ namespace VEPROMS prevInfo = AddNote(nd, parentInfo, prevInfo); } - // jsj 4-29-2016 appears to not be used - //private ItemInfo AddNote(XmlReader xr, ItemInfo parentInfo, ItemInfo prevInfo, int oldid) - //{ - // string number = xr.GetAttribute("number"); - // string text = xr.GetAttribute("text"); - // int steptype = int.Parse(xr.GetAttribute("type")); - // string formatid = xr.GetAttribute("formatid"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // Step step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Note); - // step.DTS = dts; - // step.UserID = userid; - // string formatfilename = xr.GetAttribute("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - // if (formatid != string.Empty) - // step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid), formatfilename); - // step.MyContent.Config = config; - // step.MyContent.DTS = dts; - // step.MyContent.UserID = userid; - // step.Save(); - // Old2NewItem.Add(oldid, step.ItemID); - // Old2NewContent.Add(int.Parse(xr.GetAttribute("contentid")), step.MyContent.ContentID); - // prevInfo = StepInfo.Get(step.ItemID); - // return prevInfo; - //} - private ItemInfo AddNote(XmlNode xn, ItemInfo parentInfo, ItemInfo prevInfo) { pbImportStep.PerformStep(); @@ -4839,32 +3590,6 @@ namespace VEPROMS prevInfo = AddCaution(nd, parentInfo, prevInfo); } - // jsj 4-29-2016 appears to not be used - //private ItemInfo AddCaution(XmlReader xr, ItemInfo parentInfo, ItemInfo prevInfo, int oldid) - //{ - // string number = xr.GetAttribute("number"); - // string text = xr.GetAttribute("text"); - // int steptype = int.Parse(xr.GetAttribute("type")); - // string formatid = xr.GetAttribute("formatid"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // Step step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Caution); - // step.DTS = dts; - // step.UserID = userid; - // string formatfilename = xr.GetAttribute("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - // if (formatid != string.Empty) - // step.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid), formatfilename); - // step.MyContent.Config = config; - // step.MyContent.DTS = dts; - // step.MyContent.UserID = userid; - // step.Save(); - // Old2NewItem.Add(oldid, step.ItemID); - // Old2NewContent.Add(int.Parse(xr.GetAttribute("contentid")), step.MyContent.ContentID); - // prevInfo = StepInfo.Get(step.ItemID); - // return prevInfo; - //} - private ItemInfo AddCaution(XmlNode xn, ItemInfo parentInfo, ItemInfo prevInfo) { pbImportStep.PerformStep(); @@ -4933,39 +3658,6 @@ namespace VEPROMS prevInfo = AddSection(nd, parentInfo, prevInfo); } - private Dictionary GetSectionData(XmlReader xr) - { - Dictionary rv = new Dictionary(); - rv.Add("itemid", xr.GetAttribute("itemid")); - return rv; - } - - // js j4-29-2016 appears to not be used - //private ItemInfo AddSection(XmlReader xr, ItemInfo parentInfo, ItemInfo prevInfo, int oldid) - //{ - // string number = xr.GetAttribute("number"); - // string text = xr.GetAttribute("text"); - // int sectiontype = int.Parse(xr.GetAttribute("type")); - // string formatid = xr.GetAttribute("formatid"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // Section sect = Section.MakeSection(parentInfo, prevInfo, number, text, sectiontype); - // sect.DTS = dts; - // sect.UserID = userid; - // string formatfilename = xr.GetAttribute("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to - // if (formatid != string.Empty) - // sect.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid), formatfilename); - // sect.MyContent.Config = config; - // sect.MyContent.DTS = dts; - // sect.MyContent.UserID = userid; - // sect.Save(); - // Old2NewItem.Add(oldid, sect.ItemID); - // Old2NewContent.Add(int.Parse(xr.GetAttribute("contentid")), sect.MyContent.ContentID); - // prevInfo = SectionInfo.Get(sect.ItemID); - // return prevInfo; - //} - private ItemInfo AddSection(XmlNode xn, ItemInfo parentInfo, ItemInfo prevInfo) { pbImportSection.PerformStep(); @@ -5049,19 +3741,6 @@ namespace VEPROMS } } - // jsj 2016Feb16 - This appears to not be used - //private void AddGrid(XmlReader xr) - //{ - // int contentid = int.Parse(xr.GetAttribute("contentid")); - // contentid = Old2NewContent[contentid]; - // Content content = Content.Get(contentid); - // string data = xr.GetAttribute("data"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // Grid gg = Grid.MakeGrid(content, data, config, dts, userid); - //} - private void AddGrid(Content content, XmlNode xc) { XmlNode nd = xc.SelectSingleNode("grid"); @@ -5093,14 +3772,13 @@ namespace VEPROMS string newvalue = ""; // if it's an ro within a table, need to process into an flex grid to save the grid data: string findLinkXml = @"<START\].*?\[END>"; - //string lookForXml = string.Format(@"^<START\](\\[^v \\]+)*\\v0(\\[^v '?{{}}\\]+)*( |\\u[0-9]{{1,4}}?|\\'[0-9a-fA-F]{{2}}|\\[{{}}~])(.*?)(\\[^v'?{{}} \\]+)*\\v(\\[^v \\]+)* #Link:ReferencedObject:{0} .*?\[END>$", rousageid); string lookForXml = @"^<START\](\\[^v \\]+)*\\v0(\\[^v '?{{}}\\]+)*( |\\u[0-9]{{1,4}}?|\\'[0-9a-fA-F]{{2}}|\\[{{}}~])(.*?)(\\[^v'?{{}} \\]+)*\\v(\\[^v \\]+)* #Link:ReferencedObject:.*?\[END>$"; MatchCollection msg = Regex.Matches(data, findLinkXml); int nmsg = msg.Count; for (int i = nmsg - 1; i >= 0; i--) { Match mmg = msg[i]; - Match mg = Regex.Match(mmg.Value, lookForXml);// Regex.Match(MyGrid.Data, lookForXml); + Match mg = Regex.Match(mmg.Value, lookForXml); if (mg != null && mg.Groups.Count > 1) { int myIndex = mg.Groups[4].Index + mmg.Index; @@ -5145,17 +3823,6 @@ namespace VEPROMS content.MyGrid = gg; } - - // jsj 4-29-2016 appears to not be used - //private Dictionary AddEntry(XmlReader xr) - //{ - // Dictionary dic = new Dictionary(); - // dic.Add("contentid", xr.GetAttribute("contentid")); - // dic.Add("dts", xr.GetAttribute("dts")); - // dic.Add("userid", xr.GetAttribute("userid")); - // return dic; - //} - private void AddEntry(Content content, XmlNode xc) { XmlNode nd = xc.SelectSingleNode("entry"); @@ -5167,25 +3834,7 @@ namespace VEPROMS ee.Save(); } } - // jsj 2016Feb16 - This appears to not be used - //private void AddDocument(XmlReader xr, Dictionary dic) - //{ - // string libtitle = xr.GetAttribute("libtitle"); - // byte[] doccontent = Convert.FromBase64String(xr.GetAttribute("doccontent")); - // string docascii = xr.GetAttribute("docascii"); - // string config = xr.GetAttribute("config"); - // string userid = xr.GetAttribute("userid"); - // DateTime dts = DateTime.Parse(xr.GetAttribute("dts")); - // string fileextension = xr.GetAttribute("fileextension"); - // Document dd = Document.MakeDocument(libtitle, doccontent, docascii, config, dts, userid, fileextension); - // int contentid = int.Parse(dic["contentid"]); - // contentid = Old2NewContent[contentid]; - // Content content = Content.Get(contentid); - // dts = DateTime.Parse(dic["dts"]); - // userid = dic["userid"]; - // Entry ee = Entry.MakeEntry(content, dd, dts, userid); - //} - + // B2019-035 This is called only once to get the existing library document info. // when it was in the AddDocument() logic, it would use up (and not free up) memory each time // a Word section was added during the import diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index 569ec633..9e286827 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -246,26 +246,21 @@ namespace VEPROMS } //For Exporting an RO that is an image - //returns an xmlElement - // - that is a child to xindivid - // - that has a name of Name - // - that has a value of the binary representation of the image - // - that has an attribute designating the location of the image file - private XmlElement AddGraphic(XmlElement xindivid, string Name, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) + //returns the Location and FileName of the RO Image + private string GetROImageFileLocation(ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) { - XmlElement xroid = xindivid.OwnerDocument.CreateElement(Name); string rodbpath = rodb.FolderPath; string rocval = roc.value; if (rocval == null) rocval = Array.Find(roc.children, x => x.value.Contains('.')).value; - if (rocval == null) return xroid; + if (rocval == null) return ""; string imgname; if (isMulti) - { + { imgname = rocval.Substring(rocval.IndexOf(' ') + 1, rocval.IndexOf("\r\n") - rocval.IndexOf(' ') - 1); } - else + else { imgname = rocval.Substring(0, rocval.IndexOf('\n')); } @@ -278,6 +273,21 @@ namespace VEPROMS } string imgfile = Path.Combine(rodbpath, fname); + return imgfile; + } + + //For Exporting an RO that is an image + //returns an xmlElement + // - that is a child to xindivid + // - that has a name of Name + // - that has a value of the binary representation of the image + // - that has an attribute designating the location of the image file + private XmlElement AddGraphic(XmlElement xindivid, string Name, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) + { + XmlElement xroid = xindivid.OwnerDocument.CreateElement(Name); + + string imgfile = GetROImageFileLocation(roc, rodb, isMulti); + if (string.IsNullOrEmpty(imgfile)) return xroid; xroid.Attributes.SetNamedItem(AddAttribute(xroid.OwnerDocument, "Location", imgfile)); if (File.Exists(imgfile)) @@ -293,6 +303,12 @@ namespace VEPROMS return xroid; } + protected override void SetROLocation(ref XmlElement xindivid, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) + { + string imgfile = GetROImageFileLocation(roc, rodb, isMulti); + if (!string.IsNullOrEmpty(imgfile)) xindivid.Attributes.SetNamedItem(AddAttribute(xindivid.OwnerDocument, "Location", imgfile)); + } + //clear objects to release memory private void OnClose(object sender, EventArgs e) { -- 2.49.1 From ec25f6426ac0c20b6a8a23c515a37daf067f7961 Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 15 Jul 2025 13:43:19 -0400 Subject: [PATCH 05/44] C2025-024 Electronic Procedures Phase 2 - XML Export Export code cleanup and initial set RO Location code --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index a644d255..d12a6d2c 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -1829,15 +1829,17 @@ namespace VEPROMS //use overridden method to set the location for ROs protected void SetROLocation(ref XmlElement xindivid, string roid, int rodbid) { - ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); - - using (RODbInfo myRODB = RODbInfoList.Get().FirstOrDefault(x => x.RODbID == rodbid)) + if (MyDocVersion != null) { - roid = ROFSTLookup.FormatRoidKey(roid, true); - ROFSTLookup.rochild roc = lookup.GetRoChild(roid); - SetROLocation(ref xindivid, roc, myRODB, roc.type != 8); - } + ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); + using (RODbInfo myRODB = RODbInfoList.Get().FirstOrDefault(x => x.RODbID == rodbid)) + { + roid = ROFSTLookup.FormatRoidKey(roid, true); + ROFSTLookup.rochild roc = lookup.GetRoChild(roid); + SetROLocation(ref xindivid, roc, myRODB, roc.type != 8); + } + } } private void ExportItemAudits(XmlElement xn, ItemInfo ii) -- 2.49.1 From f6e25fd9666fd43396e2ec68153dbb7b5073f367 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 15 Jul 2025 23:14:26 -0400 Subject: [PATCH 06/44] C2025-027-AnnotationsTypeSelect --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 52 +++- .../frmVEPROMS.Designer.cs | 2 +- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 27 --- .../Generated/AnnotationAuditInfoList.cs | 2 +- .../Generated/AnnotationAuditInfoList_bak.cs | 226 ------------------ .../Minimal/AnnotationstypeSections.cs | 112 +-------- .../AnnotationDetails.cs | 16 +- 7 files changed, 66 insertions(+), 371 deletions(-) delete mode 100644 PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList_bak.cs diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 0beebdf6..cc155fbe 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24135,7 +24135,7 @@ CREATE PROC [dbo].[getAnnotationstypeSelections] ) AS BEGIN - IF((SELECT TypeID FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0) + IF((SELECT count(TypeID) FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0) BEGIN SELECT [ASTypeID] ,[TypeID] @@ -24164,6 +24164,56 @@ BEGIN END GO +-- C2025-027 Annotation Type Filtering +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAnnotationstypeFiltered]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [getAnnotationstypeFiltered]; +GO +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +-- ============================================= +-- Author: Paul Larsen +-- Create date: 07/10/2025 +-- Description: Retrieve Current Annotation Types +-- ============================================= + +CREATE PROC [dbo].[getAnnotationstypeFiltered] +( + @UsrID varchar(50) +) +AS +BEGIN + IF((SELECT count(TypeID) FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0) + BEGIN + SELECT [ASTypeID] + ,[TypeID] + ,[UsrID] + ,[Name] + ,[Config] + ,[DTS] + ,[UserID] + ,[IsEPAnnotationType] + FROM [dbo].[AnnotationTypeSelections] + WHERE UsrID = @UsrID + END + ELSE + BEGIN + SELECT + [TypeID], + [Name], + [Config], + [DTS], + [UserID], + [LastChanged], + (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]=[AnnotationTypes].[TypeID]) [AnnotationCount], + [IsEPAnnotationType] + FROM [AnnotationTypes] + END +END + -- C2025-027 Annotation Type Filtering IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AnnotationTypeSelections]') AND type in (N'U')) DROP TABLE [dbo].[AnnotationTypeSelections] diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs index 18e3b2bf..285d5aaf 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs @@ -1663,7 +1663,7 @@ namespace VEPROMS private DevComponents.DotNetBar.QatCustomizeItem qatCustomizeItem1; private DevComponents.DotNetBar.Bar bottomBar; private DevComponents.DotNetBar.ProgressBarItem bottomProgBar; - private DevComponents.DotNetBar.ExpandablePanel epAnnotations; + public DevComponents.DotNetBar.ExpandablePanel epAnnotations; private DevComponents.DotNetBar.ExpandablePanel epProcedures; private DevComponents.DotNetBar.ExpandablePanel infoPanel; private Volian.Controls.Library.vlnTreeView tv; diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 8e0178e9..206f99d1 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1296,37 +1296,10 @@ namespace VEPROMS pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0; } - //void tv_SelectAnnotations(object sender, vlnTreeEventArgs args) - //{ - // ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo; - // if (pi == null) return; - - // tc.SaveCurrentEditItem(pi); - - // //pi.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex; - - // DlgAnnotationsSelect sannoDlg = new DlgAnnotationsSelect(pi, MyUserInfo.UserID); - // //sannoDlg.SelectedSlave = args.UnitIndex; - // //sannoDlg.MySessionInfo = MySessionInfo; - // sannoDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window - - // //pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0; - //} public static void tv_SelectAnnotations() { - //ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo; - //if (pi == null) return; - - //tc.SaveCurrentEditItem(pi); - - //pi.MyDocVersion.DocVersionConfig.SelectedSlave = args.UnitIndex; - DlgAnnotationsSelect sannoDlg = new DlgAnnotationsSelect(VlnSettings.UserID); - //sannoDlg.SelectedSlave = args.UnitIndex; - //sannoDlg.MySessionInfo = MySessionInfo; sannoDlg.ShowDialog(); // RHM 20120925 - Center dialog over PROMS window - - //pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0; } void tv_CreateTimeCriticalActionSummary(object sender, vlnTreeEventArgs args) { diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList.cs b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList.cs index f444303b..a804a4fe 100644 --- a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList.cs +++ b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList.cs @@ -206,7 +206,7 @@ namespace VEPROMS.CSLA.Library public partial class AnnotationAuditInfoListPropertyDescriptor : vlnListPropertyDescriptor { private AnnotationAuditInfo Item { get { return (AnnotationAuditInfo)_Item; } } - public AnnotationAuditInfoListPropertyDescriptor(AnnotationAuditInfoList collection, int index) : base(collection, index) {; } + public AnnotationAuditInfoListPropertyDescriptor(AnnotationAuditInfoList collection, int index) : base(collection, index) { ;} } #endregion #region Converter diff --git a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList_bak.cs b/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList_bak.cs deleted file mode 100644 index a804a4fe..00000000 --- a/PROMS/VEPROMS.CSLA.Library/Generated/AnnotationAuditInfoList_bak.cs +++ /dev/null @@ -1,226 +0,0 @@ -// ======================================================================== -// Copyright 2007 - Volian Enterprises, Inc. All rights reserved. -// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE -// ------------------------------------------------------------------------ -// $Workfile: $ $Revision: $ -// $Author: $ $Date: $ -// -// $History: $ -// ======================================================================== - -using System; -using System.Data; -using System.Data.SqlClient; -using Csla; -using Csla.Data; -using System.Configuration; -using System.IO; -using System.ComponentModel; -using System.Collections.Generic; -namespace VEPROMS.CSLA.Library -{ - /// - /// AnnotationAuditInfoList Generated by MyGeneration using the CSLA Object Mapping template - /// - [Serializable()] - [TypeConverter(typeof(AnnotationAuditInfoListConverter))] - public partial class AnnotationAuditInfoList : ReadOnlyListBase, ICustomTypeDescriptor, IDisposable - { - #region Log4Net - private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - #endregion - #region Business Methods - internal new IList Items - { get { return base.Items; } } - public void AddEvents() - { - foreach (AnnotationAuditInfo tmp in this) - { - tmp.Changed += new AnnotationAuditInfoEvent(tmp_Changed); - } - } - void tmp_Changed(object sender) - { - for (int i = 0; i < Count; i++) - { - if (base[i] == sender) - this.OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, i)); - } - } - private bool _Disposed = false; - private static int _CountCreated = 0; - private static int _CountDisposed = 0; - private static int _CountFinalized = 0; - private static int IncrementCountCreated - { get { return ++_CountCreated; } } - private int _CountWhenCreated = IncrementCountCreated; - public static int CountCreated - { get { return _CountCreated; } } - public static int CountNotDisposed - { get { return _CountCreated - _CountDisposed; } } - public static int CountNotFinalized - { get { return _CountCreated - _CountFinalized; } } - ~AnnotationAuditInfoList() - { - _CountFinalized++; - } - public void Dispose() - { - if (_Disposed) return; - _CountDisposed++; - _Disposed = true; - foreach (AnnotationAuditInfo tmp in this) - { - tmp.Changed -= new AnnotationAuditInfoEvent(tmp_Changed); - } - } - #endregion - #region Factory Methods - public static AnnotationAuditInfoList _AnnotationAuditInfoList = null; - /// - /// Return a list of all AnnotationAuditInfo. - /// - public static AnnotationAuditInfoList Get() - { - try - { - if (_AnnotationAuditInfoList != null) - return _AnnotationAuditInfoList; - AnnotationAuditInfoList tmp = DataPortal.Fetch(); - AnnotationAuditInfo.AddList(tmp); - tmp.AddEvents(); - _AnnotationAuditInfoList = tmp; - return tmp; - } - catch (Exception ex) - { - throw new DbCslaException("Error on AnnotationAuditInfoList.Get", ex); - } - } - /// - /// Reset the list of all AnnotationAuditInfo. - /// - public static void Reset() - { - _AnnotationAuditInfoList = null; - } - // CSLATODO: Add alternative gets - - //public static AnnotationAuditInfoList Get() - //{ - // try - // { - // return DataPortal.Fetch(new FilteredCriteria()); - // } - // catch (Exception ex) - // { - // throw new DbCslaException("Error on AnnotationAuditInfoList.Get", ex); - // } - //} - private AnnotationAuditInfoList() - { /* require use of factory methods */ } - #endregion - #region Data Access Portal - private void DataPortal_Fetch() - { - this.RaiseListChangedEvents = false; - if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationAuditInfoList.DataPortal_Fetch", GetHashCode()); - try - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "getAnnotationAudits"; - cm.CommandTimeout = Database.DefaultTimeout; - using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) - { - IsReadOnly = false; - while (dr.Read()) this.Add(new AnnotationAuditInfo(dr)); - IsReadOnly = true; - } - } - } - } - catch (Exception ex) - { - if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationAuditInfoList.DataPortal_Fetch", ex); - throw new DbCslaException("AnnotationAuditInfoList.DataPortal_Fetch", ex); - } - this.RaiseListChangedEvents = true; - } - #endregion - #region ICustomTypeDescriptor impl - public String GetClassName() - { return TypeDescriptor.GetClassName(this, true); } - public AttributeCollection GetAttributes() - { return TypeDescriptor.GetAttributes(this, true); } - public String GetComponentName() - { return TypeDescriptor.GetComponentName(this, true); } - public TypeConverter GetConverter() - { return TypeDescriptor.GetConverter(this, true); } - public EventDescriptor GetDefaultEvent() - { return TypeDescriptor.GetDefaultEvent(this, true); } - public PropertyDescriptor GetDefaultProperty() - { return TypeDescriptor.GetDefaultProperty(this, true); } - public object GetEditor(Type editorBaseType) - { return TypeDescriptor.GetEditor(this, editorBaseType, true); } - public EventDescriptorCollection GetEvents(Attribute[] attributes) - { return TypeDescriptor.GetEvents(this, attributes, true); } - public EventDescriptorCollection GetEvents() - { return TypeDescriptor.GetEvents(this, true); } - public object GetPropertyOwner(PropertyDescriptor pd) - { return this; } - /// - /// Called to get the properties of this type. Returns properties with certain - /// attributes. this restriction is not implemented here. - /// - /// - /// - public PropertyDescriptorCollection GetProperties(Attribute[] attributes) - { return GetProperties(); } - /// - /// Called to get the properties of this type. - /// - /// - public PropertyDescriptorCollection GetProperties() - { - // Create a collection object to hold property descriptors - PropertyDescriptorCollection pds = new PropertyDescriptorCollection(null); - // Iterate the list - for (int i = 0; i < this.Items.Count; i++) - { - // Create a property descriptor for the item and add to the property descriptor collection - AnnotationAuditInfoListPropertyDescriptor pd = new AnnotationAuditInfoListPropertyDescriptor(this, i); - pds.Add(pd); - } - // return the property descriptor collection - return pds; - } - #endregion - } // Class - #region Property Descriptor - /// - /// Summary description for CollectionPropertyDescriptor. - /// - public partial class AnnotationAuditInfoListPropertyDescriptor : vlnListPropertyDescriptor - { - private AnnotationAuditInfo Item { get { return (AnnotationAuditInfo)_Item; } } - public AnnotationAuditInfoListPropertyDescriptor(AnnotationAuditInfoList collection, int index) : base(collection, index) { ;} - } - #endregion - #region Converter - internal class AnnotationAuditInfoListConverter : ExpandableObjectConverter - { - public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destType) - { - if (destType == typeof(string) && value is AnnotationAuditInfoList) - { - // Return department and department role separated by comma. - return ((AnnotationAuditInfoList)value).Items.Count.ToString() + " AnnotationAudits"; - } - return base.ConvertTo(context, culture, value, destType); - } - } - #endregion -} // Namespace diff --git a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs index 7df44168..d1186cea 100644 --- a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs +++ b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs @@ -16,13 +16,13 @@ using System.ComponentModel; //namespace VEPROMS.CSLA.Library; -// C2025-027 this new file is used to support (data retrival) for selecting Annotation types to display on the Annotation screen. +// C2025-027 this new file is used to support (data retrival) for selecting Annotation types to display on the Annotation screen. This is related to Annotation type filtering through V->Options. namespace VEPROMS.CSLA.Library { public class AnnotationstypeSelections { - public static DataTable Get(string UserID, int ItemID) + public static DataTable Get(string UserID) { using (SqlConnection cn = Database.VEPROMS_SqlConnection) { @@ -31,7 +31,7 @@ namespace VEPROMS.CSLA.Library try { cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "getAnnotationstypeSelections"; + cm.CommandText = "getAnnotationstypeFiltered"; cm.CommandTimeout = Database.DefaultTimeout; cm.Parameters.AddWithValue("@UsrID", UserID); SqlDataAdapter da = new SqlDataAdapter(cm); @@ -58,7 +58,6 @@ namespace VEPROMS.CSLA.Library { row = dt.NewRow(); row["TypeID"] = annosel.TypeID; - row["ItemID"] = ItemID; row["Name"] = annosel.Name; row["Config"] = annosel.Config; row["DTS"] = annosel.DTS; @@ -67,18 +66,7 @@ namespace VEPROMS.CSLA.Library dt.Rows.Add(row); } - //row = dt.NewRow(); - //row["TypeID"] = annosel.TypeID; - //row["ItemID"] = ItemID; - //row["Name"] = annosel.Name; - //row["Config"] = annosel.Config; - //row["DTS"] = annosel.DTS; - //row["UserID"] = annosel.UserID; - //row["IsEPAnnotationType"] = annosel.IsEPAnnotationType; - //dt.Rows.Add(row); - - //dt.Rows.Add(0,annosel.TypeID, ItemID, annosel.Name, annosel.Config, annosel.DTS, annosel.UserID, 0x0000000000000000, annosel.IsEPAnnotationType); }; } return dt; @@ -183,27 +171,7 @@ namespace VEPROMS.CSLA.Library } } - public static AnnotationTypeInfoList AnnotationSelectByItem(int itemID) - { - try - { - //if (_AnnotationTypeInfoList != null) - // return _AnnotationTypeInfoList; - AnnotationTypeInfoList tmp = (AnnotationTypeInfoList)DataPortal.Fetch(new AnnotationSelectByItemIDCriteria(itemID)); - if (tmp.Count < 1) - { - tmp = DataPortal.Fetch(); - } - AnnotationTypeInfo.AddList(tmp); - tmp.AddEvents(); - return tmp; - } - catch (Exception ex) - { - throw new DbCslaException("Error on AnnotationTypeInfoList.Get", ex); - } - } private int _TypeID; [System.ComponentModel.DataObjectField(true, true)] public int TypeID @@ -361,80 +329,6 @@ namespace VEPROMS.CSLA.Library } } - private void DataPortal_Fetch(retrieveAnnotSelections criteria) - { - try - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "getAnnotationstypeSelections"; - cm.CommandTimeout = Database.DefaultTimeout; - cm.Parameters.AddWithValue("@itemID", criteria.itemID); - using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) - { - if (!dr.Read()) - { - _ErrorMessage = "No Record Found"; - return; - } - ReadData(dr); - } - } - } - } - catch (Exception ex) - { - if (_MyLog.IsErrorEnabled) _MyLog.Error("retrieveAnnotSelectionsList.DataPortal_Fetch", ex); - throw new DbCslaException("retrieveAnnotSelectionsList.DataPortal_Fetch", ex); - } - //this.RaiseListChangedEvents = true; - } - [Serializable()] - protected class AnnotationSelectByItemIDCriteria - { - private int _itemID; - public int ItemID - { get { return _itemID; } } - - public AnnotationSelectByItemIDCriteria(int itemID) - { - _itemID = itemID; - } - } - private void DataPortal_Fetch(AnnotationSelectByItemIDCriteria criteria) - { - //this.RaiseListChangedEvents = false; - if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] AnnotationTypeInfoList.DataPortal_Fetch", GetHashCode()); - try - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "getAnnotationTypes2"; - cm.Parameters.AddWithValue("@itemID", criteria.ItemID); - cm.CommandTimeout = Database.DefaultTimeout; - using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) - { - //IsReadOnly = false; - //while (dr.Read()) this.Add(new AnnotationTypeInfo(dr)); - //IsReadOnly = true; - } - } - } - } - catch (Exception ex) - { - if (_MyLog.IsErrorEnabled) _MyLog.Error("AnnotationTypeInfoList.DataPortal_Fetch", ex); - throw new DbCslaException("AnnotationTypeInfoList.DataPortal_Fetch", ex); - } - //this.RaiseListChangedEvents = true; - } - private void ReadData(SafeDataReader dr) { if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] retrieveAnnotSelectionsList.ReadData", GetHashCode()); diff --git a/PROMS/Volian.Controls.Library/AnnotationDetails.cs b/PROMS/Volian.Controls.Library/AnnotationDetails.cs index 2506f1a1..bec98914 100644 --- a/PROMS/Volian.Controls.Library/AnnotationDetails.cs +++ b/PROMS/Volian.Controls.Library/AnnotationDetails.cs @@ -119,13 +119,11 @@ namespace Volian.Controls.Library if (CurrentItem.MyDocVersion != null) if (CurrentItem.MyDocVersion.DocVersionAssociationCount > 0) _ROPath = CurrentItem.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath; - ProcItem = CurrentItem.MyProcedure; - // C2025-027 - //cbGridAnnoType.DataSource = VEPROMS.CSLA.Library.AnnotationstypeSelections.Get(ProcItem.ItemID); - cbGridAnnoType.DataSource = VEPROMS.CSLA.Library.AnnotationstypeSelections.Get(MyUserInfo.UserID, ProcItem.ItemID); - cbGridAnnoType.WatermarkText = "Select Annotation Type"; - + //ProcItem = CurrentItem.MyProcedure; + // C2025-027 Annotation Type Filtering + //cbGridAnnoType.WatermarkText = "Select Annotation Type"; + //cbGridAnnoType.DataSource = VEPROMS.CSLA.Library.AnnotationstypeSelections.Get(MyUserInfo.UserID); } public AnnotationInfo FirstExeAnnotation(ItemInfo ii) @@ -372,6 +370,12 @@ namespace Volian.Controls.Library cbGridAnnoType.DisplayMember = "Name"; cbGridAnnoType.ValueMember = "TypeId"; cbGridAnnoType.DataSource = AnnotationTypeInfoList.Get().Clone(); + + //ProcItem = CurrentItem.MyProcedure; + //C2025 - 027 Annotation Type Filtering + cbGridAnnoType.WatermarkText = "Select Annotation Type"; + cbGridAnnoType.DataSource = VEPROMS.CSLA.Library.AnnotationstypeSelections.Get(MyUserInfo.UserID); + // If there are no annotatons, then selected index is -1 (not defined), otherwise select the first. // This was done so that it could be saved if there was text entered but user moves to another steprtb without selecting save button // so that annotation gets saved. -- 2.49.1 From c98299d916819beda3b60f902805106f49e76f9c Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 15 Jul 2025 23:32:31 -0400 Subject: [PATCH 07/44] C2025-027-AnnotationsTypeSelect --- PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs index 285d5aaf..18e3b2bf 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs @@ -1663,7 +1663,7 @@ namespace VEPROMS private DevComponents.DotNetBar.QatCustomizeItem qatCustomizeItem1; private DevComponents.DotNetBar.Bar bottomBar; private DevComponents.DotNetBar.ProgressBarItem bottomProgBar; - public DevComponents.DotNetBar.ExpandablePanel epAnnotations; + private DevComponents.DotNetBar.ExpandablePanel epAnnotations; private DevComponents.DotNetBar.ExpandablePanel epProcedures; private DevComponents.DotNetBar.ExpandablePanel infoPanel; private Volian.Controls.Library.vlnTreeView tv; -- 2.49.1 From b9fc9748c7726bef939246e45696943daedd6c9f Mon Sep 17 00:00:00 2001 From: mschill Date: Wed, 16 Jul 2025 10:09:01 -0400 Subject: [PATCH 08/44] C2025-024 Electronic Procedures Phase 2 - XML Export set RO Location code for pre-existing RO usages --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index d12a6d2c..1c52f404 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -1829,15 +1829,16 @@ namespace VEPROMS //use overridden method to set the location for ROs protected void SetROLocation(ref XmlElement xindivid, string roid, int rodbid) { - if (MyDocVersion != null) + if (MyProcedure?.MyDocVersion != null) { - ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); + ROFSTLookup lookup = MyProcedure.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyProcedure.MyDocVersion); using (RODbInfo myRODB = RODbInfoList.Get().FirstOrDefault(x => x.RODbID == rodbid)) { roid = ROFSTLookup.FormatRoidKey(roid, true); ROFSTLookup.rochild roc = lookup.GetRoChild(roid); - SetROLocation(ref xindivid, roc, myRODB, roc.type != 8); + if (Enumerable.Range(8, 15).Contains(roc.type)) + SetROLocation(ref xindivid, roc, myRODB, roc.type != 8); } } } -- 2.49.1 From 2784b57a05eb8bbc60a637bdd2298219d896ef6a Mon Sep 17 00:00:00 2001 From: mschill Date: Wed, 16 Jul 2025 14:23:55 -0400 Subject: [PATCH 09/44] C2025-023 - Electronic Procedures - Modifications to PROMS Working on multiunit for DB Sequence --- .../dlgExportImportEP.cs | 18 ++++++++++++------ PROMS/VEPROMS User Interface/frmVEPROMS.cs | 6 +++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index 9e286827..818587ed 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -18,31 +18,34 @@ namespace VEPROMS #pragma warning restore S101 // Types should be named in PascalCase { private readonly AnnotationTypeInfo _AnnotationType; - - private readonly string multiseparator = ","; + private readonly int _UnitIndex; + private readonly string multiseparator = ","; private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]"); - public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions) 0) + public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions) 0) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); + _UnitIndex = unitIndex; _ExportBothConvertedandNot = true; DocReplace = new Dictionary(); FormClosed += OnClose; Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}"; } - public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0) + public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); + _UnitIndex = unitIndex; _ExportBothConvertedandNot = true; DocReplace = new Dictionary(); FormClosed += OnClose; Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}"; } - public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0) + public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); + _UnitIndex = unitIndex; _ExportBothConvertedandNot = true; DocReplace = new Dictionary(); FormClosed += OnClose; @@ -242,7 +245,10 @@ namespace VEPROMS //return a db sequence string from an ItemInfo private string dbSeq(ItemInfo ii) { - return $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.DBSequence}"; + if (_UnitIndex > 0) ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + string rtnval = $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.MyProcedure.DisplayNumber} {ii.MyProcedure.DisplayText}:{ii.DBSequence}"; + ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0; + return rtnval; } //For Exporting an RO that is an image diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 0ab8be76..531af12c 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -713,7 +713,7 @@ namespace VEPROMS //form for exporting Electronic Procedures from FolderInfo if (args.AnnotationTypeId > 0) { - dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", fi, this, args.AnnotationTypeId); + dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", fi, this, args.AnnotationTypeId, args.UnitIndex); dlg.ShowDialog(this); MySessionInfo.CheckInItem(ownerid); @@ -763,7 +763,7 @@ namespace VEPROMS //form for exporting Electronic Procedures from DocVersionInfo if (args.AnnotationTypeId > 0) { - dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", dvi, this, args.AnnotationTypeId); + dlgExportImportEP dlg = new dlgExportImportEP(args.Index == 0 ? "Export" : "Import", dvi, this, args.AnnotationTypeId, args.UnitIndex); dlg.MyNewProcedure = null; dlg.ExternalTransitionItem = null; dlg.ShowDialog(this); @@ -813,7 +813,7 @@ namespace VEPROMS //form for exporting Electronic Procedures from ProcedureInfo if (args.AnnotationTypeId > 0) { - dlgExportImportEP dlg = new dlgExportImportEP("Export", pi, this, args.AnnotationTypeId); + dlgExportImportEP dlg = new dlgExportImportEP("Export", pi, this, args.AnnotationTypeId, args.UnitIndex); dlg.ShowDialog(this); MySessionInfo.CheckInItem(ownerid); -- 2.49.1 From 7a0f56cad8800912576eb8692e191343eab50d5f Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 16 Jul 2025 15:03:32 -0400 Subject: [PATCH 10/44] C2025-027-AnnotationsTypeSelect --- .../DlgAnnotationsSelect.cs | 17 +- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 29 ++- .../VEPROMS User Interface/VEPROMS_UI.csproj | 10 +- .../dlgAnnotationsSelect.Designer.cs | 41 ++-- .../frmSysOptions.Designer.cs | 3 +- PROMS/VEPROMS User Interface/frmSysOptions.cs | 17 +- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 3 +- .../Minimal/AnnotationstypeSections.cs | 183 +----------------- .../AnnotationDetails.cs | 7 - 9 files changed, 58 insertions(+), 252 deletions(-) diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs index 3dadbffd..5083cd84 100644 --- a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -12,20 +12,19 @@ using VEPROMS.CSLA.Library; namespace VEPROMS { // C2025-027 Annotation Type Filtering - public partial class DlgAnnotationsSelect : Form + public partial class dlgAnnotationsSelect : Form { - int AnnotationTypeID; - string AnnotationNameStr = ""; + //int AnnotationTypeID; + //string AnnotationNameStr = ""; - public DlgAnnotationsSelect() + public dlgAnnotationsSelect() { InitializeComponent(); } - public DlgAnnotationsSelect(string userid) + public dlgAnnotationsSelect(string userid) { InitializeComponent(); - //MyItemID = pi.ItemID; UserID = userid; } @@ -97,13 +96,13 @@ namespace VEPROMS // Save selected list to DB. private void btnUpdate_Click(object sender, EventArgs e) { + int AnnotationTypeID; + string AnnotationNameStr = ""; + // dltFlg flag is used to notify SQL SP to deleted all the entries for the user before entering the annotation type selections. int dltFlg = 1; foreach (AnnotataionItem item in lstSelected.Items.OfType()) { - lstSelected.DisplayMember = "NameStr"; - lstSelected.ValueMember = "TypeID"; - AnnotationTypeID = item.TypeID; AnnotationNameStr = item.NameStr; diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index cc155fbe..0dc8511a 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24134,8 +24134,6 @@ CREATE PROC [dbo].[getAnnotationstypeSelections] @UsrID varchar(50) ) AS -BEGIN - IF((SELECT count(TypeID) FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0) BEGIN SELECT [ASTypeID] ,[TypeID] @@ -24146,22 +24144,8 @@ BEGIN ,[UserID] ,[IsEPAnnotationType] FROM [dbo].[AnnotationTypeSelections] - WHERE UsrID = @UsrID + WHERE UsrID = @UsrID END - ELSE - BEGIN - SELECT - [TypeID], - [Name], - [Config], - [DTS], - [UserID], - [LastChanged], - (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]=[AnnotationTypes].[TypeID]) [AnnotationCount], - [IsEPAnnotationType] - FROM [AnnotationTypes] - END -END GO -- C2025-027 Annotation Type Filtering @@ -24244,6 +24228,17 @@ CREATE TABLE [dbo].[AnnotationTypeSelections]( [IsEPAnnotationType] [bit] NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO +CREATE NONCLUSTERED INDEX [idx_AnnotationTypeSelections_Usrid] ON [dbo].[AnnotationTypeSelections] +( + [UsrID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +GO +CREATE NONCLUSTERED INDEX [idx_AnnotationTypeSelections_TypeID] ON [dbo].[AnnotationTypeSelections] +( + [TypeID] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +GO + IF (@@Error = 0) PRINT 'Running vesp_UpdateEPFormat Succeeded' ELSE PRINT 'Running vesp_UpdateEPFormat Failed to Execute' diff --git a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj index 69f53336..1a130536 100644 --- a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj +++ b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj @@ -152,11 +152,11 @@ AboutVEPROMS.cs - + Form - DlgAnnotationsSelect.cs + dlgAnnotationsSelect.cs Form @@ -343,10 +343,10 @@ Designer AboutVEPROMS.cs - - DlgAnnotationsSelect.cs + + dlgAnnotationsSelect.cs ResXFileCodeGenerator - DlgAnnotationsSelect1.Designer.cs + dlgAnnotationsSelect2.Designer.cs dlgMSWordMessage.cs diff --git a/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs index b3d06b00..21924cba 100644 --- a/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs +++ b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs @@ -1,7 +1,7 @@  namespace VEPROMS { - partial class DlgAnnotationsSelect + partial class dlgAnnotationsSelect { /// /// Required designer variable. @@ -38,6 +38,7 @@ namespace VEPROMS this.btnUpdate = new System.Windows.Forms.Button(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.btnCancel = new System.Windows.Forms.Button(); + this.lblMessage = new System.Windows.Forms.Label(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // @@ -46,11 +47,12 @@ namespace VEPROMS this.lstUnselected.Dock = System.Windows.Forms.DockStyle.Fill; this.lstUnselected.FormattingEnabled = true; this.lstUnselected.IntegralHeight = false; + this.lstUnselected.ItemHeight = 20; this.lstUnselected.Location = new System.Drawing.Point(3, 3); this.lstUnselected.Name = "lstUnselected"; this.tableLayoutPanel1.SetRowSpan(this.lstUnselected, 4); this.lstUnselected.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; - this.lstUnselected.Size = new System.Drawing.Size(287, 394); + this.lstUnselected.Size = new System.Drawing.Size(287, 359); this.lstUnselected.TabIndex = 0; this.lstUnselected.SelectedIndexChanged += new System.EventHandler(this.lst_SelectedIndexChanged); // @@ -59,18 +61,19 @@ namespace VEPROMS this.lstSelected.Dock = System.Windows.Forms.DockStyle.Fill; this.lstSelected.FormattingEnabled = true; this.lstSelected.IntegralHeight = false; + this.lstSelected.ItemHeight = 20; this.lstSelected.Location = new System.Drawing.Point(334, 3); this.lstSelected.Name = "lstSelected"; this.tableLayoutPanel1.SetRowSpan(this.lstSelected, 4); this.lstSelected.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; - this.lstSelected.Size = new System.Drawing.Size(288, 394); + this.lstSelected.Size = new System.Drawing.Size(288, 359); this.lstSelected.TabIndex = 1; this.lstSelected.SelectedIndexChanged += new System.EventHandler(this.lst_SelectedIndexChanged); // // btnSelect // this.btnSelect.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnSelect.Location = new System.Drawing.Point(298, 38); + this.btnSelect.Location = new System.Drawing.Point(298, 34); this.btnSelect.Name = "btnSelect"; this.btnSelect.Size = new System.Drawing.Size(28, 23); this.btnSelect.TabIndex = 2; @@ -81,7 +84,7 @@ namespace VEPROMS // btnSelectAll // this.btnSelectAll.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnSelectAll.Location = new System.Drawing.Point(298, 138); + this.btnSelectAll.Location = new System.Drawing.Point(298, 125); this.btnSelectAll.Name = "btnSelectAll"; this.btnSelectAll.Size = new System.Drawing.Size(28, 23); this.btnSelectAll.TabIndex = 3; @@ -92,7 +95,7 @@ namespace VEPROMS // btnDeselectAll // this.btnDeselectAll.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnDeselectAll.Location = new System.Drawing.Point(298, 238); + this.btnDeselectAll.Location = new System.Drawing.Point(298, 216); this.btnDeselectAll.Name = "btnDeselectAll"; this.btnDeselectAll.Size = new System.Drawing.Size(28, 23); this.btnDeselectAll.TabIndex = 5; @@ -103,7 +106,7 @@ namespace VEPROMS // btnDeselect // this.btnDeselect.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnDeselect.Location = new System.Drawing.Point(298, 338); + this.btnDeselect.Location = new System.Drawing.Point(298, 307); this.btnDeselect.Name = "btnDeselect"; this.btnDeselect.Size = new System.Drawing.Size(28, 23); this.btnDeselect.TabIndex = 4; @@ -124,9 +127,9 @@ namespace VEPROMS // // tableLayoutPanel1 // - this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); + this.tableLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); this.tableLayoutPanel1.ColumnCount = 3; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 38F)); @@ -137,14 +140,14 @@ namespace VEPROMS this.tableLayoutPanel1.Controls.Add(this.btnDeselectAll, 1, 2); this.tableLayoutPanel1.Controls.Add(this.btnSelect, 1, 0); this.tableLayoutPanel1.Controls.Add(this.btnSelectAll, 1, 1); - this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 12); + this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 51); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 4; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(625, 400); + this.tableLayoutPanel1.Size = new System.Drawing.Size(625, 365); this.tableLayoutPanel1.TabIndex = 6; // // btnCancel @@ -157,14 +160,25 @@ namespace VEPROMS this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click_1); // + // lblMessage + // + this.lblMessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblMessage.Location = new System.Drawing.Point(50, 18); + this.lblMessage.Name = "lblMessage"; + this.lblMessage.Size = new System.Drawing.Size(317, 28); + this.lblMessage.TabIndex = 10; + this.lblMessage.Text = "Updates will appear when PROMS is restarted."; + // // DlgAnnotationsSelect // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(653, 466); this.Controls.Add(this.btnCancel); this.Controls.Add(this.tableLayoutPanel1); this.Controls.Add(this.btnUpdate); + this.Controls.Add(this.lblMessage); + this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Name = "DlgAnnotationsSelect"; this.Text = "Select Annotation Types"; @@ -185,6 +199,7 @@ namespace VEPROMS private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.Button btnCancel; + private System.Windows.Forms.Label lblMessage; } } \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs index bbb2e6cc..aa101551 100644 --- a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs @@ -1306,7 +1306,7 @@ namespace VEPROMS this.cbShwAnnoFilter.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.cbShwAnnoFilter.TabIndex = 0; this.cbShwAnnoFilter.Text = "Select"; - this.cbShwAnnoFilter.Click += new System.EventHandler(this.buttonX1_Click); + this.cbShwAnnoFilter.Click += new System.EventHandler(this.cbShwAnnoFilter_Click); // // frmSysOptions // @@ -1404,7 +1404,6 @@ namespace VEPROMS private DevComponents.DotNetBar.Controls.CheckBoxX cbOTRemember; private DevComponents.DotNetBar.Controls.CheckBoxX cbOTAutoOpen; private DevComponents.DotNetBar.Controls.CheckBoxX cbShwRplWrdsColor; - //private DevComponents.DotNetBar.ButtonItem cbShwAnnoFilter; private DevComponents.DotNetBar.Controls.GroupPanel gpMSWordSum; private DevComponents.DotNetBar.Controls.CheckBoxX cbMSWordPrompt; private DevComponents.DotNetBar.ButtonX cbShwAnnoFilter; diff --git a/PROMS/VEPROMS User Interface/frmSysOptions.cs b/PROMS/VEPROMS User Interface/frmSysOptions.cs index c3364284..19de065e 100644 --- a/PROMS/VEPROMS User Interface/frmSysOptions.cs +++ b/PROMS/VEPROMS User Interface/frmSysOptions.cs @@ -365,24 +365,11 @@ namespace VEPROMS Properties.Settings.Default.cbShwRplWrdsColor = cbShwRplWrdsColor.Checked; // update setting value Properties.Settings.Default.Save(); // save settings } + private void cbShwAnnoFilter_Click(object sender, EventArgs e) - { - - //OnSelectAnnotations(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); - - //Settings.Default.cbShwAnnoFilter = cbShwAnnoFilter.Checked; - //VlnSettings.cbShwAnnoFilter = cbShwAnnoFilter.Checked; - //Properties.Settings.Default.cbShwAnnoFilter = cbShwAnnoFilter.Checked; // update setting value - //Properties.Settings.Default.Save(); // save settings - } - - private void buttonX1_Click(object sender, EventArgs e) { frmVEPROMS.tv_SelectAnnotations(); } - //private void OnSelectAnnotations(object sender, vlnTreeEventArgs args) - //{ - // if (SelectAnnotations != null) SelectAnnotations(sender, args); - //} + } } \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 206f99d1..0ac6013a 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -543,7 +543,6 @@ namespace VEPROMS tv.RefreshCheckedOutProcedures += new vlnTreeViewEvent(tv_RefreshCheckedOutProcedures); tv.ProcedureCheckedOutTo += new vlnTreeViewEvent(tv_ProcedureCheckedOutTo); tv.ViewPDF += new vlnTreeViewPdfEvent(tv_ViewPDF); - //tv.SelectAnnotations += new (tv_SelectAnnotations); displayApplicability.ApplicabilityViewModeChanged += new DisplayApplicability.DisplayApplicabilityEvent(displayApplicability_ApplicabilityViewModeChanged); tv.ExportImportProcedureSets += new vlnTreeViewEvent(tv_ExportImportProcedureSets); @@ -1298,7 +1297,7 @@ namespace VEPROMS } public static void tv_SelectAnnotations() { - DlgAnnotationsSelect sannoDlg = new DlgAnnotationsSelect(VlnSettings.UserID); + dlgAnnotationsSelect sannoDlg = new dlgAnnotationsSelect(VlnSettings.UserID); sannoDlg.ShowDialog(); // RHM 20120925 - Center dialog over PROMS window } void tv_CreateTimeCriticalActionSummary(object sender, vlnTreeEventArgs args) diff --git a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs index d1186cea..9caba8a6 100644 --- a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs +++ b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs @@ -169,188 +169,7 @@ namespace VEPROMS.CSLA.Library } } } - } - - - private int _TypeID; - [System.ComponentModel.DataObjectField(true, true)] - public int TypeID - { - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - get - { - return _TypeID; - } - } - private int _ItemID; - [System.ComponentModel.DataObjectField(true, true)] - public int ItemID - { - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - get - { - return _ItemID; - } - } - private string _Name = string.Empty; - public string Name - { - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - get - { - return _Name; - } - } - private string _Config = string.Empty; - public string Config - { - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - get - { - return _Config; - } - } - private DateTime _DTS = new DateTime(); - public DateTime DTS - { - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - get - { - return _DTS; - } - } - private string _UserID = string.Empty; - public string UserID - { - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - get - { - return _UserID; - } - } - private int _AnnotationTypeAnnotationCount = 0; - public int AnnotationTypeAnnotationCount - { - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - get - { - return _AnnotationTypeAnnotationCount; - } - } - //C2025-023 - Electronic Procedures - Modifications to PROMS - // Is Annotation Type an EP Annotation? - private bool _IsEPAnnotationType = false; - public bool IsEPAnnotationType - { - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - get - { - return _IsEPAnnotationType; - } - [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] - set - { - if (_IsEPAnnotationType != value) - { - _IsEPAnnotationType = value; - //PropertyHasChanged(); - } - } - } - - #region Log4Net - private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - #endregion - private string _ErrorMessage = string.Empty; - public string ErrorMessage - { - get { return _ErrorMessage; } - } - [Serializable()] - protected class retrieveAnnotSelections - { - private int _itemID; - public int itemID { get { return _itemID; } } - - public retrieveAnnotSelections(int itemID) - { - _itemID = itemID; - } - } - [Serializable()] - public class retrieveAnnotSelectionsList - { - private int _TypeID; - public int TypeID - { - get { return _TypeID; } - set { _TypeID = value; } - } - private int _ItemID; - public int ItemID - { - get { return _ItemID; } - set { _ItemID = value; } - } - private string _Name; - public string Name - { - get { return _Name; } - set { _Name = value; } - } - private string _Config; - public string Config - { - get { return _Config; } - set { _Config = value; } - } - private DateTime _DTS; - public DateTime DTS - { - get { return _DTS; } - set { _DTS = value; } - } - private string _UserID; - public string UserID - { - get { return _UserID; } - set { _UserID = value; } - } - private bool _IsEPAnnotationType; - public bool IsEPAnnotationType - { - get { return _IsEPAnnotationType; } - set { _IsEPAnnotationType = value; } - } - private string _ErrorMessage = string.Empty; - public string ErrorMessage - { - get { return _ErrorMessage; } - } - } - - private void ReadData(SafeDataReader dr) - { - if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] retrieveAnnotSelectionsList.ReadData", GetHashCode()); - try - { - _TypeID = dr.GetInt32("TypeID"); - _ItemID = dr.GetInt32("ItemID"); - _Name = dr.GetString("Name"); - _Config = dr.GetString("Config"); - _DTS = dr.GetDateTime("DTS"); - _UserID = dr.GetString("UserID"); - _AnnotationTypeAnnotationCount = dr.GetInt32("AnnotationCount"); - if (dr.GetSchemaTable().Rows.OfType().Any(row => row["ColumnName"].ToString() == "IsEPAnnotationType")) - _IsEPAnnotationType = (bool)dr.GetValue("IsEPAnnotationType"); - } - catch (Exception ex) - { - if (_MyLog.IsErrorEnabled) _MyLog.Error("retrieveAnnotSelectionsList.ReadData", ex); - _ErrorMessage = ex.Message; - throw new DbCslaException("retrieveAnnotSelectionsList.ReadData", ex); - } - } + } } } diff --git a/PROMS/Volian.Controls.Library/AnnotationDetails.cs b/PROMS/Volian.Controls.Library/AnnotationDetails.cs index bec98914..27577b01 100644 --- a/PROMS/Volian.Controls.Library/AnnotationDetails.cs +++ b/PROMS/Volian.Controls.Library/AnnotationDetails.cs @@ -120,11 +120,6 @@ namespace Volian.Controls.Library if (CurrentItem.MyDocVersion.DocVersionAssociationCount > 0) _ROPath = CurrentItem.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath; - //ProcItem = CurrentItem.MyProcedure; - // C2025-027 Annotation Type Filtering - //cbGridAnnoType.WatermarkText = "Select Annotation Type"; - //cbGridAnnoType.DataSource = VEPROMS.CSLA.Library.AnnotationstypeSelections.Get(MyUserInfo.UserID); - } public AnnotationInfo FirstExeAnnotation(ItemInfo ii) { @@ -369,9 +364,7 @@ namespace Volian.Controls.Library cbGridAnnoType.DisplayMember = "Name"; cbGridAnnoType.ValueMember = "TypeId"; - cbGridAnnoType.DataSource = AnnotationTypeInfoList.Get().Clone(); - //ProcItem = CurrentItem.MyProcedure; //C2025 - 027 Annotation Type Filtering cbGridAnnoType.WatermarkText = "Select Annotation Type"; cbGridAnnoType.DataSource = VEPROMS.CSLA.Library.AnnotationstypeSelections.Get(MyUserInfo.UserID); -- 2.49.1 From 0bf9025c0d2ac41da675e54e16a6579051cc6445 Mon Sep 17 00:00:00 2001 From: mschill Date: Thu, 17 Jul 2025 13:59:11 -0400 Subject: [PATCH 11/44] C2025-024 Electronic Procedures Phase 2 - XML Export Multi-unit --- .../dlgExportImportEP.cs | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index 818587ed..87a746c8 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -55,14 +55,23 @@ namespace VEPROMS //Overridden function to handle export of EP data protected override void ExportEPAnnotationInfo(XmlElement xe, ItemInfo ii) { - //switch to handle customizations for different formats - switch (ii.ActiveFormat.PlantFormat.EPFormatFiles.Find(x => x.AnnotationTypeID == _AnnotationType.TypeID)?.Name) + if (_UnitIndex > 0) + { + ii.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + } + + //switch to handle customizations for different formats + switch (ii.ActiveFormat.PlantFormat.EPFormatFiles.Find(x => x.AnnotationTypeID == _AnnotationType.TypeID)?.Name) { default: ExportEPAnnotationInfo_Default(xe, ii); break; } - + + ii.MyDocVersion.DocVersionConfig.SelectedSlave = 0; + ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0; + } //default export of EP Data @@ -242,18 +251,13 @@ namespace VEPROMS return dbSeq(ii); } } - //return a db sequence string from an ItemInfo - private string dbSeq(ItemInfo ii) - { - if (_UnitIndex > 0) ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; - string rtnval = $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.MyProcedure.DisplayNumber} {ii.MyProcedure.DisplayText}:{ii.DBSequence}"; - ii.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0; - return rtnval; - } - //For Exporting an RO that is an image - //returns the Location and FileName of the RO Image - private string GetROImageFileLocation(ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) + //return a db sequence string from an ItemInfo + private string dbSeq(ItemInfo ii) => $"{((FolderInfo)ii.MyDocVersion.ActiveParent).Name}:{ii.MyProcedure.DisplayNumber} {ii.MyProcedure.DisplayText}:{ii.DBSequence}"; + + //For Exporting an RO that is an image + //returns the Location and FileName of the RO Image + private string GetROImageFileLocation(ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) { string rodbpath = rodb.FolderPath; -- 2.49.1 From 4c4f4d52d2393210908fb6d39db2eb9f1f454ec4 Mon Sep 17 00:00:00 2001 From: mschill Date: Fri, 18 Jul 2025 13:26:16 -0400 Subject: [PATCH 12/44] C2025-024 Electronic Procedures Phase 2 - XML Export Code refactor and added comment --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 12 ++++-------- PROMS/VEPROMS User Interface/dlgExportImportEP.cs | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 1c52f404..c4bc8d6c 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -1209,14 +1209,10 @@ namespace VEPROMS // See if there is an existing format file that was created as a copy. If so, check if the passed in format's // config is the same as an existing 'Copy of' format - if so, use rather than importing the same format as // defined by config. - foreach (var existname in existingFormat.Where(existname => existname.Key.Contains(name))) + foreach (string cpy in existingFormat.Select(existname => existname.Key).Where(existname => existname.Contains(name) && existname.StartsWith("Copy") && existname.Contains("of " + name))) { - string cpy = existname.Key; - if (cpy.StartsWith("Copy") && cpy.Contains("of " + name)) - { - FormatInfo exFI = FormatInfo.Get(existingFormat[cpy]); - if (exFI.Config == config) return cpy; - } + FormatInfo exFI = FormatInfo.Get(existingFormat[cpy]); + if (exFI.Config == config) return cpy; } return null; } @@ -3110,7 +3106,7 @@ namespace VEPROMS bool hasNewROID = (content.MyGrid.Data.Contains(glookFor)); if (hasNewROID) content.MyGrid.Data = content.MyGrid.Data.Replace(glookFor, greplaceWith); - else if (!hasNewROID && glookFor.Contains("0041") && glookFor.Contains("FFFF")) + else if (glookFor.Contains("0041") && glookFor.Contains("FFFF")) { string newGlookFor = glookFor; newGlookFor = newGlookFor.Replace("0041", "0000"); diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index 87a746c8..a422c743 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -313,6 +313,7 @@ namespace VEPROMS return xroid; } + //overridden - used to set the RO location for RO Images that are not in annotations protected override void SetROLocation(ref XmlElement xindivid, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) { string imgfile = GetROImageFileLocation(roc, rodb, isMulti); -- 2.49.1 From d7f83fa4d41ce08806605677cd3a72d394d04315 Mon Sep 17 00:00:00 2001 From: mschill Date: Fri, 18 Jul 2025 14:52:05 -0400 Subject: [PATCH 13/44] C2025-024 Electronic Procedures Phase 2 - XML Export Export Cleanup --- .../VEPROMS User Interface/dlgExportImport.cs | 181 ++++++++---------- 1 file changed, 77 insertions(+), 104 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index c4bc8d6c..40716318 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -155,18 +155,15 @@ namespace VEPROMS if (MyFolder != null) { sfd.FileName = string.Format("{0}-{1}.expx", Database.ActiveDatabase, MyFolder.Name); - if (sfd.ShowDialog(this) == DialogResult.OK) - { - if (sfd.FileName != string.Empty) - { - txtExport.Text = sfd.FileName; - if (File.Exists(txtExport.Text)) - File.Delete(txtExport.Text); - MyExpxZipFile = new ZipFile(txtExport.Text, Encoding.UTF8); - MyExpxZipFile.Save(); - } - } - } + if (sfd.ShowDialog(this) == DialogResult.OK && sfd.FileName != string.Empty) + { + txtExport.Text = sfd.FileName; + if (File.Exists(txtExport.Text)) + File.Delete(txtExport.Text); + MyExpxZipFile = new ZipFile(txtExport.Text, Encoding.UTF8); + MyExpxZipFile.Save(); + } + } else if (MyProcedure != null) { txtExport.Enabled = true; @@ -1330,76 +1327,70 @@ namespace VEPROMS txtImport.Text = ofd.FileName; return; } - if (MyFolder != null) - { - if (ofd.ShowDialog(this) == DialogResult.OK) - { - if (ofd.FileName != string.Empty) - { - Old2NewItem = new Dictionary(); - Old2NewContent = new Dictionary(); - Old2NewLibDoc = new Dictionary(); - GetExistingLibDocsList(); // B2019-035 better memory management - PendingTransitions = new XmlDocument(); - FileInfo fi = new FileInfo(ofd.FileName); - string dn; - if (fi.Name.IndexOf("-") > 0) - dn = fi.Name.Substring(0, fi.Name.IndexOf("-")); - else - dn = fi.Name.Substring(0, fi.Name.IndexOf(".")); - txtImport.Text = ofd.FileName; - ReadOptions ro = new ReadOptions(); - ro.Encoding = Encoding.UTF8; - MyExpxZipFile = ZipFile.Read(txtImport.Text, ro); - string fn = string.Format(@"{0}\{1}.impx", PEIPath, dn); - if (File.Exists(fn)) - { - MyImpxZipFile = ZipFile.Read(fn, ro); - ReadTransitionAndItemContentIDs(); - } - else - { - MyImpxZipFile = new ZipFile(fn, Encoding.UTF8); - //transitions - XmlElement xe = PendingTransitions.CreateElement("transitions"); - PendingTransitions.AppendChild(xe); - fn = PEIPath + @"\transitions.xml"; - PendingTransitions.Save(fn); - MyImpxZipFile.AddFile(fn, ""); - MyImpxZipFile.Save(); - File.Delete(fn); - //itemids - XmlDocument xd = new XmlDocument(); - xe = xd.CreateElement("items"); - xd.AppendChild(xe); - fn = PEIPath + @"\items.xml"; - xd.Save(fn); - MyImpxZipFile.AddFile(fn, ""); - MyImpxZipFile.Save(); - File.Delete(fn); - //contentids - xd = new XmlDocument(); - xe = xd.CreateElement("contents"); - xd.AppendChild(xe); - fn = PEIPath + @"\contents.xml"; - xd.Save(fn); - MyImpxZipFile.AddFile(fn, ""); - MyImpxZipFile.Save(); - File.Delete(fn); - //libdocids - xd = new XmlDocument(); - xe = xd.CreateElement("libdocs"); - xd.AppendChild(xe); - fn = PEIPath + @"\libdocs.xml"; - xd.Save(fn); - MyImpxZipFile.AddFile(fn, ""); - MyImpxZipFile.Save(); - File.Delete(fn); - } - } - } - } - if (MyDocVersion != null) + if (MyFolder != null && ofd.ShowDialog(this) == DialogResult.OK && ofd.FileName != string.Empty) + { + Old2NewItem = new Dictionary(); + Old2NewContent = new Dictionary(); + Old2NewLibDoc = new Dictionary(); + GetExistingLibDocsList(); // B2019-035 better memory management + PendingTransitions = new XmlDocument(); + FileInfo fi = new FileInfo(ofd.FileName); + string dn; + if (fi.Name.IndexOf("-") > 0) + dn = fi.Name.Substring(0, fi.Name.IndexOf("-")); + else + dn = fi.Name.Substring(0, fi.Name.IndexOf(".")); + txtImport.Text = ofd.FileName; + ReadOptions ro = new ReadOptions(); + ro.Encoding = Encoding.UTF8; + MyExpxZipFile = ZipFile.Read(txtImport.Text, ro); + string fn = string.Format(@"{0}\{1}.impx", PEIPath, dn); + if (File.Exists(fn)) + { + MyImpxZipFile = ZipFile.Read(fn, ro); + ReadTransitionAndItemContentIDs(); + } + else + { + MyImpxZipFile = new ZipFile(fn, Encoding.UTF8); + //transitions + XmlElement xe = PendingTransitions.CreateElement("transitions"); + PendingTransitions.AppendChild(xe); + fn = PEIPath + @"\transitions.xml"; + PendingTransitions.Save(fn); + MyImpxZipFile.AddFile(fn, ""); + MyImpxZipFile.Save(); + File.Delete(fn); + //itemids + XmlDocument xd = new XmlDocument(); + xe = xd.CreateElement("items"); + xd.AppendChild(xe); + fn = PEIPath + @"\items.xml"; + xd.Save(fn); + MyImpxZipFile.AddFile(fn, ""); + MyImpxZipFile.Save(); + File.Delete(fn); + //contentids + xd = new XmlDocument(); + xe = xd.CreateElement("contents"); + xd.AppendChild(xe); + fn = PEIPath + @"\contents.xml"; + xd.Save(fn); + MyImpxZipFile.AddFile(fn, ""); + MyImpxZipFile.Save(); + File.Delete(fn); + //libdocids + xd = new XmlDocument(); + xe = xd.CreateElement("libdocs"); + xd.AppendChild(xe); + fn = PEIPath + @"\libdocs.xml"; + xd.Save(fn); + MyImpxZipFile.AddFile(fn, ""); + MyImpxZipFile.Save(); + File.Delete(fn); + } + } + if (MyDocVersion != null) { ofd.Filter = "PROMS Procedure Export Files|*.pxml"; if (ofd.ShowDialog(this) == DialogResult.OK) @@ -2223,16 +2214,9 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rodbid", ri.RODbID.ToString())); if (_ExportBothConvertedandNot) SetROLocation(ref xe, ri.ROID, ri.RODbID); - //rousage audits - ExportROUsageAudits(xe, ri); xn.AppendChild(xe); } - private void ExportROUsageAudits(XmlElement xe, RoUsageInfo ri) - { - if (cbxExportAudits.Checked) { }; - } - private void ExportPart(XmlElement xn, PartInfo pi, string nodename) { /* @@ -2309,16 +2293,9 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ti.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff"))); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ti.UserID.ToString())); - //transition audits - ExportTransitionAudits(xe, ti); xn.AppendChild(xe); } - private void ExportTransitionAudits(XmlElement xe, TransitionInfo ti) - { - if (cbxExportAudits.Checked) { }; - } - private void ExportAnnotation(XmlElement xn, AnnotationInfo ai, string nodename) { /* @@ -2813,15 +2790,11 @@ namespace VEPROMS { // create a list of the RO databases currently in the database List roDbNameList = new List(); - RODbInfoList rolist = RODbInfoList.Get(); + using (RODbInfoList rolist = RODbInfoList.Get()) + { + roDbNameList.AddRange(rolist.Where(rodbinfo => !roDbNameList.Contains(rodbinfo.ROName)).Select(rodbinfo => rodbinfo.ROName)); + } - foreach (RODbInfo rodbinfo in rolist) - { - if (!roDbNameList.Contains(rodbinfo.ROName)) - roDbNameList.Add(rodbinfo.ROName); - } - - rolist.Dispose(); int cnt = 0; string roNameNew = roname; -- 2.49.1 From 0577acad931cb9a6b50c5856b3c785c9b6089e1c Mon Sep 17 00:00:00 2001 From: mschill Date: Fri, 18 Jul 2025 16:13:16 -0400 Subject: [PATCH 14/44] C2025-024 Electronic Procedures Phase 2 - XML Export Removed unnecessary usings --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 5 +---- PROMS/VEPROMS User Interface/dlgExportImportEP.cs | 9 ++++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 40716318..e5ff639a 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -1,8 +1,5 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; using System.Text; using System.Windows.Forms; using VEPROMS.CSLA.Library; @@ -17,7 +14,7 @@ using System.Linq; namespace VEPROMS { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Major Code Smell", "S6580:Use a format provider when parsing date and time", Justification = "dts formatting may be different time per plant")] + [System.Diagnostics.CodeAnalysis.SuppressMessage("Major Code Smell", "S6580:Use a format provider when parsing date and time", Justification = "dts formatting may be different time per plant")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Major Code Smell", "S6561:Avoid using \"DateTime.Now\" for benchmarking or timing operations", Justification = "Rough Time estimate on ProgressBars")] public partial class dlgExportImport : Form { diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index a422c743..4f7d0887 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -4,17 +4,16 @@ using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; -using System.Threading.Tasks; using System.Xml; using VEPROMS.CSLA.Library; namespace VEPROMS { - //C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) - //class inherits from normal import/export form - //then adds additional functionality + //C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) + //class inherits from normal import/export form + //then adds additional functionality #pragma warning disable S101 // Types should be named in PascalCase - public partial class dlgExportImportEP : dlgExportImport + public partial class dlgExportImportEP : dlgExportImport #pragma warning restore S101 // Types should be named in PascalCase { private readonly AnnotationTypeInfo _AnnotationType; -- 2.49.1 From ecb9a805e510e58036c3bb0792665ae0cc45a4b8 Mon Sep 17 00:00:00 2001 From: mschill Date: Mon, 21 Jul 2025 13:47:23 -0400 Subject: [PATCH 15/44] C2025-024 Electronic Procedures Phase 2 - XML Export UI / menu filtering for EP only procedures --- .../Format/EPFormatFile.cs | 9 ++++++- PROMS/Volian.Controls.Library/vlnTreeView.cs | 25 +++++++------------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs b/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs index 84b71cc6..9bdb1720 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs @@ -61,6 +61,13 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _AnnotationTypeID, "@AnnotationTypeID"); } } + + // Return Name of Annotation that EP Format File is Attached to + public string AnnotationName() + { + return AnnotationTypeInfo.Get((int) AnnotationTypeID).Name; + } + //if xml value is blank, should element export? //defaults to true private LazyLoad _exportblank; @@ -373,7 +380,6 @@ namespace VEPROMS.CSLA.Library } } - //return a list of values for the specified ROID //given the EP items return columns //will return all RO items under the Group that's roid = the rosource @@ -406,6 +412,7 @@ namespace VEPROMS.CSLA.Library } } + #endregion //C2025-023 - Electronic Procedures - Modifications to PROMS // class to handle return of RO Lists diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 95beb6f2..b926f150 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -875,7 +875,9 @@ namespace Volian.Controls.Library if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion)) { cm.MenuItems.Add("Export Procedure", mi_Click); - AddEPExport(cm.MenuItems, pri.MyDocVersion.MultiUnitCount, pri.MyDocVersion.UnitNames); + //C2025-024 Proms XML Output - if have any EP Format files, add dropdown menu for exporting EP formats + if (pri.ActiveFormat.PlantFormat.EPFormatFiles.Count > 0) + AddEPExport(cm.MenuItems, pri.MyDocVersion.MultiUnitCount, pri.MyDocVersion.UnitNames, pri.ActiveFormat.PlantFormat.EPFormatFiles); } if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion) || ui.IsWriter(pri.MyDocVersion)) { @@ -1392,24 +1394,15 @@ namespace Volian.Controls.Library // Add context menu for exporting Electronic Procedures // if has an Electronic procedure // then loop through and add an Export for each EP Viewer - private void AddEPExport(Menu.MenuItemCollection menuItems, int MultiUnitCount, string[] UnitNames) + private void AddEPExport(Menu.MenuItemCollection menuItems, int MultiUnitCount, string[] UnitNames, EPFormatFiles EPFiles) { - //get EP Annotations - AnnotationTypeInfoList annotations = AnnotationTypeInfoList.Get(); - List epAnnotations = new List(); - foreach (AnnotationTypeInfo tmp in annotations) - { - if (tmp.IsEPAnnotationType) epAnnotations.Add(tmp); - } - - if (epAnnotations.Count == 0) return; // no Electronic Procedures - //add outer menu MenuItem mi = menuItems.Add("Electronic Procedure Viewer Export"); - foreach (AnnotationTypeInfo epAnn in epAnnotations) + foreach (EPFormatFile epAnnType in EPFiles) { + //Add item for each individual EP Viewer - MenuItem mv = mi.MenuItems.Add(epAnn.Name); + MenuItem mv = mi.MenuItems.Add(epAnnType.AnnotationName()); //tag will be of format: //{EP Annotation Type ID},{Unit} @@ -1422,13 +1415,13 @@ namespace Volian.Controls.Library { k++; MenuItem multiunit_mv = mv.MenuItems.Add(s); - multiunit_mv.Tag = $"{epAnn.TypeID},{k}"; + multiunit_mv.Tag = $"{epAnnType.AnnotationTypeID},{k}"; multiunit_mv.Click += new EventHandler(miEP_Click); } } else { - mv.Tag = $"{epAnn.TypeID},0"; + mv.Tag = $"{epAnnType.AnnotationTypeID},0"; mv.Click += new EventHandler(miEP_Click); } } -- 2.49.1 From 6f04d0bf07c73ea17f226c179e65bfcd2517e0d2 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 22 Jul 2025 09:06:11 -0400 Subject: [PATCH 16/44] C2025-027-AnnotationsTypeSelect --- .../DlgAnnotationsSelect.cs | 31 ++- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 180 ++++++++++++++---- .../Minimal/AnnotationstypeSections.cs | 27 ++- 3 files changed, 189 insertions(+), 49 deletions(-) diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs index 5083cd84..cf77407b 100644 --- a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -101,14 +101,17 @@ namespace VEPROMS // dltFlg flag is used to notify SQL SP to deleted all the entries for the user before entering the annotation type selections. int dltFlg = 1; - foreach (AnnotataionItem item in lstSelected.Items.OfType()) - { - AnnotationTypeID = item.TypeID; - AnnotationNameStr = item.NameStr; + //foreach (AnnotataionItem item in lstSelected.Items.OfType()) + //{ + // AnnotationTypeID = item.TypeID; + // AnnotationNameStr = item.NameStr; + + DataTable dt2 = coverToTable(UserID); + + VEPROMS.CSLA.Library.AnnotationstypeSelections.Update2(dt2); + // dltFlg = 0; + //} - VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(UserID, AnnotationTypeID, dltFlg, AnnotationNameStr); - dltFlg = 0; - } } public class AnnotataionItem { @@ -172,6 +175,20 @@ namespace VEPROMS { this.Close(); } + + private DataTable coverToTable(string userid) + { + DataTable dt = new DataTable(); + dt.Columns.Add("TypeID", typeof(Int32)); + dt.Columns.Add("NameStr", typeof(string)); + dt.Columns.Add("UserID", typeof(string)); + + foreach (AnnotataionItem item in lstSelected.Items.OfType()) + { + dt.Rows.Add(item.TypeID, item.NameStr, userid); + } + return dt; + } } } diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 0dc8511a..60e92399 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -1,5 +1,3 @@ - - Set NoCount On; If (db_name() in('master','model','msdn','tempdb')) @@ -24076,16 +24074,72 @@ ELSE GO + + + + +-- C2025-027 Annotation Type Filtering +IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AnnotationTypeSelections]') AND type in (N'U')) +DROP TABLE [dbo].[AnnotationTypeSelections] +GO + +/****** Object: Table [dbo].[AnnotationTypeSelections] Script Date: 7/10/2025 2:38:23 PM ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +-- ============================================= +-- Author: Paul Larsen +-- Create date: 07/10/2025 +-- Description: Store user Annotation selections for annotation filter. +-- ============================================= + +CREATE TABLE [dbo].[AnnotationTypeSelections]( + [ASTypeID] [int] IDENTITY(1,1) NOT NULL, + [TypeID] [int] NULL, + [UsrID] [varchar](50) NULL, + [Name] [nvarchar](100) NULL, + [Config] [nvarchar](max) NULL, + [DTS] [datetime] NULL, + [UserID] [nvarchar](100) NULL, + [LastChanged] [timestamp] NULL, + [IsEPAnnotationType] [bit] NULL +) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] +GO + +--CREATE UNIQUE INDEX idx_AnnotationTypeSelections_Usrid +--ON AnnotationTypeSelections (TypeID, Name, UsrID); +--GO + +IF EXISTS (SELECT * FROM sys.indexes WHERE name='idx_AnnotationTypeSelections_UsrID' +AND object_id = OBJECT_ID('[dbo].[AnnotationTypeSelections]')) +begin +DROP INDEX [idx_AnnotationTypeSelections_UsrID] ON [dbo].[AnnotationTypeSelections]; +end + +CREATE NONCLUSTERED INDEX idx_AnnotationTypeSelections_UsrID + ON [dbo].[AnnotationTypeSelections] (UsrID) +INCLUDE (TypeID, Name) +GO + +--CREATE NONCLUSTERED INDEX [idx_AnnotationTypeSelections_Usrid] ON [dbo].[AnnotationTypeSelections] +--( +-- [UsrID] ASC +--)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +--GO +--CREATE NONCLUSTERED INDEX [idx_AnnotationTypeSelections_TypeID] ON [dbo].[AnnotationTypeSelections] +--( +-- [TypeID] ASC +--)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +--GO + -- C2025-027 Annotation Type Filtering IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAnnotationSelectListTypes]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) DROP PROCEDURE [getAnnotationSelectListTypes]; GO -SET ANSI_NULLS ON -GO -SET QUOTED_IDENTIFIER ON -GO - -- ============================================= -- Author: Paul Larsen -- Create date: 7/10/2025 @@ -24104,13 +24158,10 @@ AS [DTS], [UserID], [LastChanged], - (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount] - --[IsEPAnnotationType] + (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount], + [IsEPAnnotationType] FROM [AnnotationTypes] --A - --JOIN AnnotationTypeSelections S ON S.TypeID = A.TypeID - WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections WHERE UsrID = @UserID) --S.ItemID = @ItemID AND S.TypeID != A.TypeID - - RETURN + WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections WHERE UsrID = @UserID) GO @@ -24154,7 +24205,6 @@ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAnnotationsty GO SET ANSI_NULLS ON GO - SET QUOTED_IDENTIFIER ON GO @@ -24198,12 +24248,42 @@ BEGIN END END +GO -- C2025-027 Annotation Type Filtering -IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AnnotationTypeSelections]') AND type in (N'U')) -DROP TABLE [dbo].[AnnotationTypeSelections] +--IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[TableValAnnotTypeSelections]') AND OBJECTPROPERTY(id,N'IsType') = 1) + +-- Type -- + +--IF NOT EXISTS (SELECT * FROM sys.types WHERE is_table_type = 1 AND name ='TableValAnnotTypeSelections') +-- DROP PROCEDURE [TableValAnnotTypeSelections]; +--GO + +--/****** Object: UserDefinedTableType [dbo].[TableValAnnotTypeSelections] Script Date: 7/21/2025 8:06:11 PM ******/ +--CREATE TYPE [dbo].[TableValAnnotTypeSelections] AS TABLE( +-- [TypeID] [int] NOT NULL, +-- [NameStr] [varchar](200) NULL, +-- [UserID] [varchar](50) NULL +--) +--GO + +-- C2025-027 Annotation Type Filtering +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[UpdateAnnotationstypeSelections2]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [UpdateAnnotationstypeSelections2]; + +-- Need to drop UpdateAnnotationstypeSelections2 SP first so script can drop and recreate the TableValAnnotTypeSelections table type + +IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.DOMAINS WHERE Domain_Name = 'TableValAnnotTypeSelections' ) + DROP TYPE [dbo].[TableValAnnotTypeSelections] + +CREATE TYPE [dbo].[TableValAnnotTypeSelections] AS TABLE( + [TypeID] [int] NOT NULL, + [NameStr] [varchar](200) NULL, + [UserID] [varchar](50) NULL +) GO -/****** Object: Table [dbo].[AnnotationTypeSelections] Script Date: 7/10/2025 2:38:23 PM ******/ + +/****** Object: StoredProcedure [dbo].[UpdateAnnotationstypeSelections2] Script Date: 7/21/2025 8:51:42 PM ******/ SET ANSI_NULLS ON GO @@ -24212,33 +24292,51 @@ GO -- ============================================= -- Author: Paul Larsen --- Create date: 07/10/2025 --- Description: Store user Annotation selections for annotation filter. +-- Create date: 07/21/2025 +-- Description: Manage user choice annotation types -- ============================================= - -CREATE TABLE [dbo].[AnnotationTypeSelections]( - [ASTypeID] [int] IDENTITY(1,1) NOT NULL, - [TypeID] [int] NULL, - [UsrID] [varchar](50) NULL, - [Name] [nvarchar](100) NOT NULL, - [Config] [nvarchar](max) NULL, - [DTS] [datetime] NOT NULL, - [UserID] [nvarchar](100) NOT NULL, - [LastChanged] [timestamp] NOT NULL, - [IsEPAnnotationType] [bit] NOT NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] -GO -CREATE NONCLUSTERED INDEX [idx_AnnotationTypeSelections_Usrid] ON [dbo].[AnnotationTypeSelections] +CREATE PROC [dbo].[UpdateAnnotationstypeSelections2] ( - [UsrID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] -GO -CREATE NONCLUSTERED INDEX [idx_AnnotationTypeSelections_TypeID] ON [dbo].[AnnotationTypeSelections] -( - [TypeID] ASC -)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] -GO + @TempTable AS dbo.TableValAnnotTypeSelections READONLY +) +AS +BEGIN + --INSERT INTO CUSTOMER (CustomerId,CustomerName ,Isdeleted ) + --SELECT CustomerId, CustomerName, 0 AS Isdeleted FROM @TempTable + +MERGE AnnotationTypeSelections AS TARGET + USING @TempTable AS SOURCE + + /* 1. Performing the UPDATE operation */ + + /* If the P_ID is same, + check for change in P_NAME or P_PRICE */ + ON (TARGET.TypeID = SOURCE.TypeID) + WHEN MATCHED + AND TARGET.Name <> SOURCE.NameStr + + /* Update the records in TARGET */ + THEN UPDATE + SET TARGET.Name = SOURCE.NameStr, + TARGET.UsrID = SOURCE.UserID + + /* 2. Performing the INSERT operation */ + + /* When no records are matched with TARGET table + Then insert the records in the target table */ + WHEN NOT MATCHED BY TARGET + THEN INSERT (TypeID, Name, UsrID) + VALUES (SOURCE.TypeID, SOURCE.NameStr,SOURCE.UserID) + + /* 3. Performing the DELETE operation */ + + /* When no records are matched with SOURCE table + Then delete the records from the target table */ + WHEN NOT MATCHED BY SOURCE + THEN DELETE; +END +GO IF (@@Error = 0) PRINT 'Running vesp_UpdateEPFormat Succeeded' ELSE PRINT 'Running vesp_UpdateEPFormat Failed to Execute' diff --git a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs index 9caba8a6..e120ccd9 100644 --- a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs +++ b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs @@ -169,7 +169,32 @@ namespace VEPROMS.CSLA.Library } } } - } + + } + public static void Update2(DataTable dt) + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + try + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "UpdateAnnotationstypeSelections2"; + cm.CommandTimeout = Database.DefaultTimeout; + + //Pass table Valued parameter to Store Procedure + SqlParameter sqlParam = cm.Parameters.AddWithValue("@TempTable", dt); + sqlParam.SqlDbType = SqlDbType.Structured; + cm.ExecuteNonQuery(); + } + catch (Exception ex) + { + + } + } + } + } } } -- 2.49.1 From 20c31153debcbb7e5de957fc33cfa7d735ace10e Mon Sep 17 00:00:00 2001 From: mschill Date: Wed, 23 Jul 2025 15:26:45 -0400 Subject: [PATCH 17/44] C2025-024 Electronic Procedures Phase 2 - XML Export Multi-Unit RO Resolution --- .../VEPROMS User Interface/dlgExportImport.cs | 65 ++++++++++++-- .../dlgExportImportEP.cs | 84 +++++++++++++++---- 2 files changed, 125 insertions(+), 24 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index e5ff639a..d18edc30 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -36,6 +36,10 @@ namespace VEPROMS private bool _DidConvertROsToText = false; private bool _DidUCF = false; + //C2025-024 Proms EP XML Output + //this will hold if a specific unit was selected + protected int _UnitIndex = 0; + private ItemInfo _ExternalTransitionItem = null; public ItemInfo ExternalTransitionItem { @@ -62,9 +66,9 @@ namespace VEPROMS } private string PEIPath; private string _MyMode; - private FolderInfo MyFolder = null; - private DocVersionInfo MyDocVersion = null; - private ProcedureInfo MyProcedure = null; + protected FolderInfo MyFolder = null; + protected DocVersionInfo MyDocVersion = null; + protected ProcedureInfo MyProcedure = null; protected XmlAttribute AddAttribute(XmlDocument xd, string name, string value) { XmlAttribute xa = xd.CreateAttribute(name); @@ -1885,8 +1889,13 @@ namespace VEPROMS UserID */ XmlElement xe = xn.OwnerDocument.CreateElement(nodename); - // strip the link information if we are convertingthe RO and Transitions to text - string ciText = (_ConvertROsAndTransitionsToText) ? ItemInfo.StripLinks(ci.Text) : ci.Text; + + //C2025-024 PROMS EP XML output + //if multiunit with ROs, need to actually resolve those / not just strip links + string ciText = ResolveMultiUnitROs(ci); + + // strip the link information if we are converting the RO and Transitions to text + ciText = _ConvertROsAndTransitionsToText ? ItemInfo.StripLinks(ciText) : ciText; string formatFileName = (ci.MyFormat != null) ? ci.MyFormat.Name : ""; xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "contentid", ci.ContentID.ToString())); @@ -1926,7 +1935,51 @@ namespace VEPROMS ExportPart(xe, pi, ((E_FromTypes)pi.FromType).ToString().ToLower()); } - private void ExportContentAudits(XmlElement xn, ContentInfo ci) + //C2025-024 PROMS Electronic Procedure XML output + //if multi unit with ROs, need to actually resolve those / not just strip links + private string ResolveMultiUnitROs(ContentInfo ci) + { + string ciText = ci.Text; + + if (_UnitIndex != 0 && ci.ContentRoUsageCount > 0) + { + ROFSTLookup lookup = null; + if (MyProcedure?.MyDocVersion != null) + { + lookup = MyProcedure.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyProcedure.MyDocVersion); + } + else if (MyDocVersion != null) + { + lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); + } + else if (MyFolder.FolderDocVersions != null && MyFolder.FolderDocVersions.Count > 0) + { + lookup = MyFolder.FolderDocVersions[0].DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyFolder.FolderDocVersions[0]); + } + + if (lookup != null) + { + foreach (var RO in ci.ContentRoUsages) + { + string roid = ROFSTLookup.FormatRoidKey(RO.ROID, true); + ROFSTLookup.rochild roc = lookup.GetRoChild(roid); + //need to search / replace in content info + string lookFor = string.Format(@"()", RO.ROUsageID); + Match m = Regex.Match(ciText, lookFor, RegexOptions.Singleline); + if (m != null && m.Groups.Count > 1) + { + ciText = ciText.Replace($"{m.Groups[1].Value}{m.Groups[5].Value}{m.Groups[6].Value}", $"{m.Groups[1].Value}{roc.value}{m.Groups[6].Value}"); + } + } + } + + } + + + return ciText; + } + + private void ExportContentAudits(XmlElement xn, ContentInfo ci) { if (cbxExportAudits.Checked) { diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index 4f7d0887..c13203e5 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -17,31 +17,48 @@ namespace VEPROMS #pragma warning restore S101 // Types should be named in PascalCase { private readonly AnnotationTypeInfo _AnnotationType; - private readonly int _UnitIndex; private readonly string multiseparator = ","; private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]"); - public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions) 0) + public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions)0) { - _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); - _UnitIndex = unitIndex; - _ExportBothConvertedandNot = true; - DocReplace = new Dictionary(); - FormClosed += OnClose; - Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}"; - } + _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); + _UnitIndex = unitIndex; + _ExportBothConvertedandNot = true; + DocReplace = new Dictionary(); + FormClosed += OnClose; + Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}"; - public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0) - { - _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); - _UnitIndex = unitIndex; - _ExportBothConvertedandNot = true; - DocReplace = new Dictionary(); - FormClosed += OnClose; - Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}"; + if (_UnitIndex > 0) + { + foreach (DocVersionInfo docver in MyFolder.FolderDocVersions) + { + docver.DocVersionConfig.SelectedSlave = _UnitIndex; + + foreach (ItemInfo proc in docver.Procedures) + proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + } + } } - public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0) + public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0) + { + _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); + _UnitIndex = unitIndex; + _ExportBothConvertedandNot = true; + DocReplace = new Dictionary(); + FormClosed += OnClose; + Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}"; + + if (_UnitIndex > 0) + { + MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + + foreach (ItemInfo proc in MyDocVersion.Procedures) + proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + } + } + public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); _UnitIndex = unitIndex; @@ -49,6 +66,13 @@ namespace VEPROMS DocReplace = new Dictionary(); FormClosed += OnClose; Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {procedureInfo.DisplayNumber}"; + + if (_UnitIndex > 0) + { + MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + } + } //Overridden function to handle export of EP data @@ -320,8 +344,32 @@ namespace VEPROMS } //clear objects to release memory + //and unset the unit (SelectedSlave) private void OnClose(object sender, EventArgs e) { + if (MyProcedure != null) + { + MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0; + MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0; + } + if (MyDocVersion != null) + { + MyDocVersion.DocVersionConfig.SelectedSlave = 0; + + foreach (ItemInfo proc in MyDocVersion.Procedures) + proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + } + if (MyFolder != null) + { + foreach (DocVersionInfo docver in MyFolder.FolderDocVersions) + { + docver.DocVersionConfig.SelectedSlave = _UnitIndex; + + foreach (ItemInfo proc in docver.Procedures) + proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + } + } + DocReplace.Clear(); DocReplace = null; } -- 2.49.1 From 8c32d18aec78d638c7a476a81b074f3a80c1cf0b Mon Sep 17 00:00:00 2001 From: mschill Date: Thu, 24 Jul 2025 08:08:18 -0400 Subject: [PATCH 18/44] C2025-024 Electronic Procedures Phase 2 - XML Export Multi-Unit RO Resolution --- .../VEPROMS User Interface/dlgExportImport.cs | 67 +++++++++++++++++-- .../dlgExportImportEP.cs | 59 +--------------- 2 files changed, 66 insertions(+), 60 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index d18edc30..8c54bcfd 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -38,7 +38,7 @@ namespace VEPROMS //C2025-024 Proms EP XML Output //this will hold if a specific unit was selected - protected int _UnitIndex = 0; + readonly protected int _UnitIndex; private ItemInfo _ExternalTransitionItem = null; public ItemInfo ExternalTransitionItem @@ -75,7 +75,7 @@ namespace VEPROMS xa.InnerText = value; return xa; } - public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset) + public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0) { UCFImportDefaultFromSettings = frset; MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing @@ -83,8 +83,21 @@ namespace VEPROMS MyFolder = folderInfo; InitializeComponent(); this.Text = mode + " Dialog for " + folderInfo.Name; + _UnitIndex = unitIndex; + + if (_UnitIndex > 0) + { + foreach (DocVersionInfo docver in MyFolder.FolderDocVersions) + { + docver.DocVersionConfig.SelectedSlave = _UnitIndex; + + foreach (ItemInfo proc in docver.Procedures) + proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + } + FormClosed += RemoveUnit_OnClose; + } } - public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset) + public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0) { UCFImportDefaultFromSettings = frset; MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing @@ -95,8 +108,19 @@ namespace VEPROMS this.Text = mode; else this.Text = mode + " Dialog for " + docVersionInfo.Name + " of " + docVersionInfo.MyFolder.Name; + _UnitIndex = unitIndex; + + if (_UnitIndex > 0) + { + MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + + foreach (ItemInfo proc in MyDocVersion.Procedures) + proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + + FormClosed += RemoveUnit_OnClose; + } } - public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset) + public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset, int unitIndex = 0) { UCFImportDefaultFromSettings = frset; MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing @@ -108,6 +132,14 @@ namespace VEPROMS //Preset path for single procedures. PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database; txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\", "_")); + _UnitIndex = unitIndex; + + if (_UnitIndex > 0) + { + MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + FormClosed += RemoveUnit_OnClose; + } } private void dlgExportImport_Load(object sender, EventArgs e) { @@ -3938,5 +3970,32 @@ namespace VEPROMS { this.Close(); } + + //unset the unit (SelectedSlave) + private void RemoveUnit_OnClose(object sender, EventArgs e) + { + if (MyProcedure != null) + { + MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0; + MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0; + } + if (MyDocVersion != null) + { + MyDocVersion.DocVersionConfig.SelectedSlave = 0; + + foreach (ItemInfo proc in MyDocVersion.Procedures) + proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + } + if (MyFolder != null) + { + foreach (DocVersionInfo docver in MyFolder.FolderDocVersions) + { + docver.DocVersionConfig.SelectedSlave = _UnitIndex; + + foreach (ItemInfo proc in docver.Procedures) + proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; + } + } + } } } diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index c13203e5..0715d8b5 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -21,58 +21,29 @@ namespace VEPROMS private static Regex _ROAccPageTokenPattern = new Regex("[<][^<>-]+-[^<>]+[>]"); - public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions)0) + public dlgExportImportEP(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, folderInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); - _UnitIndex = unitIndex; _ExportBothConvertedandNot = true; DocReplace = new Dictionary(); FormClosed += OnClose; Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {folderInfo.Name}"; - - if (_UnitIndex > 0) - { - foreach (DocVersionInfo docver in MyFolder.FolderDocVersions) - { - docver.DocVersionConfig.SelectedSlave = _UnitIndex; - - foreach (ItemInfo proc in docver.Procedures) - proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; - } - } } - public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0) + public dlgExportImportEP(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, docVersionInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); - _UnitIndex = unitIndex; _ExportBothConvertedandNot = true; DocReplace = new Dictionary(); FormClosed += OnClose; Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {docVersionInfo.Name} of {docVersionInfo.MyFolder.Name}"; - - if (_UnitIndex > 0) - { - MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; - - foreach (ItemInfo proc in MyDocVersion.Procedures) - proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; - } } - public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0) + public dlgExportImportEP(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, int annotationTypeId, int unitIndex = 0) : base(mode, procedureInfo, myFrmVEPROMS, (E_UCFImportOptions)0, unitIndex) { _AnnotationType = AnnotationTypeInfo.Get(annotationTypeId); - _UnitIndex = unitIndex; _ExportBothConvertedandNot = true; DocReplace = new Dictionary(); FormClosed += OnClose; Text = $"{mode} Electronic Procedure ({_AnnotationType.Name}) Dialog for {procedureInfo.DisplayNumber}"; - - if (_UnitIndex > 0) - { - MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; - MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; - } - } //Overridden function to handle export of EP data @@ -344,32 +315,8 @@ namespace VEPROMS } //clear objects to release memory - //and unset the unit (SelectedSlave) private void OnClose(object sender, EventArgs e) { - if (MyProcedure != null) - { - MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0; - MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = 0; - } - if (MyDocVersion != null) - { - MyDocVersion.DocVersionConfig.SelectedSlave = 0; - - foreach (ItemInfo proc in MyDocVersion.Procedures) - proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; - } - if (MyFolder != null) - { - foreach (DocVersionInfo docver in MyFolder.FolderDocVersions) - { - docver.DocVersionConfig.SelectedSlave = _UnitIndex; - - foreach (ItemInfo proc in docver.Procedures) - proc.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; - } - } - DocReplace.Clear(); DocReplace = null; } -- 2.49.1 From 99445406fcb5541b182ab5f1c8c3dc015d2619db Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Fri, 25 Jul 2025 23:06:50 -0400 Subject: [PATCH 19/44] C2025-027-AnnotationsTypeSelect --- .../DlgAnnotationsSelect.cs | 24 +-- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 142 ++++++------------ .../VEPROMS User Interface/VEPROMS_UI.csproj | 6 +- .../dlgAnnotationsSelect.Designer.cs | 60 +++++--- .../Minimal/AnnotationstypeSections.cs | 54 +++---- 5 files changed, 124 insertions(+), 162 deletions(-) diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs index cf77407b..a13fa677 100644 --- a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -14,9 +14,6 @@ namespace VEPROMS // C2025-027 Annotation Type Filtering public partial class dlgAnnotationsSelect : Form { - //int AnnotationTypeID; - //string AnnotationNameStr = ""; - public dlgAnnotationsSelect() { InitializeComponent(); @@ -96,22 +93,8 @@ namespace VEPROMS // Save selected list to DB. private void btnUpdate_Click(object sender, EventArgs e) { - int AnnotationTypeID; - string AnnotationNameStr = ""; - // dltFlg flag is used to notify SQL SP to deleted all the entries for the user before entering the annotation type selections. - int dltFlg = 1; - - //foreach (AnnotataionItem item in lstSelected.Items.OfType()) - //{ - // AnnotationTypeID = item.TypeID; - // AnnotationNameStr = item.NameStr; - DataTable dt2 = coverToTable(UserID); - - VEPROMS.CSLA.Library.AnnotationstypeSelections.Update2(dt2); - // dltFlg = 0; - //} - + VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2); } public class AnnotataionItem { @@ -178,14 +161,17 @@ namespace VEPROMS private DataTable coverToTable(string userid) { + int RowID = 0; DataTable dt = new DataTable(); dt.Columns.Add("TypeID", typeof(Int32)); dt.Columns.Add("NameStr", typeof(string)); dt.Columns.Add("UserID", typeof(string)); + dt.Columns.Add("RowID", typeof(string)); foreach (AnnotataionItem item in lstSelected.Items.OfType()) { - dt.Rows.Add(item.TypeID, item.NameStr, userid); + ++RowID; + dt.Rows.Add(item.TypeID, item.NameStr, userid, RowID); } return dt; } diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 60e92399..f5ded9fc 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24104,15 +24104,10 @@ CREATE TABLE [dbo].[AnnotationTypeSelections]( [Config] [nvarchar](max) NULL, [DTS] [datetime] NULL, [UserID] [nvarchar](100) NULL, - [LastChanged] [timestamp] NULL, - [IsEPAnnotationType] [bit] NULL + [LastChanged] [timestamp] NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO ---CREATE UNIQUE INDEX idx_AnnotationTypeSelections_Usrid ---ON AnnotationTypeSelections (TypeID, Name, UsrID); ---GO - IF EXISTS (SELECT * FROM sys.indexes WHERE name='idx_AnnotationTypeSelections_UsrID' AND object_id = OBJECT_ID('[dbo].[AnnotationTypeSelections]')) begin @@ -24124,17 +24119,6 @@ CREATE NONCLUSTERED INDEX idx_AnnotationTypeSelections_UsrID INCLUDE (TypeID, Name) GO ---CREATE NONCLUSTERED INDEX [idx_AnnotationTypeSelections_Usrid] ON [dbo].[AnnotationTypeSelections] ---( --- [UsrID] ASC ---)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ---GO ---CREATE NONCLUSTERED INDEX [idx_AnnotationTypeSelections_TypeID] ON [dbo].[AnnotationTypeSelections] ---( --- [TypeID] ASC ---)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] ---GO - -- C2025-027 Annotation Type Filtering IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAnnotationSelectListTypes]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) DROP PROCEDURE [getAnnotationSelectListTypes]; @@ -24161,8 +24145,7 @@ AS (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount], [IsEPAnnotationType] FROM [AnnotationTypes] --A - WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections WHERE UsrID = @UserID) - + WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections WHERE UsrID = @UserID) GO -- C2025-027 Annotation Type Filtering @@ -24187,26 +24170,23 @@ CREATE PROC [dbo].[getAnnotationstypeSelections] AS BEGIN SELECT [ASTypeID] - ,[TypeID] + ,ATS.[TypeID] ,[UsrID] - ,[Name] - ,[Config] - ,[DTS] - ,[UserID] - ,[IsEPAnnotationType] - FROM [dbo].[AnnotationTypeSelections] + ,AT.[Name] + ,AT.[Config] + ,ATS.[DTS] + ,AT.[UserID] + ,AT.[IsEPAnnotationType] + FROM [dbo].[AnnotationTypeSelections] ATS + INNER JOIN AnnotationTypes AT ON AT.TypeID = ATS.TypeID WHERE UsrID = @UsrID END -GO +GO -- C2025-027 Annotation Type Filtering IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAnnotationstypeFiltered]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) DROP PROCEDURE [getAnnotationstypeFiltered]; GO -SET ANSI_NULLS ON -GO -SET QUOTED_IDENTIFIER ON -GO -- ============================================= -- Author: Paul Larsen @@ -24223,14 +24203,15 @@ BEGIN IF((SELECT count(TypeID) FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0) BEGIN SELECT [ASTypeID] - ,[TypeID] + ,ATS.[TypeID] ,[UsrID] - ,[Name] - ,[Config] - ,[DTS] - ,[UserID] - ,[IsEPAnnotationType] - FROM [dbo].[AnnotationTypeSelections] + ,AT.[Name] + ,AT.[Config] + ,ATS.[DTS] + ,AT.[UserID] + ,AT.[IsEPAnnotationType] + FROM [dbo].[AnnotationTypeSelections] ATS + INNER JOIN AnnotationTypes AT ON AT.TypeID = ATS.TypeID WHERE UsrID = @UsrID END ELSE @@ -24249,28 +24230,12 @@ BEGIN END GO --- C2025-027 Annotation Type Filtering ---IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[TableValAnnotTypeSelections]') AND OBJECTPROPERTY(id,N'IsType') = 1) - --- Type -- - ---IF NOT EXISTS (SELECT * FROM sys.types WHERE is_table_type = 1 AND name ='TableValAnnotTypeSelections') --- DROP PROCEDURE [TableValAnnotTypeSelections]; ---GO - ---/****** Object: UserDefinedTableType [dbo].[TableValAnnotTypeSelections] Script Date: 7/21/2025 8:06:11 PM ******/ ---CREATE TYPE [dbo].[TableValAnnotTypeSelections] AS TABLE( --- [TypeID] [int] NOT NULL, --- [NameStr] [varchar](200) NULL, --- [UserID] [varchar](50) NULL ---) ---GO -- C2025-027 Annotation Type Filtering -IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[UpdateAnnotationstypeSelections2]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) - DROP PROCEDURE [UpdateAnnotationstypeSelections2]; +IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[UpdateAnnotationstypeSelections]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) + DROP PROCEDURE [UpdateAnnotationstypeSelections]; --- Need to drop UpdateAnnotationstypeSelections2 SP first so script can drop and recreate the TableValAnnotTypeSelections table type +-- Need to drop UpdateAnnotationstypeSelections SP first so script can drop and recreate the TableValAnnotTypeSelections table type IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.DOMAINS WHERE Domain_Name = 'TableValAnnotTypeSelections' ) DROP TYPE [dbo].[TableValAnnotTypeSelections] @@ -24278,63 +24243,46 @@ IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.DOMAINS WHERE Domain_Name = 'TableVa CREATE TYPE [dbo].[TableValAnnotTypeSelections] AS TABLE( [TypeID] [int] NOT NULL, [NameStr] [varchar](200) NULL, - [UserID] [varchar](50) NULL + [UserID] [varchar](50) NULL, + [RowID] [int] NOT NULL, + PRIMARY KEY CLUSTERED +( + [RowID] ASC +)WITH (IGNORE_DUP_KEY = OFF) ) GO - -/****** Object: StoredProcedure [dbo].[UpdateAnnotationstypeSelections2] Script Date: 7/21/2025 8:51:42 PM ******/ -SET ANSI_NULLS ON -GO - -SET QUOTED_IDENTIFIER ON -GO +/****** Object: StoredProcedure [dbo].[UpdateAnnotationstypeSelections] Script Date: 7/21/2025 8:51:42 PM ******/ -- ============================================= -- Author: Paul Larsen -- Create date: 07/21/2025 -- Description: Manage user choice annotation types -- ============================================= -CREATE PROC [dbo].[UpdateAnnotationstypeSelections2] +CREATE PROC [dbo].[UpdateAnnotationstypeSelections] ( @TempTable AS dbo.TableValAnnotTypeSelections READONLY ) AS BEGIN - --INSERT INTO CUSTOMER (CustomerId,CustomerName ,Isdeleted ) - --SELECT CustomerId, CustomerName, 0 AS Isdeleted FROM @TempTable + DECLARE @cnt integer = 0 + DECLARE @cnt2 integer = 0 + SET @cnt = (SELECT count(*) from @TempTable) + DECLARE @UserID VARCHAR(50) = (SELECT TOP 1 UserID FROM @TempTable) + DELETE FROM AnnotationTypeSelections WHERE usrID = @UserID; -MERGE AnnotationTypeSelections AS TARGET - USING @TempTable AS SOURCE + declare @i int + select @i = min(RowID) from @TempTable + declare @max int + select @max = max(RowID) from @TempTable - /* 1. Performing the UPDATE operation */ - - /* If the P_ID is same, - check for change in P_NAME or P_PRICE */ - ON (TARGET.TypeID = SOURCE.TypeID) - WHEN MATCHED - AND TARGET.Name <> SOURCE.NameStr - - /* Update the records in TARGET */ - THEN UPDATE - SET TARGET.Name = SOURCE.NameStr, - TARGET.UsrID = SOURCE.UserID - - /* 2. Performing the INSERT operation */ - - /* When no records are matched with TARGET table - Then insert the records in the target table */ - WHEN NOT MATCHED BY TARGET - THEN INSERT (TypeID, Name, UsrID) - VALUES (SOURCE.TypeID, SOURCE.NameStr,SOURCE.UserID) - - /* 3. Performing the DELETE operation */ - - /* When no records are matched with SOURCE table - Then delete the records from the target table */ - WHEN NOT MATCHED BY SOURCE - THEN DELETE; + WHILE @i <= @max + BEGIN + INSERT INTO AnnotationTypeSelections (TypeID, Name, Usrid) + select TypeID, NameStr, UserID from @TempTable where RowID = @i + set @i = @i + 1 + END END GO diff --git a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj index 1a130536..34aae1a6 100644 --- a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj +++ b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj @@ -158,6 +158,11 @@ dlgAnnotationsSelect.cs + + True + True + dlgAnnotationsSelect.resx + Form @@ -346,7 +351,6 @@ dlgAnnotationsSelect.cs ResXFileCodeGenerator - dlgAnnotationsSelect2.Designer.cs dlgMSWordMessage.cs diff --git a/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs index 21924cba..9e6eb162 100644 --- a/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs +++ b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs @@ -39,6 +39,8 @@ namespace VEPROMS this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.btnCancel = new System.Windows.Forms.Button(); this.lblMessage = new System.Windows.Forms.Label(); + this.lblAvailableTypes = new System.Windows.Forms.Label(); + this.lblSelected = new System.Windows.Forms.Label(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // @@ -47,12 +49,12 @@ namespace VEPROMS this.lstUnselected.Dock = System.Windows.Forms.DockStyle.Fill; this.lstUnselected.FormattingEnabled = true; this.lstUnselected.IntegralHeight = false; - this.lstUnselected.ItemHeight = 20; + this.lstUnselected.ItemHeight = 16; this.lstUnselected.Location = new System.Drawing.Point(3, 3); this.lstUnselected.Name = "lstUnselected"; this.tableLayoutPanel1.SetRowSpan(this.lstUnselected, 4); this.lstUnselected.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; - this.lstUnselected.Size = new System.Drawing.Size(287, 359); + this.lstUnselected.Size = new System.Drawing.Size(287, 347); this.lstUnselected.TabIndex = 0; this.lstUnselected.SelectedIndexChanged += new System.EventHandler(this.lst_SelectedIndexChanged); // @@ -61,19 +63,19 @@ namespace VEPROMS this.lstSelected.Dock = System.Windows.Forms.DockStyle.Fill; this.lstSelected.FormattingEnabled = true; this.lstSelected.IntegralHeight = false; - this.lstSelected.ItemHeight = 20; + this.lstSelected.ItemHeight = 16; this.lstSelected.Location = new System.Drawing.Point(334, 3); this.lstSelected.Name = "lstSelected"; this.tableLayoutPanel1.SetRowSpan(this.lstSelected, 4); this.lstSelected.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; - this.lstSelected.Size = new System.Drawing.Size(288, 359); + this.lstSelected.Size = new System.Drawing.Size(288, 347); this.lstSelected.TabIndex = 1; this.lstSelected.SelectedIndexChanged += new System.EventHandler(this.lst_SelectedIndexChanged); // // btnSelect // this.btnSelect.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnSelect.Location = new System.Drawing.Point(298, 34); + this.btnSelect.Location = new System.Drawing.Point(298, 32); this.btnSelect.Name = "btnSelect"; this.btnSelect.Size = new System.Drawing.Size(28, 23); this.btnSelect.TabIndex = 2; @@ -84,9 +86,9 @@ namespace VEPROMS // btnSelectAll // this.btnSelectAll.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnSelectAll.Location = new System.Drawing.Point(298, 125); + this.btnSelectAll.Location = new System.Drawing.Point(296, 120); this.btnSelectAll.Name = "btnSelectAll"; - this.btnSelectAll.Size = new System.Drawing.Size(28, 23); + this.btnSelectAll.Size = new System.Drawing.Size(32, 23); this.btnSelectAll.TabIndex = 3; this.btnSelectAll.Text = ">>"; this.btnSelectAll.UseVisualStyleBackColor = true; @@ -95,9 +97,9 @@ namespace VEPROMS // btnDeselectAll // this.btnDeselectAll.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnDeselectAll.Location = new System.Drawing.Point(298, 216); + this.btnDeselectAll.Location = new System.Drawing.Point(297, 207); this.btnDeselectAll.Name = "btnDeselectAll"; - this.btnDeselectAll.Size = new System.Drawing.Size(28, 23); + this.btnDeselectAll.Size = new System.Drawing.Size(30, 26); this.btnDeselectAll.TabIndex = 5; this.btnDeselectAll.Text = "<<"; this.btnDeselectAll.UseVisualStyleBackColor = true; @@ -106,7 +108,7 @@ namespace VEPROMS // btnDeselect // this.btnDeselect.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnDeselect.Location = new System.Drawing.Point(298, 307); + this.btnDeselect.Location = new System.Drawing.Point(298, 297); this.btnDeselect.Name = "btnDeselect"; this.btnDeselect.Size = new System.Drawing.Size(28, 23); this.btnDeselect.TabIndex = 4; @@ -140,14 +142,14 @@ namespace VEPROMS this.tableLayoutPanel1.Controls.Add(this.btnDeselectAll, 1, 2); this.tableLayoutPanel1.Controls.Add(this.btnSelect, 1, 0); this.tableLayoutPanel1.Controls.Add(this.btnSelectAll, 1, 1); - this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 51); + this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 62); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 4; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 25F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(625, 365); + this.tableLayoutPanel1.Size = new System.Drawing.Size(625, 353); this.tableLayoutPanel1.TabIndex = 6; // // btnCancel @@ -163,28 +165,49 @@ namespace VEPROMS // lblMessage // this.lblMessage.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblMessage.Location = new System.Drawing.Point(50, 18); + this.lblMessage.Location = new System.Drawing.Point(43, 12); this.lblMessage.Name = "lblMessage"; - this.lblMessage.Size = new System.Drawing.Size(317, 28); + this.lblMessage.Size = new System.Drawing.Size(317, 16); this.lblMessage.TabIndex = 10; this.lblMessage.Text = "Updates will appear when PROMS is restarted."; // - // DlgAnnotationsSelect + // lblAvailableTypes // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.lblAvailableTypes.AutoSize = true; + this.lblAvailableTypes.Location = new System.Drawing.Point(12, 43); + this.lblAvailableTypes.Name = "lblAvailableTypes"; + this.lblAvailableTypes.Size = new System.Drawing.Size(110, 16); + this.lblAvailableTypes.TabIndex = 11; + this.lblAvailableTypes.Text = "Types Available "; + // + // lblSelected + // + this.lblSelected.AutoSize = true; + this.lblSelected.Location = new System.Drawing.Point(343, 43); + this.lblSelected.Name = "lblSelected"; + this.lblSelected.Size = new System.Drawing.Size(104, 16); + this.lblSelected.TabIndex = 12; + this.lblSelected.Text = "Types Selected"; + // + // dlgAnnotationsSelect + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(653, 466); + this.Controls.Add(this.lblSelected); + this.Controls.Add(this.lblAvailableTypes); this.Controls.Add(this.btnCancel); this.Controls.Add(this.tableLayoutPanel1); this.Controls.Add(this.btnUpdate); this.Controls.Add(this.lblMessage); this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "DlgAnnotationsSelect"; + this.Name = "dlgAnnotationsSelect"; this.Text = "Select Annotation Types"; this.Load += new System.EventHandler(this.DlgAnnotationsSelect_Load); this.tableLayoutPanel1.ResumeLayout(false); this.ResumeLayout(false); + this.PerformLayout(); } @@ -200,6 +223,7 @@ namespace VEPROMS private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.Button btnCancel; private System.Windows.Forms.Label lblMessage; - + private System.Windows.Forms.Label lblAvailableTypes; + private System.Windows.Forms.Label lblSelected; } } \ No newline at end of file diff --git a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs index e120ccd9..338c6276 100644 --- a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs +++ b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs @@ -145,7 +145,33 @@ namespace VEPROMS.CSLA.Library } } } - public static void Update(string UserID, int TypeID, int dltFlg, string Name = "") + //public static void Update(string UserID, int TypeID, int dltFlg, string Name = "") + //{ + // using (SqlConnection cn = Database.VEPROMS_SqlConnection) + // { + // using (SqlCommand cm = cn.CreateCommand()) + // { + // try + // { + // cm.CommandType = CommandType.StoredProcedure; + // cm.CommandText = "UpdateAnnotationstypeSelections"; + // cm.CommandTimeout = Database.DefaultTimeout; + // cm.Parameters.AddWithValue("@UserID", UserID); + // cm.Parameters.AddWithValue("@TypeID", TypeID); + // cm.Parameters.AddWithValue("@dltFlg", dltFlg); + // cm.Parameters.AddWithValue("@Name", Name); + + // cm.ExecuteNonQuery(); + // } + // catch (Exception ex) + // { + + // } + // } + // } + + //} + public static void Update(DataTable dt) { using (SqlConnection cn = Database.VEPROMS_SqlConnection) { @@ -156,32 +182,6 @@ namespace VEPROMS.CSLA.Library cm.CommandType = CommandType.StoredProcedure; cm.CommandText = "UpdateAnnotationstypeSelections"; cm.CommandTimeout = Database.DefaultTimeout; - cm.Parameters.AddWithValue("@UserID", UserID); - cm.Parameters.AddWithValue("@TypeID", TypeID); - cm.Parameters.AddWithValue("@dltFlg", dltFlg); - cm.Parameters.AddWithValue("@Name", Name); - - cm.ExecuteNonQuery(); - } - catch (Exception ex) - { - - } - } - } - - } - public static void Update2(DataTable dt) - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - try - { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "UpdateAnnotationstypeSelections2"; - cm.CommandTimeout = Database.DefaultTimeout; //Pass table Valued parameter to Store Procedure SqlParameter sqlParam = cm.Parameters.AddWithValue("@TempTable", dt); -- 2.49.1 From 4def73d7384ac2d52175ee5229e8a340b4bdd909 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Mon, 28 Jul 2025 16:06:55 -0400 Subject: [PATCH 20/44] B2025-039 Needed to include the Blue color to the RTF color table for formats that use a proportional font. --- PROMS/Volian.Controls.Library/StepRTB.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index d922791f..dcd59514 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -1284,7 +1284,7 @@ namespace Volian.Controls.Library } selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}"; if (!isFixed) - selectedRtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;}"); // C2017-036 get best available proportional font for symbols + selectedRtfSB.Append(@"{\f1\fnil\fcharset0 " + Volian.Base.Library.vlnFont.ProportionalSymbolFont + @";}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // C2017-036 get best available proportional font for symbols - B2025-039 add Blue for Colored Replace Words else selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // FreeMono is now used for the edit screen only. VESymbFix and Consolas are used for printing selectedRtfSB.Append("\r\n"); -- 2.49.1 From d3888e3c3266a03daed20a7032a04faa37cdf698 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 29 Jul 2025 09:20:58 -0400 Subject: [PATCH 21/44] C2025-027-AnnotationsTypeSelect --- .../DlgAnnotationsSelect.cs | 22 ++-- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 103 +++++++++--------- .../Minimal/AnnotationstypeSections.cs | 51 ++------- 3 files changed, 69 insertions(+), 107 deletions(-) diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs index a13fa677..1786e97c 100644 --- a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -93,8 +93,8 @@ namespace VEPROMS // Save selected list to DB. private void btnUpdate_Click(object sender, EventArgs e) { - DataTable dt2 = coverToTable(UserID); - VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2); + DataTable dt2 = coverToTable(); + VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID); } public class AnnotataionItem { @@ -145,12 +145,10 @@ namespace VEPROMS lstSelected.DisplayMember = "NameStr"; lstSelected.ValueMember = "TypeID"; DataTable lstSelectedTbl = VEPROMS.CSLA.Library.AnnotationstypeSelections.Retrieve(UserID); - if (lstSelectedTbl.Rows.Count > 0) + + foreach (DataRow lstSelectedRow in lstSelectedTbl.Rows) { - foreach (DataRow lstSelectedRow in lstSelectedTbl.Rows) - { - lstSelected.Items.Add(new AnnotataionItem(lstSelectedRow["Name"].ToString(), (int)lstSelectedRow["TypeID"])); - } + lstSelected.Items.Add(new AnnotataionItem(lstSelectedRow["Name"].ToString(), (int)lstSelectedRow["TypeID"])); } } @@ -159,19 +157,15 @@ namespace VEPROMS this.Close(); } - private DataTable coverToTable(string userid) + private DataTable coverToTable() { - int RowID = 0; DataTable dt = new DataTable(); dt.Columns.Add("TypeID", typeof(Int32)); - dt.Columns.Add("NameStr", typeof(string)); - dt.Columns.Add("UserID", typeof(string)); - dt.Columns.Add("RowID", typeof(string)); + foreach (AnnotataionItem item in lstSelected.Items.OfType()) { - ++RowID; - dt.Rows.Add(item.TypeID, item.NameStr, userid, RowID); + dt.Rows.Add(item.TypeID); } return dt; } diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index f5ded9fc..d16b68c8 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24074,10 +24074,6 @@ ELSE GO - - - - -- C2025-027 Annotation Type Filtering IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AnnotationTypeSelections]') AND type in (N'U')) DROP TABLE [dbo].[AnnotationTypeSelections] @@ -24095,28 +24091,36 @@ GO -- Create date: 07/10/2025 -- Description: Store user Annotation selections for annotation filter. -- ============================================= +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AnnotationTypeSelections]') AND type in (N'U')) +BEGIN -CREATE TABLE [dbo].[AnnotationTypeSelections]( - [ASTypeID] [int] IDENTITY(1,1) NOT NULL, - [TypeID] [int] NULL, - [UsrID] [varchar](50) NULL, - [Name] [nvarchar](100) NULL, - [Config] [nvarchar](max) NULL, - [DTS] [datetime] NULL, - [UserID] [nvarchar](100) NULL, - [LastChanged] [timestamp] NULL -) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] + CREATE TABLE [dbo].[AnnotationTypeSelections]( + [ASTypeID] [int] IDENTITY(1,1) NOT NULL, + [TypeID] [int] NULL, + [UserID] [varchar](50) NULL, + [LastChanged] [datetime] NULL, + CONSTRAINT [PK_AnnotationTypeSelections] PRIMARY KEY CLUSTERED + ([ASTypeID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] + ) ON [PRIMARY] +END + +IF OBJECT_ID('DF_AnnotationTypeSelections_LastChanged', 'D') IS NULL + ALTER TABLE AnnotationTypeSelections ADD CONSTRAINT [DF_AnnotationTypeSelections_LastChanged] DEFAULT (getdate()) for [LastChanged]; GO -IF EXISTS (SELECT * FROM sys.indexes WHERE name='idx_AnnotationTypeSelections_UsrID' +IF EXISTS (SELECT * FROM sys.indexes WHERE name='idx_AnnotationTypeSelections_UserIDTypeID' AND object_id = OBJECT_ID('[dbo].[AnnotationTypeSelections]')) begin -DROP INDEX [idx_AnnotationTypeSelections_UsrID] ON [dbo].[AnnotationTypeSelections]; +DROP INDEX [idx_AnnotationTypeSelections_UserIDTypeID] ON [dbo].[AnnotationTypeSelections]; end -CREATE NONCLUSTERED INDEX idx_AnnotationTypeSelections_UsrID - ON [dbo].[AnnotationTypeSelections] (UsrID) -INCLUDE (TypeID, Name) +CREATE UNIQUE INDEX [idx_AnnotationTypeSelections_UserIDTypeID] ON [dbo].[AnnotationTypeSelections] +( +[UserID] ASC, +[TypeID] ASC +) +INCLUDE (ASTypeID) +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] GO -- C2025-027 Annotation Type Filtering @@ -24145,7 +24149,7 @@ AS (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount], [IsEPAnnotationType] FROM [AnnotationTypes] --A - WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections WHERE UsrID = @UserID) + WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections ATS WHERE ATS.UserID = @UserID) GO -- C2025-027 Annotation Type Filtering @@ -24171,18 +24175,19 @@ AS BEGIN SELECT [ASTypeID] ,ATS.[TypeID] - ,[UsrID] + ,ATS.[UserID] ,AT.[Name] ,AT.[Config] - ,ATS.[DTS] + ,ATS.[LastChanged] ,AT.[UserID] ,AT.[IsEPAnnotationType] FROM [dbo].[AnnotationTypeSelections] ATS INNER JOIN AnnotationTypes AT ON AT.TypeID = ATS.TypeID - WHERE UsrID = @UsrID + WHERE ATS.UserID = @UsrID END GO + -- C2025-027 Annotation Type Filtering IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[getAnnotationstypeFiltered]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1) DROP PROCEDURE [getAnnotationstypeFiltered]; @@ -24200,19 +24205,19 @@ CREATE PROC [dbo].[getAnnotationstypeFiltered] ) AS BEGIN - IF((SELECT count(TypeID) FROM AnnotationTypeSelections WHERE UsrID = @UsrID) > 0) + IF((SELECT count(TypeID) FROM AnnotationTypeSelections WHERE UserID = @UsrID) > 0) BEGIN SELECT [ASTypeID] ,ATS.[TypeID] - ,[UsrID] + ,ATS.[UserID] ,AT.[Name] ,AT.[Config] - ,ATS.[DTS] + ,ATS.[LastChanged] ,AT.[UserID] ,AT.[IsEPAnnotationType] FROM [dbo].[AnnotationTypeSelections] ATS INNER JOIN AnnotationTypes AT ON AT.TypeID = ATS.TypeID - WHERE UsrID = @UsrID + WHERE ATS.UserID = @UsrID END ELSE BEGIN @@ -24241,14 +24246,8 @@ IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.DOMAINS WHERE Domain_Name = 'TableVa DROP TYPE [dbo].[TableValAnnotTypeSelections] CREATE TYPE [dbo].[TableValAnnotTypeSelections] AS TABLE( - [TypeID] [int] NOT NULL, - [NameStr] [varchar](200) NULL, - [UserID] [varchar](50) NULL, - [RowID] [int] NOT NULL, - PRIMARY KEY CLUSTERED -( - [RowID] ASC -)WITH (IGNORE_DUP_KEY = OFF) + [TypeID] [int] NOT NULL + ) GO @@ -24261,28 +24260,30 @@ GO -- ============================================= CREATE PROC [dbo].[UpdateAnnotationstypeSelections] ( - @TempTable AS dbo.TableValAnnotTypeSelections READONLY + @TempTable AS dbo.TableValAnnotTypeSelections READONLY, + @UserID [varchar](50) NULL ) AS BEGIN + + - DECLARE @cnt integer = 0 - DECLARE @cnt2 integer = 0 - SET @cnt = (SELECT count(*) from @TempTable) - DECLARE @UserID VARCHAR(50) = (SELECT TOP 1 UserID FROM @TempTable) - DELETE FROM AnnotationTypeSelections WHERE usrID = @UserID; + DELETE FROM AnnotationTypeSelections where UserID = @UserID + AND + TypeID not in + (Select TypeID From @TempTable tmp) - declare @i int - select @i = min(RowID) from @TempTable - declare @max int - select @max = max(RowID) from @TempTable + --this would insert all the ones that are in the uploaded table and not already in AnnotationTypeSelections + Insert INTO AnnotationTypeSelections (TypeID, UserID) + Select tmp.TypeID, @UserID + FROM + @TempTable tmp + LEFT OUTER JOIN + AnnotationTypeSelections ATS on ATS.TypeID = tmp.TypeID + AND ATS.UserID = @UserID + where + ATS.ASTypeID IS NULL - WHILE @i <= @max - BEGIN - INSERT INTO AnnotationTypeSelections (TypeID, Name, Usrid) - select TypeID, NameStr, UserID from @TempTable where RowID = @i - set @i = @i + 1 - END END GO diff --git a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs index 338c6276..0ef12337 100644 --- a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs +++ b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs @@ -41,8 +41,6 @@ namespace VEPROMS.CSLA.Library // if the user has not created a annotation sub-set list saved to AnnotationTypeSelections table. if (dt.Rows.Count < 1) { - //dt.Rows.Add(DataPortal.Fetch()); - //DataPortal.Fetch(); DataRow row; int rowflg = 0; foreach (AnnotationTypeInfo annosel in DataPortal.Fetch()) @@ -145,53 +143,22 @@ namespace VEPROMS.CSLA.Library } } } - //public static void Update(string UserID, int TypeID, int dltFlg, string Name = "") - //{ - // using (SqlConnection cn = Database.VEPROMS_SqlConnection) - // { - // using (SqlCommand cm = cn.CreateCommand()) - // { - // try - // { - // cm.CommandType = CommandType.StoredProcedure; - // cm.CommandText = "UpdateAnnotationstypeSelections"; - // cm.CommandTimeout = Database.DefaultTimeout; - // cm.Parameters.AddWithValue("@UserID", UserID); - // cm.Parameters.AddWithValue("@TypeID", TypeID); - // cm.Parameters.AddWithValue("@dltFlg", dltFlg); - // cm.Parameters.AddWithValue("@Name", Name); - // cm.ExecuteNonQuery(); - // } - // catch (Exception ex) - // { - - // } - // } - // } - - //} - public static void Update(DataTable dt) + public static void Update(DataTable dt, string UserID) { using (SqlConnection cn = Database.VEPROMS_SqlConnection) { using (SqlCommand cm = cn.CreateCommand()) { - try - { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "UpdateAnnotationstypeSelections"; - cm.CommandTimeout = Database.DefaultTimeout; + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "UpdateAnnotationstypeSelections"; + cm.CommandTimeout = Database.DefaultTimeout; - //Pass table Valued parameter to Store Procedure - SqlParameter sqlParam = cm.Parameters.AddWithValue("@TempTable", dt); - sqlParam.SqlDbType = SqlDbType.Structured; - cm.ExecuteNonQuery(); - } - catch (Exception ex) - { - - } + //Pass table Valued parameter to Store Procedure + SqlParameter sqlParam = cm.Parameters.AddWithValue("@TempTable", dt); + sqlParam.SqlDbType = SqlDbType.Structured; + cm.Parameters.AddWithValue("@UserID", UserID); + cm.ExecuteNonQuery(); } } } -- 2.49.1 From d701935ddf17e42ad247bd848befab083ce6a18d Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 29 Jul 2025 09:21:51 -0400 Subject: [PATCH 22/44] DEV_Proj_File_Dependency_Update Visual Studio 2022 changed the default build order --- this will alow rebuild all in VS2022 --- PROMS/VEPROMS/VEPROMS.sln | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PROMS/VEPROMS/VEPROMS.sln b/PROMS/VEPROMS/VEPROMS.sln index 09af4b2f..47cfa040 100644 --- a/PROMS/VEPROMS/VEPROMS.sln +++ b/PROMS/VEPROMS/VEPROMS.sln @@ -38,6 +38,9 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Baseline", "..\Baseline\Baseline.csproj", "{8B29E0DE-B6C9-4041-8817-319FDE3123C4}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RoAccessToSql", "..\RoAccessToSql\RoAccessToSql.csproj", "{1EC96BDA-01E7-4153-A95D-6A4A36FA278E}" + ProjectSection(ProjectDependencies) = postProject + {AEEE9FD1-6892-45E2-A67E-418C06D46FF9} = {AEEE9FD1-6892-45E2-A67E-418C06D46FF9} + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution -- 2.49.1 From 09d3995e6c40703dfa1bd521d26899285a6ea983 Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 29 Jul 2025 15:12:51 -0400 Subject: [PATCH 23/44] C2025-044 Update PROMS Fixes to be SQL 2016 compatible --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index d97734f5..6668fddf 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24026,7 +24026,7 @@ Begin -- Rofst Tables CONSTRAINT [PK_EPFormats] PRIMARY KEY CLUSTERED ( [FormatID] ASC - )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] + )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] IF (@@Error = 0) PRINT 'Table Creation: [EPFormats] Succeeded' -- 2.49.1 From 1ebf67233bd86771b4780d0b49169a95887605b4 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 29 Jul 2025 15:34:13 -0400 Subject: [PATCH 24/44] C2025-027-AnnotationsTypeSelect --- .../DlgAnnotationsSelect.cs | 1 + PROMS/VEPROMS User Interface/PROMSFixes.Sql | 9 ++++---- .../Minimal/AnnotationstypeSections.cs | 23 ++++++++++++------- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs index 1786e97c..3f4d87e3 100644 --- a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -95,6 +95,7 @@ namespace VEPROMS { DataTable dt2 = coverToTable(); VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID); + this.Close(); } public class AnnotataionItem { diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index d16b68c8..c882ef3c 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24075,10 +24075,6 @@ ELSE GO -- C2025-027 Annotation Type Filtering -IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AnnotationTypeSelections]') AND type in (N'U')) -DROP TABLE [dbo].[AnnotationTypeSelections] -GO - /****** Object: Table [dbo].[AnnotationTypeSelections] Script Date: 7/10/2025 2:38:23 PM ******/ SET ANSI_NULLS ON GO @@ -24149,7 +24145,10 @@ AS (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount], [IsEPAnnotationType] FROM [AnnotationTypes] --A - WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections ATS WHERE ATS.UserID = @UserID) + LEFT OUTER JOIN AnnotationTypeSelections ON AnnotationTypeSelections.TypeID = AnnotationTypes.TypeID + WHERE AnnotationTypeSelections.UserID = @UserID + AND + AnnotationTypeSelections.ASTypeID IS NULL GO -- C2025-027 Annotation Type Filtering diff --git a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs index 0ef12337..c3af558b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs +++ b/PROMS/VEPROMS.CSLA.Library/Minimal/AnnotationstypeSections.cs @@ -150,15 +150,22 @@ namespace VEPROMS.CSLA.Library { using (SqlCommand cm = cn.CreateCommand()) { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "UpdateAnnotationstypeSelections"; - cm.CommandTimeout = Database.DefaultTimeout; + try + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "UpdateAnnotationstypeSelections"; + cm.CommandTimeout = Database.DefaultTimeout; - //Pass table Valued parameter to Store Procedure - SqlParameter sqlParam = cm.Parameters.AddWithValue("@TempTable", dt); - sqlParam.SqlDbType = SqlDbType.Structured; - cm.Parameters.AddWithValue("@UserID", UserID); - cm.ExecuteNonQuery(); + //Pass table Valued parameter to Store Procedure + SqlParameter sqlParam = cm.Parameters.AddWithValue("@TempTable", dt); + sqlParam.SqlDbType = SqlDbType.Structured; + cm.Parameters.AddWithValue("@UserID", UserID); + cm.ExecuteNonQuery(); + } + catch (Exception ex) + { + throw new DbCslaException("Error in UpdateAnnotationstypeSelections: update failed", ex); + } } } } -- 2.49.1 From 655592186ba9586195acbcdfb93834bcbb35ed2d Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 29 Jul 2025 22:54:44 -0400 Subject: [PATCH 25/44] C2025-027-AnnotationsTypeSelect --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index c882ef3c..41d0e283 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24116,7 +24116,7 @@ CREATE UNIQUE INDEX [idx_AnnotationTypeSelections_UserIDTypeID] ON [dbo].[Annota [TypeID] ASC ) INCLUDE (ASTypeID) -WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] +WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] GO -- C2025-027 Annotation Type Filtering -- 2.49.1 From 449bb2522b565a1491df840dee8fcd40a857141f Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 30 Jul 2025 10:25:07 -0400 Subject: [PATCH 26/44] C2025-027-AnnotationsTypeSelect-2 --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index b1408657..3a210aeb 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24136,19 +24136,19 @@ CREATE PROCEDURE [dbo].[getAnnotationSelectListTypes] WITH EXECUTE AS OWNER AS SELECT - [TypeID], - [Name], - [Config], + ATS.[TypeID], + AT.[Name], + AT.[Config], [DTS], - [UserID], - [LastChanged], + ATS.[UserID], + ATS.[LastChanged], (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount], [IsEPAnnotationType] - FROM [AnnotationTypes] --A - LEFT OUTER JOIN AnnotationTypeSelections ON AnnotationTypeSelections.TypeID = AnnotationTypes.TypeID - WHERE AnnotationTypeSelections.UserID = @UserID + FROM [AnnotationTypes] AT + LEFT OUTER JOIN AnnotationTypeSelections ATS ON ATS.TypeID = AT.TypeID + WHERE ATS.UserID = @UserID AND - AnnotationTypeSelections.ASTypeID IS NULL + ATS.ASTypeID IS NULL GO -- C2025-027 Annotation Type Filtering -- 2.49.1 From e31e0b6680949897125f448edf5a96052c173a7e Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 30 Jul 2025 10:58:58 -0400 Subject: [PATCH 27/44] C2025-027-AnnotationsTypeSelect-2 --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 3a210aeb..3ca37132 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24136,19 +24136,16 @@ CREATE PROCEDURE [dbo].[getAnnotationSelectListTypes] WITH EXECUTE AS OWNER AS SELECT - ATS.[TypeID], - AT.[Name], - AT.[Config], + [TypeID], + [Name], + [Config], [DTS], - ATS.[UserID], - ATS.[LastChanged], + [UserID], + [LastChanged], (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount], [IsEPAnnotationType] - FROM [AnnotationTypes] AT - LEFT OUTER JOIN AnnotationTypeSelections ATS ON ATS.TypeID = AT.TypeID - WHERE ATS.UserID = @UserID - AND - ATS.ASTypeID IS NULL + FROM [AnnotationTypes] --A + WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections WHERE UserID = @UserID) GO -- C2025-027 Annotation Type Filtering -- 2.49.1 From 009243b0912625be6c400645db26e85d5cc01ada Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 30 Jul 2025 11:18:33 -0400 Subject: [PATCH 28/44] C2025-027-AnnotationsTypeSelect-2 --- PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs index 18e3b2bf..e2f0b575 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.Designer.cs @@ -721,10 +721,11 @@ namespace VEPROMS this.epAnnotations.Dock = System.Windows.Forms.DockStyle.Bottom; this.epAnnotations.Enabled = false; this.epAnnotations.Expanded = false; - this.epAnnotations.ExpandedBounds = new System.Drawing.Rectangle(4, 544, 1187, 202); + this.epAnnotations.ExpandedBounds = new System.Drawing.Rectangle(5, 371, 1185, 202); this.epAnnotations.ExpandOnTitleClick = true; - this.epAnnotations.Location = new System.Drawing.Point(5, 324); - this.epAnnotations.Size = new System.Drawing.Size(1185, 249); + this.epAnnotations.Location = new System.Drawing.Point(5, 547); + this.epAnnotations.Name = "epAnnotations"; + this.epAnnotations.Size = new System.Drawing.Size(1185, 26); this.epAnnotations.Style.Alignment = System.Drawing.StringAlignment.Center; this.epAnnotations.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; this.epAnnotations.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; @@ -760,11 +761,11 @@ namespace VEPROMS this.ctrlAnnotationDetails.Dock = System.Windows.Forms.DockStyle.Fill; this.ctrlAnnotationDetails.Enabled = false; this.ctrlAnnotationDetails.Location = new System.Drawing.Point(0, 26); - this.ctrlAnnotationDetails.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2); + this.ctrlAnnotationDetails.Margin = new System.Windows.Forms.Padding(2); this.ctrlAnnotationDetails.MyUserInfo = null; this.ctrlAnnotationDetails.Name = "ctrlAnnotationDetails"; this.ctrlAnnotationDetails.ProcItem = null; - this.ctrlAnnotationDetails.Size = new System.Drawing.Size(1185, 223); + this.ctrlAnnotationDetails.Size = new System.Drawing.Size(1185, 0); this.ctrlAnnotationDetails.TabIndex = 15; // // btnAnnoDetailsPushPin @@ -798,7 +799,7 @@ namespace VEPROMS this.epProcedures.ExpandOnTitleClick = true; this.epProcedures.Location = new System.Drawing.Point(5, 57); this.epProcedures.Name = "epProcedures"; - this.epProcedures.Size = new System.Drawing.Size(326, 267); + this.epProcedures.Size = new System.Drawing.Size(326, 490); this.epProcedures.Style.Alignment = System.Drawing.StringAlignment.Center; this.epProcedures.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground; this.epProcedures.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2; -- 2.49.1 From 44025c39786fd82988ddd53e44bd874dd014f45a Mon Sep 17 00:00:00 2001 From: mschill Date: Wed, 30 Jul 2025 13:47:25 -0400 Subject: [PATCH 29/44] C2025-024 Electronic Procedures Phase 2 - XML Export Multi-Unit Resolution, and Fix RO Annotation resolution in Text --- .../VEPROMS User Interface/dlgExportImport.cs | 65 ++++++++++--------- .../dlgExportImportEP.cs | 14 +++- 2 files changed, 47 insertions(+), 32 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 8c54bcfd..93ad460c 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -128,10 +128,6 @@ namespace VEPROMS MyProcedure = procedureInfo; InitializeComponent(); this.Text = mode + " Dialog for " + procedureInfo.DisplayNumber; - - //Preset path for single procedures. - PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database; - txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\", "_")); _UnitIndex = unitIndex; if (_UnitIndex > 0) @@ -140,6 +136,10 @@ namespace VEPROMS MyProcedure.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = _UnitIndex; FormClosed += RemoveUnit_OnClose; } + + //Preset path for single procedures. + PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database; + txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/", "_").Replace("\\", "_")); } private void dlgExportImport_Load(object sender, EventArgs e) { @@ -1972,39 +1972,46 @@ namespace VEPROMS private string ResolveMultiUnitROs(ContentInfo ci) { string ciText = ci.Text; - - if (_UnitIndex != 0 && ci.ContentRoUsageCount > 0) + DocVersionInfo docver = null; + if (MyProcedure?.MyDocVersion != null) { - ROFSTLookup lookup = null; - if (MyProcedure?.MyDocVersion != null) - { - lookup = MyProcedure.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyProcedure.MyDocVersion); - } - else if (MyDocVersion != null) - { - lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); - } - else if (MyFolder.FolderDocVersions != null && MyFolder.FolderDocVersions.Count > 0) - { - lookup = MyFolder.FolderDocVersions[0].DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyFolder.FolderDocVersions[0]); - } + docver = MyProcedure.MyDocVersion; + } + else if (MyDocVersion != null) + { + docver = MyDocVersion; + } + else if (MyFolder.FolderDocVersions != null && MyFolder.FolderDocVersions.Count > 0) + { + docver = MyFolder.FolderDocVersions[0]; + } - if (lookup != null) + + if (_UnitIndex != 0 && docver != null) + { + ciText = DisplayText.ResolveUnitSpecific(docver, ciText); + + if (ci.ContentRoUsageCount > 0) { - foreach (var RO in ci.ContentRoUsages) + ROFSTLookup lookup = docver.DocVersionAssociations[0].MyROFst.GetROFSTLookup(docver); + + if (lookup != null) { - string roid = ROFSTLookup.FormatRoidKey(RO.ROID, true); - ROFSTLookup.rochild roc = lookup.GetRoChild(roid); - //need to search / replace in content info - string lookFor = string.Format(@"()", RO.ROUsageID); - Match m = Regex.Match(ciText, lookFor, RegexOptions.Singleline); - if (m != null && m.Groups.Count > 1) + foreach (var RO in ci.ContentRoUsages) { - ciText = ciText.Replace($"{m.Groups[1].Value}{m.Groups[5].Value}{m.Groups[6].Value}", $"{m.Groups[1].Value}{roc.value}{m.Groups[6].Value}"); + string roid = ROFSTLookup.FormatRoidKey(RO.ROID, true); + ROFSTLookup.rochild roc = lookup.GetRoChild(roid); + //need to search / replace in content info + string lookFor = string.Format(@"()", RO.ROUsageID); + Match m = Regex.Match(ciText, lookFor, RegexOptions.Singleline); + if (m != null && m.Groups.Count > 1) + { + ciText = ciText.Replace($"{m.Groups[1].Value}{m.Groups[5].Value}{m.Groups[6].Value}", $"{m.Groups[1].Value}{roc.value}{m.Groups[6].Value}"); + } } } - } + } } diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index 0715d8b5..a310e864 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -115,6 +115,12 @@ namespace VEPROMS if (epexportblank || !string.IsNullOrEmpty(val)) { + + if (_UnitIndex != 0) + { + val = DisplayText.ResolveUnitSpecific(ii.MyDocVersion, val); + } + XmlElement xindivid = xe.OwnerDocument.CreateElement(EP.name); //need to resolve ROs ROSingle, ROMulti, in text @@ -140,14 +146,14 @@ namespace VEPROMS //XML element with the same xml name as the AccID foreach (Match m in matches) { - ROFSTLookup.rochild roc = lookup.GetROChildByAccPageID(m.Groups[1].Value); + ROFSTLookup.rochild roc = lookup.GetROChildByAccPageID(m.Groups[0].Value); // Exclude replacing Images since are binary - for those, add a sub item if (Enumerable.Range(8, 15).Contains(roc.type)) { xindivid.InnerText = val; - XmlElement xroid = AddGraphic(xindivid, m.Groups[1].Value, roc, myRODB, roc.type != 8); + XmlElement xroid = AddGraphic(xindivid, m.Groups[0].Value, roc, myRODB, roc.type != 8); xindivid.AppendChild(xroid); } @@ -159,7 +165,7 @@ namespace VEPROMS rocvalue = rocvalue.Replace("\xF8", "\xB0"); rocvalue = rocvalue.Replace("\x7F", "\x394"); //delta if (convertCaretToDeltaSymbol) rocvalue = rocvalue.Replace("^", "\x394"); // delta - val = val.Replace($"<{m.Groups[1].Value}>", rocvalue); + val = val.Replace($"{m.Groups[0].Value}", rocvalue); xindivid.InnerText = val; } } @@ -288,6 +294,8 @@ namespace VEPROMS // - that has an attribute designating the location of the image file private XmlElement AddGraphic(XmlElement xindivid, string Name, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti) { + Name = Name.Replace("<", "").Replace(">", ""); + XmlElement xroid = xindivid.OwnerDocument.CreateElement(Name); string imgfile = GetROImageFileLocation(roc, rodb, isMulti); -- 2.49.1 From 25bfbeb8d6d2cc951d82f3f8636223c050710a8d Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 30 Jul 2025 23:05:11 -0400 Subject: [PATCH 30/44] C2025-027-AnnotationsTypeSelect-3 --- .../DlgAnnotationsSelect.cs | 1 - .../dlgAnnotationsSelect.Designer.cs | 4 +- .../frmSysOptions.Designer.cs | 38 +++++++++---------- PROMS/Volian.Controls.Library/vlnTreeView.cs | 23 ----------- 4 files changed, 21 insertions(+), 45 deletions(-) diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs index 3f4d87e3..1786e97c 100644 --- a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -95,7 +95,6 @@ namespace VEPROMS { DataTable dt2 = coverToTable(); VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID); - this.Close(); } public class AnnotataionItem { diff --git a/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs index 9e6eb162..22a5f7c5 100644 --- a/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs +++ b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs @@ -123,7 +123,7 @@ namespace VEPROMS this.btnUpdate.Name = "btnUpdate"; this.btnUpdate.Size = new System.Drawing.Size(100, 35); this.btnUpdate.TabIndex = 8; - this.btnUpdate.Text = "Update"; + this.btnUpdate.Text = "Save"; this.btnUpdate.UseVisualStyleBackColor = true; this.btnUpdate.Click += new System.EventHandler(this.btnUpdate_Click); // @@ -158,7 +158,7 @@ namespace VEPROMS this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(100, 35); this.btnCancel.TabIndex = 9; - this.btnCancel.Text = "Close"; + this.btnCancel.Text = "Cancel"; this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click_1); // diff --git a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs index aa101551..51e952ec 100644 --- a/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs +++ b/PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs @@ -30,7 +30,7 @@ namespace VEPROMS { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmSysOptions)); - this.btnCancel = new DevComponents.DotNetBar.ButtonX(); + //this.btnCancel = new DevComponents.DotNetBar.ButtonX(); this.btnOK = new DevComponents.DotNetBar.ButtonX(); this.gpSystemColor = new DevComponents.DotNetBar.Controls.GroupPanel(); this.cbRibonBlack = new DevComponents.DotNetBar.Controls.CheckBoxX(); @@ -103,23 +103,23 @@ namespace VEPROMS this.gpTransRangeColor.SuspendLayout(); this.gpPropPageStyle.SuspendLayout(); this.SuspendLayout(); - // - // btnCancel - // - this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.btnCancel.Location = new System.Drawing.Point(616, 591); - this.btnCancel.Margin = new System.Windows.Forms.Padding(2); - this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(56, 19); - this.btnCancel.TabIndex = 0; - this.btnCancel.Text = "Cancel"; - this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); + //// + //// btnCancel + //// + //this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; + //this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; + //this.btnCancel.Location = new System.Drawing.Point(616, 591); + //this.btnCancel.Margin = new System.Windows.Forms.Padding(2); + //this.btnCancel.Name = "btnCancel"; + //this.btnCancel.Size = new System.Drawing.Size(56, 19); + //this.btnCancel.TabIndex = 0; + //this.btnCancel.Text = "Cancel"; + //this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); // // btnOK // this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton; - this.btnOK.Location = new System.Drawing.Point(542, 591); + this.btnOK.Location = new System.Drawing.Point(616, 591); this.btnOK.Margin = new System.Windows.Forms.Padding(2); this.btnOK.Name = "btnOK"; this.btnOK.Size = new System.Drawing.Size(56, 19); @@ -562,7 +562,7 @@ namespace VEPROMS // this.gpAnnoTypeFilter.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.gpAnnoTypeFilter.TabIndex = 13; - this.gpAnnoTypeFilter.Text = "Select Annotation Types"; + this.gpAnnoTypeFilter.Text = "Filter Annotation Types"; // // gpVisioPath // @@ -1305,7 +1305,7 @@ namespace VEPROMS this.cbShwAnnoFilter.Size = new System.Drawing.Size(91, 23); this.cbShwAnnoFilter.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled; this.cbShwAnnoFilter.TabIndex = 0; - this.cbShwAnnoFilter.Text = "Select"; + this.cbShwAnnoFilter.Text = "Open"; this.cbShwAnnoFilter.Click += new System.EventHandler(this.cbShwAnnoFilter_Click); // // frmSysOptions @@ -1313,14 +1313,14 @@ namespace VEPROMS this.AcceptButton = this.btnOK; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.CancelButton = this.btnCancel; + //this.CancelButton = this.btnCancel; this.ClientSize = new System.Drawing.Size(699, 620); this.ControlBox = false; this.Controls.Add(this.btnReset); this.Controls.Add(this.tcSysOpts); this.Controls.Add(this.panButtons); this.Controls.Add(this.btnOK); - this.Controls.Add(this.btnCancel); + //this.Controls.Add(this.btnCancel); this.DoubleBuffered = true; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Margin = new System.Windows.Forms.Padding(2); @@ -1352,7 +1352,7 @@ namespace VEPROMS #endregion - private DevComponents.DotNetBar.ButtonX btnCancel; + //private DevComponents.DotNetBar.ButtonX btnCancel; private DevComponents.DotNetBar.ButtonX btnOK; private DevComponents.DotNetBar.Controls.GroupPanel gpSystemColor; private DevComponents.DotNetBar.Controls.CheckBoxX cbRibonBlack; diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 212fafdf..82dc5a98 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -573,12 +573,6 @@ namespace Volian.Controls.Library { if (ProcedureCheckedOutTo != null) ProcedureCheckedOutTo(sender, args); } - // C2025-027 - public event vlnTreeViewEvent SelectAnnotations; - private void OnSelectAnnotations(object sender, vlnTreeEventArgs args) - { - if (SelectAnnotations != null) SelectAnnotations(sender, args); - } public event vlnTreeViewEvent ExportImportProcedureSets; private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args) { @@ -872,7 +866,6 @@ namespace Volian.Controls.Library MenuItem miqp = new MenuItem("Quick Print"); //MenuItem mips = new MenuItem("Print Section"); MenuItem mia = new MenuItem("Approve"); - MenuItem misa = new MenuItem("Select Annotations"); //C2025-027 int k = 0; foreach (string s in pri.MyDocVersion.UnitNames) @@ -898,16 +891,12 @@ namespace Volian.Controls.Library MenuItem mtc = mitcas.MenuItems.Add(s, new EventHandler(miMultiUnit_Click)); mtc.Enabled = procAppl; mtc.Tag = k; - MenuItem msa = misa.MenuItems.Add(s, new EventHandler(miMultiUnit_Click)); - msa.Enabled = procAppl; - msa.Tag = k; } cm.MenuItems.Add(micas); cm.MenuItems.Add(mitcas); cm.MenuItems.Add(mip); cm.MenuItems.Add(miqp); //cm.MenuItems.Add(mips); - cm.MenuItems.Add(misa); AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri); cm.MenuItems.Add(mia); AddApprovedRevisionsMultiUnit(cm.MenuItems, pri); @@ -923,7 +912,6 @@ namespace Volian.Controls.Library AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri); cm.MenuItems.Add("Approve", new EventHandler(mi_Click)); //_MyLog.WarnFormat("Context Menu 1 before - {0}", GC.GetTotalMemory(true)); - cm.MenuItems.Add("Select Annotations", new EventHandler(mi_Click)); //C2025-027 AddApprovedRevisions(cm.MenuItems, pri); //_MyLog.WarnFormat("Context Menu 1 after - {0}", GC.GetTotalMemory(true)); } @@ -936,7 +924,6 @@ namespace Volian.Controls.Library { MenuItem mip = new MenuItem("Print"); MenuItem miqp = new MenuItem("Quick Print"); - MenuItem misa = new MenuItem("Select Annotations"); //C2025-027 int k = 0; foreach (string s in pri.MyDocVersion.UnitNames) { @@ -945,19 +932,15 @@ namespace Volian.Controls.Library mp.Tag = k; MenuItem mqp = miqp.MenuItems.Add(s, new EventHandler(miMultiUnit_Click)); mqp.Tag = k; - MenuItem msa = misa.MenuItems.Add(s, new EventHandler(miMultiUnit_Click)); - msa.Tag = k; } cm.MenuItems.Add(mip); cm.MenuItems.Add(miqp); - cm.MenuItems.Add(misa); AddApprovedRevisionsMultiUnit(cm.MenuItems, pri); } else { cm.MenuItems.Add("Print", new EventHandler(mi_Click)); cm.MenuItems.Add("Quick Print", new EventHandler(mi_Click)); - cm.MenuItems.Add("Select Annotations", new EventHandler(mi_Click)); //C2025-027 AddApprovedRevisions(cm.MenuItems, pri); } } @@ -1949,9 +1932,6 @@ namespace Volian.Controls.Library case "Create Time Critical Action Summary": OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, mi.Text, (int)mi.Tag)); break; - case "Select Annotations": // C2025-027 - OnSelectAnnotations(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); - break; default: if (mip.Text.StartsWith("Showing Change Bars Starting")) OnSelectDateToStartChangeBars(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); @@ -2257,9 +2237,6 @@ namespace Volian.Controls.Library FlexibleMessageBox.Show("You have copied a document that is NOT linked to an Enhanced Document.\n\n" + "You cannot paste a Non-Enhanced Procedure into an Enhanced Procedure Set.", "Cannot Paste Here"); break; - case "Select Annotations": // C2025-027 - OnSelectAnnotations(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); - break; //case "Check Out Procedure Set": // CheckOutDocVersion(SelectedNode as VETreeNode); // break; -- 2.49.1 From 81a23305ba097069d30b357e82db9709ac7243b5 Mon Sep 17 00:00:00 2001 From: mschill Date: Thu, 31 Jul 2025 10:48:39 -0400 Subject: [PATCH 31/44] SQL optimization to used AnnotationTypeSelections Index --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 26 +++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 3ca37132..2ea74f82 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -24136,16 +24136,18 @@ CREATE PROCEDURE [dbo].[getAnnotationSelectListTypes] WITH EXECUTE AS OWNER AS SELECT - [TypeID], - [Name], - [Config], - [DTS], - [UserID], - [LastChanged], - (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= [TypeID]) [AnnotationCount], - [IsEPAnnotationType] - FROM [AnnotationTypes] --A - WHERE TypeID NOT IN (SELECT TypeID FROM AnnotationTypeSelections WHERE UserID = @UserID) + AT.[TypeID], + AT.[Name], + AT.[Config], + AT.[DTS], + AT.[UserID], + AT.[LastChanged], + (SELECT COUNT(*) FROM [Annotations] WHERE [Annotations].[TypeID]= AT.[TypeID]) [AnnotationCount], + AT.[IsEPAnnotationType] + FROM [AnnotationTypes] AT + LEFT OUTER JOIN AnnotationTypeSelections ATS + ON ATS.TypeID = AT.TypeID AND ATS.UserID = @UserID + WHERE ATS.ASTypeID IS NULL GO -- C2025-027 Annotation Type Filtering @@ -24325,8 +24327,8 @@ BEGIN TRY -- Try Block DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '07/10/2025 2:30 PM' - set @RevDescription = 'C2025-027 Annotation Type Filtering' + set @RevDate = '07/31/2025 10:30 AM' + set @RevDescription = 'SQL Optimization' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription -- 2.49.1 From a7c7744ff3060fa77f80615cf2de60a1e013573d Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Thu, 31 Jul 2025 23:06:29 -0400 Subject: [PATCH 32/44] C2025-047-AnnotationsTypeSelectChanges --- .../DlgAnnotationsSelect.cs | 30 ++++- .../VEPROMS User Interface/VEPROMS_UI.csproj | 9 ++ .../dlgAnnotationsSelect.Designer.cs | 4 +- .../dlgSaveAnnotationSelections.Designer.cs | 47 +++++++ .../dlgSaveAnnotationSelections.cs | 20 +++ .../dlgSaveAnnotationSelections.resx | 120 ++++++++++++++++++ 6 files changed, 225 insertions(+), 5 deletions(-) create mode 100644 PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.Designer.cs create mode 100644 PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.cs create mode 100644 PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.resx diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs index 1786e97c..ac31fad0 100644 --- a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -63,18 +63,21 @@ namespace VEPROMS lstFrom.Items.Remove(item); } SetButtonsEditable(); + btnUpdate.Enabled = true; } // Move all items to lstSelected. private void btnSelectAll_Click(object sender, EventArgs e) { MoveAllItems(lstUnselected, lstSelected); + btnUpdate.Enabled = true; } // Move all items to lstUnselected. private void btnDeselectAll_Click(object sender, EventArgs e) { MoveAllItems(lstSelected, lstUnselected); + btnUpdate.Enabled = true; } // Move all items from one ListBox to another. @@ -83,6 +86,7 @@ namespace VEPROMS lstTo.Items.AddRange(lstFrom.Items); lstFrom.Items.Clear(); SetButtonsEditable(); + btnUpdate.Enabled = true; } // Enable and disable buttons. @@ -93,8 +97,10 @@ namespace VEPROMS // Save selected list to DB. private void btnUpdate_Click(object sender, EventArgs e) { - DataTable dt2 = coverToTable(); - VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID); + saveChanges(); + //DataTable dt2 = coverToTable(); + //VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID); + //btnUpdate.Enabled = false; } public class AnnotataionItem { @@ -154,7 +160,19 @@ namespace VEPROMS private void btnCancel_Click_1(object sender, EventArgs e) { - this.Close(); + string message = "Changes have not yet been saved. Do you want to save the changes prior to closing?"; + string title = "Save Annotation Selections"; + MessageBoxButtons buttons = MessageBoxButtons.YesNo; + DialogResult result = MessageBox.Show(message, title, buttons); + if (result == DialogResult.Yes) + { + saveChanges(); + this.Close(); + } + else + { + this.Close(); + } } private DataTable coverToTable() @@ -169,6 +187,12 @@ namespace VEPROMS } return dt; } + private void saveChanges() + { + DataTable dt2 = coverToTable(); + VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID); + btnUpdate.Enabled = false; + } } } diff --git a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj index 34aae1a6..d9859e1a 100644 --- a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj +++ b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj @@ -229,6 +229,12 @@ DlgPrintProcedure.cs + + Form + + + dlgSaveAnnotationSelections.cs + Form @@ -368,6 +374,9 @@ DlgPrintProcedure.cs Designer + + dlgSaveAnnotationSelections.cs + dlgSetChangeBarStartDate.cs diff --git a/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs index 22a5f7c5..ec7a1f11 100644 --- a/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs +++ b/PROMS/VEPROMS User Interface/dlgAnnotationsSelect.Designer.cs @@ -158,7 +158,7 @@ namespace VEPROMS this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(100, 35); this.btnCancel.TabIndex = 9; - this.btnCancel.Text = "Cancel"; + this.btnCancel.Text = "Close"; this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click_1); // @@ -203,7 +203,7 @@ namespace VEPROMS this.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Name = "dlgAnnotationsSelect"; - this.Text = "Select Annotation Types"; + this.Text = "Filter Annotation Types"; this.Load += new System.EventHandler(this.DlgAnnotationsSelect_Load); this.tableLayoutPanel1.ResumeLayout(false); this.ResumeLayout(false); diff --git a/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.Designer.cs b/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.Designer.cs new file mode 100644 index 00000000..a6438b26 --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.Designer.cs @@ -0,0 +1,47 @@ + +namespace VEPROMS +{ + partial class dlgSaveAnnotationSelections + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // dlgSaveAnnotationSelections + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(634, 351); + this.Name = "dlgSaveAnnotationSelections"; + this.Text = "Save Annotation Selections"; + this.ResumeLayout(false); + + } + + #endregion + } +} \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.cs b/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.cs new file mode 100644 index 00000000..1714cf15 --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace VEPROMS +{ + public partial class dlgSaveAnnotationSelections : Form + { + public dlgSaveAnnotationSelections() + { + InitializeComponent(); + } + } +} diff --git a/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.resx b/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file -- 2.49.1 From 6e20774edf96dcf9ea79854e611ef6959b6acd76 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Fri, 1 Aug 2025 07:34:33 -0400 Subject: [PATCH 33/44] C2025-047-AnnotationsTypeSelectChanges --- .../DlgAnnotationsSelect.cs | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs index ac31fad0..e40b8520 100644 --- a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -156,18 +156,26 @@ namespace VEPROMS { lstSelected.Items.Add(new AnnotataionItem(lstSelectedRow["Name"].ToString(), (int)lstSelectedRow["TypeID"])); } + btnUpdate.Enabled = false; } private void btnCancel_Click_1(object sender, EventArgs e) { - string message = "Changes have not yet been saved. Do you want to save the changes prior to closing?"; - string title = "Save Annotation Selections"; - MessageBoxButtons buttons = MessageBoxButtons.YesNo; - DialogResult result = MessageBox.Show(message, title, buttons); - if (result == DialogResult.Yes) + if (btnUpdate.Enabled == true) { - saveChanges(); - this.Close(); + string message = "Changes have not yet been saved. Do you want to save the changes prior to closing?"; + string title = "Save Annotation Selections"; + MessageBoxButtons buttons = MessageBoxButtons.YesNo; + DialogResult result = MessageBox.Show(message, title, buttons); + if (result == DialogResult.Yes) + { + saveChanges(); + this.Close(); + } + else + { + this.Close(); + } } else { -- 2.49.1 From 28c681a5623d73c4fc0c07c2ad90ca60b33bd2c3 Mon Sep 17 00:00:00 2001 From: mschill Date: Fri, 1 Aug 2025 13:53:08 -0400 Subject: [PATCH 34/44] C2025-024 Electronic Procedures Phase 2 - XML Export Enhanced Doc Links --- PROMS/Formats/Formats.csproj | 1 + PROMS/Formats/fmtall/EPTSTBCK1all.xml | Bin 0 -> 51866 bytes .../VEPROMS User Interface/dlgExportImport.cs | 16 +- .../dlgExportImportEP.cs | 13 + .../Format/EPFormatFile.cs | 744 +++++++++--------- .../frmEPAnnotationDetails.cs | 6 +- 6 files changed, 408 insertions(+), 372 deletions(-) create mode 100644 PROMS/Formats/fmtall/EPTSTBCK1all.xml diff --git a/PROMS/Formats/Formats.csproj b/PROMS/Formats/Formats.csproj index e950a1ee..c1ca80da 100644 --- a/PROMS/Formats/Formats.csproj +++ b/PROMS/Formats/Formats.csproj @@ -180,6 +180,7 @@ + diff --git a/PROMS/Formats/fmtall/EPTSTBCK1all.xml b/PROMS/Formats/fmtall/EPTSTBCK1all.xml new file mode 100644 index 0000000000000000000000000000000000000000..4fd3f7b2ee3f41bf4d8708686d768f6b97ebef93 GIT binary patch literal 51866 zcmeI5*>fC6a>hISCWjs22S506EQdCBH5nr zy{z`Dz3M-z&#SA|m(|z$f222i)wZ5L)!V)5dHwcHbyPj8uBg;4mHA8c=jtD;zpw68 z|EgzKsx`H>UmfW8OVvKAw)E+pT3S{8XL@s}UbpnzdK;<6s9LUTysPUxuU_cwsJbQ! zu2nbni4s4m#IEXWsg+T+qTfd~)z;5gpU2go^oCxxMg6E+Qh7!P9oFW!{)>`~mr*}e zNoe*Ftf>Y)997>(l-k?RG{O~)E`Ia9+TN}E9#xN2^R+(1zfG0g&~GSR)9<(re|fFX zCp~{wb+taK?$v#4*JC+2;T=7tEpLj`2P!*~Y>-||Q%?J4O(BvtJ)r!O#=fVKBQ=+h zx49}R=STm>^f{*?aN^J609phe;xXN; zDcQ=#(wDz*;EnVF8KH-x>aPCZu3kwa(9$;=?NdFCdxYvWy*X657b=amJl05^ALDwA zOL~It?bmwrSncf8`nRN7+p52%9Sp8Zli)KlIa)irE{JFO%jKN>g)Ft+{3{>D_

vYR0X{=dO)wE`t99%Tt^z;o}QtBclG&5Kl>U3r61{O+Ox?TS;Co->cp6} zq#F0CCw1#b6C|OX2WsaB(YstN=`)leso(UQx4*0YCQ9h}-&KEKZ=a}Lq-dX>sw|ol zI26~QwVY$7ImVlB>i&!`_W7;aeyY}uyWa|rXyb)?ah!*$tCQ!k+!*~=(m{Bi$^+ZO zW{^7;a~Me$jQUN_pVk)YrLc=#jr+A~(ckTf%tGlUq1}3C9ix0nh%lbC246!9F;#hg zu_otZq#ic$N^*OqpP;1=^?XlMLvbjzUzdW5*y3*Wvm}Cc2kfG}No7N=zLZvO=pRUm zKJqrECvO?u1lNAiZ$@}9(O1WqP&bwe(h4ovNWf3@KP}f((mVll&-BQs_wldRbhwqE zv)dZ+YyF_N%;KOS97%a=^K?#C-j~^OQ(y4+wR*z$SZtrBOHZWP%r1wL5>mM_v4SRA zz&|hm&1xDs?cj0jPqgKFBR{aHoF7e6YAWY?8Ki0UNuL2*n8}|?K8)q2Rth$!tw}#wO}O6xC#~+f%5G`w%%RlzTHX=<|F`l`ujwfX>#bG_h`Q1gb$f74iVy`E34UuGZH7uFk; zIy&OrJg>)Kqp}&o>aOaY>ynKSiq=FmSi7ov_})l|IRK2n$6}s+QRp!Buygz#r07~q zudz;rHC;ei^NLv=;V~FKw(Ejv1E@`Z%n8t#>Wkqby1oc6lCiw2c?g&ACg9qkp1@u6 z`no+$=z;F9Y7Oq9+{)l#H|u&jPS9ef_IC^sjQ6I4v8AWAoP&RxXzTZq5Z;mNLp(!S zTbttKEA?c)#j*ZJkKh5i^1jyOvRAluEKPyJ_p%hjsi5C|Yc$PyHg0dBiGG{)n(0SF z4{9IlV$yE2XEW`m;r$emhXIyqn9>Iv{(vO#hL)SGQ0){Z9EQlR!okNaZfkXE-PZ0B@b@LNSeGR;^GPd@Gsx8eu zwq`R9!-Lp+AO=NDj2ObEKH+Z=H>Gr5c9eMv7Tq&1A)V)m9r)~?awL|Qd7>862{OYE zT&ekthZ5GNP-C81dyD6<0jX{>TE`V%w~gdABf&TF8Q`+5T#;ZI%XG{uHH((ZVS3XiJ)Qc0)4{Lt5W_nn?XZ|H-z z=W8=>(fsu=tHsoRSN-*5B;P5b^>3nhN%5@kX*8kGJ^3bH5byax<(wxzs=N+8|0MgN zY;&Dd7RW95)~VGrd&i}=FBX&C-w24qniCI|HJBj*@@vDM7@zQh(PLIJta;#0K%0~k zVYTi$=opZe>u*Db73eASHu251wX4V2u3}08y}6HJt5LUe#?0Q!)0&DluI2My+>?!% zwXky}wkD^Yems7W+L}Mjb+xHxUM6le<>2gmu_!^zm&ZbpE?vsGVmkr{wI2Odh`B4d zK9*(LXI9wEGN41wzcxuv^9hU}`3!&dp2Ei>bBpN2GH2(5T^sZJyQCj`F(EedxJHsg zX%0~$!xW3`cw7Cw9qexvsV0c|R}6tuokpx7T_) z4TV>!J@?nRdAxxuiU=+#?z1U>;IVuL`~deImPHXy9!WpW%5#{d|2|&EibjEl6#Rlk zdK)RPX7M?iYNmRMyxTPOd^`{KQi=Kp&jX9Wqvd(q%sHUMkx=Pu=CSib3HG;H_kDPL z=+pE0BZE^p3nrv>E;<_6iGUalLL{ay9;7o|yT|@*fjsQB5Xm4i#0dz_l63XD_*Ks| zi=O6#=032^?}n`&acGV`+!Nw%Yvg`vFs$mE@nF$$hkLU7W%&o3<;Z;m_v3??klP~O zS&SOfYcxd^ z`)7|n_xJEUVsJ6z2!8%6miDH&eWaCIe_ye`Zj})+Uo+ZD)&%3Nh-Da zC+%Pnq2E(vze}^rnz23fr>TtM5O?KN&slS$j3um#^S_>Xzva4w75Vl__kK=?nDvwKZ>jJHb$CF0mY!+=>X{Tjrse44$TlXHoEYz2C zd`gk+l`fY0=ICF1q6)9DdyIXp{@Ub3XDlC&fOJd7OD#qw{pl@dMyI4(7G7#G^vjuCuQ-_$H~wbW15M z+gG~=St0*fG4pzZ-&L;0>>eVLXtS)cPFTUES{m?s);NXv87V3=X2)fpXMEO5`!x&g z6Jz9t8>iH{0qG;o=irix!1*pZP9vexw=B7B5<2~QJFl6JFYq{@`>uERg?{s*`P`}_ z_F&(3|2W(oNPVwZi%+9Hr60`g3+^Y`-3Ge@G)o+`sce6JDZSh#deT^H8|tK``qNPQ ziFS7>tevNw{_*$StITlrBdnQ^>zEMu^1i|EZo{(E?YK;j!^YZWC$@cs*S!zJY>NgF zyWY{KMdPHQb)R!($8{{*X?ZV7{HOG^y36M46321YC$rU@UL)7lFnh!j>B8M|&B5)h z=bF3xRAHOdoF?jby}nJJ#%Bx%`u3Wa%Q@hhU(PV4x8H;qdHZdn&&&0vquhyYqGL9$ zG?(s6(~So2&9vC9xXWjYBeC~1CvXE4uO~gnp2m}~dpO&5DvikZmN4P5%KBaFxRqGL zyZpD)VO~5Zq&@Zb0F8%1+u>p=6WR(k>qyb;dGXkza(Bq34@$ z?Sxj>!ftQTOBs(AadP{-WB&bTxKBYZEG8T4Mc9|b$Ko#Xrf`KjP3!eMN46$7(}we* zei_|tvxUBA3w^H2?S5Xw%Fl97_urauDP2D>pSpMC^cqIQZ~V#W&?cuM#>N0-G)j427b zrft~cC1Tz0kN4p&eTn?(yDn?(E{VOTC35Zr?S&TNUoS31W)p0h@DuXSD_e*+9$KgjG-S*p^XR9?prAg~W=*sw-gcGnn(@75N28aj?dPV= zV>=Q@urBu|bIU46AJ8!$e~gwfpTZ5`z^OI$IDuoXS2gGUENGI69W@y_8;C z*1TYwDM#SR#Xy7EcRgdj)}hii52}O4MS`3$1VGg}k2~`JcW3rFeE< z)E+9&CMBzrr%!Zp*h>Dx$+I786f?^I?&Rr%lQ#b)dgitNS)pzoPl^L&74x8=`ms>KOca(|MY z_Wp?m$Ms{ai6!GckxM8phjxYDyd+t>Q>^v~g-hE@GKTz}@yRld^Zr=*%D)u)+G+G~ zLx_k^{w~PneVxC@-kZ!gk#Jv}Kh*9ab)Cmhdo1a^)SI!m6W*{RX4>Z3X!m#UDf4pZ zV&H`PP)2`D`~IZ&<7h-B)lRYdR`(@2_66{IePn@RA4z|Dp|;6O%H>l^(jyIdNk*E# zD<$dUYL-O19J;tWPn)OXfv?t^c;N95e^>G#$Su~i?hzUqkdcR*)8q;!Kl6cpb3{-O=FQBoNvn)1w>9AU4^eN8L!?wmd*0@>G?biJfzXoFs&*PqK zhJmJ4@rm^>*3Z3-x3wIaddTx%Qk!ydyX+eVI^h80j90&Kh8;o6HC<-fiES7@$GYYm zb+jgvyRCRZ3yT9_-H-J2wfZpX=nG`C??B+@Pn?P0TQI%#He!FYsh6}5*TkT+!3xH; z_NFrjD{mizdAqBkkbGL`d75+cp18FnE^KP7OUl)>BCI^tvlTrfYtxEGyR6^w+lMM? z(Tnxu`G%f9)RPBE`OnoWvV2?f%VQ6$j(6)PS0=Mrxu#oFFUz9aPJJ9^qw4n3;F(E= z=mVK>R@5Kb%4gQLXfd><8U8)aP`{HuLL&#z(9t)qszOS9fLKKM!20^ZvS?pk=`d$sz4o zr@J+a*$&GDNe*VxGjx-0Zm^m72i0d@=Kfe|hhZfg;;-(j8|A?c%^v2r!;KodRy8uq zW%Ecg>%$(rgPZ2xG;=P@U@;=hI1#h9k6A(N4Y6)jLZhcCClE=-UR5pB|Ls{k|_eLO}$IvyP+>o ztZg1TmQOQym+|*UnT&(Xy7Xc2F44UY%d5e=hrpgc~t#gC`I;PaNx0OEbD!|VkBef_tE=J{T;7E|4{pd>Dtk(B1ZRH+N=6<;?FM5 zo0tdTo6q&dE64s=-;J+rk_g^e?u&)*h#7bY`VMO)G;H>m#o*1l*VES*8djIDd;5(6 zzlPOixUbpnY5Qt`xpr79#d2JRK~j!@m8v3!hNo6UP1ER*xY ztJ?cxzt6t8sBNbz-7{pzH|+P_6295__;|1C)78MHJ=YK^&v*K6$x_R+FrOm#7Ppo; z8}6O2Uo!t%hHRjm>Es)6xv!Pqawazh-g?4H|>(7Nf~ z5clu~9KI|#e5{+f!@Z%t`f59t*M}WTeK#66>P~<5ZHPIY_9Pd1Rlc6G-)pz3LcGpz z@5Xw5xxJz_t?)Sw+`e*czAtoJoU_xvZE+{=qkYVr>+*=2eD1!Mn$G%{S-boO8t35r z^K9PsHJvJ$u4x~eRW2?=6=99+AHzWF#T;jDJ@txetk(`1cxcU%k9{MJz9# z1=>%84)?A;#I63emDy*N?bEkTx zIl>2RqYSa8pf$|=ajsI!D{!DYT|{o5*Yr{Asxo$%CkAi0#ZUAXS)dc#>8F(Et@EDq z_qWuJwc;hxT!J^X`-8V^WvESFi<}lRd3%{W0|1&r?hyEjw#6f5tmbQv)F$zeu}0~+ zOI`Y->ID&evo25;-~LC-FH0atY^JaCU`^PyJUgU`Tb?gQ zg(uZ?D(yS@s`h;;WV;?IPvJ|Ie4$TqT%1_Ksyy59%{CUTB>VPj#lwk56D2(T4#j{C z7X=&2Q;F@^aDMk7`$f~-&gVgk>H8+PC-*+uRyfxuXcJpAtHn=mb+f2_`MzFBpS{rm zc`gd_lqW9Qk;is-K14>~en@k1;wc|y4HRS9e4fedn81!D2*4h$`6YY<$eY?b!H2<9 z340%wb=h_TOFzcGiM5{}GpuoDJE?KLYn%a177?AjSZLCOG=9R1cWd=22qN&z9EbHC J$Row*{~r$9As_$% literal 0 HcmV?d00001 diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 93ad460c..5e56d913 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -1824,7 +1824,7 @@ namespace VEPROMS //item audits ExportItemAudits(xe, ii); - ExportContent(xe, ii.MyContent, "content"); + ExportContent(xe, ii, "content"); if (ii.ItemAnnotationCount > 0) foreach (AnnotationInfo ai in ii.ItemAnnotations) @@ -1844,6 +1844,11 @@ namespace VEPROMS //do nothing - this will be for Electronic procedures only //and handled/overridden in dlgExportEP.cs } + protected virtual void SetEPEnhancedDocLinks(ref XmlElement xe, ItemInfo ii) + { + //do nothing - this will be for Electronic procedures only + //and handled/overridden in dlgExportEP.cs + } //C2025-024 Electronic Procedures Phase 2 - XML Export //use overridden method to set the location for ROs @@ -1908,8 +1913,9 @@ namespace VEPROMS } } - private void ExportContent(XmlElement xn, ContentInfo ci, string nodename) + private void ExportContent(XmlElement xn, ItemInfo ii, string nodename) { + ContentInfo ci = ii.MyContent; /* ContentID Number @@ -1939,7 +1945,11 @@ namespace VEPROMS xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ci.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff"))); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ci.UserID.ToString())); xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatfilename", formatFileName)); - if (_ExportBothConvertedandNot) xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "textwithlinks", ci.Text)); + if (_ExportBothConvertedandNot) + { + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "textwithlinks", ci.Text)); + SetEPEnhancedDocLinks(ref xe, ii); + } //content audits ExportContentAudits(xe, ci); diff --git a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs index a310e864..07151940 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImportEP.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImportEP.cs @@ -322,6 +322,19 @@ namespace VEPROMS if (!string.IsNullOrEmpty(imgfile)) xindivid.Attributes.SetNamedItem(AddAttribute(xindivid.OwnerDocument, "Location", imgfile)); } + //overridden - used to set specific enhanced doc info + protected override void SetEPEnhancedDocLinks(ref XmlElement xe, ItemInfo ii) + { + EnhancedDocuments eds = ii.GetMyEnhancedDocuments(); + + if (eds != null && eds.Count == 1) + { + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocType", eds[0].Type.ToString())); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocToItemID", eds[0].ItemID.ToString())); + xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocToDbSeq", dbSeq(eds[0].ItemID))); + } + } + //clear objects to release memory private void OnClose(object sender, EventArgs e) { diff --git a/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs b/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs index 9bdb1720..1d75f875 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs @@ -11,157 +11,157 @@ using static VEPROMS.CSLA.Library.ROFSTLookup; namespace VEPROMS.CSLA.Library { - //C2025-023 - Electronic Procedures - Modifications to PROMS - // class to handle storage and access of EPFormatFile and EPFormatFile details - #region EPFormatFiles - [TypeConverter(typeof(vlnListConverter))] - public class EPFormatFiles : vlnFormatList - { - public EPFormatFiles(XmlNodeList xmlNodeList) : base(xmlNodeList) { } - } - #endregion - #region EPFormatFile - public class EPFormatFile : vlnFormatItem - { - #region Constructor - public EPFormatFile(XmlNode xmlNode) : base(xmlNode) { } - public EPFormatFile() : base() { } - #endregion - #region Business Fields - // Name of the EP Viewer Format File - private LazyLoad _Name; - [DisplayName("Name")] - [Description("EP Viewer File Name")] - public string Name - { - get - { - return LazyLoad(ref _Name, "@Name"); - } - } - // Name of the EP Viewer Format File - private LazyLoad _Description; - [DisplayName("Description")] - [Description("EP Viewer Description")] - public string Description - { - get - { - return LazyLoad(ref _Description, "@Description"); - } - } - // Id of Annotation Type Associated with this file - private LazyLoad _AnnotationTypeID; - [DisplayName("AnnotationTypeID")] - [Description("Id of Annotation Type Associated with this file")] - public int? AnnotationTypeID - { - get - { - return LazyLoad(ref _AnnotationTypeID, "@AnnotationTypeID"); - } - } + //C2025-023 - Electronic Procedures - Modifications to PROMS + // class to handle storage and access of EPFormatFile and EPFormatFile details + #region EPFormatFiles + [TypeConverter(typeof(vlnListConverter))] + public class EPFormatFiles : vlnFormatList + { + public EPFormatFiles(XmlNodeList xmlNodeList) : base(xmlNodeList) { } + } + #endregion + #region EPFormatFile + public class EPFormatFile : vlnFormatItem + { + #region Constructor + public EPFormatFile(XmlNode xmlNode) : base(xmlNode) { } + public EPFormatFile() : base() { } + #endregion + #region Business Fields + // Name of the EP Viewer Format File + private LazyLoad _Name; + [DisplayName("Name")] + [Description("EP Viewer File Name")] + public string Name + { + get + { + return LazyLoad(ref _Name, "@Name"); + } + } + // Name of the EP Viewer Format File + private LazyLoad _Description; + [DisplayName("Description")] + [Description("EP Viewer Description")] + public string Description + { + get + { + return LazyLoad(ref _Description, "@Description"); + } + } + // Id of Annotation Type Associated with this file + private LazyLoad _AnnotationTypeID; + [DisplayName("AnnotationTypeID")] + [Description("Id of Annotation Type Associated with this file")] + public int? AnnotationTypeID + { + get + { + return LazyLoad(ref _AnnotationTypeID, "@AnnotationTypeID"); + } + } - // Return Name of Annotation that EP Format File is Attached to - public string AnnotationName() - { - return AnnotationTypeInfo.Get((int) AnnotationTypeID).Name; - } + // Return Name of Annotation that EP Format File is Attached to + public string AnnotationName() + { + return AnnotationTypeInfo.Get((int) AnnotationTypeID).Name; + } - //if xml value is blank, should element export? - //defaults to true - private LazyLoad _exportblank; - [DisplayName("exportblank")] - [Description("if xml value is blank, should element export?")] - public bool exportblank - { - get - { - return LazyLoad(ref _exportblank, "@exportblank"); - } - } - // returns a list of fields that are defined in the EP format's structure - private EPFields _FieldList; - public EPFields FieldList - { - get - { - XmlDocument xd = GetEPFormatData(Name); - return _FieldList == null ? _FieldList = new EPFields(xd.SelectNodes("/EPFormat/EPField")) : _FieldList; - } - } - #endregion - #region Business Methods - // update all in-use annotation types that have Electronic Procedures - public static void UpdateAllInUseEPAnnotationTypes() - { - foreach (int formatid in GetAllInUseFormats()) - { - PlantFormat frmt = FormatInfo.Get(formatid).PlantFormat; - foreach (EPFormatFile EP in frmt.EPFormatFiles) + //if xml value is blank, should element export? + //defaults to true + private LazyLoad _exportblank; + [DisplayName("exportblank")] + [Description("if xml value is blank, should element export?")] + public bool exportblank + { + get + { + return LazyLoad(ref _exportblank, "@exportblank"); + } + } + // returns a list of fields that are defined in the EP format's structure + private EPFields _FieldList; + public EPFields FieldList + { + get + { + XmlDocument xd = GetEPFormatData(Name); + return _FieldList ?? (_FieldList = new EPFields(xd.SelectNodes("/EPFormat/EPField"))); + } + } + #endregion + #region Business Methods + // update all in-use annotation types that have Electronic Procedures + public static void UpdateAllInUseEPAnnotationTypes() + { + foreach (int formatid in GetAllInUseFormats()) + { + PlantFormat frmt = FormatInfo.Get(formatid).PlantFormat; + foreach (EPFormatFile EP in frmt.EPFormatFiles) { - UpdateAnnotationTypeAsEP((int) EP.AnnotationTypeID); - } - } - } - #endregion - #region Data Access - // static - Load EP Format details - save to db (insert/update) - public static void UpdateEPFormat(string name, string data, string userID) - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.StoredProcedure; - cm.CommandText = "vesp_UpdateEPFormat"; - cm.Parameters.AddWithValue("@name", name); - cm.Parameters.AddWithValue("@data", data); - cm.Parameters.AddWithValue("@userID", userID); - cm.CommandTimeout = Database.DefaultTimeout; - cm.ExecuteNonQuery(); - } - } - } + UpdateAnnotationTypeAsEP((int) EP.AnnotationTypeID); + } + } + } + #endregion + #region Data Access + // static - Load EP Format details - save to db (insert/update) + public static void UpdateEPFormat(string name, string data, string userID) + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.StoredProcedure; + cm.CommandText = "vesp_UpdateEPFormat"; + cm.Parameters.AddWithValue("@name", name); + cm.Parameters.AddWithValue("@data", data); + cm.Parameters.AddWithValue("@userID", userID); + cm.CommandTimeout = Database.DefaultTimeout; + cm.ExecuteNonQuery(); + } + } + } - // load data for getting fieldlist for this EPFormat - public static XmlDocument GetEPFormatData(string name) - { - name = name.Replace(".xml", ""); + // load data for getting fieldlist for this EPFormat + public static XmlDocument GetEPFormatData(string name) + { + name = name.Replace(".xml", ""); - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.Text; - cm.CommandText = "Select Data FROM EPFormats where Name = @Name"; - cm.Parameters.AddWithValue("@Name", name); - cm.CommandTimeout = Database.DefaultTimeout; - using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) - { - if (dr.Read()) - { - XmlDocument xd = new XmlDocument(); - xd.XmlResolver = null; - xd.LoadXml(dr.GetString("Data")); - return xd; - } - } - } - } + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.Text; + cm.CommandText = "Select Data FROM EPFormats where Name = @Name"; + cm.Parameters.AddWithValue("@Name", name); + cm.CommandTimeout = Database.DefaultTimeout; + using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) + { + if (dr.Read()) + { + XmlDocument xd = new XmlDocument(); + xd.XmlResolver = null; + xd.LoadXml(dr.GetString("Data")); + return xd; + } + } + } + } - return null; - } + return null; + } - // Get all in-use formats - public static List GetAllInUseFormats() - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.Text; - cm.CommandText = @"SELECT Distinct Formats.[FormatID] + // Get all in-use formats + public static List GetAllInUseFormats() + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.Text; + cm.CommandText = @"SELECT Distinct Formats.[FormatID] FROM ( SELECT FormatID FROM Contents @@ -172,260 +172,272 @@ namespace VEPROMS.CSLA.Library ) inuse inner join Formats on inuse.FormatID = Formats.FormatID"; - cm.CommandTimeout = Database.DefaultTimeout; + cm.CommandTimeout = Database.DefaultTimeout; - using (DataTable dt = new DataTable()) - { - using (SqlDataAdapter da = new SqlDataAdapter(cm)) - { - da.Fill(dt); - return dt.AsEnumerable().Select(x => x.Field("FormatID")).ToList(); - } - } + using (DataTable dt = new DataTable()) + { + using (SqlDataAdapter da = new SqlDataAdapter(cm)) + { + da.Fill(dt); + return dt.AsEnumerable().Select(x => x.Field("FormatID")).ToList(); + } + } - } - } - } + } + } + } - // update an annotation type as an Electronic Procedure Annotation Type - public static void UpdateAnnotationTypeAsEP(int typeID) - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.Text; - cm.CommandText = @"Update AnnotationTypes + // update an annotation type as an Electronic Procedure Annotation Type + public static void UpdateAnnotationTypeAsEP(int typeID) + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.Text; + cm.CommandText = @"Update AnnotationTypes SET IsEPAnnotationType = 1 WHERE TypeID = @typeID"; - cm.Parameters.AddWithValue("@typeID", typeID); - cm.CommandTimeout = Database.DefaultTimeout; - cm.ExecuteNonQuery(); - } - } - } + cm.Parameters.AddWithValue("@typeID", typeID); + cm.CommandTimeout = Database.DefaultTimeout; + cm.ExecuteNonQuery(); + } + } + } - // Returns true if there are any EP Annotation Types - public static bool IsEPAnnotationType() - { - try - { - using (SqlConnection cn = Database.VEPROMS_SqlConnection) - { - using (SqlCommand cm = cn.CreateCommand()) - { - cm.CommandType = CommandType.Text; - cm.CommandText = @"SELECT RESULT = CASE WHEN + // Returns true if there are any EP Annotation Types + public static bool IsEPAnnotationType() + { + try + { + using (SqlConnection cn = Database.VEPROMS_SqlConnection) + { + using (SqlCommand cm = cn.CreateCommand()) + { + cm.CommandType = CommandType.Text; + cm.CommandText = @"SELECT RESULT = CASE WHEN EXISTS(SELECT 1 FROM AnnotationTypes where IsEPAnnotationType = 1) THEN 1 ELSE 0 END"; - cm.CommandTimeout = Database.DefaultTimeout; - using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) - { - if (dr.Read() && dr.GetInt32("RESULT") == 1) - return true; - } - } - } - } - catch - { - // EP Support has not yet been added for this DB - // IsEPAnnotationType does not exist - // need to run PROMS Fixes - // until then will ignore EP code - // instead of crashing for a field not found - } + cm.CommandTimeout = Database.DefaultTimeout; + using (SafeDataReader dr = new SafeDataReader(cm.ExecuteReader())) + { + if (dr.Read() && dr.GetInt32("RESULT") == 1) + return true; + } + } + } + } + catch + { + // EP Support has not yet been added for this DB + // IsEPAnnotationType does not exist + // need to run PROMS Fixes + // until then will ignore EP code + // instead of crashing for a field not found + } - return false; - } - #endregion - } + return false; + } + #endregion + } - public class EPFields : vlnFormatList - { + public class EPFields : vlnFormatList + { public EPFields() { } public EPFields(XmlNodeList xmlNodeList) : base(xmlNodeList) { } - } - // EP field class - public class EPField : vlnFormatItem - { - public EPField(XmlNode xmlNode) : base(xmlNode) { } - public EPField() : base() { } - private LazyLoad _name; - public string name - { - get - { - return LazyLoad(ref _name, "@name"); - } - } - private LazyLoad _type; - public string type - { - get - { - return LazyLoad(ref _type, "@type"); - } - } - private LazyLoad _label; - public string label - { - get - { - string tmp = LazyLoad(ref _label, "@label"); + } + // EP field class + public class EPField : vlnFormatItem + { + public EPField(XmlNode xmlNode) : base(xmlNode) { } + public EPField() : base() { } + private LazyLoad _name; + public string name + { + get + { + return LazyLoad(ref _name, "@name"); + } + } + private LazyLoad _type; + public string type + { + get + { + return LazyLoad(ref _type, "@type"); + } + } + private LazyLoad _label; + public string label + { + get + { + string tmp = LazyLoad(ref _label, "@label"); - if (string.IsNullOrEmpty(tmp)) - return LazyLoad(ref _name, "@name"); - else - return tmp; - } - } - private LazyLoad _text; - public string text - { - get - { - return LazyLoad(ref _text, "@text"); - } - } - //roid of group item that individual sub-items will be the choices for the list/combobox for ROSINGLE and ROMULTI - private LazyLoad _rosource; - public string rosource - { - get - { - return LazyLoad(ref _rosource, "@rosource"); - } - } - //the columns in the RO that will be included in the exports - private LazyLoad _returncols; - public List returncols() - { - try - { - string tmp = LazyLoad(ref _returncols, "@returncols"); + if (string.IsNullOrEmpty(tmp)) + return LazyLoad(ref _name, "@name"); + else + return tmp; + } + } + private LazyLoad _text; + public string text + { + get + { + return LazyLoad(ref _text, "@text"); + } + } + //roid of group item that individual sub-items will be the choices for the list/combobox for ROSINGLE and ROMULTI + private LazyLoad _rosource; + public string rosource + { + get + { + return LazyLoad(ref _rosource, "@rosource"); + } + } + //the columns in the RO that will be included in the exports + private LazyLoad _returncols; + public List returncols() + { + try + { + string tmp = LazyLoad(ref _returncols, "@returncols"); - if (string.IsNullOrEmpty(tmp)) - return new List(); - else - return tmp.Split(',').Select(p => p.Trim()).ToList(); - } - catch - { - throw new ArgumentException($"Error in returncols for EP file: {((EPFormatFile)MyParentFormat).Name}.xml, field: {name}"); - } - } + if (string.IsNullOrEmpty(tmp)) + return new List(); + else + return tmp.Split(',').Select(p => p.Trim()).ToList(); + } + catch + { + throw new ArgumentException($"Error in returncols for EP file, field: {name}"); + } + } - //number of lines for a multi-line text box to span - private LazyLoad _numlines; - public int numlines - { - get - { - int? tmp = LazyLoad(ref _numlines, "@numlines"); + //number of lines for a multi-line text box to span + private LazyLoad _numlines; + public int numlines + { + get + { + int? tmp = LazyLoad(ref _numlines, "@numlines"); - if (tmp == null) - return 1; + if (tmp == null) + return 1; - return (int) tmp; - } - } - //step types that the EPForma Item is valid for (as a list of types) - private LazyLoad _validforsteptypes; + return (int) tmp; + } + } + //step types that the EPForma Item is valid for (as a list of types) + private LazyLoad _validforsteptypes; public List validforsteptypes() - { - try - { - string tmp = LazyLoad(ref _validforsteptypes, "@validforsteptypes"); - return tmp.Split(',').Select(p => p.Trim()).ToList(); - } - catch - { - throw new ArgumentException($"Error in validforsteptypes for EP file: {((EPFormatFile) MyParentFormat).Name}.xml, field: {name}"); - } - } - public bool IsValidForStepType(string StepType) - { - List tmp = validforsteptypes(); - return tmp.Contains(StepType); - } + { + try + { + string tmp = LazyLoad(ref _validforsteptypes, "@validforsteptypes"); + return tmp.Split(',').Select(p => p.Trim()).ToList(); + } + catch + { + throw new ArgumentException($"Error in validforsteptypes for EP file, field: {name}"); + } + } + public bool IsValidForStepType(string StepType) + { + List tmp = validforsteptypes(); + return tmp.Contains(StepType); + } - //return a list of items based on the ROsource specified in the EPFormat File - //will return all RO items under the Group that's roid = the rosource - public List getROList(AnnotationInfo currAnn, bool includeblank) - { - if (string.IsNullOrEmpty(rosource)) - return new List(); + //return a list of items based on the ROsource specified in the EPFormat File + //will return all RO items under the Group that's roid = the rosource + public List getROList(AnnotationInfo currAnn, bool includeblank) + { + if (string.IsNullOrEmpty(rosource)) + return new List(); - try - { - DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion; - ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); + try + { + DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion; - string roid = FormatRoidKey(rosource, false); - rochild[] children = lookup.GetRoChildrenByRoid(roid); + if (MyDocVersion.DocVersionAssociations != null && MyDocVersion.DocVersionAssociations.Any()) + { + ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); - List mylist = children.Select(x => new ROListItem(x.title, x.roid.Substring(0, 12))).ToList(); - if (includeblank) - mylist.Insert(0, new ROListItem("", "")); + string roid = FormatRoidKey(rosource, false); + rochild[] children = lookup.GetRoChildrenByRoid(roid); - return mylist; - } - catch (Exception Ex) - { - throw new ArgumentException($"Error in rosource for EP file: {((EPFormatFile)MyParentFormat).Name}.xml, field: {name}"); - } - } + List mylist = children.Select(x => new ROListItem(x.title, x.roid.Substring(0, 12))).ToList(); + if (includeblank) + mylist.Insert(0, new ROListItem("", "")); - //return a list of values for the specified ROID - //given the EP items return columns - //will return all RO items under the Group that's roid = the rosource - public List getROValuesList(AnnotationInfo currAnn, string roid) - { - if (string.IsNullOrEmpty(roid)) - return new List(); + return mylist; + } + else + { + return new List + { + new ROListItem("", "") + }; + } - List values = new List(); - DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion; - ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); - rochild ro = lookup.GetRoChild(roid); + } + catch + { + throw new ArgumentException($"Error in rosource for EP file, field: {name}"); + } + } - List rtncols = returncols(); + //return a list of values for the specified ROID + //given the EP items return columns + //will return all RO items under the Group that's roid = the rosource + public List getROValuesList(AnnotationInfo currAnn, string roid) + { + if (string.IsNullOrEmpty(roid)) + return new List(); - if (rtncols.Count == 0) - { - values.Add(ro.value); - } - else - { - foreach (string rcol in rtncols) - { - rochild ro_indiv = Array.Find(ro.children, x => x.appid.EndsWith($".{rcol}")); - if (ro_indiv.value != null) values.Add(ro_indiv.value); - } - } + List values = new List(); + DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion; + ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); + rochild ro = lookup.GetRoChild(roid); - return values; + List rtncols = returncols(); - } - } + if (rtncols.Count == 0) + { + values.Add(ro.value); + } + else + { + foreach (string rcol in rtncols) + { + rochild ro_indiv = Array.Find(ro.children, x => x.appid.EndsWith($".{rcol}")); + if (ro_indiv.value != null) values.Add(ro_indiv.value); + } + } - #endregion - //C2025-023 - Electronic Procedures - Modifications to PROMS - // class to handle return of RO Lists - #region EPFormatFiles - public class ROListItem - { - public string Text { get; private set; } - public string Value { get; private set; } - public ROListItem(string _text, string _value) - { - Text = _text; Value = _value; - } - } - #endregion + return values; + + } + } + + #endregion + //C2025-023 - Electronic Procedures - Modifications to PROMS + // class to handle return of RO Lists + #region EPFormatFiles + public class ROListItem + { + public string Text { get; private set; } + public string Value { get; private set; } + public ROListItem(string _text, string _value) + { + Text = _text; Value = _value; + } + } + #endregion } diff --git a/PROMS/Volian.Controls.Library/frmEPAnnotationDetails.cs b/PROMS/Volian.Controls.Library/frmEPAnnotationDetails.cs index a641fd1c..518e63c7 100644 --- a/PROMS/Volian.Controls.Library/frmEPAnnotationDetails.cs +++ b/PROMS/Volian.Controls.Library/frmEPAnnotationDetails.cs @@ -120,7 +120,7 @@ namespace Volian.Controls.Library foreach (string t in tmps) cmb.Items.Add(t.Trim()); string val = MyConfig.GetValue("EP", EP.name); if (val != null && val != "") cmb.SelectedItem = val; - cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Length).First(), cmb.Font).Width + SystemInformation.VerticalScrollBarWidth; + cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Length).FirstOrDefault(), cmb.Font).Width + SystemInformation.VerticalScrollBarWidth; cmb.Width = cmb.DropDownWidth; _DicComboBox.Add(EP.name, cmb); panelEP.Controls.Add(cmb, 1, panelEP.RowCount - 1); @@ -135,7 +135,7 @@ namespace Volian.Controls.Library cmb.ValueMember = "Value"; cmb.DataSource = tmps; cmb.DropDownStyle = ComboBoxStyle.DropDownList; - cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).First().Text, cmb.Font).Width + SystemInformation.VerticalScrollBarWidth; + cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).FirstOrDefault()?.Text, cmb.Font).Width + SystemInformation.VerticalScrollBarWidth; cmb.Width = cmb.DropDownWidth; _DicSingleRO.Add(EP.name, cmb); @@ -148,7 +148,7 @@ namespace Volian.Controls.Library List tmps = EP.getROList(currAnn, false); lb.DisplayMember = "Text"; lb.ValueMember = "Value"; - lb.Width = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).First().Text, lb.Font).Width + SystemInformation.VerticalScrollBarWidth; + lb.Width = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).FirstOrDefault()?.Text, lb.Font).Width + SystemInformation.VerticalScrollBarWidth; lb.DataSource = tmps; _DicMultiRO.Add(EP.name, lb); -- 2.49.1 From 371d1177467bc8315c3d6eb1c45014f368e8c4e5 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Fri, 1 Aug 2025 14:44:48 -0400 Subject: [PATCH 35/44] C2025-047-cleanup --- .../DlgAnnotationsSelect.cs | 3 - .../VEPROMS User Interface/VEPROMS_UI.csproj | 9 -- .../dlgSaveAnnotationSelections.Designer.cs | 47 ------- .../dlgSaveAnnotationSelections.cs | 20 --- .../dlgSaveAnnotationSelections.resx | 120 ------------------ 5 files changed, 199 deletions(-) delete mode 100644 PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.Designer.cs delete mode 100644 PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.cs delete mode 100644 PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.resx diff --git a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs index e40b8520..c27bba37 100644 --- a/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs +++ b/PROMS/VEPROMS User Interface/DlgAnnotationsSelect.cs @@ -98,9 +98,6 @@ namespace VEPROMS private void btnUpdate_Click(object sender, EventArgs e) { saveChanges(); - //DataTable dt2 = coverToTable(); - //VEPROMS.CSLA.Library.AnnotationstypeSelections.Update(dt2, UserID); - //btnUpdate.Enabled = false; } public class AnnotataionItem { diff --git a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj index d9859e1a..34aae1a6 100644 --- a/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj +++ b/PROMS/VEPROMS User Interface/VEPROMS_UI.csproj @@ -229,12 +229,6 @@ DlgPrintProcedure.cs - - Form - - - dlgSaveAnnotationSelections.cs - Form @@ -374,9 +368,6 @@ DlgPrintProcedure.cs Designer - - dlgSaveAnnotationSelections.cs - dlgSetChangeBarStartDate.cs diff --git a/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.Designer.cs b/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.Designer.cs deleted file mode 100644 index a6438b26..00000000 --- a/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.Designer.cs +++ /dev/null @@ -1,47 +0,0 @@ - -namespace VEPROMS -{ - partial class dlgSaveAnnotationSelections - { - ///

- /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.SuspendLayout(); - // - // dlgSaveAnnotationSelections - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(634, 351); - this.Name = "dlgSaveAnnotationSelections"; - this.Text = "Save Annotation Selections"; - this.ResumeLayout(false); - - } - - #endregion - } -} \ No newline at end of file diff --git a/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.cs b/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.cs deleted file mode 100644 index 1714cf15..00000000 --- a/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace VEPROMS -{ - public partial class dlgSaveAnnotationSelections : Form - { - public dlgSaveAnnotationSelections() - { - InitializeComponent(); - } - } -} diff --git a/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.resx b/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.resx deleted file mode 100644 index 1af7de15..00000000 --- a/PROMS/VEPROMS User Interface/dlgSaveAnnotationSelections.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file -- 2.49.1 From e2a276085bd91e51d8c922183051298456d144c6 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Mon, 4 Aug 2025 10:30:20 -0400 Subject: [PATCH 36/44] =?UTF-8?q?C2025-039=20Per=20the=20customer=E2=80=99?= =?UTF-8?q?s=20request,=20adjusted=20the=20=E2=80=9C{Proc=20Num}=20(Proced?= =?UTF-8?q?ure=20Number=20Only)"=20transition=20type=20in=20the=20Beaver?= =?UTF-8?q?=20Valley=20formats=20so=20that=20a=20procedure=20that=20contai?= =?UTF-8?q?ns=20only=20Word=20sections=20can=20be=20referenced.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Formats/fmtall/BVPS1all.xml | Bin 132024 -> 132024 bytes PROMS/Formats/fmtall/BVPS2all.xml | Bin 98448 -> 98448 bytes PROMS/Formats/fmtall/BVPSAOPDEVall.xml | Bin 41498 -> 41498 bytes PROMS/Formats/fmtall/BVPSAOPall.xml | Bin 150204 -> 150204 bytes PROMS/Formats/fmtall/BVPSAtchall.xml | Bin 127018 -> 127018 bytes PROMS/Formats/fmtall/BVPSBCKall.xml | Bin 73400 -> 73400 bytes PROMS/Formats/fmtall/BVPSDEVall.xml | Bin 41498 -> 41498 bytes PROMS/Formats/fmtall/BVPSFlexDEVall.xml | Bin 39762 -> 39762 bytes PROMS/Formats/fmtall/BVPSNIBCKall.xml | Bin 71456 -> 71456 bytes PROMS/Formats/fmtall/BVPSSAMGBCKall.xml | Bin 70556 -> 70556 bytes PROMS/Formats/fmtall/BVPSSAMGDEVall.xml | Bin 41504 -> 41504 bytes PROMS/Formats/fmtall/BVPSSAMGall.xml | Bin 127746 -> 127746 bytes 12 files changed, 0 insertions(+), 0 deletions(-) diff --git a/PROMS/Formats/fmtall/BVPS1all.xml b/PROMS/Formats/fmtall/BVPS1all.xml index 1eaecf8f21da7ad1c6ef2fdb91487dbfd388c38a..5604d6cad77665e5ec996a2114ea0cb4f87424bf 100644 GIT binary patch delta 22 ecmdnd&atDNW5c3#ll4~XG@o0y{oFdnS0Mm^`3sl; delta 22 ecmdnd&atDNW5c3#ldERwG@o0y{oFdnS0Mm{&I{83 diff --git a/PROMS/Formats/fmtall/BVPS2all.xml b/PROMS/Formats/fmtall/BVPS2all.xml index 008ab87e18661e9ce6ee65079b38c49fd66a769a..f0d8b4cf299f7707b64d012a0a1b7bfd356059c6 100644 GIT binary patch delta 25 hcmbQx$Tp#oZ3EBR$qCDJChrOrn&ir|*>A1WWdMgW3a*s=TM6F) diff --git a/PROMS/Formats/fmtall/BVPSDEVall.xml b/PROMS/Formats/fmtall/BVPSDEVall.xml index 45236c45595471dcda53e3ab803e56393150172e..1c0d61cbdf55cd82f089920a9701a71eb5449e17 100644 GIT binary patch delta 18 acmbPrglX0hrVW05lYLrrHdpm65C#BIn+Qq( delta 18 acmbPrglX0hrVW05lhvwpHdpm65C#BHB?uY- diff --git a/PROMS/Formats/fmtall/BVPSFlexDEVall.xml b/PROMS/Formats/fmtall/BVPSFlexDEVall.xml index 6fd10bd4fbb60ad5765fe4f168d6d623606b9a64..7d2ac0ce4a81f4e77a3c714c65d5622af699a53f 100644 GIT binary patch delta 22 ecmcb#jp@=hrVVZFlMUK9CV!|?*}SQJfiM7puUX63<_Z9P=L(bn delta 22 ecmZpA#@_UdeM7+7$r>|tnrqf>uUX63<_Z9Nu?l1W -- 2.49.1 From 22de686a44dc2592c68933f5cafb875eeea75103 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 6 Aug 2025 11:25:44 -0400 Subject: [PATCH 37/44] B2025-036-SplitScreen-Print-Error --- PROMS/VEPROMS User Interface/frmVEPROMS.cs | 11 ++++++-- .../Volian.Controls.Library/StepTabRibbon.cs | 28 +++++++++++++++++-- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 6d7aafa8..8cd88ab2 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1483,9 +1483,11 @@ namespace VEPROMS // and if they are not the same, use the CurrentItem from the main frmVEPROMS. ProcedureInfo piThis = null; if (_CurrentItem != null) piThis = _CurrentItem.MyProcedure; - ProcedureInfo pi = args.Proc as ProcedureInfo; - if (piThis != null && pi.ItemID != piThis.ItemID) pi = piThis; + if (args.OringFlg == 1) // B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed. + { + if (piThis != null && pi.ItemID != piThis.ItemID) pi = piThis; + } // Check if Procedure Info is null if (pi == null) return; @@ -1527,8 +1529,11 @@ namespace VEPROMS if (_CurrentItem != null) piThis = _CurrentItem.MyProcedure; ProcedureInfo pi = args.Proc as ProcedureInfo; - if (piThis != null && pi.ItemID != piThis.ItemID) pi = piThis; + if (args.OringFlg == 1) // B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed. + { + if (piThis != null && pi.ItemID != piThis.ItemID) pi = piThis; + } // Check if Procedure Info is null if (pi == null) return; diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 77ed9197..6a81f477 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -618,6 +618,15 @@ namespace Volian.Controls.Library } private int _MyLastFormatID = -1; private StepRTB _MyStepRTB; + private static int _OringFlg; + public static int OringFlg + { + get { return _OringFlg; } + set + { + _OringFlg = value; + } + } public StepRTB MyStepRTB { get { return _MyStepRTB; } @@ -4143,16 +4152,22 @@ namespace Volian.Controls.Library private void btnPdfCreate_Click(object sender, EventArgs e) { + // B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed. + _OringFlg = 0; + DevComponents.DotNetBar.eEventSource oring = ((DevComponents.DotNetBar.Events.EventSourceArgs)e).Source; + if (oring == eEventSource.Keyboard) + _OringFlg = 1; + if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return; if (MyEditItem != null) MyEditItem.SaveCurrentAndContents(); - OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure), 0); + OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 0); } private void btnPdfQuickCreate_Click(object sender, EventArgs e) { if (MyItemInfo == null) return; // if creating a pdf before rtb exists, return; if (MyEditItem != null) MyEditItem.SaveCurrentAndContents(); - OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure), 1); + OnPrintRequest(new StepTabRibbonEventArgs(MyItemInfo.MyProcedure, _OringFlg), 1); } private void btnCASCreate_Click(object sender, EventArgs e) @@ -4814,9 +4829,10 @@ namespace Volian.Controls.Library public class StepTabRibbonEventArgs : EventArgs { public StepTabRibbonEventArgs() { ; } - public StepTabRibbonEventArgs(ItemInfo proc) + public StepTabRibbonEventArgs(ItemInfo proc, int oringFlg = 0) { _Proc = proc; + OringFlg = oringFlg; } private ItemInfo _Proc; @@ -4825,6 +4841,12 @@ namespace Volian.Controls.Library get { return _Proc; } set { _Proc = value; } } + private int _OringFlg; + public int OringFlg + { + get { return _OringFlg; } + set { _OringFlg = value; } + } } public delegate void StepTabRibbonEvent(object sender, StepTabRibbonEventArgs args); -- 2.49.1 From ad0d091b495539acb5cd8915cc588405efdfee84 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 6 Aug 2025 11:28:28 -0400 Subject: [PATCH 38/44] B2025-036-SplitScreen-Print-Error --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 6a81f477..6455fca1 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -4841,6 +4841,7 @@ namespace Volian.Controls.Library get { return _Proc; } set { _Proc = value; } } + // B2025-036 split screen print issue. if oringFlg == 1 the ctrl-p keys was pressed. private int _OringFlg; public int OringFlg { -- 2.49.1 From b5a9462e956507696cb9b0152f349036982c660c Mon Sep 17 00:00:00 2001 From: mschill Date: Wed, 6 Aug 2025 14:41:15 -0400 Subject: [PATCH 39/44] C2025-024 Electronic Procedures - Phase 2 (PROMS XML output) Fix Regular Expression RO Resolution for when multi ROs and multi-unit --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 5e56d913..df2e4acb 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -1999,6 +1999,7 @@ namespace VEPROMS if (_UnitIndex != 0 && docver != null) { + docver.DocVersionConfig.SelectedSlave = _UnitIndex; ciText = DisplayText.ResolveUnitSpecific(docver, ciText); if (ci.ContentRoUsageCount > 0) @@ -2012,16 +2013,18 @@ namespace VEPROMS string roid = ROFSTLookup.FormatRoidKey(RO.ROID, true); ROFSTLookup.rochild roc = lookup.GetRoChild(roid); //need to search / replace in content info - string lookFor = string.Format(@"()", RO.ROUsageID); + string lookFor = string.Format(@"(?<=(()", RO.ROUsageID); Match m = Regex.Match(ciText, lookFor, RegexOptions.Singleline); if (m != null && m.Groups.Count > 1) { - ciText = ciText.Replace($"{m.Groups[1].Value}{m.Groups[5].Value}{m.Groups[6].Value}", $"{m.Groups[1].Value}{roc.value}{m.Groups[6].Value}"); + ciText = ciText.Replace($"{m.Groups[1].Value}{m.Groups[6].Value}{m.Groups[7].Value}", $"{m.Groups[1].Value}{roc.value}{m.Groups[7].Value}"); } } } } + + docver.DocVersionConfig.SelectedSlave = 0; } -- 2.49.1 From 58cc75ef7161978171777bb83b93c3341f210181 Mon Sep 17 00:00:00 2001 From: mschill Date: Fri, 8 Aug 2025 09:44:51 -0400 Subject: [PATCH 40/44] C2025-024 Fix merge conflict --- PROMS/Volian.Controls.Library/vlnTreeView.cs | 332 +++++++++---------- 1 file changed, 166 insertions(+), 166 deletions(-) diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index b926f150..ce8fed14 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -22,11 +22,11 @@ namespace Volian.Controls.Library public delegate void vlnTreeViewEvent(object sender, vlnTreeEventArgs args); public delegate void vlnTreeViewTimeEvent(object sender, vlnTreeTimeEventArgs args); public delegate void vlnTreeViewStatusEvent(object sender, vlnTreeStatusEventArgs args); - public delegate ItemInfo vlnTreeViewClipboardStatusEvent(object sender, vlnTreeEventArgs args); - public delegate void vlnTreeViewItemInfoEvent(object sender, vlnTreeItemInfoEventArgs args); + public delegate ItemInfo vlnTreeViewClipboardStatusEvent(object sender, vlnTreeEventArgs args); + public delegate void vlnTreeViewItemInfoEvent(object sender, vlnTreeItemInfoEventArgs args); public delegate bool vlnTreeViewBoolEvent(object sender, vlnTreeEventArgs args); public delegate bool vlnTreeViewItemInfoDeleteEvent(object sender, vlnTreeItemInfoEventArgs args); - + public delegate bool vlnTreeViewItemInfoInsertEvent(object sender, vlnTreeItemInfoInsertEventArgs args); public delegate bool vlnTreeViewItemInfoDeleteFolderEvent(object sender, vlnTreeFolderDeleteEventArgs args); public delegate bool vlnTreeViewItemInfoPasteEvent(object sender, vlnTreeItemInfoPasteEventArgs args); @@ -217,7 +217,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) @@ -347,7 +347,7 @@ namespace Volian.Controls.Library _PasteType = pasteType; _Type = type; } - + #endregion } #endregion @@ -598,16 +598,16 @@ namespace Volian.Controls.Library { if (ProcedureCheckedOutTo != null) ProcedureCheckedOutTo(sender, args); } - - - - - - public event vlnTreeViewEvent ExportImportProcedureSets; - private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args) - { - if (ExportImportProcedureSets != null) ExportImportProcedureSets(sender, args); - } + + + + + + public event vlnTreeViewEvent ExportImportProcedureSets; + private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args) + { + if (ExportImportProcedureSets != null) ExportImportProcedureSets(sender, args); + } public event vlnTreeViewEvent PrintTransitionReport; private void OnPrintTransitionReport(object sender, vlnTreeEventArgs args) { @@ -659,7 +659,7 @@ namespace Volian.Controls.Library // This event was added to update the Step Properties/RO & Tools/Search RO & Reports // when an update of ro.fst is done & the ro trees on those panels needs refreshed. // (bug fix B2015-226) - public event StepPanelTabDisplayEvent TabDisplay; + public event StepPanelTabDisplayEvent TabDisplay; private void OnTabDisplay(object sender, StepPanelTabDisplayEventArgs args) { if (TabDisplay != null) TabDisplay(sender, args); @@ -736,7 +736,7 @@ namespace Volian.Controls.Library if (ui.IsAdministrator() || ui.IsSetAdministrator(fi))// && fi.MyParent == null) //VEPROMS level { if (fi.HasWorkingDraft) - { + { cm.MenuItems.Add("Export Procedure Set", new EventHandler(mi_Click)); //AddEPExport(cm.MenuItems, 0, null); } @@ -759,12 +759,12 @@ namespace Volian.Controls.Library } } // B2020-111 only allow Set Administrator to add new folders inside folders they admininstrate - if ((ui.IsAdministrator() || ui.IsSetAdministrator(fi.MyParent)) && fi.FolderDocVersionCount == 0) + if ((ui.IsAdministrator() || ui.IsSetAdministrator(fi.MyParent)) && fi.FolderDocVersionCount == 0) cm.MenuItems.Add("New Folder", new EventHandler(mi_Click)); - if (fi.ChildFolderCount == 0 && !fi.HasWorkingDraft) + if (fi.ChildFolderCount == 0 && !fi.HasWorkingDraft) cm.MenuItems.Add("Create Working Draft", new EventHandler(mi_Click)); } - if (fi.HasWorkingDraft) + if (fi.HasWorkingDraft) cm.MenuItems.Add("Print Transition Report", new EventHandler(mi_Click)); } else if (tn.VEObject as DocVersionInfo != null) // DocVersions can only contain procs @@ -773,14 +773,14 @@ namespace Volian.Controls.Library //_MyLog.WarnFormat("Context Menu 1c - {0}", GC.GetTotalMemory(true)); DocVersionInfo dvi = tn.VEObject as DocVersionInfo; if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi)) - { - cm.MenuItems.Add("Import Procedure", mi_Click); - } - if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi) || ui.IsWriter(dvi)) + { + cm.MenuItems.Add("Import Procedure", mi_Click); + } + if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi) || ui.IsWriter(dvi)) { OwnerInfoList.Reset(); oil = OwnerInfoList.GetByVersionID(dvi.VersionID); - if (dvi.ActiveFormat.PlantFormat.FormatData.SpecificInfo) + if (dvi.ActiveFormat.PlantFormat.FormatData.SpecificInfo) cm.MenuItems.Add("Procedure Set Specific Information", new EventHandler(mi_Click)); cm.MenuItems.Add("Refresh Checked Out Procedures", new EventHandler(mi_Click)); cm.MenuItems.Add("New Procedure", new EventHandler(mi_Click)); @@ -874,9 +874,9 @@ namespace Volian.Controls.Library oi = OwnerInfo.GetByItemID(pri.ItemID, CheckOutType.Procedure); if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion)) { - cm.MenuItems.Add("Export Procedure", mi_Click); - //C2025-024 Proms XML Output - if have any EP Format files, add dropdown menu for exporting EP formats - if (pri.ActiveFormat.PlantFormat.EPFormatFiles.Count > 0) + cm.MenuItems.Add("Export Procedure", mi_Click); + //C2025-024 Proms XML Output - if have any EP Format files, add dropdown menu for exporting EP formats + if (pri.ActiveFormat.PlantFormat.EPFormatFiles.Count > 0) AddEPExport(cm.MenuItems, pri.MyDocVersion.MultiUnitCount, pri.MyDocVersion.UnitNames, pri.ActiveFormat.PlantFormat.EPFormatFiles); } if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion) || ui.IsWriter(pri.MyDocVersion)) @@ -929,7 +929,7 @@ namespace Volian.Controls.Library } cm.MenuItems.Add(micas); cm.MenuItems.Add(mitcas); - cm.MenuItems.Add(mip); + cm.MenuItems.Add(mip); cm.MenuItems.Add(miqp); //cm.MenuItems.Add(mips); AddShowChangeBarsAfterMenuItem(cm.MenuItems, pri); @@ -1163,35 +1163,35 @@ namespace Volian.Controls.Library #region Menu_Delete if (ok) - - - - - + + + + + + { + // Add delete to the menu unless at the very 'top' node, on a grouping (partinfo) + // node (RNOs, Steps, Cautions, Notes) or Folder/DocVersion that contains any items. + PartInfo pi = tn.VEObject as PartInfo; + if (pi == null && tn.Parent != null) // it's not a part and it's not the top.... { - // Add delete to the menu unless at the very 'top' node, on a grouping (partinfo) - // node (RNOs, Steps, Cautions, Notes) or Folder/DocVersion that contains any items. - PartInfo pi = tn.VEObject as PartInfo; - if (pi == null && tn.Parent != null) // it's not a part and it's not the top.... + fi = tn.VEObject as FolderInfo; + if (fi == null || tn.Nodes.Count == 0) // it's not a folder or it has no children { - fi = tn.VEObject as FolderInfo; - if (fi == null || tn.Nodes.Count == 0) // it's not a folder or it has no children + DocVersionInfo di = tn.VEObject as DocVersionInfo; + if (di == null || tn.Nodes.Count == 0) // it's not a docversion or it has no children { - DocVersionInfo di = tn.VEObject as DocVersionInfo; - if (di == null || tn.Nodes.Count == 0) // it's not a docversion or it has no children - { - // if it's an enhanced step that was linked from a source, don't allow delete - bool canDoDel = true; - ItemInfo iienh = tn.VEObject as ItemInfo; - if (iienh != null && iienh.IsProcedure && iienh.IsEnhancedProcedure) canDoDel = false; - if (iienh != null && iienh.IsSection && iienh.IsEnhancedSection && !iienh.IsEnhancedSectionTitleOnly) canDoDel = false; - if (iienh != null && iienh.IsEnhancedStep) canDoDel = false; - if (canDoDel) cm.MenuItems.Add("Delete", new EventHandler(mi_Click)); - } + // if it's an enhanced step that was linked from a source, don't allow delete + bool canDoDel = true; + ItemInfo iienh = tn.VEObject as ItemInfo; + if (iienh != null && iienh.IsProcedure && iienh.IsEnhancedProcedure) canDoDel = false; + if (iienh != null && iienh.IsSection && iienh.IsEnhancedSection && !iienh.IsEnhancedSectionTitleOnly) canDoDel = false; + if (iienh != null && iienh.IsEnhancedStep) canDoDel = false; + if (canDoDel) cm.MenuItems.Add("Delete", new EventHandler(mi_Click)); } } } - + } + #endregion //_MyLog.WarnFormat("Context Menu 6 - {0}", GC.GetTotalMemory(true)); #region Menu_ExternalTransitions @@ -1255,8 +1255,8 @@ namespace Volian.Controls.Library // 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)); - 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) + 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))); PartInfo pia = tn.VEObject as PartInfo; ItemInfo ii = tn.VEObject as ItemInfo; @@ -1337,7 +1337,7 @@ namespace Volian.Controls.Library itm.Text == "Procedure Set Specific Information" || itm.Text == "Approve All Procedures for" || itm.Text == "Approve Some Procedures" || itm.Text == "Approve Some Procedures for") itm.Enabled = false; - + } } } @@ -1366,9 +1366,9 @@ 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.StartsWith("Showing Change Bars Starting") || itm.Text == "Create Continuous Action Summary" || itm.Text == "Create Time Critical Action Summary" || itm.Text == "Export Procedure") itm.Enabled = false; } @@ -1395,7 +1395,7 @@ namespace Volian.Controls.Library // if has an Electronic procedure // then loop through and add an Export for each EP Viewer private void AddEPExport(Menu.MenuItemCollection menuItems, int MultiUnitCount, string[] UnitNames, EPFormatFiles EPFiles) - { + { //add outer menu MenuItem mi = menuItems.Add("Electronic Procedure Viewer Export"); foreach (EPFormatFile epAnnType in EPFiles) @@ -1419,7 +1419,7 @@ namespace Volian.Controls.Library multiunit_mv.Click += new EventHandler(miEP_Click); } } - else + else { mv.Tag = $"{epAnnType.AnnotationTypeID},0"; mv.Click += new EventHandler(miEP_Click); @@ -1427,7 +1427,7 @@ namespace Volian.Controls.Library } } - private void AddApprovedRevisionsMultiUnit(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri) + private void AddApprovedRevisionsMultiUnit(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri) { _currentPri = pri; RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID); @@ -1478,11 +1478,11 @@ namespace Volian.Controls.Library ril = null; } } - public void AddNewNode(IVEDrillDownReadOnly o) - { - VETreeNode tn = new VETreeNode(o); - SelectedNode.Nodes.Add(tn); - } + public void AddNewNode(IVEDrillDownReadOnly o) + { + VETreeNode tn = new VETreeNode(o); + SelectedNode.Nodes.Add(tn); + } private void AddApprovedRevisions(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri) { try @@ -1491,7 +1491,7 @@ namespace Volian.Controls.Library _currentPri = pri; using (RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID)) { - //_MyLog.WarnFormat("Context Menu 1 After GET - {0}", GC.GetTotalMemory(true)); + //_MyLog.WarnFormat("Context Menu 1 After GET - {0}", GC.GetTotalMemory(true)); if (ril.Count == 0) return; // no versions to list MenuItem mi = menuItemCollection.Add("Versions"); int lastApprovedRevisionID = 0; @@ -1625,7 +1625,7 @@ namespace Volian.Controls.Library } 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) { @@ -1748,7 +1748,7 @@ namespace Volian.Controls.Library // 3) 'to' docversion is 'source' and 'from' procedure is within this docversion // 4) 'to' docVersion is 'enhanced' and 'from' procedure is not bool canPaste = false; - + DocVersionInfo dvi = tn.VEObject as DocVersionInfo; DocVersionConfig dvc = dvi.DocVersionConfig; bool docVersionIsEnhanced = dvc.MyEnhancedDocuments != null && dvc.MyEnhancedDocuments.Count > 0 && dvc.MyEnhancedDocuments[0].Type == 0; @@ -1769,7 +1769,7 @@ namespace Volian.Controls.Library if (iiClipboard.IsRtfRaw) canPaste = false; // never paste an equation. if (canPaste) cm.MenuItems.Add("Paste Procedure", new EventHandler(mi_Click)); } - #endregion + #endregion } else { @@ -1987,7 +1987,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)); @@ -2048,7 +2048,7 @@ namespace Volian.Controls.Library if (hasValidConnectingProc) { ItemInfo lprc = ItemInfo.Get(seleds[0].ItemID); - lprc.DoUnlinkEnhanced(lprc, 0, !hasValidConnectingProc); + lprc.DoUnlinkEnhanced(lprc, 0, !hasValidConnectingProc); } else selprc.DoUnlinkEnhanced(selprc, seleds[0].Type, !hasValidConnectingProc); @@ -2068,7 +2068,7 @@ namespace Volian.Controls.Library { ItemInfo lprc = ItemInfo.Get(ed.ItemID); bool hasValidConnectingProc = CheckForValidEnhLink(lprc); - // if there is a valid connection, unlink both. Otherwise, just unlink this selected procedure. + // if there is a valid connection, unlink both. Otherwise, just unlink this selected procedure. if (hasValidConnectingProc) lprc.DoUnlinkEnhanced(lprc, ed.Type, !hasValidConnectingProc); else @@ -2092,37 +2092,37 @@ namespace Volian.Controls.Library OnNodeSI(this, new vlnTreeEventArgs(tn, null, 0)); return; } - if (mi.Text.StartsWith("Collapse")) - { + if (mi.Text.StartsWith("Collapse")) + { CollapseProcedures(); - return; - } + return; + } if (mi.Text == "Print Transition Report") { OnPrintTransitionReport(this, new vlnTreeEventArgs(SelectedNode as VETreeNode)); return; } - - - - - - - - - - - if (mi.Text == "Export Procedure Set" || mi.Text == "Export Procedure") - { - OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); - return; - } - if (mi.Text == "Import Procedure Set" || mi.Text == "Import Procedure") - { - OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 1)); - return; - } - if (mi.Text.StartsWith("Procedure Checked Out to") || mi.Text.StartsWith("Document Checked Out to")) + + + + + + + + + + + if (mi.Text == "Export Procedure Set" || mi.Text == "Export Procedure") + { + OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); + return; + } + if (mi.Text == "Import Procedure Set" || mi.Text == "Import Procedure") + { + OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 1)); + return; + } + if (mi.Text.StartsWith("Procedure Checked Out to") || mi.Text.StartsWith("Document Checked Out to")) { OnProcedureCheckedOutTo(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); return; @@ -2148,7 +2148,7 @@ namespace Volian.Controls.Library break; case "New Folder": SelectedNode.Expand(); - tv_NodeNew(MenuSelections.Folder); + tv_NodeNew(MenuSelections.Folder); break; case "Create Working Draft": SelectedNode.Expand(); @@ -2192,7 +2192,7 @@ namespace Volian.Controls.Library tv_NodeCopy(); break; // lots of paste options: - case "Paste Procedure": + case "Paste Procedure": case "Paste Procedure Before": case "Paste Procedure After": case "Paste Section": @@ -2226,7 +2226,7 @@ namespace Volian.Controls.Library break; } - + case "Delete": if (tv_NodeDelete()) { @@ -2294,12 +2294,12 @@ namespace Volian.Controls.Library case "Create Continuous Action Summary": OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0)); break; - // F2022-024 Time Critical Action Summary + // F2022-024 Time Critical Action Summary case "Create Time Critical Action Summary": 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 + // 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 case "CANNOT PASTE HERE. Click for more information...": FlexibleMessageBox.Show("You have copied a document that is linked to an Enhanced Document.\n\n" + "It can only be pasted before or after another document, within the set, that is linked to an Enhanced Document.", "Cannot Paste Here"); @@ -2339,7 +2339,7 @@ namespace Volian.Controls.Library OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, annTypeid)); else OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0, "", unit, annTypeid)); - } + } private bool _doingCollapseNode = false; // B2016-058 when collapse is done, it always calls the drag node event which doesn't appear to be needed private void CollapseProcedures() { @@ -2358,7 +2358,7 @@ namespace Volian.Controls.Library foreach (VETreeNode tnc in tn.Nodes) CollapseProcedures(tnc); if (tn.VEObject as DocVersionInfo == null && tn.VEObject as FolderInfo == null) - tn.Collapse(); + tn.Collapse(); _doingCollapseNode = true; // B2016-058 this will prevent a Drag Node error when collapsing an RNOs, Cautions, or Notes tree node } private void tv_RemoveChgIds() @@ -2418,7 +2418,7 @@ namespace Volian.Controls.Library using (DocVersion dv = DocVersion.Get(MyDVI.VersionID)) { swROUpdate = new System.IO.StreamWriter(ROFstInfo.ROUpdateResultsPath(MyDVI)); // RO changes placed in file in the Documents\VEPROMS folder - // B2022-026 RO Memory Reduction code - first load the new ro.fst so that we can assign the ROTableUpdate event to the correct roFstInfo + // B2022-026 RO Memory Reduction code - first load the new ro.fst so that we can assign the ROTableUpdate event to the correct roFstInfo if (dv.ROfstLoadingFigures || dv.NewerRoFst) // B2017-125 see if loading figures was completed { // only load the RO.fst @@ -2559,7 +2559,7 @@ namespace Volian.Controls.Library return; } // C2017-003: ro data in sql server, check for sql connection string - if (MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString != "cstring") + if (MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString != "cstring") roloc = roloc + " \"" + MyDVI.DocVersionAssociations[0].MyROFst.MyRODb.DBConnectionString + "\""; // C2021-026 pass in Parent/Child information (list of the children) // B2022-019 look at all DocVersions to find ParentChild information @@ -2610,7 +2610,7 @@ namespace Volian.Controls.Library } } VETreeNode tn = SelectedNode as VETreeNode; - + DocVersionInfo dvi = tn.VEObject as DocVersionInfo; // Check for paste into a docversion - queries/code is different than paste related to an item (into a proc or section) if (dvi != null) @@ -2660,7 +2660,7 @@ namespace Volian.Controls.Library if (OnlyProc && repitem != null && tmp != null) { VETreeNode tn1 = new VETreeNode(repitem); - tmp.Nodes.Add(tn1); + tmp.Nodes.Add(tn1); SelectedNode = tn1; } } @@ -2669,7 +2669,7 @@ namespace Volian.Controls.Library //if (p.IndexOf("Replace") <= -1) - this.Cursor = Cursors.Default; + this.Cursor = Cursors.Default; } public void PasteAsDocVersionChild(VETreeNode tn, int copyStartID) @@ -2738,7 +2738,7 @@ namespace Volian.Controls.Library // the item to be pasted in the step editor and the tree. ItemInfo newItemInfo = null; // F2021-009 display a message if pasting step will results in more sub-step levels than are defined in the format - if (!ii.IsProcedure) + if (!ii.IsProcedure) ItemInfo.PasteStepIsWithinDefinedSubStepLevels(copyStartID, ii, false); if (ii.IsProcedure || !OnPasteItemInfo(this, new vlnTreeItemInfoPasteEventArgs(ii, copyStartID, pasteOpt, ii.MyContent.Type))) { @@ -2801,7 +2801,7 @@ namespace Volian.Controls.Library SelectedNode.Nodes.Add(tn1); // add tree node to end of list. SelectedNode = tn1; } - private void tv_NodeCopy() + private void tv_NodeCopy() { if (SelectedNode == null) return; VETreeNode tn = SelectedNode as VETreeNode; @@ -2839,7 +2839,7 @@ namespace Volian.Controls.Library { using (Folder folder = folderInfo.Get()) { - OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} Properties", folder.FolderConfig.Name), folder.FolderConfig)); + OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} Properties", folder.FolderConfig.Name), folder.FolderConfig)); } } private void OpenProperties(DocVersionInfo dvInfo) @@ -2853,7 +2853,7 @@ namespace Volian.Controls.Library { using (Procedure proc = procInfo.Get()) { - OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} {1} Properties", proc.ProcedureConfig.Number, proc.ProcedureConfig.Title), proc.ProcedureConfig)); + OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} {1} Properties", proc.ProcedureConfig.Number, proc.ProcedureConfig.Title), proc.ProcedureConfig)); } } private void OpenProperties(SectionInfo sectInfo) @@ -2866,7 +2866,7 @@ namespace Volian.Controls.Library title = string.Format("{0} {1} Properties", sectInfo.SectionConfig.Number, sectInfo.SectionConfig.Title); else title = string.Format("{0} Properties", sectInfo.SectionConfig.Title); - OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(title, sect.SectionConfig)); + OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(title, sect.SectionConfig)); } } private void OpenProperties(StepInfo stpinfo) @@ -3004,7 +3004,7 @@ namespace Volian.Controls.Library procedure.Save(); tn = new VETreeNode(_LastProcedureInfo); SelectedNode.Nodes.Add(tn); // add tree node to end of list. - // The following line will allow for a refresh of the procedure list on the Working Draft's treenodes docversion (B2016-034) + // The following line will allow for a refresh of the procedure list on the Working Draft's treenodes docversion (B2016-034) if (((SelectedNode as VETreeNode).VEObject as DocVersionInfo) != null) ((SelectedNode as VETreeNode).VEObject as DocVersionInfo).ResetProcedures(); if (procedure.MyProcedureInfo.CreateEnhanced) { @@ -3046,7 +3046,7 @@ namespace Volian.Controls.Library else p2 = procedure.ItemID; } - if (p2 != -1) + if (p2 != -1) DeleteItemInfoAndChildren(_LastProcedureInfo); // Delete Item and reset Previous and Next } #endregion @@ -3056,11 +3056,11 @@ namespace Volian.Controls.Library string message = string.Empty; if (_LastProcedureInfo != null) if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message)) - { - FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning); - OnUnPauseRefresh(this, null); - return; - } + { + FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning); + OnUnPauseRefresh(this, null); + return; + } int s1 = -1; if (!(_LastProcedureInfo == null) || !(_LastSectionInfo == null)) { @@ -3113,8 +3113,8 @@ namespace Volian.Controls.Library { tn = new VETreeNode(_LastSectionInfo); SelectedNode.Nodes.Add(tn); // add tree node to end of list. - // if the new section was flagged as either having an enhanced link for Title or Contents, create the - // Enhanced section: + // if the new section was flagged as either having an enhanced link for Title or Contents, create the + // Enhanced section: Section sectiontmp = Section.Get(section.ItemID); // need to do this because of 'caching' problem. if (sectiontmp.SectionConfig.LinkEnhanced == "T" || sectiontmp.SectionConfig.LinkEnhanced == "Y") CreateEnhancedForSection(newtype, sectiontmp, savLastSectionInfo, sectiontmp.DisplayNumber, sectiontmp.MyContent.Text); @@ -3142,7 +3142,7 @@ namespace Volian.Controls.Library if (s1 != -1) { DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next - // B2020-087 refresh the tree node after canceling the creation of the subsection + // B2020-087 refresh the tree node after canceling the creation of the subsection _LastTreeNode.ChildrenLoaded = false; _LastTreeNode.RefreshNode(); _LastTreeNode.Collapse(); @@ -3189,7 +3189,7 @@ namespace Volian.Controls.Library if (s2 != -1) { DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next - // B2020-087 refresh the tree node after canceling the creation of the subsection + // B2020-087 refresh the tree node after canceling the creation of the subsection _LastTreeNode.ChildrenLoaded = false; _LastTreeNode.RefreshNode(); _LastTreeNode.Collapse(); @@ -3386,7 +3386,7 @@ namespace Volian.Controls.Library cs.Save(); } } - + private Section CreateNewSection() { // B2020-087 the config for SubSection_Edit was sometimes set even when there wasn't any subsections, @@ -3426,7 +3426,7 @@ namespace Volian.Controls.Library // The parent step was not open in the step editor, just create new step(s) and add treenode. int newId = -1; // B2020-076: if this step has a template, insert template steps. - int topType = ii.GetSmartTemplateTopLevelIndxOfThisType(20002); + int topType = ii.GetSmartTemplateTopLevelIndxOfThisType(20002); if (topType != -1) { ItemInfo tmp = null; @@ -3646,7 +3646,7 @@ namespace Volian.Controls.Library { foreach (DVEnhancedDocument dve in dvc.MyEnhancedDocuments) { - if (dve.Type != 0) + if (dve.Type != 0) DocVersion.Delete(dve.VersionID); else { @@ -3692,7 +3692,7 @@ namespace Volian.Controls.Library if (ed.Type != 0) enhIds.Add(ed.ItemID); // always return false because an event gets fired to delete tree nodes. if (!DeleteItemInfoAndChildren(_LastProcedureInfo)) return false; - + _LastProcedureInfo = null; foreach (int enhId in enhIds) { @@ -3791,7 +3791,7 @@ namespace Volian.Controls.Library } return false; } - + public void RemoveFolder(int folderId) { TreeNode nodeToRemove = FindNodeById(folderId, this.Nodes); @@ -3865,7 +3865,7 @@ namespace Volian.Controls.Library // C2020-033: Support delete to bring up Search/Incoming Transitions panel if (ex.Message.Contains("has External Transitions")) { - ItemInfo iis = ItemInfo.Get(ii.ItemID); + ItemInfo iis = ItemInfo.Get(ii.ItemID); OnSearchIncTransIn(this, new vlnTreeItemInfoEventArgs(iis)); iis = ii.HandleSqlExceptionOnDelete(ex); } @@ -3963,7 +3963,7 @@ namespace Volian.Controls.Library ItemInfo iidrag = ((VETreeNode)dragNode).VEObject as ItemInfo; FolderInfo fdrag = ((VETreeNode)dragNode).VEObject as FolderInfo; DocVersionInfo ddrag = ((VETreeNode)dragNode).VEObject as DocVersionInfo; - if ((iidrag == null && fdrag == null && ddrag == null)) + if ((iidrag == null && fdrag == null && ddrag == null)) { FlexibleMessageBox.Show("Cannot drag/drop a grouping node."); return; @@ -4014,7 +4014,7 @@ namespace Volian.Controls.Library { get { return _lastScroll; } } - private string _location = string.Empty; + private string _location = string.Empty; #endregion #region Constructors public DropLocation(TreeView tv, System.Windows.Forms.DragEventArgs e, DateTime lastScroll) @@ -4131,7 +4131,7 @@ namespace Volian.Controls.Library { return; } - //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("Line at {0} Node {1}[{2}] {3}", _location, _dropNode.Text, _index, _position.ToString()); + //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("Line at {0} Node {1}[{2}] {3}", _location, _dropNode.Text, _index, _position.ToString()); // Changed the color of the drag indicator to always be red Color lc = (_position == DropPosition.After ? Color.Red : Color.Red); Brush lb = (_position == DropPosition.After ? Brushes.Red : Brushes.Red); @@ -4158,12 +4158,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); @@ -4176,8 +4176,8 @@ namespace Volian.Controls.Library if (_position != DropPosition.Child) InsertPointer(tmp, g); } } -// } -// else ScrollTreeView(tmp); + // } + // else ScrollTreeView(tmp); DragHelper.ImageList_DragShowNolock(true); } } @@ -4200,10 +4200,10 @@ namespace Volian.Controls.Library tn.NextVisibleNode.EnsureVisible();// Make sure that the next node is visible else if (tn.PrevVisibleNode != null && tn.PrevVisibleNode.PrevVisibleNode != null && tn.PrevVisibleNode.PrevVisibleNode.IsVisible == false) - tn.PrevVisibleNode.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible } - else + tn.PrevVisibleNode.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible } + else if (tn.PrevVisibleNode != null && tn.PrevVisibleNode.IsVisible == false) - tn.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible + tn.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible retval = (top != tn.Bounds.Top); // if (retval) if(_MyLog.IsInfoEnabled)_MyLog.Info("Scroll"); } @@ -4236,7 +4236,7 @@ namespace Volian.Controls.Library { DragDropEffects ee = e.Effect; if (e.KeyState == 13) // Shift and Control Keys to do a move. - ee = DragDropEffects.Move; + ee = DragDropEffects.Move; else ee = DragDropEffects.None; // Default - Do nothing if (IsChild(dragNode, dl.DropNode)) // Don't copy or move to a child node @@ -4432,28 +4432,28 @@ namespace Volian.Controls.Library 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) { -- 2.49.1 From 14bc1712469e7bfdbd751186c5266b8099f45b21 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 12 Aug 2025 08:09:38 -0400 Subject: [PATCH 41/44] B2025-038-Copy-a-step-between-two-screens --- PROMS/Volian.Controls.Library/StepTabRibbon.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/PROMS/Volian.Controls.Library/StepTabRibbon.cs b/PROMS/Volian.Controls.Library/StepTabRibbon.cs index 6455fca1..37b57301 100644 --- a/PROMS/Volian.Controls.Library/StepTabRibbon.cs +++ b/PROMS/Volian.Controls.Library/StepTabRibbon.cs @@ -4105,6 +4105,7 @@ namespace Volian.Controls.Library public void DoCopyStep() { + MyEditItem.SaveCurrentAndContents(); // B2025-038 copy step and text to another procedure in another screen. // highlight selected step(s) and prompt to see if selection is what user wants: if (MyFlexGrid != null) MyEditItem.IdentifyMe(true); MyEditItem.IdentifyChildren(true); -- 2.49.1 From 41e969f79ea5366d461f5c02cde5ac88433bf352 Mon Sep 17 00:00:00 2001 From: John Jenko Date: Tue, 12 Aug 2025 09:21:26 -0400 Subject: [PATCH 42/44] C2025-015 Added logic to make approved PDF names unique to allow procedures from different sets or different revs of the same procedure to be opened (viewed) at the same time. --- PROMS/Volian.Controls.Library/vlnTreeView.cs | 41 ++++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Controls.Library/vlnTreeView.cs b/PROMS/Volian.Controls.Library/vlnTreeView.cs index 8fc87d14..1cdda809 100644 --- a/PROMS/Volian.Controls.Library/vlnTreeView.cs +++ b/PROMS/Volian.Controls.Library/vlnTreeView.cs @@ -1606,6 +1606,27 @@ namespace Volian.Controls.Library FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information); } + //C2025-015 Get a partial folder path. This will be used in building the PDF file name when viewing Approved procedures + string ProcFolderPathforApprovedPDF(string fullPath) + { + string rtnStr = ""; + try + { + // the fullPath string that is passed in ends with the Working Draft node. We want to trim that off + string[] strParts = fullPath.Substring(0, fullPath.LastIndexOf("\\")).Split('\\'); //fullPath.Replace("\\Working Draft","").Split('\\'); + int lastPart = Math.Max(strParts.Length - 1, 0); + rtnStr = strParts[lastPart]; + if (rtnStr.ToUpper().StartsWith("UNIT")) + { + rtnStr = strParts[lastPart - 1] + "_" + rtnStr; + } + } + catch + { + rtnStr = fullPath.Replace("\\", "_"); // just return the full path with _ intead of backslashes + } + return rtnStr; + } void ApprovedRevision_Click(object sender, EventArgs e) { @@ -1619,7 +1640,10 @@ namespace Volian.Controls.Library 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" : ""); + ProcedureInfo prcInfo = ProcedureInfo.Get(ri.ItemID); + // C2025-015 build a file name that includes a partial folder path and approved revision number + string approvedPDFName = string.Format("{0}_{1} Revision {2}", ProcFolderPathforApprovedPDF(prcInfo.SearchDVPath_clean), prcInfo.PDFNumber,ri.RevisionNumber); + vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(approvedPDFName), ri.LatestVersion.PDF, superceded ? "Superceded" : ""); OnViewPDF(sender, args); // System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded)); } @@ -1628,6 +1652,7 @@ namespace Volian.Controls.Library bool superceded = false; MenuItem mi = sender as MenuItem; if (mi == null) return; + string childName = ""; //RevisionInfo ri = mi.Tag as RevisionInfo; RevisionInfo ri = RevisionInfo.Get(int.Parse(mi.Tag.ToString())); { @@ -1635,12 +1660,22 @@ namespace Volian.Controls.Library //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) superceded = true; + // C2025_015 get the child's name to append to file name + mip = mip.Parent as MenuItem; + if (mip != null) + { + childName = "_" + mip.Text; + } } 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), ri.LatestVersion.PDF, superceded ? "Superceded" : ""); + ProcedureInfo prcInfo = ProcedureInfo.Get(ri.ItemID); + if (prcInfo.MyContent.Number.ToUpper().Contains(" Date: Tue, 12 Aug 2025 16:16:59 -0400 Subject: [PATCH 43/44] =?UTF-8?q?C2025-049=20Added=20a=20check=20and=20fix?= =?UTF-8?q?=20for=20a=20different=20hyphen=20character=20that=20is=20in=20?= =?UTF-8?q?Vogtle=E2=80=99s=203=20&=204=20procedures,=20introduced=20by=20?= =?UTF-8?q?automatic=20importing=20and=20copy/paste=20from=20Word=20docume?= =?UTF-8?q?nts.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS User Interface/PROMSFixes.Sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PROMS/VEPROMS User Interface/PROMSFixes.Sql b/PROMS/VEPROMS User Interface/PROMSFixes.Sql index 2ea74f82..d8c470f5 100644 --- a/PROMS/VEPROMS User Interface/PROMSFixes.Sql +++ b/PROMS/VEPROMS User Interface/PROMSFixes.Sql @@ -13635,8 +13635,8 @@ WITH EXECUTE AS OWNER AS BEGIN TRY -- Try Block BEGIN TRANSACTION - Update Contents set Text = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Text,'\emdash','\u8209?'),'\endash','\u8209?'),'\u8213?','\u8209?'),'\u8212?','\u8209?'),'\u8211?','\u8209?'),'\u8210?','\u8209?'),'\u8208?','\u8209?') - where Text Like '%\u8208?%' or Text Like '%\u8210?%' or Text Like '%\u8211?%' or Text Like '%\u8212?%' or Text Like '%\u8213?%' or Text Like '%\endash%' or Text Like '%\emdash%' + Update Contents set Text = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Text,'\emdash','\u8209?'),'\endash','\u8209?'),'\u8213?','\u8209?'),'\u8212?','\u8209?'),'\u8211?','\u8209?'),'\u8210?','\u8209?'),'\u8208?','\u8209?'),NCHAR(8209),'\u8209?') + where Text Like '%\u8208?%' or Text Like '%\u8210?%' or Text Like '%\u8211?%' or Text Like '%\u8212?%' or Text Like '%\u8213?%' or Text Like '%\endash%' or Text Like '%\emdash%'or Text Like '%' + NCHAR(8209) + '%' IF( @@TRANCOUNT > 0 ) COMMIT IF( @@TRANCOUNT > 0 ) COMMIT END TRY BEGIN CATCH -- Catch Block @@ -24327,8 +24327,8 @@ BEGIN TRY -- Try Block DECLARE @RevDate varchar(255) DECLARE @RevDescription varchar(255) - set @RevDate = '07/31/2025 10:30 AM' - set @RevDescription = 'SQL Optimization' + set @RevDate = '08/12/2025 4:12 PM' + set @RevDescription = 'Updated Fix Hyphen Characters' Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription -- 2.49.1 From dba1f4e71c890883e014cd5b356c4a8522b9ad73 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Wed, 13 Aug 2025 09:11:52 -0400 Subject: [PATCH 44/44] C2025-048-Set-Quick-Print-overwrite-pdf-to-false --- PROMS/VEPROMS User Interface/DlgPrintProcedure.cs | 6 ++++++ PROMS/VEPROMS User Interface/frmVEPROMS.cs | 1 + 2 files changed, 7 insertions(+) diff --git a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs index 15031b4a..ee32e49b 100644 --- a/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs +++ b/PROMS/VEPROMS User Interface/DlgPrintProcedure.cs @@ -66,6 +66,12 @@ namespace VEPROMS set { _prtSectID = value; } } + private bool _OverwritePDF; + public bool OverwritePDF + { + get { return cbxOverwritePDF2.Checked; } + set { cbxOverwritePDF2.Checked = 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 diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 2a28917c..06d32cec 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1602,6 +1602,7 @@ namespace VEPROMS { using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi)) { + prnDlg.OverwritePDF = false; // turn off overwriting of PDFs. prnDlg.SelectedSlave = pi.ProcedureConfig.SelectedSlave == 0 ? -1 : pi.ProcedureConfig.SelectedSlave; //added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit prnDlg.MySessionInfo = MySessionInfo; prnDlg.SetupForProcedure(); // Setup filename -- 2.49.1