|
|
|
@ -146,6 +146,18 @@ public partial class MainForm : Form |
|
|
|
|
// send the keypress to the search results |
|
|
|
|
// NOTE: We could also respond to Up/Down and scroll the ChartImage vertically, |
|
|
|
|
// but that would be confusing, given that Left/Right selects a search result. |
|
|
|
|
if ( mSearchResults.Items.Count > 1 && mSearchResults.SelectedItems.Count > 0 ) { |
|
|
|
|
// check for wrap-around |
|
|
|
|
ImageListViewItem selItem = mSearchResults.SelectedItems[0] ; |
|
|
|
|
if ( keyCode == Keys.Left && Object.ReferenceEquals( selItem, mSearchResults.Items[0] ) ) { |
|
|
|
|
mSearchResults.setSelection( mSearchResults.Items.Count-1 ) ; |
|
|
|
|
return true ; |
|
|
|
|
} |
|
|
|
|
if ( keyCode == Keys.Right && Object.ReferenceEquals( selItem, mSearchResults.Items[mSearchResults.Items.Count-1] ) ) { |
|
|
|
|
mSearchResults.setSelection( 0 ) ; |
|
|
|
|
return true ; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
mSearchResults.Focus() ; |
|
|
|
|
mDisableProcessCmdKey = true ; |
|
|
|
|
SendKeys.SendWait( "{" + keyCode.ToString() + "}" ) ; |
|
|
|
|