/// <summary> /// Clear the cache on any template set change /// If needed this could be optimized to care about the specific /// change but I doubt it would be worthwhile. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TemplateSetChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { Cache = null; }
private void EmployeeList_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { DataService.SaveToFile(); }
private void M_MessageHandlers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { m_MessageHandlersCollectionChanged = true; OnChanged(); }
protected abstract void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e);
private void SettingsLayers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { RebuildDropDownList(); }
private void Series_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { this.UpdateGradientBarFills(); }
private void ErrorsCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { this.RaisePropertyChanged(nameof(this.HasErrors)); }
void Items_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { // TODO: Implement Add, Delete Sync with server }
private void ReturnValues_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { UpdateOutputTemplateTabHeader(); }
private void GitHubReleases_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { OnPropertyChanged("NumberNewReleases"); OnPropertyChanged("NumberNewReleasesString"); }
protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { base.OnItemsChanged(e); }
private void CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { IsInitialized = false; }
void OnGroupedCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { UpdateItemSource(); }
private void Layers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { Initialize(); RaisePropertyChanged(nameof(ActiveLayerModel)); }
private void _watchedFiles_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { WatchedFiles = WatchedFile.Sort(WatchedFiles); }
private void AppModelParameters_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { UpdateModelParametersTabHeader(); }
private void FilesAndFolders_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { UpdateItemColumnViewModels(); }
private void Items_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { int i = 0; }
private void VariablesPage_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { RefreshVariablesNames(); }
private void OldNotifyCollectionChanged_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { IsRequireReset = true; }
protected override void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (isList) { //IList or Array switch (e.Action) { case NotifyCollectionChangedAction.Reset: this.RaiseValueChanged(); break; case NotifyCollectionChangedAction.Remove: case NotifyCollectionChangedAction.Replace: if (this.key == e.OldStartingIndex || this.key == e.NewStartingIndex) { this.RaiseValueChanged(); } break; case NotifyCollectionChangedAction.Move: if (this.key == e.OldStartingIndex || this.key == e.NewStartingIndex) { this.RaiseValueChanged(); } break; case NotifyCollectionChangedAction.Add: int endIndex = e.NewItems != null ? e.NewStartingIndex + e.NewItems.Count : e.NewStartingIndex + 1; if (this.key >= e.NewStartingIndex && this.key < endIndex) { this.RaiseValueChanged(); } break; default: break; } } else { //IDictionary if (e.Action == NotifyCollectionChangedAction.Reset) { this.RaiseValueChanged(); return; } if (e.NewItems != null && e.NewItems.Count > 0) { foreach (var item in e.NewItems) { if (regex.IsMatch(item.ToString())) { this.RaiseValueChanged(); return; } } } if (e.OldItems != null && e.OldItems.Count > 0) { foreach (var item in e.OldItems) { if (regex.IsMatch(item.ToString())) { this.RaiseValueChanged(); return; } } } } }
void CollectionItemsSourceChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { if (!(ItemsViewAdapter?.ItemsSource is IItemsViewSource observableItemsSource)) { return; } var carouselPosition = Carousel.Position; var currentItemPosition = observableItemsSource.GetPosition(Carousel.CurrentItem); var count = observableItemsSource.Count; bool removingCurrentElement = currentItemPosition == -1; bool removingLastElement = e.OldStartingIndex == count; bool removingFirstElement = e.OldStartingIndex == 0; bool removingAnyPrevious = e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Remove && e.OldStartingIndex < carouselPosition; _noNeedForScroll = true; _gotoPosition = -1; if (removingCurrentElement) { if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Reset) { carouselPosition = 0; } if (removingFirstElement) { carouselPosition = 0; } else if (removingLastElement) { carouselPosition = Carousel.Position - 1; } if (Carousel.Loop) { UpdateAdapter(); ScrollToPosition(carouselPosition); } } //If we are adding a new item make sure to maintain the CurrentItemPosition else if (e.Action == System.Collections.Specialized.NotifyCollectionChangedAction.Add && currentItemPosition != -1) { carouselPosition = currentItemPosition; } // Queue the rest up for later after the Adapter has finished processing item change notifications if (removingAnyPrevious) { return; } Device.BeginInvokeOnMainThread(() => { SetCurrentItem(carouselPosition); UpdatePosition(carouselPosition); //If we are adding or removing the last item we need to update //the inset that we give to items so they are centered if (e.NewStartingIndex == count - 1 || removingLastElement) { UpdateItemDecoration(); } UpdateVisualStates(); }); }
/// <summary> /// Forwards CollectionChanged notifications for the ServiceDeliveryPoints property to the parent model element /// </summary> /// <param name="sender">The collection that raised the change</param> /// <param name="e">The original event data</param> private void ServiceDeliveryPointsCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { this.OnCollectionChanged("ServiceDeliveryPoints", e, _serviceDeliveryPointsReference); }
private void Sources_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { OnPropertyChanged("SubElements"); }
private void Views_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { //throw new NotImplementedException(); }
/// <summary> /// This event handler method is invoked when object collection was changed. /// </summary> /// <param name="e"></param> protected override void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { //Console.WriteLine(e.Action); base.OnCollectionChanged(e); }
private static void Inventory_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { UpdateGrid(); }
private void _subs_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { Subs = Sort(Subs); setDisplayImage(Path); }
protected virtual void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs args) { }
private void Dbs_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { UpdateDBsTabHeader(); }