Widow – Diff between revs 9 and 11

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