@@ -21,6 +21,7 @@ public class OpenResourceForm : SmartForm
21
21
private System . Windows . Forms . Label infoLabel ;
22
22
private System . Windows . Forms . TextBox textBox ;
23
23
private System . Windows . Forms . ListBox listBox ;
24
+ private System . Windows . Forms . CheckBox cbInClasspathsOnly ;
24
25
private System . Windows . Forms . CheckBox checkBox ;
25
26
private System . Windows . Forms . Button refreshButton ;
26
27
@@ -46,6 +47,7 @@ private void InitializeComponent()
46
47
this . infoLabel = new System . Windows . Forms . Label ( ) ;
47
48
this . textBox = new System . Windows . Forms . TextBox ( ) ;
48
49
this . listBox = new System . Windows . Forms . ListBox ( ) ;
50
+ this . cbInClasspathsOnly = new System . Windows . Forms . CheckBox ( ) ;
49
51
this . checkBox = new System . Windows . Forms . CheckBox ( ) ;
50
52
this . refreshButton = new System . Windows . Forms . Button ( ) ;
51
53
this . SuspendLayout ( ) ;
@@ -75,20 +77,31 @@ private void InitializeComponent()
75
77
this . refreshButton . Location = new System . Drawing . Point ( 465 , 30 ) ;
76
78
this . refreshButton . Name = "refreshButton" ;
77
79
this . refreshButton . Size = new System . Drawing . Size ( 26 , 23 ) ;
78
- this . refreshButton . TabIndex = 3 ;
80
+ this . refreshButton . TabIndex = 4 ;
79
81
this . refreshButton . Click += new EventHandler ( RefreshButtonClick ) ;
82
+ //
83
+ // cbInClasspathsOnly
84
+ //
85
+ this . cbInClasspathsOnly . Anchor = ( ( System . Windows . Forms . AnchorStyles ) ( ( System . Windows . Forms . AnchorStyles . Top | System . Windows . Forms . AnchorStyles . Right ) ) ) ;
86
+ this . cbInClasspathsOnly . Location = new System . Drawing . Point ( 279 , 9 ) ;
87
+ this . cbInClasspathsOnly . Size = new System . Drawing . Size ( 111 , 17 ) ;
88
+ this . cbInClasspathsOnly . AutoSize = true ;
89
+ this . cbInClasspathsOnly . Name = "cbInClasspathsOnly" ;
90
+ this . cbInClasspathsOnly . TabIndex = 2 ;
91
+ this . cbInClasspathsOnly . Text = "In Classpaths only" ;
92
+ this . cbInClasspathsOnly . CheckedChanged += new System . EventHandler ( this . CbInClasspathsOnlyCheckedChanged ) ;
80
93
//
81
94
// checkBox
82
95
//
83
96
this . checkBox . Anchor = ( ( System . Windows . Forms . AnchorStyles ) ( ( System . Windows . Forms . AnchorStyles . Top | System . Windows . Forms . AnchorStyles . Right ) ) ) ;
84
- this . checkBox . Location = new System . Drawing . Point ( 464 , 9 ) ;
97
+ this . checkBox . Location = new System . Drawing . Point ( 396 , 9 ) ;
85
98
this . checkBox . Size = new System . Drawing . Size ( 26 , 24 ) ;
86
99
this . checkBox . CheckAlign = ContentAlignment . MiddleRight ;
87
100
this . checkBox . TextAlign = ContentAlignment . MiddleLeft ;
88
101
this . checkBox . Text = "Code files only" ;
89
102
this . checkBox . Name = "checkBox" ;
90
103
this . checkBox . AutoSize = true ;
91
- this . checkBox . TabIndex = 2 ;
104
+ this . checkBox . TabIndex = 3 ;
92
105
this . checkBox . Checked = false ;
93
106
this . checkBox . CheckedChanged += new EventHandler ( this . CheckBoxCheckedChanged ) ;
94
107
//
@@ -100,7 +113,7 @@ private void InitializeComponent()
100
113
this . listBox . Location = new System . Drawing . Point ( 12 , 62 ) ;
101
114
this . listBox . Name = "listBox" ;
102
115
this . listBox . Size = new System . Drawing . Size ( 478 , 276 ) ;
103
- this . listBox . TabIndex = 4 ;
116
+ this . listBox . TabIndex = 5 ;
104
117
this . listBox . DrawItem += new System . Windows . Forms . DrawItemEventHandler ( this . ListBoxDrawItem ) ;
105
118
this . listBox . Resize += new System . EventHandler ( this . ListBoxResize ) ;
106
119
this . listBox . DoubleClick += new System . EventHandler ( this . ListBoxDoubleClick ) ;
@@ -110,6 +123,7 @@ private void InitializeComponent()
110
123
this . AutoScaleDimensions = new System . Drawing . SizeF ( 6F , 13F ) ;
111
124
this . AutoScaleMode = System . Windows . Forms . AutoScaleMode . Font ;
112
125
this . ClientSize = new System . Drawing . Size ( 502 , 340 ) ;
126
+ this . Controls . Add ( this . cbInClasspathsOnly ) ;
113
127
this . Controls . Add ( this . listBox ) ;
114
128
this . Controls . Add ( this . textBox ) ;
115
129
this . Controls . Add ( this . refreshButton ) ;
@@ -153,6 +167,7 @@ private void InitializeGraphics()
153
167
private void InitializeLocalization ( )
154
168
{
155
169
this . infoLabel . Text = TextHelper . GetString ( "Label.SearchString" ) ;
170
+ this . cbInClasspathsOnly . Text = TextHelper . GetString ( "Label.InClasspathsOnly" ) ;
156
171
this . checkBox . Text = TextHelper . GetString ( "Label.CodeFilesOnly" ) ;
157
172
this . Text = " " + TextHelper . GetString ( "Title.OpenResource" ) ;
158
173
}
@@ -166,6 +181,15 @@ private void RefreshButtonClick(Object sender, EventArgs e)
166
181
this . RefreshListBox ( ) ;
167
182
}
168
183
184
+ /// <summary>
185
+ ///
186
+ /// </summary>
187
+ private void CbInClasspathsOnlyCheckedChanged ( Object sender , EventArgs e )
188
+ {
189
+ this . CreateFileList ( ) ;
190
+ this . RefreshListBox ( ) ;
191
+ }
192
+
169
193
/// <summary>
170
194
///
171
195
/// </summary>
@@ -377,7 +401,7 @@ public List<String> GetProjectFolders()
377
401
{
378
402
String projectFolder = Path . GetDirectoryName ( PluginBase . CurrentProject . ProjectPath ) ;
379
403
List < String > folders = new List < String > ( ) ;
380
- folders . Add ( projectFolder ) ;
404
+ if ( ! cbInClasspathsOnly . Checked ) folders . Add ( projectFolder ) ;
381
405
if ( ! PluginMain . Settings . SearchExternalClassPath ) return folders ;
382
406
foreach ( String path in PluginBase . CurrentProject . SourcePaths )
383
407
{
0 commit comments