fixed bug where results would not position to found RO

This commit is contained in:
John Jenko 2009-09-01 13:05:51 +00:00
parent 9d2d8a25c4
commit 1e68d76923
2 changed files with 113 additions and 108 deletions

View File

@ -42,6 +42,11 @@ namespace Volian.Controls.Library
this.rbtnSrchTxt = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cbxSrchTypeUsage = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.tabStepTypeSearch = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel();
this.gpFindROs = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbxFndUnLnkROVals = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cmboTreeROs = new DevComponents.DotNetBar.Controls.ComboTree();
this.tabROSearch = new DevComponents.DotNetBar.TabItem(this.components);
this.tabControlPanel3 = new DevComponents.DotNetBar.TabControlPanel();
this.gpSrchAnnoText = new DevComponents.DotNetBar.Controls.GroupPanel();
this.panel4 = new System.Windows.Forms.Panel();
@ -51,11 +56,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.tabControlPanel2 = new DevComponents.DotNetBar.TabControlPanel();
this.gpFindROs = new DevComponents.DotNetBar.Controls.GroupPanel();
this.cbxFndUnLnkROVals = new DevComponents.DotNetBar.Controls.CheckBoxX();
this.cmboTreeROs = new DevComponents.DotNetBar.Controls.ComboTree();
this.tabROSearch = new DevComponents.DotNetBar.TabItem(this.components);
this.contextMenuBar1 = new DevComponents.DotNetBar.ContextMenuBar();
this.btnCMIFindText = new DevComponents.DotNetBar.ButtonItem();
this.btnCMEdit = new DevComponents.DotNetBar.ButtonItem();
@ -104,11 +104,11 @@ namespace Volian.Controls.Library
this.gpSrchText.SuspendLayout();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
this.tabControlPanel2.SuspendLayout();
this.gpFindROs.SuspendLayout();
this.tabControlPanel3.SuspendLayout();
this.gpSrchAnnoText.SuspendLayout();
this.panel4.SuspendLayout();
this.tabControlPanel2.SuspendLayout();
this.gpFindROs.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).BeginInit();
@ -124,8 +124,8 @@ namespace Volian.Controls.Library
this.tabSearchTypes.CloseButtonOnTabsAlwaysDisplayed = false;
this.tabSearchTypes.CloseButtonPosition = DevComponents.DotNetBar.eTabCloseButtonPosition.Right;
this.tabSearchTypes.Controls.Add(this.tabControlPanel4);
this.tabSearchTypes.Controls.Add(this.tabControlPanel3);
this.tabSearchTypes.Controls.Add(this.tabControlPanel2);
this.tabSearchTypes.Controls.Add(this.tabControlPanel3);
this.tabSearchTypes.Controls.Add(this.contextMenuBar1);
this.tabSearchTypes.Dock = System.Windows.Forms.DockStyle.Top;
this.tabSearchTypes.Location = new System.Drawing.Point(0, 0);
@ -336,6 +336,99 @@ namespace Volian.Controls.Library
this.tabStepTypeSearch.Text = "Text";
this.tabStepTypeSearch.Click += new System.EventHandler(this.tabStepTypeSearch_Click);
//
// tabControlPanel2
//
this.tabControlPanel2.Controls.Add(this.gpFindROs);
this.tabControlPanel2.Controls.Add(this.cmboTreeROs);
this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel2.Location = new System.Drawing.Point(0, 24);
this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tabControlPanel2.Name = "tabControlPanel2";
this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel2.Size = new System.Drawing.Size(385, 114);
this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tabControlPanel2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel2.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tabControlPanel2.Style.GradientAngle = 90;
this.tabControlPanel2.TabIndex = 2;
this.tabControlPanel2.TabItem = this.tabROSearch;
//
// gpFindROs
//
this.gpFindROs.CanvasColor = System.Drawing.SystemColors.Control;
this.gpFindROs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.gpFindROs.Controls.Add(this.cbxFndUnLnkROVals);
this.gpFindROs.Dock = System.Windows.Forms.DockStyle.Fill;
this.gpFindROs.Location = new System.Drawing.Point(1, 24);
this.gpFindROs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.gpFindROs.Name = "gpFindROs";
this.gpFindROs.Size = new System.Drawing.Size(383, 89);
//
//
//
this.gpFindROs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.gpFindROs.Style.BackColorGradientAngle = 90;
this.gpFindROs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.gpFindROs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderBottomWidth = 1;
this.gpFindROs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.gpFindROs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderLeftWidth = 1;
this.gpFindROs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderRightWidth = 1;
this.gpFindROs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderTopWidth = 1;
this.gpFindROs.Style.CornerDiameter = 4;
this.gpFindROs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.gpFindROs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.gpFindROs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.gpFindROs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
this.gpFindROs.TabIndex = 3;
this.gpFindROs.EnabledChanged += new System.EventHandler(this.gpFindROs_EnabledChanged);
//
// cbxFndUnLnkROVals
//
this.cbxFndUnLnkROVals.BackColor = System.Drawing.Color.Transparent;
this.cbxFndUnLnkROVals.Enabled = false;
this.cbxFndUnLnkROVals.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbxFndUnLnkROVals.Location = new System.Drawing.Point(0, 4);
this.cbxFndUnLnkROVals.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbxFndUnLnkROVals.Name = "cbxFndUnLnkROVals";
this.cbxFndUnLnkROVals.Size = new System.Drawing.Size(188, 23);
this.cbxFndUnLnkROVals.TabIndex = 2;
this.cbxFndUnLnkROVals.Text = "Find Unlinked Values";
//
// cmboTreeROs
//
this.cmboTreeROs.BackColor = System.Drawing.SystemColors.Window;
//
//
//
this.cmboTreeROs.BackgroundStyle.Class = "TextBoxBorder";
this.cmboTreeROs.ButtonDropDown.Visible = true;
this.cmboTreeROs.Dock = System.Windows.Forms.DockStyle.Top;
this.cmboTreeROs.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmboTreeROs.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
this.cmboTreeROs.Location = new System.Drawing.Point(1, 1);
this.cmboTreeROs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cmboTreeROs.Name = "cmboTreeROs";
this.cmboTreeROs.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.cmboTreeROs.Size = new System.Drawing.Size(383, 23);
this.superTooltip1.SetSuperTooltip(this.cmboTreeROs, new DevComponents.DotNetBar.SuperTooltipInfo("Select the RO to Search", "", "Select the Referenced Object to search for.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cmboTreeROs.TabIndex = 1;
this.cmboTreeROs.ThemeAware = true;
this.cmboTreeROs.WatermarkText = "Select an RO to seach";
this.cmboTreeROs.SelectedIndexChanged += new System.EventHandler(this.cmboTreeROs_SelectedIndexChanged);
//
// tabROSearch
//
this.tabROSearch.AttachedControl = this.tabControlPanel2;
this.tabROSearch.Name = "tabROSearch";
this.tabROSearch.Text = "Referenced Objects";
//
// tabControlPanel3
//
this.tabControlPanel3.Controls.Add(this.gpSrchAnnoText);
@ -490,99 +583,6 @@ namespace Volian.Controls.Library
this.tabAnnotationSearch.Text = "Annotations";
this.tabAnnotationSearch.Click += new System.EventHandler(this.tabAnnotationSearch_Click);
//
// tabControlPanel2
//
this.tabControlPanel2.Controls.Add(this.gpFindROs);
this.tabControlPanel2.Controls.Add(this.cmboTreeROs);
this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControlPanel2.Location = new System.Drawing.Point(0, 24);
this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.tabControlPanel2.Name = "tabControlPanel2";
this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1);
this.tabControlPanel2.Size = new System.Drawing.Size(385, 114);
this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(253)))), ((int)(((byte)(253)))), ((int)(((byte)(254)))));
this.tabControlPanel2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(188)))), ((int)(((byte)(227)))));
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.tabControlPanel2.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(146)))), ((int)(((byte)(165)))), ((int)(((byte)(199)))));
this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
| DevComponents.DotNetBar.eBorderSide.Bottom)));
this.tabControlPanel2.Style.GradientAngle = 90;
this.tabControlPanel2.TabIndex = 2;
this.tabControlPanel2.TabItem = this.tabROSearch;
//
// gpFindROs
//
this.gpFindROs.CanvasColor = System.Drawing.SystemColors.Control;
this.gpFindROs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
this.gpFindROs.Controls.Add(this.cbxFndUnLnkROVals);
this.gpFindROs.Dock = System.Windows.Forms.DockStyle.Fill;
this.gpFindROs.Location = new System.Drawing.Point(1, 24);
this.gpFindROs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.gpFindROs.Name = "gpFindROs";
this.gpFindROs.Size = new System.Drawing.Size(383, 89);
//
//
//
this.gpFindROs.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.gpFindROs.Style.BackColorGradientAngle = 90;
this.gpFindROs.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.gpFindROs.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderBottomWidth = 1;
this.gpFindROs.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.gpFindROs.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderLeftWidth = 1;
this.gpFindROs.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderRightWidth = 1;
this.gpFindROs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.gpFindROs.Style.BorderTopWidth = 1;
this.gpFindROs.Style.CornerDiameter = 4;
this.gpFindROs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.gpFindROs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.gpFindROs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.gpFindROs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
this.gpFindROs.TabIndex = 3;
this.gpFindROs.EnabledChanged += new System.EventHandler(this.gpFindROs_EnabledChanged);
//
// cbxFndUnLnkROVals
//
this.cbxFndUnLnkROVals.BackColor = System.Drawing.Color.Transparent;
this.cbxFndUnLnkROVals.Enabled = false;
this.cbxFndUnLnkROVals.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cbxFndUnLnkROVals.Location = new System.Drawing.Point(0, 4);
this.cbxFndUnLnkROVals.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cbxFndUnLnkROVals.Name = "cbxFndUnLnkROVals";
this.cbxFndUnLnkROVals.Size = new System.Drawing.Size(188, 23);
this.cbxFndUnLnkROVals.TabIndex = 2;
this.cbxFndUnLnkROVals.Text = "Find Unlinked Values";
//
// cmboTreeROs
//
this.cmboTreeROs.BackColor = System.Drawing.SystemColors.Window;
//
//
//
this.cmboTreeROs.BackgroundStyle.Class = "TextBoxBorder";
this.cmboTreeROs.ButtonDropDown.Visible = true;
this.cmboTreeROs.Dock = System.Windows.Forms.DockStyle.Top;
this.cmboTreeROs.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmboTreeROs.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
this.cmboTreeROs.Location = new System.Drawing.Point(1, 1);
this.cmboTreeROs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.cmboTreeROs.Name = "cmboTreeROs";
this.cmboTreeROs.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.cmboTreeROs.Size = new System.Drawing.Size(383, 23);
this.superTooltip1.SetSuperTooltip(this.cmboTreeROs, new DevComponents.DotNetBar.SuperTooltipInfo("Select the RO to Search", "", "Select the Referenced Object to search for.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.cmboTreeROs.TabIndex = 1;
this.cmboTreeROs.ThemeAware = true;
this.cmboTreeROs.WatermarkText = "Select an RO to seach";
this.cmboTreeROs.SelectedIndexChanged += new System.EventHandler(this.cmboTreeROs_SelectedIndexChanged);
//
// tabROSearch
//
this.tabROSearch.AttachedControl = this.tabControlPanel2;
this.tabROSearch.Name = "tabROSearch";
this.tabROSearch.Text = "Referenced Objects";
//
// contextMenuBar1
//
this.contextMenuBar1.DockSide = DevComponents.DotNetBar.eDockSide.Top;
@ -1076,13 +1076,13 @@ namespace Volian.Controls.Library
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel3.ResumeLayout(false);
this.tabControlPanel2.ResumeLayout(false);
this.gpFindROs.ResumeLayout(false);
this.tabControlPanel3.ResumeLayout(false);
this.tabControlPanel3.PerformLayout();
this.gpSrchAnnoText.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.tabControlPanel2.ResumeLayout(false);
this.gpFindROs.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeProcSets)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.advTreeStepTypes)).EndInit();

View File

@ -14,7 +14,7 @@ namespace Volian.Controls.Library
public partial class DisplaySearch : UserControl
{
#region Properties
private string _strSrchText = "";
private List<DocVersionInfo> lstCheckedDocVersions = new List<DocVersionInfo>();
private List<int> lstCheckedStepTypes = new List<int>();
@ -623,9 +623,9 @@ namespace Volian.Controls.Library
_OpenDocFromSearch = true;
DisplayTabItem dti = _TabControl.OpenItem(_ItemInfo); // open the corresponding procedure text
if (dti.MyDSOTabPanel != null)
dti.MyDSOTabPanel.SearchString = this.cbxTextSearchText.Text;
dti.MyDSOTabPanel.SearchString = _strSrchText; // this.cbxTextSearchText.Text;
if (dti.MyStepTabPanel != null)
dti.MyStepTabPanel.SearchString = this.cbxTextSearchText.Text;
dti.MyStepTabPanel.SearchString = _strSrchText; // this.cbxTextSearchText.Text;
_OpenDocFromSearch = false;
}
}
@ -675,6 +675,7 @@ namespace Volian.Controls.Library
#region Search
private string[] BuildSearchString()
{
_strSrchText = ""; // used when jumping to a section from the results window
// the search query needs '<DocVerID>,...<DocVerID>','<StepTypeID>,...,<StepTypeID>','<TextToSearch>'
string[] strRtnStr = { "", "", "" };
// append list of document versions to search
@ -706,7 +707,9 @@ namespace Volian.Controls.Library
if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[0])
{ // Text Search
strRtnStr[2] += ConvertSpecialChars(cbxTextSearchText.Text);//string.Format("{0}", cbxTextSearchText.Text); // append text to search
_strSrchText = ConvertSpecialChars(cbxTextSearchText.Text);//string.Format("{0}", cbxTextSearchText.Text);
strRtnStr[2] += _strSrchText; // append text to search
//strRtnStr[2] += ConvertSpecialChars(cbxTextSearchText.Text);//string.Format("{0}", cbxTextSearchText.Text); // append text to search
}
else if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[1])
{ // Annotation Search
@ -721,7 +724,9 @@ namespace Volian.Controls.Library
if (cbxFndUnLnkROVals.Enabled && cbxFndUnLnkROVals.Checked)
{
ch = (ROFSTLookup.rochild)cmboTreeROs.SelectedNode.Tag;
strRtnStr[2] += string.Format("{0}", ch.value); // append RO Value text to search
_strSrchText = string.Format("{0}", ch.value);
strRtnStr[2] += _strSrchText; // append RO Value text to search
//strRtnStr[2] += string.Format("{0}", ch.value); // append RO Value text to search
}
else
{