File tree Expand file tree Collapse file tree 1 file changed +17
-19
lines changed Expand file tree Collapse file tree 1 file changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -164,31 +164,29 @@ static void AddressChangedCallback(object sender, EventArgs e)
164
164
165
165
if ( adapters == null ) // No networkadapters found
166
166
{
167
- return ;
168
- }
169
-
170
- var networkChangeAdapterList = settings . NetworkChangeAdapters . Split ( "," ) ;
167
+ var networkChangeAdapterList = settings . NetworkChangeAdapters . Split ( "," ) ;
171
168
172
- foreach ( NetworkInterface n in adapters )
173
- {
174
- if ( n . OperationalStatus == OperationalStatus . Up && networkChangeAdapterList . Contains ( n . Id ) )
169
+ foreach ( NetworkInterface n in adapters )
175
170
{
176
- status = PingTest ( ) ;
171
+ if ( n . OperationalStatus == OperationalStatus . Up && networkChangeAdapterList . Contains ( n . Id ) )
172
+ {
173
+ status = PingTest ( ) ;
177
174
178
- // Update staus text in console
179
- Clear ( ) ;
175
+ // Update staus text in console
176
+ Clear ( ) ;
180
177
181
- if ( status == IPStatus . Success )
182
- {
183
- EnableProxy ( ) ;
184
- }
185
- else
186
- {
187
- DisableProxy ( ) ;
178
+ if ( status == IPStatus . Success )
179
+ {
180
+ EnableProxy ( ) ;
181
+ }
182
+ else
183
+ {
184
+ DisableProxy ( ) ;
185
+ }
188
186
}
187
+ //Console.WriteLine(" {0} is {1}", n.Name, n.OperationalStatus);
188
+ //Console.WriteLine("Description is {0} [{1}]", n.Description, n.Id);
189
189
}
190
- //Console.WriteLine(" {0} is {1}", n.Name, n.OperationalStatus);
191
- //Console.WriteLine("Description is {0} [{1}]", n.Description, n.Id);
192
190
}
193
191
}
194
192
You can’t perform that action at this time.
0 commit comments