Widow – Blame information for rev 14

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