diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index b6f02379..fa3a36c5 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -7279,9 +7279,33 @@ namespace VEPROMS.CSLA.Library _ByWordSuffix = byWordSuffix; } } + private string checkPercentChar(string SearchString) + { + string ss = ""; + string pattern = "%"; // Pattern to match the percentage sign + Match match = Regex.Match(SearchString, pattern); + if (match.Success) + { + int sl = SearchString.Length; + int precentIdx = SearchString.IndexOf('%'); + int startIndex = 0; + if (sl == precentIdx + 1) // % the last char. + { + ss = SearchString.Substring(startIndex, sl - 1); + var isNumeric = int.TryParse(ss, out int n); + if (isNumeric == true) // other that a % are the rest of the characters numbers. + { + ss = ' ' + SearchString; //add a space prefix; + } + } + } + return ss; + } + private void DataPortal_Fetch(ItemListSearchCriteria criteria) { this.RaiseListChangedEvents = false; + //criteria.SearchString = checkPercentChar(criteria.SearchString); try { using (SqlConnection cn = Database.VEPROMS_SqlConnection) diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs b/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs index 5c2552de..80bbc53a 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs @@ -94,15 +94,6 @@ namespace Volian.Controls.Library this.label2 = new System.Windows.Forms.Label(); this.cbxAnnoTypes = new DevComponents.DotNetBar.Controls.ComboBoxEx(); 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.btnCMIFindText = 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.btnOR = 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.elementStyle1 = new DevComponents.DotNetBar.ElementStyle(); this.node1 = new DevComponents.AdvTree.Node(); @@ -168,9 +168,9 @@ namespace Volian.Controls.Library this.tabControlPanel3.SuspendLayout(); this.gpSrchAnnoText.SuspendLayout(); this.panel4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).BeginInit(); this.tabControlPanel1.SuspendLayout(); this.groupBox1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).BeginInit(); this.grpPanSearchResults.SuspendLayout(); @@ -974,118 +974,6 @@ namespace Volian.Controls.Library this.tabAnnotationSearch.Text = "Annotations"; 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 // this.contextMenuBar1.DockSide = DevComponents.DotNetBar.eDockSide.Top; @@ -1248,6 +1136,119 @@ namespace Volian.Controls.Library this.btnNOT.Text = "NOT"; 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 // 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.CheckBoxesVisible = true; - this.lbSrchResultsIncTrans.CheckStateMember = null; this.lbSrchResultsIncTrans.ContainerControlProcessDialogKey = true; this.lbSrchResultsIncTrans.Dock = System.Windows.Forms.DockStyle.Fill; this.lbSrchResultsIncTrans.DragDropSupport = true; @@ -1733,11 +1733,6 @@ namespace Volian.Controls.Library this.Controls.Add(this.xpSetToSearch); this.Controls.Add(this.tabSearchTypes); 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.Name = "DisplaySearch"; this.RightToLeft = System.Windows.Forms.RightToLeft.Yes; @@ -1760,11 +1755,11 @@ namespace Volian.Controls.Library this.gpSrchAnnoText.ResumeLayout(false); this.panel4.ResumeLayout(false); this.panel4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).EndInit(); this.tabControlPanel1.ResumeLayout(false); this.tabControlPanel1.PerformLayout(); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).EndInit(); this.grpPanSearchResults.ResumeLayout(false);