示例#1
0
        public void AddFilter(string name, LogLevel level)
        {
            var found = _filters.FirstOrDefault(x => x.Prefix == name);

            if (found is null)
            {
                _filters.Add(new LoggingFilter(name, level));
                FiltersUpdated?.Invoke();
            }
        }
示例#2
0
        public void RemoveFilter(string name)
        {
            var found = _filters.FirstOrDefault(x => x.Prefix == name);

            if (found is null)
            {
                return;
            }

            _filters.RemoveAll(x => x.Prefix == name);
            FiltersUpdated?.Invoke();
        }
示例#3
0
 private async void CurrentUserViewModelOnCurrentUserSet(ProjectMember currentUser)
 {
     if (_currentUserFilter && _currentUser != null)
     {
         await Task.Run(async() =>
         {
             FilteredUsers = await _projectMembersSetsViewModel.Resolve(_currentUser);
             FiltersUpdated?.Invoke();
         });
     }
     _currentUser = currentUser;
     RaisePropertyChanged("IsCurrentUserFilterEnabled");
 }
        void ChangeFilterStatus(Control c, bool s)
        {
            c.IsEnabled = s;
            if (s)
            {
                c.Visibility = Visibility.Visible;
            }
            else
            {
                c.Visibility = Visibility.Collapsed;
            }

            FiltersUpdated?.Invoke();
        }
 private void ButtonFilters_Click(object sender, RoutedEventArgs e)
 {
     FiltersUpdated?.Invoke();
 }
 public void UpdateAll()
 {
     UpdateListBoxFilterCategories();
     UpdateListBoxFilterUsers();
     FiltersUpdated?.Invoke();
 }
 private void ApplyFilters()
 {
     FiltersUpdated?.Invoke(metas.Where(Captured).ToArray());
 }
 private void OnFilterSchemeManagerUpdated(object sender, EventArgs e)
 {
     FiltersUpdated?.Invoke(this, EventArgs.Empty);
 }
示例#9
0
 private void OnFiltersUpdated()
 {
     FiltersUpdated?.Invoke(this, EventArgs.Empty);
 }