-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainData.cs
More file actions
37 lines (32 loc) · 1.32 KB
/
Copy pathMainData.cs
File metadata and controls
37 lines (32 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using LibKaseya;
using System.Collections.ObjectModel;
namespace KLC_Proxy {
public class MainData /*: INotifyPropertyChanged*/ {
public ObservableCollection<Agent> ListAgent { get; set; }
public MainData() {
ListAgent = new ObservableCollection<Agent>();
//ListAgent.CollectionChanged += ListAgent_CollectionChanged;
}
/*
private void ListAgent_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) {
if (e.OldItems != null) {
foreach (INotifyPropertyChanged item in e.OldItems) {
item.PropertyChanged -= NotifyPropertyChanged;
}
}
if (e.NewItems != null) {
foreach (INotifyPropertyChanged item in e.NewItems) {
item.PropertyChanged += NotifyPropertyChanged;
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void NotifyPropertyChanged(object sender, PropertyChangedEventArgs e) {
if (PropertyChanged != null) {
PropertyChanged(this, new PropertyChangedEventArgs("ListAgent"));
PropertyChanged(this, new PropertyChangedEventArgs("Label"));
}
}
*/
}
}