From 499cd0a1bf464035a6eaa5f4284eac8b6906f55f Mon Sep 17 00:00:00 2001 From: Rich Date: Thu, 9 Apr 2015 20:33:17 +0000 Subject: [PATCH] Added code to refresh transition search elements before doing long running query. Fixed incorrect search results when transition search tab selected with an open procedure Changed drop down elements from Windows Forms ComboBox to DevComponents ComboBox. --- .../DisplaySearch.Designer.cs | 21 ++++++++----------- .../Volian.Controls.Library/DisplaySearch.cs | 17 ++++++++++++++- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs b/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs index 930ba79c..51b2a2c1 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.Designer.cs @@ -52,13 +52,13 @@ namespace Volian.Controls.Library this.tabSearchTypes = new DevComponents.DotNetBar.TabControl(); this.tabControlPanel5 = new DevComponents.DotNetBar.TabControlPanel(); this.pnlTranCategory = new System.Windows.Forms.Panel(); - this.cbxTranCategory = new System.Windows.Forms.ComboBox(); + this.cbxTranCategory = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.lblTranCategory = new System.Windows.Forms.Label(); this.pnlTranFormat = new System.Windows.Forms.Panel(); - this.cbxTranFormat = new System.Windows.Forms.ComboBox(); + this.cbxTranFormat = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.lblTranFormat = new System.Windows.Forms.Label(); this.pnlTranVersion = new System.Windows.Forms.Panel(); - this.cbxTranVersion = new System.Windows.Forms.ComboBox(); + this.cbxTranVersion = new DevComponents.DotNetBar.Controls.ComboBoxEx(); this.lblTranVersion = new System.Windows.Forms.Label(); this.tabTranSearch = new DevComponents.DotNetBar.TabItem(this.components); this.tabControlPanel4 = new DevComponents.DotNetBar.TabControlPanel(); @@ -225,8 +225,7 @@ namespace Volian.Controls.Library // cbxTranCategory // this.cbxTranCategory.Dock = System.Windows.Forms.DockStyle.Fill; - this.cbxTranCategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbxTranCategory.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbxTranCategory.WatermarkText = "Select Cateogry of Transitions"; this.cbxTranCategory.Location = new System.Drawing.Point(83, 1); this.cbxTranCategory.Margin = new System.Windows.Forms.Padding(2); this.cbxTranCategory.Name = "cbxTranCategory"; @@ -260,8 +259,7 @@ namespace Volian.Controls.Library // cbxTranFormat // this.cbxTranFormat.Dock = System.Windows.Forms.DockStyle.Fill; - this.cbxTranFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbxTranFormat.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbxTranFormat.WatermarkText = "Select Style of Transitions"; this.cbxTranFormat.Location = new System.Drawing.Point(76, 1); this.cbxTranFormat.Margin = new System.Windows.Forms.Padding(2); this.cbxTranFormat.Name = "cbxTranFormat"; @@ -295,8 +293,7 @@ namespace Volian.Controls.Library // cbxTranVersion // this.cbxTranVersion.Dock = System.Windows.Forms.DockStyle.Fill; - this.cbxTranVersion.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbxTranVersion.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.cbxTranVersion.WatermarkText = "Select Format for Transitions"; this.cbxTranVersion.Location = new System.Drawing.Point(76, 1); this.cbxTranVersion.Margin = new System.Windows.Forms.Padding(2); this.cbxTranVersion.Name = "cbxTranVersion"; @@ -1544,13 +1541,13 @@ namespace Volian.Controls.Library //transition search controls private System.Windows.Forms.Panel pnlTranVersion; private System.Windows.Forms.Label lblTranVersion; - private System.Windows.Forms.ComboBox cbxTranVersion; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbxTranVersion; private System.Windows.Forms.Panel pnlTranFormat; private System.Windows.Forms.Label lblTranFormat; - private System.Windows.Forms.ComboBox cbxTranFormat; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbxTranFormat; private System.Windows.Forms.Panel pnlTranCategory; private System.Windows.Forms.Label lblTranCategory; - private System.Windows.Forms.ComboBox cbxTranCategory; + private DevComponents.DotNetBar.Controls.ComboBoxEx cbxTranCategory; //end transition search controls } } diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index e899b59c..e685a8e2 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -169,6 +169,7 @@ namespace Volian.Controls.Library this.Cursor = Cursors.WaitCursor; if (myFormatVersionList == null) { + this.Refresh(); myFormatVersionList = FormatVersionList.GetFormatVersions(); cbxTranVersion.DisplayMember = "Title"; int lastLastFormatID = 0; @@ -309,7 +310,21 @@ namespace Volian.Controls.Library uncheckNodes[0].Enabled = false; uncheckNodes.Remove(uncheckNodes[0]); } - lstCheckedDocVersions.Clear(); + if (lstCheckedDocVersions.Count > 0) + { + if (MessageBox.Show(this, "Do you want to expand to all relevant procedure sets for the selected format?", "Expand Procedure Sets", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + lstCheckedDocVersions.Clear(); + foreach (DevComponents.AdvTree.Node n in dicSelectedDocVersionNodes.Keys) + uncheckNodes.Add(n); + while (uncheckNodes.Count > 0) + { + uncheckNodes[0].Checked = false; + uncheckNodes.Remove(uncheckNodes[0]); + } + dicSelectedDocVersionNodes.Clear(); + } + } this.Cursor = Cursors.Default; }