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

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

View File

@@ -608,15 +608,27 @@ namespace Volian.Controls.Library
{
if (!_LoadingList)
{
_ItemInfo = lbSrchResults.SelectedValue as ItemInfo;
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;
_OpenDocFromSearch = false;
}
_ItemInfo = lbSrchResults.SelectedValue as ItemInfo;
if ((tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[1]))
{
_AnnotationDetails.CurrentAnnotation = AnnotationInfo.Get(_ItemInfo.SearchAnnotationID);
if (_AnnotationDetails.CurrentAnnotation != null)
_TabControl.OpenItem(_AnnotationDetails.CurrentAnnotation.MyItem); // open the corresponding procedure text
_AnnotationDetails.FindCurrentAnnotation(); // position to corresponding row in annotation grid
}
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)
{
@@ -1289,11 +1293,6 @@ namespace Volian.Controls.Library
cbxBooleanAnoTxtSrch_CheckedChanged(sender, e);
}
}
#region Annoation Search Type Class