misu – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System.Collections.Generic; |
2 | using System.ComponentModel; |
||
3 | using System.Runtime.CompilerServices; |
||
4 | using System.Windows.Forms; |
||
5 | using System.Xml.Serialization; |
||
6 | using Configuration.Annotations; |
||
7 | |||
8 | namespace Configuration |
||
9 | { |
||
10 | [XmlRoot(ElementName = "Binding")] |
||
11 | public class Binding : INotifyPropertyChanged |
||
12 | { |
||
13 | #region Public Enums, Properties and Fields |
||
14 | |||
15 | [XmlElement(ElementName = "Binding")] |
||
16 | public List<Keys> Keys |
||
17 | { |
||
18 | get => _binding; |
||
19 | set |
||
20 | { |
||
21 | if (value == _binding) |
||
22 | { |
||
23 | return; |
||
24 | } |
||
25 | |||
26 | _binding = value; |
||
27 | OnPropertyChanged(); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | #endregion |
||
32 | |||
33 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
||
34 | |||
35 | private List<Keys> _binding = new List<Keys>(); |
||
36 | |||
37 | #endregion |
||
38 | |||
39 | #region Constructors, Destructors and Finalizers |
||
40 | |||
41 | [UsedImplicitly] |
||
42 | public Binding() |
||
43 | { |
||
44 | } |
||
45 | |||
46 | #endregion |
||
47 | |||
48 | #region Interface |
||
49 | |||
50 | public event PropertyChangedEventHandler PropertyChanged; |
||
51 | |||
52 | #endregion |
||
53 | |||
54 | #region Public Overrides |
||
55 | |||
56 | public override string ToString() |
||
57 | { |
||
58 | return string.Join(@"+", _binding); |
||
59 | } |
||
60 | |||
61 | #endregion |
||
62 | |||
63 | #region Private Methods |
||
64 | |||
65 | [NotifyPropertyChangedInvocator] |
||
66 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
67 | { |
||
68 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
69 | } |
||
70 | |||
71 | #endregion |
||
72 | } |
||
73 | } |