Winify – Diff between revs 25 and 28
?pathlinks?
Rev 25 | Rev 28 | |||
---|---|---|---|---|
1 | using System.ComponentModel; |
1 | using System.ComponentModel; |
|
2 | using System.Runtime.CompilerServices; |
2 | using System.Runtime.CompilerServices; |
|
3 | using System.Xml.Serialization; |
3 | using System.Xml.Serialization; |
|
4 | using Servers.Properties; |
4 | using Servers.Properties; |
|
5 | |
5 | |
|
6 | namespace Servers |
6 | namespace Servers |
|
7 | { |
7 | { |
|
8 | [XmlRoot(Namespace = "urn:winify-servers-schema", ElementName = "Servers")] |
8 | [XmlRoot(Namespace = "urn:winify-servers-schema", ElementName = "Servers")] |
|
9 | public class Servers : INotifyPropertyChanged |
9 | public class Servers : INotifyPropertyChanged |
|
10 | { |
10 | { |
|
- | 11 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
||
- | 12 | |
||
- | 13 | private BindingListWithCollectionChanged<Server> _server = new BindingListWithCollectionChanged<Server>(); |
||
- | 14 | |
||
- | 15 | #endregion |
||
- | 16 | |
||
- | 17 | #region Constructors, Destructors and Finalizers |
||
- | 18 | |
||
- | 19 | [UsedImplicitly] |
||
- | 20 | public Servers() |
||
- | 21 | { |
||
- | 22 | } |
||
- | 23 | |
||
- | 24 | #endregion |
||
- | 25 | |
||
11 | #region Public Enums, Properties and Fields |
26 | #region Public Enums, Properties and Fields |
|
12 | |
27 | |
|
13 | [XmlElement(ElementName = "Server")] |
28 | [XmlElement(ElementName = "Server")] |
|
14 | public BindingListWithCollectionChanged<Server> Server |
29 | public BindingListWithCollectionChanged<Server> Server |
|
15 | { |
30 | { |
|
16 | get => _server; |
31 | get => _server; |
|
17 | set |
32 | set |
|
18 | { |
33 | { |
|
19 | if (Equals(value, _server)) |
34 | if (Equals(value, _server)) return; |
|
20 | { |
- | ||
21 | return; |
- | ||
22 | } |
- | ||
23 | |
35 | |
|
24 | _server = value; |
36 | _server = value; |
|
25 | OnPropertyChanged(); |
37 | OnPropertyChanged(); |
|
26 | } |
38 | } |
|
27 | } |
39 | } |
|
28 | |
- | ||
29 | #endregion |
- | ||
30 | |
- | ||
31 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
- | ||
32 | |
- | ||
33 | private BindingListWithCollectionChanged<Server> _server = new BindingListWithCollectionChanged<Server>(); |
- | ||
34 | |
- | ||
35 | #endregion |
- | ||
36 | |
- | ||
37 | #region Constructors, Destructors and Finalizers |
- | ||
38 | |
- | ||
39 | [UsedImplicitly] |
- | ||
40 | public Servers() |
- | ||
41 | { |
- | ||
42 | } |
- | ||
43 | |
40 | |
|
44 | #endregion |
41 | #endregion |
|
45 | |
42 | |
|
46 | #region Interface |
43 | #region Interface |
|
47 | |
44 | |
|
48 | public event PropertyChangedEventHandler PropertyChanged; |
45 | public event PropertyChangedEventHandler PropertyChanged; |
|
49 | |
46 | |
|
50 | #endregion |
47 | #endregion |
|
51 | |
48 | |
|
52 | #region Private Methods |
49 | #region Private Methods |
|
53 | |
50 | |
|
54 | [NotifyPropertyChangedInvocator] |
51 | [NotifyPropertyChangedInvocator] |
|
55 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
52 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
|
56 | { |
53 | { |
|
57 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
54 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
|
58 | } |
55 | } |
|
59 | |
56 | |
|
60 | #endregion |
57 | #endregion |
|
61 | } |
58 | } |
|
62 | } |
59 | } |
|
63 | |
60 | |
|
64 |
|
61 |
|
|
65 | |
62 | |
|
66 | |
63 | |
|
67 | |
64 | |