C2026-043-Tech-Debt_v1 - Stash 1

This commit is contained in:
2026-07-21 06:49:28 -04:00
parent 0fed1acfd8
commit 9486b37300
70 changed files with 4222 additions and 10191 deletions
@@ -1,16 +1,11 @@
using JR.Utils.GUI.Forms;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Xml;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using Volian.Pipe.Library;
namespace Volian.Controls.Library
@@ -64,14 +59,14 @@ namespace Volian.Controls.Library
AddAttribute(xe, "Text", myItemInfo.DisplayText);
_ProcList.DocumentElement.AppendChild(xe);
if (myItemInfo.Cautions != null) foreach (StepInfo caui in myItemInfo.Cautions) AddItem(myItemInfo.ItemID, caui);
if (myItemInfo.Notes != null) foreach (StepInfo noti in myItemInfo.Notes) AddItem(myItemInfo.ItemID, noti);
if (myItemInfo.RNOs != null) foreach (StepInfo rnoi in myItemInfo.RNOs) AddItem(myItemInfo.ItemID, rnoi);
if (myItemInfo.Sections != null) foreach (SectionInfo seci in myItemInfo.Sections) AddItem(myItemInfo.ItemID, seci);
if (myItemInfo.Cautions != null) foreach (StepInfo caui in myItemInfo.Cautions.OfType<StepInfo>()) AddItem(myItemInfo.ItemID, caui);
if (myItemInfo.Notes != null) foreach (StepInfo noti in myItemInfo.Notes.OfType<StepInfo>()) AddItem(myItemInfo.ItemID, noti);
if (myItemInfo.RNOs != null) foreach (StepInfo rnoi in myItemInfo.RNOs.OfType<StepInfo>()) AddItem(myItemInfo.ItemID, rnoi);
if (myItemInfo.Sections != null) foreach (SectionInfo seci in myItemInfo.Sections.OfType<SectionInfo>()) AddItem(myItemInfo.ItemID, seci);
if (myItemInfo.Steps != null)
{
if(myItemInfo.IsSection || (myItemInfo.IsHigh && SubStepHasRNOs(myItemInfo.Steps)))
foreach (StepInfo stpi in myItemInfo.Steps) AddItem(myItemInfo.ItemID, stpi);
foreach (StepInfo stpi in myItemInfo.Steps.OfType<StepInfo>()) AddItem(myItemInfo.ItemID, stpi);
}
}
}
@@ -102,7 +97,6 @@ namespace Volian.Controls.Library
{
_CurrentItem = value;
SetupCurrentItemValues();
SetupConfigEdit();
// B2017-126 Only turn-on NamedPipe if Command Line parameter /NamedPipe is used.
// This eliminates waiting for the Pipe if the command line parameter is not used.
if (ExeType > 0 && Volian.Base.Library.VlnSettings.GetCommandFlag("NamedPipe")) SendPromsAnnotationData();
@@ -130,10 +124,7 @@ namespace Volian.Controls.Library
if (ai.TypeID == ExeType) return ai;
return null;
}
private void SetupConfigEdit()
{
//if (ExeType == 0) ; // initialize ExeType
}
private string _ExePath;
private string _PipeOut;
private string _PipeIn;
@@ -256,9 +247,6 @@ namespace Volian.Controls.Library
public AnnotationDetails()
{
InitializeComponent();
//#if(DEBUG)
//Resize+=new EventHandler(AnnotationDetails_Resize); // Debug the resize event
//#endif
Resize += AnnotationDetails_Resize;
}
@@ -284,17 +272,12 @@ namespace Volian.Controls.Library
// CSM B2024-068 / B2024-069 - check if current annotation is not selected before removal of annotation
if (CurrentAnnotation != null)
{
//using (Annotation annotation = CurrentAnnotation.Get())
//{
// annotation.Delete();
_AnnotationSearch.LoadingList = true;
Annotation.DeleteAnnotation(CurrentAnnotation);
// annotation.Save();
_AnnotationSearch.LoadingList = false;
CurrentAnnotation = null;
UpdateAnnotationGrid();
_AnnotationSearch.UpdateAnnotationSearchResults(); // B2019-004: update search results list when an annotation is removed.
//}
}
else
{
@@ -425,14 +408,6 @@ namespace Volian.Controls.Library
}
}
private void CheckClientProcess()
{
if (ClientProcess.HasExited)
{
ClientProcess = null;
StartClientProcess();
}
}
void ClientProcess_Exited(object sender, EventArgs e)
{
ClientProcess = null;
@@ -477,7 +452,6 @@ namespace Volian.Controls.Library
{
XmlDocument xdConfig = new XmlDocument();
xdConfig.LoadXml(ai.Config);
ProcedureInfo currentProc = CurrentItem.MyProcedure;
XmlNode nd = xdMessage.DocumentElement.SelectSingleNode("//PromsAnnotationConfig");
nd.AppendChild(xdMessage.ImportNode(xdConfig.DocumentElement, true));
}
@@ -595,7 +569,7 @@ namespace Volian.Controls.Library
}
private XmlNode GetNode(XmlDocument xd, string nodeName)
{
return xd.DocumentElement.SelectSingleNode("//" + nodeName);
return xd.DocumentElement.SelectSingleNode($"//{nodeName}");
}
private string GetAttribute(XmlDocument xd, string nodeName, string attrName)
{
@@ -670,8 +644,8 @@ namespace Volian.Controls.Library
if (!_LoadingGrid && (dgAnnotations.FirstDisplayedScrollingRowIndex != -1))
dgAnnotations.FirstDisplayedScrollingRowIndex = row;
}
catch (Exception ex)
{
catch (Exception)
{
_MyLog.InfoFormat("Trying to open an annotation which has been removed");
}
}
@@ -692,8 +666,6 @@ namespace Volian.Controls.Library
using (Annotation annotation = Annotation.MakeAnnotation(myItem, annotationType, rtxbComment.Rtf, rtxbComment.Text, ""))
{
CurrentAnnotation = AnnotationInfo.Get(annotation.AnnotationID);
//annotation.DTS = DateTime.Now;
//annotation.Save();
}
}
}
@@ -724,7 +696,7 @@ namespace Volian.Controls.Library
private void btnEPAnnotation_Click(object sender, EventArgs e)
{
frmEPAnnotationDetails EPfrm = new frmEPAnnotationDetails(CurrentAnnotation);
DialogResult dr = EPfrm.ShowDialog(this);
}
_ = EPfrm.ShowDialog(this);
}
}
}