/// <summary> /// Handles the <see cref="E:FilterListChanged" /> event. /// </summary> /// <param name="listener">The listener.</param> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="NotifyCollectionChangedEventArgs"/> instance containing the event data.</param> private static void OnFilterListChanged(ProcessEditFilterSource listener, object sender, NotifyCollectionChangedEventArgs e) { listener.RaiseFiltersChanged(); }
/// <summary> /// Handles the <see cref="E:FilterChanged" /> event. /// </summary> /// <param name="listener">The listener.</param> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="ChildChangedEventArgs"/> instance containing the event data.</param> private static void OnFilterChanged(ProcessEditFilterSource listener, object sender, ChildChangedEventArgs e) { listener.OnFilterChanged(e); }
private async void LoadFilters() { var operationId = ++_loadFiltersOperationId; try { FilterList.Clear(); FilterSource = null; if (!IsList) { //workaround - resets values when switching beetwin filters in list FilterGuid = null; FilterDefinition = null; } if (string.IsNullOrEmpty(FilteredProcessName)) { return; } if (FilteringProcess != null && FilteringProcess.SystemName == FilteredProcessName) { FilterSource = new ProcessEditFilterSource(FilteringProcess); } else { try { LoadingFilters = true; var publishedProcess = await PublishedProcessWithFiltersInfo.GetProcessAsync(FilteredProcessName); if (operationId != _loadFiltersOperationId) return; FilterSource = new PublishedProcessFilterSource(publishedProcess); } catch (DataPortalException) { } } if (FilterSource != null) { try { UpdatingFilters = true; FilterList.AddRange(FilterSource.GetFilters()); FilterSource.UpdateParameters(UdpList); } finally { UpdatingFilters = false; } } } finally { if (operationId == _loadFiltersOperationId) { LoadingFilters = false; } } }