Beispiel #1
0
 private static void AttachDataSourceCollectionChangedListener(PieChart chart, object dataSource) {
   if (dataSource != null && dataSource is INotifyCollectionChanged) {
     (dataSource as INotifyCollectionChanged).CollectionChanged += new NotifyCollectionChangedEventHandler(chart.OnDataSourceCollectionChanged);
   }
 }
Beispiel #2
0
 private static void DetachOldDataSourceCollectionChangedListener(PieChart chart, object dataSource) {
   if (dataSource != null && dataSource is INotifyCollectionChanged) {
     (dataSource as INotifyCollectionChanged).CollectionChanged -= chart.OnDataSourceCollectionChanged;
   }
 }