|
|
|
@ -23,6 +23,7 @@ public partial class MainForm : Form |
|
|
|
|
private Panel mChartImagePanel = new Panel() ; |
|
|
|
|
private PictureBox mChartImagePictureBox = new PictureBox() ; |
|
|
|
|
|
|
|
|
|
private string mSearchResultsKey = null ; |
|
|
|
|
private Point? mMouseDragAnchor = null ; |
|
|
|
|
private Tuple<int,int> mScrollDragAnchor ; |
|
|
|
|
private double mUserZoom = 1.0 ; |
|
|
|
@ -103,11 +104,15 @@ public partial class MainForm : Form |
|
|
|
|
List<ChartImage> results2 = new List<ChartImage>() ; |
|
|
|
|
foreach ( var r in results ) |
|
|
|
|
results2.Add( r.Item1 ) ; |
|
|
|
|
loadSearchResults( results2 ) ; |
|
|
|
|
loadSearchResults( results2, searchQuery ) ; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void loadSearchResults( IEnumerable<ChartImage> chartImages ) |
|
|
|
|
private void loadSearchResults( IEnumerable<ChartImage> chartImages, string key ) |
|
|
|
|
{ |
|
|
|
|
// check if we need to reload the search results |
|
|
|
|
if ( key == mSearchResultsKey ) |
|
|
|
|
return ; |
|
|
|
|
|
|
|
|
|
// clear the search results |
|
|
|
|
mSearchResults.SuspendLayout() ; |
|
|
|
|
mSearchResults.Items.Clear() ; |
|
|
|
@ -123,5 +128,6 @@ public partial class MainForm : Form |
|
|
|
|
item.Selected = true ; |
|
|
|
|
} |
|
|
|
|
mSearchResults.ResumeLayout( true ) ; |
|
|
|
|
mSearchResultsKey = key ; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|