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
+26 -56
View File
@@ -1,8 +1,4 @@
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;
@@ -16,14 +12,9 @@ namespace Volian.Controls.Library
{
private bool doingfind = false;
private bool findingbookmarks = false;
private bool _FoundIt = false;
private ItemInfo _StartingItemInfo = null;// C2023-016 used to remember where we started doing the Find/Replace
public bool FoundIt
{
get { return _FoundIt; }
set { _FoundIt = value; }
}
private bool IsFound
private ItemInfo _StartingItemInfo = null;// C2023-016 used to remember where we started doing the Find/Replace
public bool FoundIt { get; set; } = false;
private bool IsFound
{
get
{
@@ -43,32 +34,17 @@ namespace Volian.Controls.Library
{
_MyEditItem = value;
if (_MyEditItem == null) return;
_MyDocVersion = _MyEditItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
Mydocversion = _MyEditItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
SetupContextMenu();
}
}
private DocVersionInfo _MyDocVersion;
public DocVersionInfo Mydocversion
{
get { return _MyDocVersion; }
set {_MyDocVersion = value; }
}
private DisplayBookMarks _myDisplayBookMarks;
public DisplayBookMarks MyDisplayBookMarks
{
get { return _myDisplayBookMarks; }
set { _myDisplayBookMarks = value; }
}
public DocVersionInfo Mydocversion { get; set; }
private bool _InApproved;
public DisplayBookMarks MyDisplayBookMarks { get; set; }
public bool InApproved
{
get { return _InApproved; }
set { _InApproved = value; }
}
public FindReplace()
public bool InApproved { get; set; }
public FindReplace()
{
InitializeComponent();
LoadFindReplaceTextListBox();
@@ -203,7 +179,7 @@ namespace Volian.Controls.Library
// C2023-016 Find the next element, but stay in the same procedure
private ItemInfo FindNextStepElement(ItemInfo curStepElem, string fndStr)
{
ItemInfo nxtStepElem = curStepElem;
ItemInfo nxtStepElem;
if (_StartingItemInfo == null)
_StartingItemInfo = MyEditItem.MyItemInfo;
if (cbxReverse.Checked)
@@ -267,11 +243,6 @@ namespace Volian.Controls.Library
}
FoundIt = true;
}
private bool FindNextText(ItemInfo next)
{
if (next.MyContent.MyGrid!=null) return true;
return next.MyContent.Text.ToUpper().Contains(cmboFindText.Text.ToUpper());
}
private void AddToComboLists()
{
bool hastext = this.cmboFindText.Text.Length > 0;
@@ -304,11 +275,6 @@ namespace Volian.Controls.Library
_StartingItemInfo = null;//C2023-016 reset the starting position
}
public void PerformFindNext()
{
btnFindNext.PerformClick();
}
private void tabFind_Click(object sender, EventArgs e)
{
lblRplTxt.Visible = false;
@@ -360,9 +326,11 @@ namespace Volian.Controls.Library
IDataObject myDO = Clipboard.GetDataObject();
if (myDO.GetDataPresent(DataFormats.Rtf))
{
RichTextBox rtb = new RichTextBox();
rtb.SelectedRtf = ItemInfo.StripLinks(myDO.GetData(DataFormats.Rtf).ToString());
if (cmboReplaceText.Focused)
RichTextBox rtb = new RichTextBox
{
SelectedRtf = ItemInfo.StripLinks(myDO.GetData(DataFormats.Rtf).ToString())
};
if (cmboReplaceText.Focused)
cmboReplaceText.SelectedText = rtb.Text;
else if (cmboFindText.Focused)
cmboFindText.SelectedText = rtb.Text;
@@ -394,9 +362,9 @@ namespace Volian.Controls.Library
private void SetupContextMenu()
{
galSymbols.SubItems.Clear();
if (_MyDocVersion != null)
if (Mydocversion != null)
{
FormatData fmtdata = _MyDocVersion.ActiveFormat.PlantFormat.FormatData;
FormatData fmtdata = Mydocversion.ActiveFormat.PlantFormat.FormatData;
SymbolList sl = fmtdata.SymbolList;
if (sl == null || sl.Count <= 0)
{
@@ -405,14 +373,16 @@ namespace Volian.Controls.Library
}
foreach (Symbol sym in sl)
{
DevComponents.DotNetBar.ButtonItem btnCM = new DevComponents.DotNetBar.ButtonItem();
btnCM.Text = string.Format("{0}", (char)sym.Unicode);
// to name button use unicode rather than desc, desc may have spaces or odd chars
btnCM.Name = "btnCM" + sym.Unicode.ToString();
btnCM.Tooltip = sym.Desc;
btnCM.Tag = string.Format(@"{0}", sym.Unicode);
btnCM.FontBold = true;
btnCM.Click += new System.EventHandler(btnSym_Click);
DevComponents.DotNetBar.ButtonItem btnCM = new DevComponents.DotNetBar.ButtonItem
{
Text = string.Format("{0}", (char)sym.Unicode),
// to name button use unicode rather than desc, desc may have spaces or odd chars
Name = "btnCM" + sym.Unicode.ToString(),
Tooltip = sym.Desc,
Tag = string.Format(@"{0}", sym.Unicode),
FontBold = true
};
btnCM.Click += new System.EventHandler(btnSym_Click);
galSymbols.SubItems.Add(btnCM);
}
}