Compare commits

..
Author SHA1 Message Date
plarsen 48a8448aa0 B2026-053-Global-Search-should-not-return-partial-matches 2026-07-27 10:51:56 -04:00
12 changed files with 251 additions and 250 deletions
+1 -1
View File
@@ -2148,7 +2148,7 @@ namespace VEPROMS
//C2019-036 View Only mode work with Checked Out Procedures //C2019-036 View Only mode work with Checked Out Procedures
// View Only Mode is no longer checked out, so no longer has an OwnerID // View Only Mode is no longer checked out, so no longer has an OwnerID
// This will keep those tabs from auto-closing based on the timer // This will keep those tabs from auto-closing based on the timer
if (!myList.Contains(dti.OwnerID) && dti?.MyStepTabPanel?.MyStepPanel?.VwMode != E_ViewMode.View) if (!myList.Contains(dti.OwnerID) && dti.MyStepTabPanel.MyStepPanel.VwMode != E_ViewMode.View)
{ {
MyCloseTabList.PushDTI(dti); MyCloseTabList.PushDTI(dti);
} }
@@ -1258,7 +1258,7 @@ namespace VEPROMS.CSLA.Library
int lastStart = sel == null ? 0 : sel.Start; int lastStart = sel == null ? 0 : sel.Start;
while (sel != null) while (sel != null)
{ {
if (!string.IsNullOrEmpty(sel.Text)) if (!string.IsNullOrEmpty(sel.Text))
{ {
@@ -1438,7 +1438,7 @@ namespace VEPROMS.CSLA.Library
lastStart = sel.Start; lastStart = sel.Start;
sel = FindRO(); sel = FindRO();
if (sel != null && !string.IsNullOrEmpty(sel.Text) && sel.Start == lastStart) if (sel != null && !string.IsNullOrEmpty(sel.Text) && sel.Start == lastStart)
{ {
@@ -2124,22 +2124,22 @@ namespace VEPROMS.CSLA.Library
bool executeResult = false; bool executeResult = false;
LBSelection sel = null; LBSelection sel = null;
while (!executeResult) while (!executeResult)
{ {
sel = MyApp.Selection; sel = MyApp.Selection;
LBFind find = sel.Find; LBFind find = sel.Find;
find.ClearFormatting(); find.ClearFormatting();
// Search string format - this is MSWord wildcard format // Search string format - this is MSWord wildcard format
// If you do a search in MSWord, make sure wildcard box is checked and then press the // If you do a search in MSWord, make sure wildcard box is checked and then press the
// Special button to see the definitions of the various wildcards // Special button to see the definitions of the various wildcards
// [<] - Less-Than Character // [<] - Less-Than Character
// [!<> -]@ - 1 or more characters not including Less-Than, Greater-Than, Dash or Space // [!<> -]@ - 1 or more characters not including Less-Than, Greater-Than, Dash or Space
// - Dash // - Dash
// [!<>]@ - 1 or more characters not including Less-Than, Greater-Than. // [!<>]@ - 1 or more characters not including Less-Than, Greater-Than.
// a space be included as part of the accessory page id (Callaway, EOP Addendum 37) // a space be included as part of the accessory page id (Callaway, EOP Addendum 37)
// [>] - Greater-Than Character // [>] - Greater-Than Character
find.Text = "[<][!<> -]@-[!<>]@[>]"; find.Text = "[<][!<> -]@-[!<>]@[>]";
find.Wrap = LBWdFindWrap.wdFindContinue; find.Wrap = LBWdFindWrap.wdFindContinue;
find.MatchCase = false; find.MatchCase = false;
find.MatchWholeWord = false; find.MatchWholeWord = false;
@@ -2159,18 +2159,14 @@ namespace VEPROMS.CSLA.Library
{ {
tryagain = false; tryagain = false;
executeResult = find.Execute(); executeResult = find.Execute();
// B2022-053 if the found text does not begin with a "<" and end with a ">", then // B2022-053 if the found text does not begin with a "<" and end with a ">", then
// move past that text and try the Word Find function again. // move past that text and try the Word Find function again.
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections // B2022-088: [JPR] Find Doc Ro button not working in Word Sections
// B2022-098: [JPR] ROs not being resolved in Word Sections // B2022-098: [JPR] ROs not being resolved in Word Sections
// B2026-070: When there is a less-then sign (<) followed by a numeric value in a Word attachment (inside of a table), PROMS thinks the user put in an RO token will generate an RO not found error in the following table row who's text contains <U-Name>.
if (executeResult && !string.IsNullOrEmpty(sel.Text) && !sel.Text.StartsWith("<") && !sel.Text.EndsWith(">")) if (executeResult && !string.IsNullOrEmpty(sel.Text) && !sel.Text.StartsWith("<") && !sel.Text.EndsWith(">"))
{ {
int location = sel.Start + sel.Text.Length - 1; //do not do this inline - this needs captured before WholeStory sel.MoveStart(LBWdUnits.wdCharacter, sel.Text.Length - 1);
tryagain = true;
sel.WholeStory();
sel.MoveStart(LBWdUnits.wdCharacter, location);
tryagain = true;
} }
} while (tryagain); } while (tryagain);
@@ -2195,7 +2191,7 @@ namespace VEPROMS.CSLA.Library
sel.MoveStart(LBWdUnits.wdCharacter, 1); sel.MoveStart(LBWdUnits.wdCharacter, 1);
executeResult = false; executeResult = false;
} }
} }
if (executeResult) return sel; if (executeResult) return sel;
@@ -7279,6 +7279,7 @@ namespace VEPROMS.CSLA.Library
_ByWordSuffix = byWordSuffix; _ByWordSuffix = byWordSuffix;
} }
} }
private void DataPortal_Fetch(ItemListSearchCriteria criteria) private void DataPortal_Fetch(ItemListSearchCriteria criteria)
{ {
this.RaiseListChangedEvents = false; this.RaiseListChangedEvents = false;
@@ -262,10 +262,8 @@ namespace VEPROMS.CSLA.Library
if (dvi.DocVersionAssociations[0].MyROFst.ROFstID != newfstid) if (dvi.DocVersionAssociations[0].MyROFst.ROFstID != newfstid)
{ {
dv.DocVersionAssociations[0].MyROFst = localROFst.GetJustROFst(); dv.DocVersionAssociations[0].MyROFst = localROFst.GetJustROFst();
SetAssociationLastCompleted(dv, DateTime.Now.ToString());
} }
// B2026-066 moved this out of if statement above
// - was not resetting the datetime and thus not disabling the Update RO Values button and menu item
SetAssociationLastCompleted(dv, DateTime.Now.ToString());
} }
} }
+1 -9
View File
@@ -613,15 +613,7 @@ namespace Volian.Controls.Library
_In_DSOTabPanel_Enter = false; _In_DSOTabPanel_Enter = false;
_MyDisplayTabControl.SelectedDisplayTabItem = MyDisplayTabItem; _MyDisplayTabControl.SelectedDisplayTabItem = MyDisplayTabItem;
// B2018-070 Position the text cursor - Activate MS Word Panel // B2018-070 Position the text cursor - Activate MS Word Panel
try _MyEdWord.GotoItem(EDWordLib.WdGoToItem.wdGoToObject, EDWordLib.WdGoToDirection.wdGoToNext, 0, null);
{
_MyEdWord.GotoItem(EDWordLib.WdGoToItem.wdGoToObject, EDWordLib.WdGoToDirection.wdGoToNext, 0, null);
}
catch
{
//B2026-067 - Do nothing if cannot Position cursor
}
} }
#endregion #endregion
#region Public Methods #region Public Methods
+4 -3
View File
@@ -643,9 +643,10 @@ namespace Volian.Controls.Library
if (_docVersionInfo != null && fstid != -1 && fstid != MyROFSTLookup.RofstID) if (_docVersionInfo != null && fstid != -1 && fstid != MyROFSTLookup.RofstID)
{ {
string message = string.Empty; string message = string.Empty;
if (_progressBar?.Text != "RO Check Paused - Other Users In Set" && !MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message)) if (_progressBar?.Text != "Cannot check-out Working Draft" && !MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message))
{ {
FinalProgressBarMessage = "RO Check Paused - Other Users In Set"; FlexibleMessageBox.Show(this, message, "Working Draft Has Items Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
FinalProgressBarMessage = "Cannot check-out Working Draft";
} }
else if (!MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message)) else if (!MySessionInfo.CanCheckOutItem(_docVersionInfo.VersionID, CheckOutType.DocVersion, ref message))
{ {
@@ -718,7 +719,7 @@ namespace Volian.Controls.Library
if (tmpROID != null) ExpandNode(ROFSTLookup.FormatRoidKey(tmpROID, true)); if (tmpROID != null) ExpandNode(ROFSTLookup.FormatRoidKey(tmpROID, true));
//doc version would have updated (if needed) so reset flag //doc version would have updated (if needed) so reset flag
if (_progressBar?.Text != "RO Check Paused - Other Users In Set") if (_progressBar?.Text != "Cannot check-out Working Draft")
{ {
changedDocVersion = false; changedDocVersion = false;
} }
+124 -129
View File
@@ -94,15 +94,6 @@ namespace Volian.Controls.Library
this.label2 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label();
this.cbxAnnoTypes = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.cbxAnnoTypes = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.tabAnnotationSearch = new DevComponents.DotNetBar.TabItem(this.components); this.tabAnnotationSearch = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel1 = new DevComponents.DotNetBar.TabControlPanel();
this.btnTranCvtSelToTxt = new System.Windows.Forms.Button();
this.lblIncTran = new System.Windows.Forms.Label();
this.btnTranCvtAllToTxt = new System.Windows.Forms.Button();
this.lblSrchIncTran = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.rbFromEditor = new System.Windows.Forms.RadioButton();
this.rbFromTree = new System.Windows.Forms.RadioButton();
this.tabIncTrans = new DevComponents.DotNetBar.TabItem(this.components);
this.contextMenuBar1 = new DevComponents.DotNetBar.ContextMenuBar(); this.contextMenuBar1 = new DevComponents.DotNetBar.ContextMenuBar();
this.btnCMIFindText = new DevComponents.DotNetBar.ButtonItem(); this.btnCMIFindText = new DevComponents.DotNetBar.ButtonItem();
this.btnCMEdit = new DevComponents.DotNetBar.ButtonItem(); this.btnCMEdit = new DevComponents.DotNetBar.ButtonItem();
@@ -121,6 +112,15 @@ namespace Volian.Controls.Library
this.btnAND = new DevComponents.DotNetBar.ButtonItem(); this.btnAND = new DevComponents.DotNetBar.ButtonItem();
this.btnOR = new DevComponents.DotNetBar.ButtonItem(); this.btnOR = new DevComponents.DotNetBar.ButtonItem();
this.btnNOT = new DevComponents.DotNetBar.ButtonItem(); this.btnNOT = new DevComponents.DotNetBar.ButtonItem();
this.tabIncTrans = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel1 = new DevComponents.DotNetBar.TabControlPanel();
this.btnTranCvtSelToTxt = new System.Windows.Forms.Button();
this.lblIncTran = new System.Windows.Forms.Label();
this.btnTranCvtAllToTxt = new System.Windows.Forms.Button();
this.lblSrchIncTran = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.rbFromEditor = new System.Windows.Forms.RadioButton();
this.rbFromTree = new System.Windows.Forms.RadioButton();
this.advTreeProcSets = new DevComponents.AdvTree.AdvTree(); this.advTreeProcSets = new DevComponents.AdvTree.AdvTree();
this.elementStyle1 = new DevComponents.DotNetBar.ElementStyle(); this.elementStyle1 = new DevComponents.DotNetBar.ElementStyle();
this.node1 = new DevComponents.AdvTree.Node(); this.node1 = new DevComponents.AdvTree.Node();
@@ -168,9 +168,9 @@ namespace Volian.Controls.Library
this.tabControlPanel3.SuspendLayout(); this.tabControlPanel3.SuspendLayout();
this.gpSrchAnnoText.SuspendLayout(); this.gpSrchAnnoText.SuspendLayout();
this.panel4.SuspendLayout(); this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).BeginInit();
this.tabControlPanel1.SuspendLayout(); this.tabControlPanel1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).BeginInit();
this.grpPanSearchResults.SuspendLayout(); this.grpPanSearchResults.SuspendLayout();
@@ -974,118 +974,6 @@ namespace Volian.Controls.Library
this.tabAnnotationSearch.Text = "Annotations"; this.tabAnnotationSearch.Text = "Annotations";
this.tabAnnotationSearch.Click += new System.EventHandler(this.tabAnnotationSearch_Click); this.tabAnnotationSearch.Click += new System.EventHandler(this.tabAnnotationSearch_Click);
// //
// tabControlPanel1
//
this.tabControlPanel1.Controls.Add(this.btnTranCvtSelToTxt);
this.tabControlPanel1.Controls.Add(this.lblIncTran);
this.tabControlPanel1.Controls.Add(this.btnTranCvtAllToTxt);
this.tabControlPanel1.Controls.Add(this.lblSrchIncTran);
this.tabControlPanel1.Controls.Add(this.groupBox1);
this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty;
this.tabControlPanel1.Location = new System.Drawing.Point(0, 34);
this.tabControlPanel1.Name = "tabControlPanel1";
this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel1.Size = new System.Drawing.Size(277, 113);
this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tabControlPanel1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
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 = 17;
this.tabControlPanel1.TabItem = this.tabIncTrans;
this.tabControlPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
this.tabControlPanel1.RightToLeft = System.Windows.Forms.RightToLeft.No;
//
// btnTranCvtSelToTxt
//
this.btnTranCvtSelToTxt.Enabled = false;
this.btnTranCvtSelToTxt.Location = new System.Drawing.Point(121, 63);
this.btnTranCvtSelToTxt.Name = "btnTranCvtSelToTxt";
this.btnTranCvtSelToTxt.Size = new System.Drawing.Size(145, 22);
this.superTooltip1.SetSuperTooltip(this.btnTranCvtSelToTxt, new DevComponents.DotNetBar.SuperTooltipInfo("Convert Selected Incoming Transitions To Text", "", "Converts selected transitions in the results list to text unless the user does no" +
"t have permission to change text.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(170, 90)));
this.btnTranCvtSelToTxt.TabIndex = 3;
this.btnTranCvtSelToTxt.Text = "Convert Selected To Text";
this.btnTranCvtSelToTxt.UseVisualStyleBackColor = true;
this.btnTranCvtSelToTxt.Click += new System.EventHandler(this.btnTranCvtSelToTxt_Click);
//
// lblIncTran
//
this.lblIncTran.AutoSize = true;
this.lblIncTran.Location = new System.Drawing.Point(4, 9);
this.lblIncTran.Name = "lblIncTran";
this.lblIncTran.Size = new System.Drawing.Size(23, 13);
this.lblIncTran.TabIndex = 2;
this.lblIncTran.Text = "To:";
//
// btnTranCvtAllToTxt
//
this.btnTranCvtAllToTxt.Enabled = false;
this.btnTranCvtAllToTxt.Location = new System.Drawing.Point(6, 63);
this.btnTranCvtAllToTxt.Name = "btnTranCvtAllToTxt";
this.btnTranCvtAllToTxt.Size = new System.Drawing.Size(109, 22);
this.superTooltip1.SetSuperTooltip(this.btnTranCvtAllToTxt, new DevComponents.DotNetBar.SuperTooltipInfo("Convert All Incoming Transitions To Text", "", "Converts all of the transitions in the results list to text unless the user does " +
"not have permission to change text.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(170, 90)));
this.btnTranCvtAllToTxt.TabIndex = 1;
this.btnTranCvtAllToTxt.Text = "Convert All To Text";
this.btnTranCvtAllToTxt.UseVisualStyleBackColor = true;
this.btnTranCvtAllToTxt.Click += new System.EventHandler(this.btnTranCvtAllToTxt_Click);
//
// lblSrchIncTran
//
this.lblSrchIncTran.BackColor = System.Drawing.Color.Transparent;
this.lblSrchIncTran.Location = new System.Drawing.Point(34, 9);
this.lblSrchIncTran.Name = "lblSrchIncTran";
this.lblSrchIncTran.Size = new System.Drawing.Size(239, 40);
this.superTooltip1.SetSuperTooltip(this.lblSrchIncTran, new DevComponents.DotNetBar.SuperTooltipInfo("Incoming Transitions", "", "This is the step, section, or procedure for which incoming transitions to it are " +
"shown in the list.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(170, 80)));
this.lblSrchIncTran.TabIndex = 1;
//
// groupBox1
//
this.groupBox1.BackColor = System.Drawing.Color.Transparent;
this.groupBox1.Controls.Add(this.rbFromEditor);
this.groupBox1.Controls.Add(this.rbFromTree);
this.groupBox1.Location = new System.Drawing.Point(147, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(130, 57);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Search Selection";
this.groupBox1.Visible = false;
//
// rbFromEditor
//
this.rbFromEditor.AutoSize = true;
this.rbFromEditor.Location = new System.Drawing.Point(22, 34);
this.rbFromEditor.Name = "rbFromEditor";
this.rbFromEditor.Size = new System.Drawing.Size(78, 17);
this.rbFromEditor.TabIndex = 1;
this.rbFromEditor.TabStop = true;
this.rbFromEditor.Text = "From Editor";
this.rbFromEditor.UseVisualStyleBackColor = true;
//
// rbFromTree
//
this.rbFromTree.AutoSize = true;
this.rbFromTree.Location = new System.Drawing.Point(22, 16);
this.rbFromTree.Name = "rbFromTree";
this.rbFromTree.Size = new System.Drawing.Size(73, 17);
this.rbFromTree.TabIndex = 0;
this.rbFromTree.TabStop = true;
this.rbFromTree.Text = "From Tree";
this.rbFromTree.UseVisualStyleBackColor = true;
//
// tabIncTrans
//
this.tabIncTrans.AttachedControl = this.tabControlPanel1;
this.tabIncTrans.Name = "tabIncTrans";
this.superTooltip1.SetSuperTooltip(this.tabIncTrans, new DevComponents.DotNetBar.SuperTooltipInfo("Search for Incoming Transitions", "", "Finds the Incoming Transitions that point to the current item and convert the tra" +
"nsition(s) to text if desired and if have permissions.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(170, 120)));
this.tabIncTrans.Text = "Incoming\nTransitions";
//
// contextMenuBar1 // contextMenuBar1
// //
this.contextMenuBar1.DockSide = DevComponents.DotNetBar.eDockSide.Top; this.contextMenuBar1.DockSide = DevComponents.DotNetBar.eDockSide.Top;
@@ -1248,6 +1136,119 @@ namespace Volian.Controls.Library
this.btnNOT.Text = "NOT"; this.btnNOT.Text = "NOT";
this.btnNOT.Click += new System.EventHandler(this.btnNOT_Click); this.btnNOT.Click += new System.EventHandler(this.btnNOT_Click);
// //
// tabIncTrans
//
this.tabIncTrans.AttachedControl = this.tabControlPanel1;
this.tabIncTrans.Name = "tabIncTrans";
this.superTooltip1.SetSuperTooltip(this.tabIncTrans, new DevComponents.DotNetBar.SuperTooltipInfo("Search for Incoming Transitions", "", "Finds the Incoming Transitions that point to the current item and convert the tra" +
"nsition(s) to text if desired and if have permissions.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(170, 120)));
this.tabIncTrans.Text = "Incoming\nTransitions";
//
// tabControlPanel1
//
this.tabControlPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControlPanel1.Controls.Add(this.btnTranCvtSelToTxt);
this.tabControlPanel1.Controls.Add(this.lblIncTran);
this.tabControlPanel1.Controls.Add(this.btnTranCvtAllToTxt);
this.tabControlPanel1.Controls.Add(this.lblSrchIncTran);
this.tabControlPanel1.Controls.Add(this.groupBox1);
this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty;
this.tabControlPanel1.Location = new System.Drawing.Point(0, 34);
this.tabControlPanel1.Name = "tabControlPanel1";
this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.tabControlPanel1.Size = new System.Drawing.Size(277, 113);
this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tabControlPanel1.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel1.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
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 = 17;
this.tabControlPanel1.TabItem = this.tabIncTrans;
//
// btnTranCvtSelToTxt
//
this.btnTranCvtSelToTxt.Enabled = false;
this.btnTranCvtSelToTxt.Location = new System.Drawing.Point(121, 63);
this.btnTranCvtSelToTxt.Name = "btnTranCvtSelToTxt";
this.btnTranCvtSelToTxt.Size = new System.Drawing.Size(145, 22);
this.superTooltip1.SetSuperTooltip(this.btnTranCvtSelToTxt, new DevComponents.DotNetBar.SuperTooltipInfo("Convert Selected Incoming Transitions To Text", "", "Converts selected transitions in the results list to text unless the user does no" +
"t have permission to change text.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(170, 90)));
this.btnTranCvtSelToTxt.TabIndex = 3;
this.btnTranCvtSelToTxt.Text = "Convert Selected To Text";
this.btnTranCvtSelToTxt.UseVisualStyleBackColor = true;
this.btnTranCvtSelToTxt.Click += new System.EventHandler(this.btnTranCvtSelToTxt_Click);
//
// lblIncTran
//
this.lblIncTran.AutoSize = true;
this.lblIncTran.Location = new System.Drawing.Point(4, 9);
this.lblIncTran.Name = "lblIncTran";
this.lblIncTran.Size = new System.Drawing.Size(23, 13);
this.lblIncTran.TabIndex = 2;
this.lblIncTran.Text = "To:";
//
// btnTranCvtAllToTxt
//
this.btnTranCvtAllToTxt.Enabled = false;
this.btnTranCvtAllToTxt.Location = new System.Drawing.Point(6, 63);
this.btnTranCvtAllToTxt.Name = "btnTranCvtAllToTxt";
this.btnTranCvtAllToTxt.Size = new System.Drawing.Size(109, 22);
this.superTooltip1.SetSuperTooltip(this.btnTranCvtAllToTxt, new DevComponents.DotNetBar.SuperTooltipInfo("Convert All Incoming Transitions To Text", "", "Converts all of the transitions in the results list to text unless the user does " +
"not have permission to change text.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(170, 90)));
this.btnTranCvtAllToTxt.TabIndex = 1;
this.btnTranCvtAllToTxt.Text = "Convert All To Text";
this.btnTranCvtAllToTxt.UseVisualStyleBackColor = true;
this.btnTranCvtAllToTxt.Click += new System.EventHandler(this.btnTranCvtAllToTxt_Click);
//
// lblSrchIncTran
//
this.lblSrchIncTran.BackColor = System.Drawing.Color.Transparent;
this.lblSrchIncTran.Location = new System.Drawing.Point(34, 9);
this.lblSrchIncTran.Name = "lblSrchIncTran";
this.lblSrchIncTran.Size = new System.Drawing.Size(239, 40);
this.superTooltip1.SetSuperTooltip(this.lblSrchIncTran, new DevComponents.DotNetBar.SuperTooltipInfo("Incoming Transitions", "", "This is the step, section, or procedure for which incoming transitions to it are " +
"shown in the list.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(170, 80)));
this.lblSrchIncTran.TabIndex = 1;
//
// groupBox1
//
this.groupBox1.BackColor = System.Drawing.Color.Transparent;
this.groupBox1.Controls.Add(this.rbFromEditor);
this.groupBox1.Controls.Add(this.rbFromTree);
this.groupBox1.Location = new System.Drawing.Point(147, 4);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(130, 57);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Search Selection";
this.groupBox1.Visible = false;
//
// rbFromEditor
//
this.rbFromEditor.AutoSize = true;
this.rbFromEditor.Location = new System.Drawing.Point(22, 34);
this.rbFromEditor.Name = "rbFromEditor";
this.rbFromEditor.Size = new System.Drawing.Size(78, 17);
this.rbFromEditor.TabIndex = 1;
this.rbFromEditor.TabStop = true;
this.rbFromEditor.Text = "From Editor";
this.rbFromEditor.UseVisualStyleBackColor = true;
//
// rbFromTree
//
this.rbFromTree.AutoSize = true;
this.rbFromTree.Location = new System.Drawing.Point(22, 16);
this.rbFromTree.Name = "rbFromTree";
this.rbFromTree.Size = new System.Drawing.Size(73, 17);
this.rbFromTree.TabIndex = 0;
this.rbFromTree.TabStop = true;
this.rbFromTree.Text = "From Tree";
this.rbFromTree.UseVisualStyleBackColor = true;
//
// advTreeProcSets // advTreeProcSets
// //
this.advTreeProcSets.AccessibleRole = System.Windows.Forms.AccessibleRole.Outline; this.advTreeProcSets.AccessibleRole = System.Windows.Forms.AccessibleRole.Outline;
@@ -1406,7 +1407,6 @@ namespace Volian.Controls.Library
// //
this.lbSrchResultsIncTrans.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square; this.lbSrchResultsIncTrans.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.lbSrchResultsIncTrans.CheckBoxesVisible = true; this.lbSrchResultsIncTrans.CheckBoxesVisible = true;
this.lbSrchResultsIncTrans.CheckStateMember = null;
this.lbSrchResultsIncTrans.ContainerControlProcessDialogKey = true; this.lbSrchResultsIncTrans.ContainerControlProcessDialogKey = true;
this.lbSrchResultsIncTrans.Dock = System.Windows.Forms.DockStyle.Fill; this.lbSrchResultsIncTrans.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbSrchResultsIncTrans.DragDropSupport = true; this.lbSrchResultsIncTrans.DragDropSupport = true;
@@ -1733,11 +1733,6 @@ namespace Volian.Controls.Library
this.Controls.Add(this.xpSetToSearch); this.Controls.Add(this.xpSetToSearch);
this.Controls.Add(this.tabSearchTypes); this.Controls.Add(this.tabSearchTypes);
this.Controls.Add(this.tabControlPanel1); this.Controls.Add(this.tabControlPanel1);
//B2025-056 Click on Incoming Transitions
// This needs to be part of overall control
// since if it is part of tabSearchTypes,
// then when that is disabled, buttons on
// this will be also
this.Margin = new System.Windows.Forms.Padding(2); this.Margin = new System.Windows.Forms.Padding(2);
this.Name = "DisplaySearch"; this.Name = "DisplaySearch";
this.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
@@ -1760,11 +1755,11 @@ namespace Volian.Controls.Library
this.gpSrchAnnoText.ResumeLayout(false); this.gpSrchAnnoText.ResumeLayout(false);
this.panel4.ResumeLayout(false); this.panel4.ResumeLayout(false);
this.panel4.PerformLayout(); this.panel4.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).EndInit();
this.tabControlPanel1.ResumeLayout(false); this.tabControlPanel1.ResumeLayout(false);
this.tabControlPanel1.PerformLayout(); this.tabControlPanel1.PerformLayout();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout(); this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).EndInit();
this.grpPanSearchResults.ResumeLayout(false); this.grpPanSearchResults.ResumeLayout(false);
+44 -49
View File
@@ -2016,16 +2016,35 @@ namespace Volian.Controls.Library
{ {
ReportTitle = string.Format("Search for '{0}'", TextSearchString); ReportTitle = string.Format("Search for '{0}'", TextSearchString);
// C2020-009: Search - Allow search 'By Word'.
string byWordPrefix = string.Empty; string byWordPrefix = string.Empty;
string byWordSuffix = string.Empty; string byWordSuffix = string.Empty;
if (cbxByWord.Checked) if (cbxByWord.Checked)
{ {
byWordPrefix = GetByWordSettings(TextSearchString, true); // Generate a prefix & suffix to be used in the sql query around the search string.
byWordSuffix = GetByWordSettings(TextSearchString, false); // If the search string starts (prefix)/ends(suffix) with a number, then use an expression that
// does not allow the preceding/following text to have a number, '.', letter or other rtf
// commands. If the search string starts/ends with a letter, then use an expression that does not
// find the preceding/following text that is text, i.e. a letter.
if (Regex.IsMatch(TextSearchString, @"^[\d\.]")) // starts with a number or '.' decimal pt
{
byWordPrefix = @"[^0-9a-zA-Z.vbpi:\\-]";
}
else if (Regex.IsMatch(TextSearchString, @"^[a-zA-Z]")) // starts with a letter
{
byWordPrefix = @"[^a-zA-Z]";
}
if (Regex.IsMatch(TextSearchString, @"[\d\.]$")) // ends with a number or decimal
{
byWordSuffix = @"[^0-9a-zA-Z.vbpi:\\-]";
}
else if (Regex.IsMatch(TextSearchString, @"[a-zA-Z]$")) // ends with a letter
{
byWordSuffix = @"[^a-zA-Z]";
}
} }
SearchString = TextSearchString;
SearchString = TextSearchString; // B2022-031 - added a cbxProcSectSrch to filter out procedure and section titles from global search results.
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, TextSearchString /*.Replace(@"\",@"\u9586?")*/, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxProcSectSrch.Checked ? 1 : 0, cbxIncROTextSrch.Checked ? ItemSearchIncludeLinks.Value : ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix, byWordPrefix, byWordSuffix); SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, TextSearchString /*.Replace(@"\",@"\u9586?")*/, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxProcSectSrch.Checked ? 1 : 0, cbxIncROTextSrch.Checked ? ItemSearchIncludeLinks.Value : ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix, byWordPrefix, byWordSuffix);
cmbResultsStyleIndex = 3; // display step text in results cmbResultsStyleIndex = 3; // display step text in results
@@ -2059,8 +2078,9 @@ namespace Volian.Controls.Library
if (cbxFndUnLnkROVals.Enabled && cbxFndUnLnkROVals.Checked) if (cbxFndUnLnkROVals.Enabled && cbxFndUnLnkROVals.Checked)
{ {
string ROSearchList2 = exactsearch(ROSearchList); // match exact string
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, ROSearchList, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxProcSectSrch.Checked ? 1 : 0, ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix, GetByWordSettings(ROSearchList, true), GetByWordSettings(ROSearchList, false)); // B2022-031 - added a cbxProcSectSrch to filter out procedure and section titles from global search results.
SearchResults = ItemInfoList.GetListFromTextSearch(DVISearchList, TypeSearchList, ROSearchList2, cbxBooleanTxtSrch.Checked ? 2 : cbxCaseSensitive.Checked ? 1 : 0, cbxProcSectSrch.Checked ? 1 : 0, ItemSearchIncludeLinks.Nothing, includeRTFformat, includeSpecialChars, unitPrefix, string.Empty, string.Empty);
cmbResultsStyleIndex = 3; // display step text in results cmbResultsStyleIndex = 3; // display step text in results
} }
else else
@@ -2170,52 +2190,27 @@ namespace Volian.Controls.Library
} }
OnSearchComplete(new DisplaySearchEventArgs(TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks))); OnSearchComplete(new DisplaySearchEventArgs(TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks)));
} }
private string GetByWordSettings(string ss, bool checkstart)
private string exactsearch(string SearchString) // B2026-053
{ {
//string ss = "";
// C2020-009: Search - Allow search 'By Word'. StringBuilder ss = new StringBuilder();
int sl = SearchString.Length;
// // Generate a prefix & suffix to be used in the sql query around the search string. int LstIdxSp = SearchString.LastIndexOf(' ');
// // If the search string starts (prefix)/ends(suffix) with a number, then use an expression that if (sl == LstIdxSp + 1) // B2026-053 if ' ' the last char.
// // does not allow the preceding/following text to have a number, '.', letter or other rtf
// // commands. If the search string starts/ends with a letter, then use an expression that does not
// // find the preceding/following text that is text, i.e. a letter.
if (ss.Length > 0)
{ {
//checking start ss.Append(' ');
if (checkstart) ss.Append(SearchString); // B2026-053 add a space prefix to make the search exact if the end of the searchString is a space.
{
// starts with a number or '.' decimal pt
if (char.IsNumber(ss, 0) || ss[0] == '.')
{
return @"[^0-9a-zA-Z.vbpi:\\-]";
}
// starts with a letter
else if (char.IsLetter(ss, 0))
{
return @"[^a-zA-Z]";
}
}
//checking end
else
{
// ends with a number or '.' decimal pt
if (char.IsNumber(ss, ss.Length - 1) || ss[ss.Length - 1] == '.')
{
return @"[^0-9a-zA-Z.vbpi:\\-]";
}
// ends with a letter
else if (char.IsLetter(ss, ss.Length - 1))
{
return @"[^a-zA-Z]";
}
}
} }
else
//default {
return string.Empty; ss.Append(' ');
ss.Append(SearchString); // B2026-053 Exact match add spaces before and after searchString.
ss.Append(' ');
}
return ss.ToString();
} }
private void ClearResults() // B2021-103 if no results when RNO only, clear results list. (moved from btnSearch_Click) private void ClearResults() // B2021-103 if no results when RNO only, clear results list. (moved from btnSearch_Click)
{ {
if (tabSearchTypes.SelectedTab != tabSearchTypes.Tabs[4]) if (tabSearchTypes.SelectedTab != tabSearchTypes.Tabs[4])
+6 -5
View File
@@ -3684,14 +3684,15 @@ namespace Volian.Controls.Library
{ {
ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MySection.MyDocVersion, null); ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MySection.MyDocVersion, null);
//B2022-083: Support Conditional RO Values string accpgid = accpageid;
//C2026-047 first try the RO Lookup with the ascii dash character in the accpageid. If not found, try again with the unicode dash
ROFSTLookup.rochild roc = myLookup.GetROChildByAccPageID(string.Format("<{0}.{1}>", accpageid.Replace(@"\u8209?", "-"), multiid), MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix); //B2022 - 083: Support Conditional RO Values
ROFSTLookup.rochild roc = myLookup.GetROChildByAccPageID(string.Format("<{0}.{1}>", accpgid, multiid), MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
if (roc.value == null) if (roc.value == null)
{ {
// try again but this time with the unicode dash accpgid = accpgid.Replace(@"\u8209?", "-");
roc = myLookup.GetROChildByAccPageID(string.Format("<{0}.{1}>", accpageid, multiid), MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix); roc = myLookup.GetROChildByAccPageID(string.Format("<{0}.{1}>", accpgid, multiid), MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
} }
if (!deflt.StartsWith("[") && !string.IsNullOrEmpty(roc.value) && roc.value.Trim().Length > 0) // don't return val if it's an empty or blank string - jsj 01-28-2019 if (!deflt.StartsWith("[") && !string.IsNullOrEmpty(roc.value) && roc.value.Trim().Length > 0) // don't return val if it's an empty or blank string - jsj 01-28-2019
+4
View File
@@ -1,4 +1,5 @@
using System; using System;
using System.Windows.Forms;
namespace Volian.Controls.Library namespace Volian.Controls.Library
{ {
@@ -78,6 +79,9 @@ namespace Volian.Controls.Library
// VlnFlexGrid // VlnFlexGrid
// //
this.Rows.DefaultSize = 19; this.Rows.DefaultSize = 19;
this.AllowDrop = true;
this.DragEnter += new DragEventHandler(Control_DragEnter);
this.DragDrop += new DragEventHandler(Control_DragDrop);
((System.ComponentModel.ISupportInitialize)(this)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
+38 -20
View File
@@ -1,22 +1,23 @@
using System;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Xml;
using System.IO;
using Volian.Controls.Library;
using VEPROMS.CSLA.Library;
using C1.Win.C1FlexGrid; using C1.Win.C1FlexGrid;
using C1.Win.C1SpellChecker; using C1.Win.C1SpellChecker;
using System.Text.RegularExpressions; using DevComponents.DotNetBar.Controls;
using System.Xml.Serialization;
using Volian.Base.Library;
using JR.Utils.GUI.Forms; using JR.Utils.GUI.Forms;
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
using Volian.Controls.Library;
namespace Volian.Controls.Library namespace Volian.Controls.Library
{ {
@@ -4438,11 +4439,28 @@ namespace Volian.Controls.Library
// } // }
//} //}
private void Control_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.Text))
{
e.Effect = DragDropEffects.Copy; // Allow copy
}
else
{
e.Effect = DragDropEffects.None; // Disallow
}
}
private void Control_DragDrop(object sender, DragEventArgs e)
{
string data = (string)e.Data.GetData(DataFormats.Text);
// Process the data (e.g., display it in a TextBox)
this.Text = data;
}
#region Uneven Selections #region Uneven Selections
/// <summary> /// <summary>
/// True if the top and bottom row of the selection is the same for every column /// True if the top and bottom row of the selection is the same for every column
/// </summary> /// </summary>
public bool EvenSelection public bool EvenSelection
{ {
get get
{ {
@@ -1660,13 +1660,13 @@ i = 0;
{ {
ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MySection.MyDocVersion, overrideChild); ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MySection.MyDocVersion, overrideChild);
//C2026-047 first try the RO Lookup with the ascii dash character in the accpageid. If not found, try again with the unicode dash string accpgid = accpageid;
ROFSTLookup.rochild roc = myLookup.GetROChildByAccPageID("<" + accpageid.Replace(@"\u8209?", "-") + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix); ROFSTLookup.rochild roc = myLookup.GetROChildByAccPageID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
if (roc.value == null) if (roc.value == null)
{ {
// try again but this time with the unicode dash accpgid = accpgid.Replace(@"\u8209?", "-");
roc = myLookup.GetROChildByAccPageID("<" + accpageid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix); roc = myLookup.GetROChildByAccPageID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
} }
if (!deflt.StartsWith("[") && !string.IsNullOrEmpty(roc.value) && roc.value.Trim().Length > 0) // don't return val if it's an empty or blank string - jsj 01-28-2019 if (!deflt.StartsWith("[") && !string.IsNullOrEmpty(roc.value) && roc.value.Trim().Length > 0) // don't return val if it's an empty or blank string - jsj 01-28-2019