Widow – Blame information for rev 9
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System.ComponentModel; |
2 | using System.Runtime.CompilerServices; |
||
3 | using System.Xml.Serialization; |
||
4 | using Windows.Annotations; |
||
5 | |||
6 | namespace Windows |
||
7 | { |
||
8 | [XmlRoot(ElementName = "Window")] |
||
9 | public class Window : INotifyPropertyChanged |
||
10 | { |
||
11 | #region Public Enums, Properties and Fields |
||
12 | |||
13 | [XmlElement(ElementName = "Name")] |
||
14 | public string Name |
||
15 | { |
||
16 | get => _name; |
||
17 | set |
||
18 | { |
||
19 | if (value == _name) |
||
20 | { |
||
21 | return; |
||
22 | } |
||
23 | |||
24 | _name = value; |
||
25 | OnPropertyChanged(); |
||
26 | } |
||
27 | } |
||
28 | |||
9 | office | 29 | [XmlElement(ElementName = "IgnoreWidth")] |
30 | public bool IgnoreWidth |
||
31 | { |
||
32 | get => _ignoreWidth; |
||
33 | set |
||
34 | { |
||
35 | if (value == _ignoreWidth) |
||
36 | { |
||
37 | return; |
||
38 | } |
||
39 | |||
40 | _ignoreWidth = value; |
||
41 | OnPropertyChanged(); |
||
42 | } |
||
43 | } |
||
44 | |||
1 | office | 45 | [XmlElement(ElementName = "Width")] |
46 | public int Width |
||
47 | { |
||
48 | get => _width; |
||
49 | set |
||
50 | { |
||
51 | if (value == _width) |
||
52 | { |
||
53 | return; |
||
54 | } |
||
55 | |||
56 | _width = value; |
||
57 | OnPropertyChanged(); |
||
58 | } |
||
59 | } |
||
60 | |||
9 | office | 61 | [XmlElement(ElementName = "IgnoreHeight")] |
62 | public bool IgnoreHeight |
||
63 | { |
||
64 | get => _ignoreHeight; |
||
65 | set |
||
66 | { |
||
67 | if (value == _ignoreHeight) |
||
68 | { |
||
69 | return; |
||
70 | } |
||
71 | |||
72 | _ignoreHeight = value; |
||
73 | OnPropertyChanged(); |
||
74 | } |
||
75 | } |
||
76 | |||
1 | office | 77 | [XmlElement(ElementName = "Height")] |
78 | public int Height |
||
79 | { |
||
80 | get => _height; |
||
81 | set |
||
82 | { |
||
83 | if (value == _height) |
||
84 | { |
||
85 | return; |
||
86 | } |
||
87 | |||
88 | _height = value; |
||
89 | OnPropertyChanged(); |
||
90 | } |
||
91 | } |
||
92 | |||
9 | office | 93 | [XmlElement(ElementName = "IgnoreLeft")] |
94 | public bool IgnoreLeft |
||
95 | { |
||
96 | get => _ignoreLeft; |
||
97 | set |
||
98 | { |
||
99 | if (value == _ignoreLeft) |
||
100 | { |
||
101 | return; |
||
102 | } |
||
103 | |||
104 | _ignoreLeft = value; |
||
105 | OnPropertyChanged(); |
||
106 | } |
||
107 | } |
||
108 | |||
1 | office | 109 | [XmlElement(ElementName = "Left")] |
110 | public int Left |
||
111 | { |
||
112 | get => _left; |
||
113 | set |
||
114 | { |
||
115 | if (value == _left) |
||
116 | { |
||
117 | return; |
||
118 | } |
||
119 | |||
120 | _left = value; |
||
121 | OnPropertyChanged(); |
||
122 | } |
||
123 | } |
||
124 | |||
9 | office | 125 | [XmlElement(ElementName = "IgnoreTop")] |
126 | public bool IgnoreTop |
||
127 | { |
||
128 | get => _ignoreTop; |
||
129 | set |
||
130 | { |
||
131 | if (value == _ignoreTop) |
||
132 | { |
||
133 | return; |
||
134 | } |
||
135 | |||
136 | _ignoreTop = value; |
||
137 | OnPropertyChanged(); |
||
138 | } |
||
139 | } |
||
140 | |||
1 | office | 141 | [XmlElement(ElementName = "Top")] |
142 | public int Top |
||
143 | { |
||
144 | get => _top; |
||
145 | set |
||
146 | { |
||
147 | if (value == _top) |
||
148 | { |
||
149 | return; |
||
150 | } |
||
151 | |||
152 | _top = value; |
||
153 | OnPropertyChanged(); |
||
154 | } |
||
155 | } |
||
156 | |||
157 | #endregion |
||
158 | |||
159 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
||
160 | |||
161 | private int _height; |
||
162 | |||
9 | office | 163 | private bool _ignoreHeight; |
164 | |||
165 | private bool _ignoreLeft; |
||
166 | |||
167 | private bool _ignoreTop; |
||
168 | |||
169 | private bool _ignoreWidth; |
||
170 | |||
1 | office | 171 | private int _left; |
172 | |||
173 | private string _name; |
||
174 | |||
175 | private int _top; |
||
176 | |||
177 | private int _width; |
||
178 | |||
179 | #endregion |
||
180 | |||
181 | #region Constructors, Destructors and Finalizers |
||
182 | |||
183 | [UsedImplicitly] |
||
184 | public Window() |
||
185 | { |
||
186 | } |
||
5 | office | 187 | |
1 | office | 188 | public Window(string name, int top, int left, int width, int height) : this() |
189 | { |
||
190 | Name = name; |
||
191 | Top = top; |
||
192 | Left = left; |
||
193 | Width = width; |
||
194 | Height = height; |
||
195 | } |
||
196 | |||
197 | #endregion |
||
198 | |||
199 | #region Interface |
||
200 | |||
201 | public event PropertyChangedEventHandler PropertyChanged; |
||
202 | |||
203 | #endregion |
||
204 | |||
205 | #region Private Methods |
||
206 | |||
207 | [NotifyPropertyChangedInvocator] |
||
208 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
209 | { |
||
210 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
211 | } |
||
212 | |||
213 | #endregion |
||
214 | } |
||
215 | } |