From 8dbdfe55de95e458d5388e0e5bb784e34f6c6a84 Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 23 Aug 2021 14:28:34 +0000 Subject: [PATCH] =?UTF-8?q?C2021-028=20(RNO=20Only=20disable=20Word=20Sect?= =?UTF-8?q?ion=20under=20Step=20Element)=20&=20B2021-075=20(RNO=20Only=20n?= =?UTF-8?q?eeds=20=E2=80=98No=20matches=20found=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DisplaySearch.Designer.cs | 3 +++ PROMS/Volian.Controls.Library/DisplaySearch.cs | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs b/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs index 818ee5fe..380176b0 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs @@ -1684,6 +1684,7 @@ namespace Volian.Controls.Library null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(180, 100))); this.cbxRnoOnlyRO.TabIndex = 8; this.cbxRnoOnlyRO.Text = "RNO Only"; + this.cbxRnoOnly.Click += CbxRnoOnly_Click; // // cbxRnoOnlyTrans // @@ -1750,6 +1751,8 @@ namespace Volian.Controls.Library } + + #endregion private DevComponents.DotNetBar.TabControl tabSearchTypes; diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index 07de79dd..447b6de9 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -490,7 +490,8 @@ namespace Volian.Controls.Library //newnode.CheckBoxVisible = true; newnode = NewAdvTreeNode("WORD Sections", true, true); // C2020-010: Change Accessory Sections to Word Sections wordSectionTreeNode = newnode; - wordSectionTreeNode.Enabled = !(tabSearchTypes.SelectedTab == tabTranSearch); + // C2021-028: RNO Only search, disable Word section tree node + wordSectionTreeNode.Enabled = !(tabSearchTypes.SelectedTab == tabTranSearch || cbxRnoOnly.Checked); advTreeStepTypes.Nodes.Add(newnode); foreach (StepDataRetval sdr in lstSrchStpTypes) { @@ -1700,6 +1701,11 @@ namespace Volian.Controls.Library } } SearchResults = iil; + // B2021-075 - put up none found message for RNO only + if (SearchResults == null || SearchResults.Count == 0) + { + FlexibleMessageBox.Show("No Matches Found.", "Search"); + } } private void AddMessageForEmptyAnnotations() { @@ -2161,7 +2167,12 @@ namespace Volian.Controls.Library Clipboard.SetDataObject(myDO); } } - + private void CbxRnoOnly_Click(object sender, System.EventArgs e) + { + // C2021-028: RNO Only search, disable Word section tree node: + wordSectionTreeNode.Enabled = !(tabSearchTypes.SelectedTab == tabTranSearch || !cbxRnoOnly.Checked); + if (!wordSectionTreeNode.Enabled) wordSectionTreeNode.Checked = false; + } private void cmFndTxtPaste_Click(object sender, EventArgs e) { // Need to check which combo box activated the context menu so that we know where to take/put selected text