@@ -471,28 +471,29 @@ public WiFiViewModel(IDialogCoordinator instance)
471471 ListSortDirection . Ascending ) ) ;
472472 NetworksView . Filter = o =>
473473 {
474- if ( string . IsNullOrEmpty ( Search ) )
475- return true ;
476-
477474 if ( o is not WiFiNetworkInfo info )
478475 return false ;
479-
480- switch ( info . Radio )
476+
477+ // Frequenzfilter immer anwenden
478+ if ( ( info . Radio == WiFiRadio . GHz2dot4 && ! Show2dot4GHzNetworks ) ||
479+ ( info . Radio == WiFiRadio . GHz5 && ! Show5GHzNetworks ) ||
480+ ( info . Radio == WiFiRadio . GHz6 && ! Show6GHzNetworks ) )
481481 {
482- case WiFiRadio . GHz2dot4 when ! Show2dot4GHzNetworks :
483- case WiFiRadio . GHz5 when ! Show5GHzNetworks :
484- case WiFiRadio . GHz6 when ! Show6GHzNetworks :
485- return false ;
486- default :
487- // Search by: SSID, Security, Frequency , Channel, BSSID (MAC address), Vendor, Phy kind
488- return info . AvailableNetwork . Ssid . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
489- info . NetworkAuthenticationType . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
490- $ "{ info . ChannelCenterFrequencyInGigahertz } ". IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
491- $ "{ info . Channel } ". IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
492- info . AvailableNetwork . Bssid . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
493- info . Vendor . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
494- info . PhyKind . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ;
482+ return false ;
495483 }
484+
485+ // Wenn kein Suchbegriff, Frequenzfilter reicht
486+ if ( string . IsNullOrEmpty ( Search ) )
487+ return true ;
488+
489+ // Suchlogik
490+ return info . AvailableNetwork . Ssid . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
491+ info . NetworkAuthenticationType . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
492+ $ "{ info . ChannelCenterFrequencyInGigahertz } ". IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
493+ $ "{ info . Channel } ". IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
494+ info . AvailableNetwork . Bssid . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
495+ info . Vendor . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ||
496+ info . PhyKind . IndexOf ( Search , StringComparison . OrdinalIgnoreCase ) > - 1 ;
496497 } ;
497498
498499 // Load network adapters
0 commit comments