Ejemplo n.º 1
0
 /// <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;
 }
Ejemplo n.º 2
0
 private void EmployeeList_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     DataService.SaveToFile();
 }
Ejemplo n.º 3
0
 private void M_MessageHandlers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     m_MessageHandlersCollectionChanged = true;
     OnChanged();
 }
Ejemplo n.º 4
0
 protected abstract void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e);
Ejemplo n.º 5
0
 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();
 }
Ejemplo n.º 7
0
 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
 }
Ejemplo n.º 9
0
 private void ReturnValues_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     UpdateOutputTemplateTabHeader();
 }
Ejemplo n.º 10
0
 private void GitHubReleases_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     OnPropertyChanged("NumberNewReleases");
     OnPropertyChanged("NumberNewReleasesString");
 }
Ejemplo n.º 11
0
 protected override void OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     base.OnItemsChanged(e);
 }
Ejemplo n.º 12
0
 private void CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     IsInitialized = false;
 }
 void OnGroupedCollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     UpdateItemSource();
 }
Ejemplo n.º 14
0
 private void Layers_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     Initialize();
     RaisePropertyChanged(nameof(ActiveLayerModel));
 }
Ejemplo n.º 15
0
 private void _watchedFiles_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     WatchedFiles = WatchedFile.Sort(WatchedFiles);
 }
Ejemplo n.º 16
0
 private void AppModelParameters_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     UpdateModelParametersTabHeader();
 }
Ejemplo n.º 17
0
 private void FilesAndFolders_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     UpdateItemColumnViewModels();
 }
Ejemplo n.º 18
0
 private void Items_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     int i = 0;
 }
Ejemplo n.º 19
0
 private void VariablesPage_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     RefreshVariablesNames();
 }
Ejemplo n.º 20
0
 private void OldNotifyCollectionChanged_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     IsRequireReset = true;
 }
Ejemplo n.º 21
0
        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;
                        }
                    }
                }
            }
        }
Ejemplo n.º 22
0
        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();
            });
        }
Ejemplo n.º 23
0
 /// <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);
 }
Ejemplo n.º 24
0
 private void Sources_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     OnPropertyChanged("SubElements");
 }
Ejemplo n.º 25
0
 private void Views_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     //throw new NotImplementedException();
 }
Ejemplo n.º 26
0
 /// <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);
 }
Ejemplo n.º 27
0
 private static void Inventory_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     UpdateGrid();
 }
Ejemplo n.º 28
0
 private void _subs_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     Subs = Sort(Subs);
     setDisplayImage(Path);
 }
Ejemplo n.º 29
0
 protected virtual void OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs args)
 {
 }
Ejemplo n.º 30
0
 private void Dbs_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
 {
     UpdateDBsTabHeader();
 }