void InitializeFilters()
		{			
			if (Filters == null)
				Filters = new ObservableCollection<FilterViewModel>();
			else
				Filters.Clear();

			foreach (var filter in ClientManager.SystemConfiguration.JournalFilters.FindAll(x => !Procedure.FiltersUids.Contains(x.UID)))
			{
				var filterViewModel = new FilterViewModel(filter);
				Filters.Add(filterViewModel);
			}
			OnPropertyChanged(() => Filters);
			SelectedFilter = Filters.FirstOrDefault();
		}
Example #2
0
		void Initialize()
		{
			Filters = new ObservableCollection<FilterViewModel>();
			foreach (var filter in ClientManager.SystemConfiguration.JournalFilters)
			{
				if (Procedure.FiltersUids.Contains(filter.UID))
				{
					var filterViewModel = new FilterViewModel(filter);
					Filters.Add(filterViewModel);
				}
			}

			OpcTagFilters = new ObservableCollection<OpcTagFilterViewModel>();
			foreach (var opcFilter in ClientManager.SystemConfiguration.AutomationConfiguration.OpcDaTagFilters)
			{
				if (Procedure.OpcDaTagFiltersUids.Contains(opcFilter.UID))
				{
					var opcFilterViewModel = new OpcTagFilterViewModel(opcFilter);
					OpcTagFilters.Add(opcFilterViewModel);
				}
			}
		}