@@ -227,36 +227,36 @@ public bool ProfileFilterIsOpen
227227 }
228228 }
229229
230- public ICollectionView ProfileTagsFilterView { get ; set ; }
230+ public ICollectionView ProfileFilterTagsView { get ; set ; }
231231
232- public ObservableCollection < ProfileTagsFilterInfo > ProfileTagsFilter { get ; set ; } = [ ] ;
232+ public ObservableCollection < ProfileFilterTagsInfo > ProfileFilterTags { get ; set ; } = [ ] ;
233233
234- private bool _profileTagsMatchAny = GlobalStaticConfiguration . Profile_TagsMatchAny ;
234+ private bool _profileFilterTagsMatchAny = GlobalStaticConfiguration . Profile_TagsMatchAny ;
235235
236- public bool ProfileTagsMatchAny
236+ public bool ProfileFilterTagsMatchAny
237237 {
238- get => _profileTagsMatchAny ;
238+ get => _profileFilterTagsMatchAny ;
239239 set
240240 {
241- if ( value == _profileTagsMatchAny )
241+ if ( value == _profileFilterTagsMatchAny )
242242 return ;
243243
244- _profileTagsMatchAny = value ;
244+ _profileFilterTagsMatchAny = value ;
245245 OnPropertyChanged ( ) ;
246246 }
247247 }
248248
249- private bool _profileTagsMatchAll ;
249+ private bool _profileFilterTagsMatchAll ;
250250
251- public bool ProfileTagsMatchAll
251+ public bool ProfileFilterTagsMatchAll
252252 {
253- get => _profileTagsMatchAll ;
253+ get => _profileFilterTagsMatchAll ;
254254 set
255255 {
256- if ( value == _profileTagsMatchAll )
256+ if ( value == _profileFilterTagsMatchAll )
257257 return ;
258258
259- _profileTagsMatchAll = value ;
259+ _profileFilterTagsMatchAll = value ;
260260 OnPropertyChanged ( ) ;
261261 }
262262 }
@@ -323,7 +323,6 @@ public GridLength ProfileWidth
323323 OnPropertyChanged ( ) ;
324324 }
325325 }
326-
327326 #endregion
328327
329328 #endregion
@@ -346,8 +345,8 @@ public PingMonitorHostViewModel(IDialogCoordinator instance)
346345 // Profiles
347346 CreateTags ( ) ;
348347
349- ProfileTagsFilterView = CollectionViewSource . GetDefaultView ( ProfileTagsFilter ) ;
350- ProfileTagsFilterView . SortDescriptions . Add ( new SortDescription ( nameof ( ProfileTagsFilterInfo . Name ) , ListSortDirection . Ascending ) ) ;
348+ ProfileFilterTagsView = CollectionViewSource . GetDefaultView ( ProfileFilterTags ) ;
349+ ProfileFilterTagsView . SortDescriptions . Add ( new SortDescription ( nameof ( ProfileFilterTagsInfo . Name ) , ListSortDirection . Ascending ) ) ;
351350
352351 SetProfilesView ( new ProfileFilterInfo ( ) ) ;
353352
@@ -493,7 +492,7 @@ private void ApplyProfileFilterAction()
493492
494493 private void ClearProfileFilterAction ( )
495494 {
496- foreach ( var tag in ProfileTagsFilter )
495+ foreach ( var tag in ProfileFilterTags )
497496 tag . IsSelected = false ;
498497
499498 RefreshProfiles ( ) ;
@@ -686,18 +685,18 @@ private void CreateTags()
686685
687686 var tagSet = new HashSet < string > ( tags ) ;
688687
689- for ( var i = ProfileTagsFilter . Count - 1 ; i >= 0 ; i -- )
688+ for ( var i = ProfileFilterTags . Count - 1 ; i >= 0 ; i -- )
690689 {
691- if ( ! tagSet . Contains ( ProfileTagsFilter [ i ] . Name ) )
692- ProfileTagsFilter . RemoveAt ( i ) ;
690+ if ( ! tagSet . Contains ( ProfileFilterTags [ i ] . Name ) )
691+ ProfileFilterTags . RemoveAt ( i ) ;
693692 }
694693
695- var existingTagNames = new HashSet < string > ( ProfileTagsFilter . Select ( ft => ft . Name ) ) ;
694+ var existingTagNames = new HashSet < string > ( ProfileFilterTags . Select ( ft => ft . Name ) ) ;
696695
697696 foreach ( var tag in tags )
698697 {
699698 if ( ! existingTagNames . Contains ( tag ) )
700- ProfileTagsFilter . Add ( new ProfileTagsFilterInfo ( false , tag ) ) ;
699+ ProfileFilterTags . Add ( new ProfileFilterTagsInfo ( false , tag ) ) ;
701700 }
702701 }
703702
@@ -710,9 +709,9 @@ private void SetProfilesView(ProfileFilterInfo filter, ProfileInfo profile = nul
710709 // If no tags are selected, show all profiles
711710 ( ! filter . Tags . Any ( ) ) ||
712711 // Any tag can match
713- ( filter . TagsFilterMatch == ProfileTagsFilterMatch . Any && filter . Tags . Any ( tag => x . TagsCollection . Contains ( tag ) ) ) ||
712+ ( filter . TagsFilterMatch == ProfileFilterTagsMatch . Any && filter . Tags . Any ( tag => x . TagsCollection . Contains ( tag ) ) ) ||
714713 // All tags must match
715- ( filter . TagsFilterMatch == ProfileTagsFilterMatch . All && filter . Tags . All ( tag => x . TagsCollection . Contains ( tag ) ) ) )
714+ ( filter . TagsFilterMatch == ProfileFilterTagsMatch . All && filter . Tags . All ( tag => x . TagsCollection . Contains ( tag ) ) ) )
716715 ) . OrderBy ( x => x . Group ) . ThenBy ( x => x . Name )
717716 } . View ;
718717
@@ -736,8 +735,8 @@ private void RefreshProfiles()
736735 SetProfilesView ( new ProfileFilterInfo
737736 {
738737 Search = Search ,
739- Tags = [ .. ProfileTagsFilter . Where ( x => x . IsSelected ) . Select ( x => x . Name ) ] ,
740- TagsFilterMatch = ProfileTagsMatchAny ? ProfileTagsFilterMatch . Any : ProfileTagsFilterMatch . All
738+ Tags = [ .. ProfileFilterTags . Where ( x => x . IsSelected ) . Select ( x => x . Name ) ] ,
739+ TagsFilterMatch = ProfileFilterTagsMatchAny ? ProfileFilterTagsMatch . Any : ProfileFilterTagsMatch . All
741740 } , SelectedProfile ) ;
742741 }
743742 #endregion
0 commit comments