Пример #1
0
		public FilterDetailsViewModel(JournalFilter filter = null)
		{
			if (filter == null)
			{
				Title = "Добавить фильтр";
				Filter = new JournalFilter();
				Name = "Новый фильтр";
			}
			else
			{
				Title = "Свойства фильтра";
				Filter = filter;
			}
			NamesViewModel = new NamesViewModel(Filter);
			ObjectsViewModel = new ObjectsViewModel(Filter);
			CopyProperties();
		}
Пример #2
0
        void SetFilterMenu( )
        {

			ObjectsViewModel _objectsViewModel = new ObjectsViewModel(Filter);

            foreach (var count in Filter.JournalSubsystemTypes)
            {
                Names.Add(new NameViewModel(count));
            }
           
            foreach (var count in Filter.JournalEventNameTypes)
            {
                Names.Add(new NameViewModel(count));
            }

			foreach (var count in Filter.JournalEventDescriptionTypes)
            {
                Names.Add(new NameViewModel(count, count.ToDescription()));
            }
           
			Objects = new ObservableCollection<ObjectViewModel>(_objectsViewModel.AllObjects.Where(c => c.IsRealChecked));
                
			OnPropertyChanged(() => Objects);
        }