예제 #1
0
        public ProfileFiltersViewModel(FiltersProfile filtersProfile, LogPaneServices logPaneServices)
        {
            FiltersProfile       = filtersProfile;
            this.logPaneServices = logPaneServices;

            LogLevels = new BindableCollection <LogLevelFilterViewModel>(
                FiltersProfile.LogLevels.Select(ll => new LogLevelFilterViewModel(logPaneServices, ll)));

            MinLogLevel = LogLevels.First();

            SourceFilterRootViewModel = new SourceFilterViewModel(filtersProfile.SourceFilterRoot, logPaneServices);
        }
예제 #2
0
        public LogPaneViewModel([NotNull] ReceiverBase receiver)
        {
            if (receiver == null)
            {
                throw new ArgumentNullException(nameof(receiver));
            }

            Receiver = receiver;
            var filtersProfile = new FiltersProfile();

            LogMessages.CollectionChanged += LogMessagesOnCollectionChanged;

            ProfileFiltersViewModel     = new ProfileFiltersViewModel(filtersProfile, LogPaneServices);
            filterLogic                 = new FilterLogic(filtersProfile);
            ProfilesFiltersViewModel    = new ProfilesFiltersViewModel(filtersProfile, LogPaneServices);
            searchTextChangedSubscriber = ProfileFiltersViewModel.SubscribeToPropertyChanged(vm => vm.SearchText, OnSearchTextChanged);

            ProfilesFiltersViewModel.ActivateWith(this);

            LogPaneServices.EventAggregator.Subscribe(this);
        }
예제 #3
0
 public ProfilesFiltersViewModel(FiltersProfile filtersProfile, LogPaneServices logPaneServices)
 {
     this.filtersProfile  = filtersProfile;
     this.logPaneServices = logPaneServices;
 }