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