Remove NEAR from boolean context menu, support logic to select found annotation in annotation grid

This commit is contained in:
John Jenko 2009-05-06 16:00:45 +00:00
parent ecfaf38e79
commit 6cec44befd
2 changed files with 23 additions and 33 deletions

View File

@ -74,7 +74,6 @@ 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.btnNear = new DevComponents.DotNetBar.ButtonItem();
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();
@ -124,9 +123,9 @@ namespace Volian.Controls.Library
this.tabSearchTypes.CanReorderTabs = false; this.tabSearchTypes.CanReorderTabs = false;
this.tabSearchTypes.CloseButtonOnTabsAlwaysDisplayed = false; this.tabSearchTypes.CloseButtonOnTabsAlwaysDisplayed = false;
this.tabSearchTypes.CloseButtonPosition = DevComponents.DotNetBar.eTabCloseButtonPosition.Right; this.tabSearchTypes.CloseButtonPosition = DevComponents.DotNetBar.eTabCloseButtonPosition.Right;
this.tabSearchTypes.Controls.Add(this.tabControlPanel2);
this.tabSearchTypes.Controls.Add(this.tabControlPanel4); this.tabSearchTypes.Controls.Add(this.tabControlPanel4);
this.tabSearchTypes.Controls.Add(this.tabControlPanel3); this.tabSearchTypes.Controls.Add(this.tabControlPanel3);
this.tabSearchTypes.Controls.Add(this.tabControlPanel2);
this.tabSearchTypes.Controls.Add(this.contextMenuBar1); this.tabSearchTypes.Controls.Add(this.contextMenuBar1);
this.tabSearchTypes.Dock = System.Windows.Forms.DockStyle.Top; this.tabSearchTypes.Dock = System.Windows.Forms.DockStyle.Top;
this.tabSearchTypes.Location = new System.Drawing.Point(0, 0); this.tabSearchTypes.Location = new System.Drawing.Point(0, 0);
@ -710,8 +709,7 @@ namespace Volian.Controls.Library
this.btnBooleanItems.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] { this.btnBooleanItems.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
this.btnAND, this.btnAND,
this.btnOR, this.btnOR,
this.btnNOT, this.btnNOT});
this.btnNear});
this.btnBooleanItems.Text = "Boolean"; this.btnBooleanItems.Text = "Boolean";
this.btnBooleanItems.Visible = false; this.btnBooleanItems.Visible = false;
// //
@ -733,12 +731,6 @@ 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);
// //
// btnNear
//
this.btnNear.Name = "btnNear";
this.btnNear.Text = "NEAR";
this.btnNear.Click += new System.EventHandler(this.btnNear_Click);
//
// advTreeProcSets // advTreeProcSets
// //
this.advTreeProcSets.AccessibleRole = System.Windows.Forms.AccessibleRole.Outline; this.advTreeProcSets.AccessibleRole = System.Windows.Forms.AccessibleRole.Outline;
@ -1173,7 +1165,6 @@ namespace Volian.Controls.Library
private DevComponents.DotNetBar.ButtonItem btnAND; private DevComponents.DotNetBar.ButtonItem btnAND;
private DevComponents.DotNetBar.ButtonItem btnOR; private DevComponents.DotNetBar.ButtonItem btnOR;
private DevComponents.DotNetBar.ButtonItem btnNOT; private DevComponents.DotNetBar.ButtonItem btnNOT;
private DevComponents.DotNetBar.ButtonItem btnNear;
} }
} }

View File

@ -608,15 +608,27 @@ namespace Volian.Controls.Library
{ {
if (!_LoadingList) if (!_LoadingList)
{ {
_ItemInfo = lbSrchResults.SelectedValue as ItemInfo; _ItemInfo = lbSrchResults.SelectedValue as ItemInfo;
if (_ItemInfo != null) if ((tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[1]))
{ {
_OpenDocFromSearch = true; _AnnotationDetails.CurrentAnnotation = AnnotationInfo.Get(_ItemInfo.SearchAnnotationID);
DisplayTabItem dti = _TabControl.OpenItem(_ItemInfo); // open the corresponding procedure text if (_AnnotationDetails.CurrentAnnotation != null)
if (dti.MyDSOTabPanel != null) _TabControl.OpenItem(_AnnotationDetails.CurrentAnnotation.MyItem); // open the corresponding procedure text
dti.MyDSOTabPanel.SearchString = this.cbxTextSearchText.Text; _AnnotationDetails.FindCurrentAnnotation(); // position to corresponding row in annotation grid
_OpenDocFromSearch = false; }
} else
{
if (_ItemInfo != null)
{
_OpenDocFromSearch = true;
DisplayTabItem dti = _TabControl.OpenItem(_ItemInfo); // open the corresponding procedure text
if (dti.MyDSOTabPanel != null)
dti.MyDSOTabPanel.SearchString = this.cbxTextSearchText.Text;
if (dti.MyStepTabPanel != null)
dti.MyStepTabPanel.SearchString = this.cbxTextSearchText.Text;
_OpenDocFromSearch = false;
}
}
} }
} }
@ -1274,14 +1286,6 @@ namespace Volian.Controls.Library
} }
private void btnNear_Click(object sender, EventArgs e)
{
if (cbxTextSearchAnnotation.Focused)
cbxTextSearchAnnotation.SelectedText = " NEAR ";
else if (cbxTextSearchText.Focused)
cbxTextSearchText.SelectedText = " NEAR ";
}
private void tabAnnotationSearch_Click(object sender, EventArgs e) private void tabAnnotationSearch_Click(object sender, EventArgs e)
{ {
@ -1289,11 +1293,6 @@ namespace Volian.Controls.Library
cbxBooleanAnoTxtSrch_CheckedChanged(sender, e); cbxBooleanAnoTxtSrch_CheckedChanged(sender, e);
} }
} }
#region Annoation Search Type Class #region Annoation Search Type Class