Spring – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 using System.Collections.Generic;
2 using System.ComponentModel;
3 using System.Runtime.CompilerServices;
4 using System.Xml.Serialization;
5 using Configuration.Properties;
6  
7 namespace Configuration
8 {
9 [XmlRoot(ElementName = "Configuration")]
10 public class Configuration : INotifyPropertyChanged
11 {
12 #region Public Events & Delegates
13  
14 public event PropertyChangedEventHandler PropertyChanged;
15  
16 #endregion
17  
18 #region Public Enums, Properties and Fields
19  
20 [XmlElement(ElementName = "BoundButton")]
21 public List<string> BoundButton
22 {
23 get => _boundButton;
24 set
25 {
26 if (Equals(value, _boundButton))
27 {
28 return;
29 }
30  
31 _boundButton = value;
32 OnPropertyChanged();
33 }
34 }
35  
36 [XmlElement(ElementName = "BoundSpeedButton")]
37 public List<string> BoundSpeedButton
38 {
39 get => _boundSpeedButton;
40 set
41 {
42 if (Equals(value, _boundSpeedButton))
43 {
44 return;
45 }
46  
47 _boundSpeedButton = value;
48 OnPropertyChanged();
49 }
50 }
51  
52 [XmlElement(ElementName = "BoundSlowButton")]
53 public List<string> BoundSlowButton
54 {
55 get => _boundSlowButton;
56 set
57 {
58 if (Equals(value, _boundSlowButton))
59 {
60 return;
61 }
62  
63 _boundSlowButton = value;
64 OnPropertyChanged();
65 }
66 }
67  
68 [XmlElement(ElementName = "Spring")]
69 public Spring Spring
70 {
71 get => _spring;
72 set
73 {
74 if (Equals(value, _spring))
75 {
76 return;
77 }
78  
79 _spring = value;
80 OnPropertyChanged();
81 }
82 }
83  
84 [XmlElement(ElementName = "HUD")]
85 public HUD HUD
86 {
87 get => _hud;
88 set
89 {
90 if (Equals(value, _hud))
91 {
92 return;
93 }
94  
95 _hud = value;
96 OnPropertyChanged();
97 }
98 }
99  
100 #endregion
101  
102 #region Private Delegates, Events, Enums, Properties, Indexers and Fields
103  
104 private List<string> _boundButton = new List<string>();
105  
106 private List<string> _boundSlowButton = new List<string>();
107  
108 private List<string> _boundSpeedButton = new List<string>();
109  
110 private HUD _hud = new HUD();
111  
112 private Spring _spring = new Spring();
113  
114 #endregion
115  
116 #region Constructors, Destructors and Finalizers
117  
118 [UsedImplicitly]
119 public Configuration()
120 {
121 }
122  
123 #endregion
124  
125 #region Private Methods
126  
127 [NotifyPropertyChangedInvocator]
128 protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
129 {
130 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
131 }
132  
133 #endregion
134 }
135 }