Merge lp:~dangarner/xibo/client-132 into lp:xibo/1.3
- client-132
- Merge into faye
Proposed by
Dan Garner
Status: | Merged |
---|---|
Merged at revision: | 231 |
Proposed branch: | lp:~dangarner/xibo/client-132 |
Merge into: | lp:xibo/1.3 |
Diff against target: |
1119 lines (+214/-291) 12 files modified
client/dotNET/CacheManager.cs (+6/-1) client/dotNET/HardwareKey.cs (+24/-11) client/dotNET/MainForm.Designer.cs (+2/-1) client/dotNET/MainForm.cs (+4/-0) client/dotNET/Media.cs (+6/-2) client/dotNET/OptionForm.Designer.cs (+44/-74) client/dotNET/OptionForm.cs (+102/-198) client/dotNET/Properties/Settings.Designer.cs (+13/-1) client/dotNET/Properties/Settings.settings (+3/-0) client/dotNET/Region.cs (+6/-2) client/dotNET/RequiredFiles.cs (+1/-1) client/dotNET/app.config (+3/-0) |
To merge this branch: | bzr merge lp:~dangarner/xibo/client-132 |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xibo Maintainters | Pending | ||
Review via email: mp+89591@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'client/dotNET/CacheManager.cs' |
2 | --- client/dotNET/CacheManager.cs 2011-02-16 17:06:01 +0000 |
3 | +++ client/dotNET/CacheManager.cs 2012-01-22 15:34:34 +0000 |
4 | @@ -222,7 +222,7 @@ |
5 | /// <returns></returns> |
6 | public bool IsValidLayout(string layoutFile) |
7 | { |
8 | - Debug.WriteLine("Checking Layout " + layoutFile + " is valid"); |
9 | + Debug.WriteLine("Checking if Layout " + layoutFile + " is valid"); |
10 | |
11 | if (!IsValidPath(layoutFile)) |
12 | return false; |
13 | @@ -245,7 +245,10 @@ |
14 | |
15 | // Get the path and see if its valid |
16 | if (!IsValidPath(media.InnerText)) |
17 | + { |
18 | + Debug.WriteLine("Invalid Media: " + media.Attributes["id"].Value.ToString()); |
19 | return false; |
20 | + } |
21 | |
22 | break; |
23 | |
24 | @@ -254,6 +257,8 @@ |
25 | } |
26 | } |
27 | |
28 | + Debug.WriteLine("Layout " + layoutFile + " is valid"); |
29 | + |
30 | return true; |
31 | } |
32 | |
33 | |
34 | === modified file 'client/dotNET/HardwareKey.cs' |
35 | --- client/dotNET/HardwareKey.cs 2010-04-19 21:45:10 +0000 |
36 | +++ client/dotNET/HardwareKey.cs 2012-01-22 15:34:34 +0000 |
37 | @@ -27,30 +27,44 @@ |
38 | { |
39 | class HardwareKey |
40 | { |
41 | + private string _hardwareKey; |
42 | + private string _macAddress; |
43 | + |
44 | + public string MacAddress |
45 | + { |
46 | + get |
47 | + { |
48 | + return _macAddress; |
49 | + } |
50 | + } |
51 | + |
52 | public HardwareKey() |
53 | { |
54 | System.Diagnostics.Debug.WriteLine("[IN]", "HardwareKey"); |
55 | |
56 | // Get the key from the Settings |
57 | - hardwareKey = Properties.Settings.Default.hardwareKey; |
58 | + _hardwareKey = Properties.Settings.Default.hardwareKey; |
59 | |
60 | // Is the key empty? |
61 | - if (hardwareKey == "") |
62 | + if (_hardwareKey == "") |
63 | { |
64 | try |
65 | { |
66 | // Calculate the Hardware key from the CPUID and Volume Serial |
67 | - hardwareKey = Hashes.MD5(GetCPUId() + GetVolumeSerial("C")); |
68 | + _hardwareKey = Hashes.MD5(GetCPUId() + GetVolumeSerial("C")); |
69 | } |
70 | catch |
71 | { |
72 | - hardwareKey = "Change for Unique Key"; |
73 | + _hardwareKey = "Change for Unique Key"; |
74 | } |
75 | |
76 | // Store the key |
77 | - Properties.Settings.Default.hardwareKey = hardwareKey; |
78 | + Properties.Settings.Default.hardwareKey = _hardwareKey; |
79 | } |
80 | |
81 | + // Get the Mac Address |
82 | + _macAddress = GetMACAddress(); |
83 | + |
84 | System.Diagnostics.Debug.WriteLine("[OUT]", "HardwareKey"); |
85 | } |
86 | |
87 | @@ -61,7 +75,7 @@ |
88 | { |
89 | get |
90 | { |
91 | - return this.hardwareKey; |
92 | + return this._hardwareKey; |
93 | } |
94 | } |
95 | |
96 | @@ -71,10 +85,10 @@ |
97 | public void Regenerate() |
98 | { |
99 | // Calculate the Hardware key from the CPUID and Volume Serial |
100 | - hardwareKey = Hashes.MD5(GetCPUId() + GetVolumeSerial("C")); |
101 | + _hardwareKey = Hashes.MD5(GetCPUId() + GetVolumeSerial("C")); |
102 | |
103 | // Store the key |
104 | - Properties.Settings.Default.hardwareKey = hardwareKey; |
105 | + Properties.Settings.Default.hardwareKey = _hardwareKey; |
106 | Properties.Settings.Default.Save(); |
107 | } |
108 | |
109 | @@ -105,6 +119,7 @@ |
110 | ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration"); |
111 | ManagementObjectCollection moc = mc.GetInstances(); |
112 | string MACAddress = String.Empty; |
113 | + |
114 | foreach (ManagementObject mo in moc) |
115 | { |
116 | if (MACAddress == String.Empty) // only return MAC Address from first card |
117 | @@ -113,7 +128,7 @@ |
118 | } |
119 | mo.Dispose(); |
120 | } |
121 | - MACAddress = MACAddress.Replace(":", ""); |
122 | + |
123 | return MACAddress; |
124 | } |
125 | |
126 | @@ -141,7 +156,5 @@ |
127 | |
128 | return cpuInfo; |
129 | } |
130 | - |
131 | - private string hardwareKey; |
132 | } |
133 | } |
134 | |
135 | === modified file 'client/dotNET/MainForm.Designer.cs' |
136 | --- client/dotNET/MainForm.Designer.cs 2009-12-31 11:38:50 +0000 |
137 | +++ client/dotNET/MainForm.Designer.cs 2012-01-22 15:34:34 +0000 |
138 | @@ -1,3 +1,4 @@ |
139 | +using XiboClient.Properties; |
140 | namespace XiboClient |
141 | { |
142 | partial class MainForm |
143 | @@ -38,7 +39,7 @@ |
144 | this.BackColor = System.Drawing.Color.Black; |
145 | this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; |
146 | this.ClientSize = new System.Drawing.Size(1024, 768); |
147 | - this.DoubleBuffered = true; |
148 | + this.DoubleBuffered = Settings.Default.DoubleBuffering; |
149 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; |
150 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); |
151 | this.Name = "MainForm"; |
152 | |
153 | === modified file 'client/dotNET/MainForm.cs' |
154 | --- client/dotNET/MainForm.cs 2011-09-06 20:46:43 +0000 |
155 | +++ client/dotNET/MainForm.cs 2012-01-22 15:34:34 +0000 |
156 | @@ -70,6 +70,9 @@ |
157 | _clientSize = SystemInformation.PrimaryMonitorSize; |
158 | } |
159 | |
160 | + // Setup the proxy information |
161 | + OptionForm.SetGlobalProxy(); |
162 | + |
163 | _statLog = new StatLog(); |
164 | |
165 | this.FormClosing += new FormClosingEventHandler(MainForm_FormClosing); |
166 | @@ -419,6 +422,7 @@ |
167 | if (region.ChildNodes.Count == 0) |
168 | { |
169 | Debug.WriteLine("A region with no media detected"); |
170 | + continue; |
171 | } |
172 | |
173 | //each region |
174 | |
175 | === modified file 'client/dotNET/Media.cs' |
176 | --- client/dotNET/Media.cs 2011-06-05 15:21:16 +0000 |
177 | +++ client/dotNET/Media.cs 2012-01-22 15:34:34 +0000 |
178 | @@ -21,6 +21,7 @@ |
179 | using System.Collections.Generic; |
180 | using System.Text; |
181 | using System.Windows.Forms; |
182 | +using XiboClient.Properties; |
183 | |
184 | namespace XiboClient |
185 | { |
186 | @@ -48,8 +49,11 @@ |
187 | this.BackColor = System.Drawing.Color.Transparent; |
188 | this.TransparencyKey = System.Drawing.Color.White; |
189 | |
190 | - SetStyle(ControlStyles.OptimizedDoubleBuffer, true); |
191 | - SetStyle(ControlStyles.AllPaintingInWmPaint, true); |
192 | + if (Settings.Default.DoubleBuffering) |
193 | + { |
194 | + SetStyle(ControlStyles.OptimizedDoubleBuffer, true); |
195 | + SetStyle(ControlStyles.AllPaintingInWmPaint, true); |
196 | + } |
197 | } |
198 | |
199 | protected void StartTimer() |
200 | |
201 | === modified file 'client/dotNET/OptionForm.Designer.cs' |
202 | --- client/dotNET/OptionForm.Designer.cs 2011-07-16 13:13:44 +0000 |
203 | +++ client/dotNET/OptionForm.Designer.cs 2012-01-22 15:34:34 +0000 |
204 | @@ -75,11 +75,11 @@ |
205 | this.clientHeight = new System.Windows.Forms.NumericUpDown(); |
206 | this.clientWidth = new System.Windows.Forms.NumericUpDown(); |
207 | this.tabPage5 = new System.Windows.Forms.TabPage(); |
208 | + this.doubleBufferingCheckBox = new System.Windows.Forms.CheckBox(); |
209 | this.enableMouseCb = new System.Windows.Forms.CheckBox(); |
210 | this.cbExpireModifiedLayouts = new System.Windows.Forms.CheckBox(); |
211 | - this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); |
212 | + this.numericUpDownEmptyRegions = new System.Windows.Forms.NumericUpDown(); |
213 | this.label15 = new System.Windows.Forms.Label(); |
214 | - this.buttonReset = new System.Windows.Forms.Button(); |
215 | this.menuStrip1 = new System.Windows.Forms.MenuStrip(); |
216 | this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
217 | this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); |
218 | @@ -101,7 +101,7 @@ |
219 | ((System.ComponentModel.ISupportInitialize)(this.clientHeight)).BeginInit(); |
220 | ((System.ComponentModel.ISupportInitialize)(this.clientWidth)).BeginInit(); |
221 | this.tabPage5.SuspendLayout(); |
222 | - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); |
223 | + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownEmptyRegions)).BeginInit(); |
224 | this.menuStrip1.SuspendLayout(); |
225 | this.SuspendLayout(); |
226 | // |
227 | @@ -134,7 +134,6 @@ |
228 | // |
229 | // buttonSaveSettings |
230 | // |
231 | - this.buttonSaveSettings.Enabled = false; |
232 | this.buttonSaveSettings.Location = new System.Drawing.Point(200, 320); |
233 | this.buttonSaveSettings.Name = "buttonSaveSettings"; |
234 | this.buttonSaveSettings.Size = new System.Drawing.Size(75, 23); |
235 | @@ -183,7 +182,6 @@ |
236 | // |
237 | // nupScrollStepAmount |
238 | // |
239 | - this.nupScrollStepAmount.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "scrollStepAmount", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
240 | this.nupScrollStepAmount.Location = new System.Drawing.Point(184, 145); |
241 | this.nupScrollStepAmount.Minimum = new decimal(new int[] { |
242 | 1, |
243 | @@ -193,7 +191,11 @@ |
244 | this.nupScrollStepAmount.Name = "nupScrollStepAmount"; |
245 | this.nupScrollStepAmount.Size = new System.Drawing.Size(76, 20); |
246 | this.nupScrollStepAmount.TabIndex = 16; |
247 | - this.nupScrollStepAmount.Value = global::XiboClient.Properties.Settings.Default.scrollStepAmount; |
248 | + this.nupScrollStepAmount.Value = new decimal(new int[] { |
249 | + 1, |
250 | + 0, |
251 | + 0, |
252 | + 0}); |
253 | // |
254 | // label10 |
255 | // |
256 | @@ -257,66 +259,56 @@ |
257 | // |
258 | // tbHardwareKey |
259 | // |
260 | - this.tbHardwareKey.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "hardwareKey", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
261 | this.tbHardwareKey.Location = new System.Drawing.Point(184, 119); |
262 | this.tbHardwareKey.Name = "tbHardwareKey"; |
263 | this.tbHardwareKey.Size = new System.Drawing.Size(237, 20); |
264 | this.tbHardwareKey.TabIndex = 14; |
265 | - this.tbHardwareKey.Text = global::XiboClient.Properties.Settings.Default.hardwareKey; |
266 | // |
267 | // checkBoxStats |
268 | // |
269 | this.checkBoxStats.AutoSize = true; |
270 | - this.checkBoxStats.Checked = global::XiboClient.Properties.Settings.Default.statsEnabled; |
271 | + this.checkBoxStats.Checked = true; |
272 | this.checkBoxStats.CheckState = System.Windows.Forms.CheckState.Checked; |
273 | - this.checkBoxStats.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::XiboClient.Properties.Settings.Default, "statsEnabled", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
274 | this.checkBoxStats.Location = new System.Drawing.Point(184, 204); |
275 | this.checkBoxStats.Name = "checkBoxStats"; |
276 | this.checkBoxStats.Size = new System.Drawing.Size(104, 17); |
277 | this.checkBoxStats.TabIndex = 0; |
278 | this.checkBoxStats.Text = "Enable Statistics"; |
279 | this.checkBoxStats.UseVisualStyleBackColor = true; |
280 | - this.checkBoxStats.CheckedChanged += new System.EventHandler(this.checkBoxStats_CheckedChanged); |
281 | // |
282 | // checkBoxPowerPoint |
283 | // |
284 | this.checkBoxPowerPoint.AutoSize = true; |
285 | - this.checkBoxPowerPoint.Checked = global::XiboClient.Properties.Settings.Default.powerpointEnabled; |
286 | - this.checkBoxPowerPoint.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::XiboClient.Properties.Settings.Default, "powerpointEnabled", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
287 | this.checkBoxPowerPoint.Location = new System.Drawing.Point(184, 181); |
288 | this.checkBoxPowerPoint.Name = "checkBoxPowerPoint"; |
289 | this.checkBoxPowerPoint.Size = new System.Drawing.Size(116, 17); |
290 | this.checkBoxPowerPoint.TabIndex = 12; |
291 | this.checkBoxPowerPoint.Text = "Enable PowerPoint"; |
292 | this.checkBoxPowerPoint.UseVisualStyleBackColor = true; |
293 | - this.checkBoxPowerPoint.CheckedChanged += new System.EventHandler(this.checkBoxPowerPoint_CheckedChanged); |
294 | // |
295 | // textBoxXmdsUri |
296 | // |
297 | - this.textBoxXmdsUri.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "serverURI", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
298 | this.textBoxXmdsUri.Location = new System.Drawing.Point(184, 11); |
299 | this.textBoxXmdsUri.Name = "textBoxXmdsUri"; |
300 | this.textBoxXmdsUri.Size = new System.Drawing.Size(237, 20); |
301 | this.textBoxXmdsUri.TabIndex = 0; |
302 | - this.textBoxXmdsUri.Text = global::XiboClient.Properties.Settings.Default.serverURI; |
303 | + this.textBoxXmdsUri.Text = "http://localhost/xibo"; |
304 | // |
305 | // textBoxServerKey |
306 | // |
307 | - this.textBoxServerKey.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "ServerKey", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
308 | this.textBoxServerKey.Location = new System.Drawing.Point(184, 38); |
309 | this.textBoxServerKey.Name = "textBoxServerKey"; |
310 | this.textBoxServerKey.Size = new System.Drawing.Size(237, 20); |
311 | this.textBoxServerKey.TabIndex = 2; |
312 | - this.textBoxServerKey.Text = global::XiboClient.Properties.Settings.Default.ServerKey; |
313 | + this.textBoxServerKey.Text = "yourserverkey"; |
314 | // |
315 | // textBoxLibraryPath |
316 | // |
317 | - this.textBoxLibraryPath.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "LibraryPath", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
318 | this.textBoxLibraryPath.Location = new System.Drawing.Point(184, 65); |
319 | this.textBoxLibraryPath.Name = "textBoxLibraryPath"; |
320 | this.textBoxLibraryPath.Size = new System.Drawing.Size(156, 20); |
321 | this.textBoxLibraryPath.TabIndex = 4; |
322 | - this.textBoxLibraryPath.Text = global::XiboClient.Properties.Settings.Default.LibraryPath; |
323 | + this.textBoxLibraryPath.Text = "DEFAULT"; |
324 | // |
325 | // tabPage2 |
326 | // |
327 | @@ -396,19 +388,17 @@ |
328 | this.labelXmdsUrl.AutoSize = true; |
329 | this.labelXmdsUrl.Location = new System.Drawing.Point(139, 10); |
330 | this.labelXmdsUrl.Name = "labelXmdsUrl"; |
331 | - this.labelXmdsUrl.Size = new System.Drawing.Size(338, 13); |
332 | + this.labelXmdsUrl.Size = new System.Drawing.Size(299, 13); |
333 | this.labelXmdsUrl.TabIndex = 3; |
334 | - this.labelXmdsUrl.Text = global::XiboClient.Properties.Settings.Default.XiboClient_xmds_xmds; |
335 | + this.labelXmdsUrl.Text = "http://localhost/Series%201.3/131-datasets/server/xmds.php"; |
336 | // |
337 | // textBoxDisplayName |
338 | // |
339 | - this.textBoxDisplayName.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "displayName", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
340 | this.textBoxDisplayName.Location = new System.Drawing.Point(142, 37); |
341 | this.textBoxDisplayName.Name = "textBoxDisplayName"; |
342 | this.textBoxDisplayName.Size = new System.Drawing.Size(264, 20); |
343 | this.textBoxDisplayName.TabIndex = 0; |
344 | - this.textBoxDisplayName.Text = global::XiboClient.Properties.Settings.Default.displayName; |
345 | - this.textBoxDisplayName.TextChanged += new System.EventHandler(this.textBoxDisplayName_TextChanged); |
346 | + this.textBoxDisplayName.Text = "COMPUTERNAME"; |
347 | // |
348 | // tabPage3 |
349 | // |
350 | @@ -448,31 +438,25 @@ |
351 | // |
352 | // textBoxProxyDomain |
353 | // |
354 | - this.textBoxProxyDomain.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "ProxyDomain", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
355 | this.textBoxProxyDomain.Location = new System.Drawing.Point(99, 95); |
356 | this.textBoxProxyDomain.Name = "textBoxProxyDomain"; |
357 | this.textBoxProxyDomain.Size = new System.Drawing.Size(171, 20); |
358 | this.textBoxProxyDomain.TabIndex = 7; |
359 | - this.textBoxProxyDomain.Text = global::XiboClient.Properties.Settings.Default.ProxyDomain; |
360 | // |
361 | // maskedTextBoxProxyPass |
362 | // |
363 | - this.maskedTextBoxProxyPass.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "ProxyPassword", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
364 | this.maskedTextBoxProxyPass.Location = new System.Drawing.Point(99, 67); |
365 | this.maskedTextBoxProxyPass.Name = "maskedTextBoxProxyPass"; |
366 | this.maskedTextBoxProxyPass.Size = new System.Drawing.Size(171, 20); |
367 | this.maskedTextBoxProxyPass.TabIndex = 5; |
368 | - this.maskedTextBoxProxyPass.Text = global::XiboClient.Properties.Settings.Default.ProxyPassword; |
369 | this.maskedTextBoxProxyPass.UseSystemPasswordChar = true; |
370 | // |
371 | // textBoxProxyUser |
372 | // |
373 | - this.textBoxProxyUser.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "ProxyUser", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
374 | this.textBoxProxyUser.Location = new System.Drawing.Point(99, 41); |
375 | this.textBoxProxyUser.Name = "textBoxProxyUser"; |
376 | this.textBoxProxyUser.Size = new System.Drawing.Size(171, 20); |
377 | this.textBoxProxyUser.TabIndex = 3; |
378 | - this.textBoxProxyUser.Text = global::XiboClient.Properties.Settings.Default.ProxyUser; |
379 | // |
380 | // labelProxyDomain |
381 | // |
382 | @@ -557,7 +541,6 @@ |
383 | // |
384 | // offsetX |
385 | // |
386 | - this.offsetX.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "offsetX", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
387 | this.offsetX.Location = new System.Drawing.Point(77, 67); |
388 | this.offsetX.Maximum = new decimal(new int[] { |
389 | 10000, |
390 | @@ -567,12 +550,9 @@ |
391 | this.offsetX.Name = "offsetX"; |
392 | this.offsetX.Size = new System.Drawing.Size(77, 20); |
393 | this.offsetX.TabIndex = 6; |
394 | - this.offsetX.Value = global::XiboClient.Properties.Settings.Default.offsetX; |
395 | - this.offsetX.ValueChanged += new System.EventHandler(this.offsetX_ValueChanged_1); |
396 | // |
397 | // offsetY |
398 | // |
399 | - this.offsetY.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "offsetY", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
400 | this.offsetY.Location = new System.Drawing.Point(77, 94); |
401 | this.offsetY.Maximum = new decimal(new int[] { |
402 | 10000, |
403 | @@ -582,12 +562,9 @@ |
404 | this.offsetY.Name = "offsetY"; |
405 | this.offsetY.Size = new System.Drawing.Size(77, 20); |
406 | this.offsetY.TabIndex = 7; |
407 | - this.offsetY.Value = global::XiboClient.Properties.Settings.Default.offsetY; |
408 | - this.offsetY.ValueChanged += new System.EventHandler(this.offsetY_ValueChanged_1); |
409 | // |
410 | // clientHeight |
411 | // |
412 | - this.clientHeight.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "sizeY", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
413 | this.clientHeight.Location = new System.Drawing.Point(77, 41); |
414 | this.clientHeight.Maximum = new decimal(new int[] { |
415 | 10000, |
416 | @@ -597,12 +574,9 @@ |
417 | this.clientHeight.Name = "clientHeight"; |
418 | this.clientHeight.Size = new System.Drawing.Size(77, 20); |
419 | this.clientHeight.TabIndex = 5; |
420 | - this.clientHeight.Value = global::XiboClient.Properties.Settings.Default.sizeY; |
421 | - this.clientHeight.ValueChanged += new System.EventHandler(this.clientHeight_ValueChanged_1); |
422 | // |
423 | // clientWidth |
424 | // |
425 | - this.clientWidth.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "sizeX", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
426 | this.clientWidth.Location = new System.Drawing.Point(77, 15); |
427 | this.clientWidth.Maximum = new decimal(new int[] { |
428 | 10000, |
429 | @@ -612,14 +586,13 @@ |
430 | this.clientWidth.Name = "clientWidth"; |
431 | this.clientWidth.Size = new System.Drawing.Size(77, 20); |
432 | this.clientWidth.TabIndex = 4; |
433 | - this.clientWidth.Value = global::XiboClient.Properties.Settings.Default.sizeX; |
434 | - this.clientWidth.ValueChanged += new System.EventHandler(this.clientWidth_ValueChanged_1); |
435 | // |
436 | // tabPage5 |
437 | // |
438 | + this.tabPage5.Controls.Add(this.doubleBufferingCheckBox); |
439 | this.tabPage5.Controls.Add(this.enableMouseCb); |
440 | this.tabPage5.Controls.Add(this.cbExpireModifiedLayouts); |
441 | - this.tabPage5.Controls.Add(this.numericUpDown1); |
442 | + this.tabPage5.Controls.Add(this.numericUpDownEmptyRegions); |
443 | this.tabPage5.Controls.Add(this.label15); |
444 | this.tabPage5.Location = new System.Drawing.Point(4, 22); |
445 | this.tabPage5.Name = "tabPage5"; |
446 | @@ -629,43 +602,51 @@ |
447 | this.tabPage5.Text = "Advanced"; |
448 | this.tabPage5.UseVisualStyleBackColor = true; |
449 | // |
450 | + // doubleBufferingCheckBox |
451 | + // |
452 | + this.doubleBufferingCheckBox.AutoSize = true; |
453 | + this.doubleBufferingCheckBox.Location = new System.Drawing.Point(176, 140); |
454 | + this.doubleBufferingCheckBox.Name = "doubleBufferingCheckBox"; |
455 | + this.doubleBufferingCheckBox.Size = new System.Drawing.Size(141, 17); |
456 | + this.doubleBufferingCheckBox.TabIndex = 4; |
457 | + this.doubleBufferingCheckBox.Text = "Enable Double Buffering"; |
458 | + this.doubleBufferingCheckBox.UseVisualStyleBackColor = true; |
459 | + // |
460 | // enableMouseCb |
461 | // |
462 | this.enableMouseCb.AutoSize = true; |
463 | - this.enableMouseCb.Checked = global::XiboClient.Properties.Settings.Default.EnableMouse; |
464 | + this.enableMouseCb.Checked = true; |
465 | this.enableMouseCb.CheckState = System.Windows.Forms.CheckState.Checked; |
466 | - this.enableMouseCb.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::XiboClient.Properties.Settings.Default, "EnableMouse", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
467 | this.enableMouseCb.Location = new System.Drawing.Point(176, 103); |
468 | this.enableMouseCb.Name = "enableMouseCb"; |
469 | this.enableMouseCb.Size = new System.Drawing.Size(94, 17); |
470 | this.enableMouseCb.TabIndex = 3; |
471 | this.enableMouseCb.Text = "Enable Mouse"; |
472 | this.enableMouseCb.UseVisualStyleBackColor = true; |
473 | - this.enableMouseCb.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); |
474 | // |
475 | // cbExpireModifiedLayouts |
476 | // |
477 | this.cbExpireModifiedLayouts.AutoSize = true; |
478 | - this.cbExpireModifiedLayouts.Checked = global::XiboClient.Properties.Settings.Default.expireModifiedLayouts; |
479 | + this.cbExpireModifiedLayouts.Checked = true; |
480 | this.cbExpireModifiedLayouts.CheckState = System.Windows.Forms.CheckState.Checked; |
481 | - this.cbExpireModifiedLayouts.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::XiboClient.Properties.Settings.Default, "expireModifiedLayouts", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
482 | this.cbExpireModifiedLayouts.Location = new System.Drawing.Point(176, 66); |
483 | this.cbExpireModifiedLayouts.Name = "cbExpireModifiedLayouts"; |
484 | this.cbExpireModifiedLayouts.Size = new System.Drawing.Size(243, 17); |
485 | this.cbExpireModifiedLayouts.TabIndex = 2; |
486 | this.cbExpireModifiedLayouts.Text = "Expire modified layouts while they are playing?"; |
487 | this.cbExpireModifiedLayouts.UseVisualStyleBackColor = true; |
488 | - this.cbExpireModifiedLayouts.CheckedChanged += new System.EventHandler(this.cbExpireModifiedLayouts_CheckedChanged); |
489 | - // |
490 | - // numericUpDown1 |
491 | - // |
492 | - this.numericUpDown1.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "emptyLayoutDuration", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); |
493 | - this.numericUpDown1.Location = new System.Drawing.Point(176, 23); |
494 | - this.numericUpDown1.Name = "numericUpDown1"; |
495 | - this.numericUpDown1.Size = new System.Drawing.Size(91, 20); |
496 | - this.numericUpDown1.TabIndex = 1; |
497 | - this.numericUpDown1.Value = global::XiboClient.Properties.Settings.Default.emptyLayoutDuration; |
498 | - this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); |
499 | + // |
500 | + // numericUpDownEmptyRegions |
501 | + // |
502 | + this.numericUpDownEmptyRegions.Location = new System.Drawing.Point(176, 23); |
503 | + this.numericUpDownEmptyRegions.Name = "numericUpDownEmptyRegions"; |
504 | + this.numericUpDownEmptyRegions.Size = new System.Drawing.Size(91, 20); |
505 | + this.numericUpDownEmptyRegions.TabIndex = 1; |
506 | + this.numericUpDownEmptyRegions.Value = new decimal(new int[] { |
507 | + 10, |
508 | + 0, |
509 | + 0, |
510 | + 0}); |
511 | // |
512 | // label15 |
513 | // |
514 | @@ -676,16 +657,6 @@ |
515 | this.label15.TabIndex = 0; |
516 | this.label15.Text = "Duration for Empty Regions"; |
517 | // |
518 | - // buttonReset |
519 | - // |
520 | - this.buttonReset.Location = new System.Drawing.Point(281, 320); |
521 | - this.buttonReset.Name = "buttonReset"; |
522 | - this.buttonReset.Size = new System.Drawing.Size(75, 23); |
523 | - this.buttonReset.TabIndex = 11; |
524 | - this.buttonReset.Text = "Reset"; |
525 | - this.buttonReset.UseVisualStyleBackColor = true; |
526 | - this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click); |
527 | - // |
528 | // menuStrip1 |
529 | // |
530 | this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { |
531 | @@ -749,7 +720,6 @@ |
532 | this.Controls.Add(this.menuStrip1); |
533 | this.Controls.Add(this.tabControl1); |
534 | this.Controls.Add(this.buttonSaveSettings); |
535 | - this.Controls.Add(this.buttonReset); |
536 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); |
537 | this.MainMenuStrip = this.menuStrip1; |
538 | this.Name = "OptionForm"; |
539 | @@ -773,7 +743,7 @@ |
540 | ((System.ComponentModel.ISupportInitialize)(this.clientWidth)).EndInit(); |
541 | this.tabPage5.ResumeLayout(false); |
542 | this.tabPage5.PerformLayout(); |
543 | - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); |
544 | + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownEmptyRegions)).EndInit(); |
545 | this.menuStrip1.ResumeLayout(false); |
546 | this.menuStrip1.PerformLayout(); |
547 | this.ResumeLayout(false); |
548 | @@ -810,7 +780,6 @@ |
549 | private System.Windows.Forms.NumericUpDown numericUpDownCollect; |
550 | private System.Windows.Forms.FolderBrowserDialog folderBrowserLibrary; |
551 | private System.Windows.Forms.Button buttonLibrary; |
552 | - private System.Windows.Forms.Button buttonReset; |
553 | private System.Windows.Forms.ToolStripMenuItem onlineHelpToolStripMenuItem; |
554 | private System.Windows.Forms.CheckBox checkBoxPowerPoint; |
555 | private System.Windows.Forms.CheckBox checkBoxStats; |
556 | @@ -838,9 +807,10 @@ |
557 | private System.Windows.Forms.NumericUpDown offsetX; |
558 | private System.Windows.Forms.NumericUpDown clientHeight; |
559 | private System.Windows.Forms.TabPage tabPage5; |
560 | - private System.Windows.Forms.NumericUpDown numericUpDown1; |
561 | + private System.Windows.Forms.NumericUpDown numericUpDownEmptyRegions; |
562 | private System.Windows.Forms.Label label15; |
563 | private System.Windows.Forms.CheckBox cbExpireModifiedLayouts; |
564 | private System.Windows.Forms.CheckBox enableMouseCb; |
565 | + private System.Windows.Forms.CheckBox doubleBufferingCheckBox; |
566 | } |
567 | } |
568 | \ No newline at end of file |
569 | |
570 | === modified file 'client/dotNET/OptionForm.cs' |
571 | --- client/dotNET/OptionForm.cs 2011-07-16 13:13:44 +0000 |
572 | +++ client/dotNET/OptionForm.cs 2012-01-22 15:34:34 +0000 |
573 | @@ -1,6 +1,6 @@ |
574 | /* |
575 | * Xibo - Digitial Signage - http://www.xibo.org.uk |
576 | - * Copyright (C) 2006,2007,2008 Daniel Garner and James Packer |
577 | + * Copyright (C) 2006-11 Daniel Garner and James Packer |
578 | * |
579 | * This file is part of Xibo. |
580 | * |
581 | @@ -26,109 +26,86 @@ |
582 | using System.Text; |
583 | using System.Net; |
584 | using System.Windows.Forms; |
585 | +using XiboClient.Properties; |
586 | +using System.Diagnostics; |
587 | |
588 | namespace XiboClient |
589 | { |
590 | public partial class OptionForm : Form |
591 | { |
592 | + private HardwareKey _hardwareKey; |
593 | + |
594 | + |
595 | public OptionForm() |
596 | { |
597 | - System.Diagnostics.Debug.WriteLine("[IN]", "OptionForm"); |
598 | + InitializeComponent(); |
599 | + |
600 | System.Diagnostics.Debug.WriteLine("Initialise Option Form Components", "OptionForm"); |
601 | |
602 | // Get a hardware key here, just in case we havent been able to get one before |
603 | - hardwareKey = new HardwareKey(); |
604 | - |
605 | - InitializeComponent(); |
606 | - |
607 | - System.Diagnostics.Debug.WriteLine("Register some Event Handlers", "OptionForm"); |
608 | - |
609 | - this.xmds1.RegisterDisplayCompleted += new XiboClient.xmds.RegisterDisplayCompletedEventHandler(xmds1_RegisterDisplayCompleted); |
610 | + _hardwareKey = new HardwareKey(); |
611 | + |
612 | + // XMDS completed event |
613 | + xmds1.RegisterDisplayCompleted += new XiboClient.xmds.RegisterDisplayCompletedEventHandler(xmds1_RegisterDisplayCompleted); |
614 | |
615 | - // Bind some events to the settings fields |
616 | - textBoxXmdsUri.TextChanged += new EventHandler(setting_TextChanged); |
617 | - textBoxServerKey.TextChanged += new EventHandler(setting_TextChanged); |
618 | - textBoxLibraryPath.TextChanged += new EventHandler(setting_TextChanged); |
619 | - numericUpDownCollect.ValueChanged += new EventHandler(setting_TextChanged); |
620 | - nupScrollStepAmount.ValueChanged += new EventHandler(nupScrollStepAmount_ValueChanged); |
621 | - |
622 | - // Bind some events to the proxy settings fields |
623 | - textBoxProxyUser.TextChanged += new EventHandler(proxySetting_TextChanged); |
624 | - maskedTextBoxProxyPass.TextChanged += new EventHandler(proxySetting_TextChanged); |
625 | - textBoxProxyDomain.TextChanged += new EventHandler(proxySetting_TextChanged); |
626 | - tbHardwareKey.TextChanged += new EventHandler(tbHardwareKey_TextChanged); |
627 | - |
628 | - clientHeight.ValueChanged += new EventHandler(clientHeight_ValueChanged); |
629 | - clientWidth.ValueChanged += new EventHandler(clientWidth_ValueChanged); |
630 | - offsetX.ValueChanged += new EventHandler(offsetX_ValueChanged); |
631 | - offsetY.ValueChanged += new EventHandler(offsetY_ValueChanged); |
632 | - |
633 | - System.Diagnostics.Debug.WriteLine("Getting the Library Path", "OptionForm"); |
634 | + // Library Path |
635 | if (Properties.Settings.Default.LibraryPath == "DEFAULT") |
636 | { |
637 | + Debug.WriteLine("Getting the Library Path", "OptionForm"); |
638 | Properties.Settings.Default.LibraryPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Xibo Library"; |
639 | Properties.Settings.Default.Save(); |
640 | } |
641 | |
642 | - System.Diagnostics.Debug.WriteLine("Getting the display Name", "OptionForm"); |
643 | - if (Properties.Settings.Default.displayName == "COMPUTERNAME") |
644 | + // Computer name if the display name hasnt been set yet |
645 | + if (Settings.Default.displayName == "COMPUTERNAME") |
646 | { |
647 | - Properties.Settings.Default.displayName = Environment.MachineName; |
648 | - Properties.Settings.Default.Save(); |
649 | + Debug.WriteLine("Getting the display Name", "OptionForm"); |
650 | + Settings.Default.displayName = Environment.MachineName; |
651 | + Settings.Default.Save(); |
652 | } |
653 | |
654 | - System.Diagnostics.Debug.WriteLine("About to call SetGlobalProxy", "OptionForm"); |
655 | + // Set global proxy information |
656 | OptionForm.SetGlobalProxy(); |
657 | |
658 | - System.Diagnostics.Debug.WriteLine("[OUT]", "OptionForm"); |
659 | - } |
660 | - |
661 | - void offsetY_ValueChanged(object sender, EventArgs e) |
662 | - { |
663 | - buttonSaveSettings.Enabled = true; |
664 | - } |
665 | - |
666 | - void offsetX_ValueChanged(object sender, EventArgs e) |
667 | - { |
668 | - buttonSaveSettings.Enabled = true; |
669 | - } |
670 | - |
671 | - void clientWidth_ValueChanged(object sender, EventArgs e) |
672 | - { |
673 | - buttonSaveSettings.Enabled = true; |
674 | - } |
675 | - |
676 | - void clientHeight_ValueChanged(object sender, EventArgs e) |
677 | - { |
678 | - buttonSaveSettings.Enabled = true; |
679 | - } |
680 | - |
681 | - void nupScrollStepAmount_ValueChanged(object sender, EventArgs e) |
682 | - { |
683 | - buttonSaveSettings.Enabled = true; |
684 | - } |
685 | - |
686 | - void tbHardwareKey_TextChanged(object sender, EventArgs e) |
687 | - { |
688 | - buttonSaveSettings.Enabled = true; |
689 | - } |
690 | - |
691 | - void proxySetting_TextChanged(object sender, EventArgs e) |
692 | - { |
693 | - buttonSaveSettings.Enabled = true; |
694 | + // Settings Tab |
695 | + textBoxXmdsUri.Text = Settings.Default.serverURI; |
696 | + textBoxServerKey.Text = Settings.Default.ServerKey; |
697 | + textBoxLibraryPath.Text = Settings.Default.LibraryPath; |
698 | + tbHardwareKey.Text = Settings.Default.hardwareKey; |
699 | + numericUpDownCollect.Value = Settings.Default.collectInterval; |
700 | + checkBoxPowerPoint.Checked = Settings.Default.powerpointEnabled; |
701 | + checkBoxStats.Checked = Settings.Default.statsEnabled; |
702 | + nupScrollStepAmount.Value = Settings.Default.scrollStepAmount; |
703 | + |
704 | + // Register Tab |
705 | + labelXmdsUrl.Text = Settings.Default.XiboClient_xmds_xmds; |
706 | + textBoxDisplayName.Text = Settings.Default.displayName; |
707 | + |
708 | + // Proxy Tab |
709 | + textBoxProxyUser.Text = Settings.Default.ProxyUser; |
710 | + maskedTextBoxProxyPass.Text = Settings.Default.ProxyPassword; |
711 | + textBoxProxyDomain.Text = Settings.Default.ProxyDomain; |
712 | + |
713 | + // Client Tab |
714 | + clientWidth.Value = Settings.Default.sizeX; |
715 | + clientHeight.Value = Settings.Default.sizeY; |
716 | + offsetX.Value = Settings.Default.offsetX; |
717 | + offsetY.Value = Settings.Default.offsetY; |
718 | + |
719 | + // Advanced Tab |
720 | + numericUpDownEmptyRegions.Value = Settings.Default.emptyLayoutDuration; |
721 | + cbExpireModifiedLayouts.Checked = Settings.Default.expireModifiedLayouts; |
722 | + enableMouseCb.Checked = Settings.Default.EnableMouse; |
723 | + doubleBufferingCheckBox.Checked = Settings.Default.DoubleBuffering; |
724 | + |
725 | + System.Diagnostics.Debug.WriteLine("Loaded Options Form", "OptionForm"); |
726 | } |
727 | |
728 | /// <summary> |
729 | - /// Fired when a setting is changed |
730 | + /// Register display completed |
731 | /// </summary> |
732 | /// <param name="sender"></param> |
733 | /// <param name="e"></param> |
734 | - void setting_TextChanged(object sender, EventArgs e) |
735 | - { |
736 | - //Set the button to be enabled |
737 | - buttonSaveSettings.Enabled = true; |
738 | - } |
739 | - |
740 | void xmds1_RegisterDisplayCompleted(object sender, XiboClient.xmds.RegisterDisplayCompletedEventArgs e) |
741 | { |
742 | if (e.Error != null) |
743 | @@ -145,19 +122,25 @@ |
744 | } |
745 | } |
746 | |
747 | + /// <summary> |
748 | + /// Register display clicked |
749 | + /// </summary> |
750 | + /// <param name="sender"></param> |
751 | + /// <param name="e"></param> |
752 | private void buttonRegister_Click(object sender, EventArgs e) |
753 | { |
754 | // Make a new hardware key just in case we have changed it in the form. |
755 | - hardwareKey = new HardwareKey(); |
756 | + _hardwareKey = new HardwareKey(); |
757 | |
758 | textBoxResults.Text = "Sending Request"; |
759 | |
760 | - this.xmds1.Url = Properties.Settings.Default.XiboClient_xmds_xmds; |
761 | + Settings.Default.XiboClient_xmds_xmds = textBoxXmdsUri.Text.TrimEnd('/') + @"/xmds.php"; |
762 | + xmds1.Url = Settings.Default.XiboClient_xmds_xmds; |
763 | |
764 | Properties.Settings.Default.displayName = textBoxDisplayName.Text; |
765 | Properties.Settings.Default.Save(); |
766 | |
767 | - xmds1.RegisterDisplayAsync(Properties.Settings.Default.ServerKey, hardwareKey.Key, textBoxDisplayName.Text, Properties.Settings.Default.Version); |
768 | + xmds1.RegisterDisplayAsync(Properties.Settings.Default.ServerKey, _hardwareKey.Key, textBoxDisplayName.Text, Properties.Settings.Default.Version); |
769 | } |
770 | |
771 | /// <summary> |
772 | @@ -169,44 +152,43 @@ |
773 | { |
774 | try |
775 | { |
776 | - buttonSaveSettings.Enabled = false; |
777 | - |
778 | // Simple settings |
779 | - Properties.Settings.Default.ServerKey = textBoxServerKey.Text; |
780 | - Properties.Settings.Default.LibraryPath = textBoxLibraryPath.Text.TrimEnd('\\'); |
781 | - Properties.Settings.Default.serverURI = textBoxXmdsUri.Text; |
782 | - Properties.Settings.Default.collectInterval = numericUpDownCollect.Value; |
783 | - Properties.Settings.Default.powerpointEnabled = checkBoxPowerPoint.Checked; |
784 | - Properties.Settings.Default.statsEnabled = checkBoxStats.Checked; |
785 | - Properties.Settings.Default.XiboClient_xmds_xmds = textBoxXmdsUri.Text.TrimEnd('/') + @"/xmds.php"; |
786 | - Properties.Settings.Default.hardwareKey = tbHardwareKey.Text; |
787 | - Properties.Settings.Default.scrollStepAmount = nupScrollStepAmount.Value; |
788 | - Properties.Settings.Default.EnableMouse = enableMouseCb.Checked; |
789 | + Settings.Default.ServerKey = textBoxServerKey.Text; |
790 | + Settings.Default.LibraryPath = textBoxLibraryPath.Text.TrimEnd('\\'); |
791 | + Settings.Default.serverURI = textBoxXmdsUri.Text; |
792 | + Settings.Default.collectInterval = numericUpDownCollect.Value; |
793 | + Settings.Default.powerpointEnabled = checkBoxPowerPoint.Checked; |
794 | + Settings.Default.statsEnabled = checkBoxStats.Checked; |
795 | + Settings.Default.XiboClient_xmds_xmds = textBoxXmdsUri.Text.TrimEnd('/') + @"/xmds.php"; |
796 | + Settings.Default.hardwareKey = tbHardwareKey.Text; |
797 | + Settings.Default.scrollStepAmount = nupScrollStepAmount.Value; |
798 | + Settings.Default.EnableMouse = enableMouseCb.Checked; |
799 | + Settings.Default.DoubleBuffering = doubleBufferingCheckBox.Checked; |
800 | |
801 | // Also tweak the address of the xmds1 |
802 | xmds1.Url = Properties.Settings.Default.XiboClient_xmds_xmds; |
803 | labelXmdsUrl.Text = Properties.Settings.Default.XiboClient_xmds_xmds; |
804 | |
805 | // Proxy Settings |
806 | - Properties.Settings.Default.ProxyUser = textBoxProxyUser.Text; |
807 | - Properties.Settings.Default.ProxyPassword = maskedTextBoxProxyPass.Text; |
808 | - Properties.Settings.Default.ProxyDomain = textBoxProxyDomain.Text; |
809 | + Settings.Default.ProxyUser = textBoxProxyUser.Text; |
810 | + Settings.Default.ProxyPassword = maskedTextBoxProxyPass.Text; |
811 | + Settings.Default.ProxyDomain = textBoxProxyDomain.Text; |
812 | |
813 | // Change the default Proxy class |
814 | OptionForm.SetGlobalProxy(); |
815 | |
816 | // Client settings |
817 | - Properties.Settings.Default.sizeX = clientWidth.Value; |
818 | - Properties.Settings.Default.sizeY = clientHeight.Value; |
819 | - Properties.Settings.Default.offsetX = offsetX.Value; |
820 | - Properties.Settings.Default.offsetY = offsetY.Value; |
821 | + Settings.Default.sizeX = clientWidth.Value; |
822 | + Settings.Default.sizeY = clientHeight.Value; |
823 | + Settings.Default.offsetX = offsetX.Value; |
824 | + Settings.Default.offsetY = offsetY.Value; |
825 | |
826 | // Advanced settings |
827 | - Properties.Settings.Default.expireModifiedLayouts = cbExpireModifiedLayouts.Checked; |
828 | - Properties.Settings.Default.emptyLayoutDuration = numericUpDown1.Value; |
829 | + Settings.Default.expireModifiedLayouts = cbExpireModifiedLayouts.Checked; |
830 | + Settings.Default.emptyLayoutDuration = numericUpDownEmptyRegions.Value; |
831 | |
832 | // Commit these changes back to the user settings |
833 | - Properties.Settings.Default.Save(); |
834 | + Settings.Default.Save(); |
835 | } |
836 | catch (Exception ex) |
837 | { |
838 | @@ -219,7 +201,6 @@ |
839 | this.Close(); |
840 | } |
841 | |
842 | - private HardwareKey hardwareKey; |
843 | |
844 | private void buttonLibrary_Click(object sender, EventArgs e) |
845 | { |
846 | @@ -233,25 +214,12 @@ |
847 | } |
848 | } |
849 | |
850 | - private void buttonReset_Click(object sender, EventArgs e) |
851 | - { |
852 | - if (MessageBox.Show("Reset to Default Settings?", "Xibo: Are you sure", MessageBoxButtons.YesNo) == DialogResult.Yes) |
853 | - { |
854 | - Properties.Settings.Default.Reset(); |
855 | - } |
856 | - |
857 | - // Make sure the special settings are delt with |
858 | - Properties.Settings.Default.LibraryPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Xibo Library"; |
859 | - Properties.Settings.Default.displayName = Environment.MachineName; |
860 | - Properties.Settings.Default.Save(); |
861 | - } |
862 | - |
863 | private void onlineHelpToolStripMenuItem_Click(object sender, EventArgs e) |
864 | { |
865 | // open URL in separate instance of default browser |
866 | try |
867 | { |
868 | - System.Diagnostics.Process.Start("http://www.xibo.org.uk/manual"); |
869 | + System.Diagnostics.Process.Start("http://wiki.xibo.org.uk/wiki/Manual:TOC"); |
870 | } |
871 | catch |
872 | { |
873 | @@ -265,31 +233,6 @@ |
874 | about.ShowDialog(); |
875 | } |
876 | |
877 | - private void checkBoxPowerPoint_CheckedChanged(object sender, EventArgs e) |
878 | - { |
879 | - buttonSaveSettings.Enabled = true; |
880 | - |
881 | - if (checkBoxPowerPoint.Checked) |
882 | - { |
883 | - // PowerPoint enabled |
884 | - // check for it installed |
885 | - |
886 | - // enable the IE setting? |
887 | - } |
888 | - |
889 | - return; |
890 | - } |
891 | - |
892 | - private void checkBoxStats_CheckedChanged(object sender, EventArgs e) |
893 | - { |
894 | - buttonSaveSettings.Enabled = true; |
895 | - } |
896 | - |
897 | - private void checkBoxAudit_CheckedChanged(object sender, EventArgs e) |
898 | - { |
899 | - buttonSaveSettings.Enabled = true; |
900 | - } |
901 | - |
902 | private void buttonDisplayAdmin_Click(object sender, EventArgs e) |
903 | { |
904 | // open URL in separate instance of default browser |
905 | @@ -303,97 +246,58 @@ |
906 | } |
907 | } |
908 | |
909 | - private void buttonProxySave_Click(object sender, EventArgs e) |
910 | - { |
911 | - |
912 | - } |
913 | - |
914 | /// <summary> |
915 | /// Sets up the global proxy |
916 | /// </summary> |
917 | public static void SetGlobalProxy() |
918 | { |
919 | - System.Diagnostics.Debug.WriteLine("[IN]", "SetGlobalProxy"); |
920 | + Debug.WriteLine("[IN]", "SetGlobalProxy"); |
921 | |
922 | - System.Diagnostics.Debug.WriteLine("Trying to detect a proxy.", "SetGlobalProxy"); |
923 | + Debug.WriteLine("Trying to detect a proxy.", "SetGlobalProxy"); |
924 | |
925 | if (Properties.Settings.Default.ProxyUser != "") |
926 | { |
927 | - System.Diagnostics.Debug.WriteLine("Creating a network credential using the Proxy User.", "SetGlobalProxy"); |
928 | - NetworkCredential nc = new NetworkCredential(Properties.Settings.Default.ProxyUser, Properties.Settings.Default.ProxyPassword); |
929 | - if (Properties.Settings.Default.ProxyDomain != "") nc.Domain = Properties.Settings.Default.ProxyDomain; |
930 | + // disable expect100Continue |
931 | + ServicePointManager.Expect100Continue = false; |
932 | + |
933 | + Debug.WriteLine("Creating a network credential using the Proxy User.", "SetGlobalProxy"); |
934 | + |
935 | + NetworkCredential nc = new NetworkCredential(Settings.Default.ProxyUser, Settings.Default.ProxyPassword); |
936 | + |
937 | + if (Properties.Settings.Default.ProxyDomain != "") |
938 | + nc.Domain = Properties.Settings.Default.ProxyDomain; |
939 | |
940 | WebRequest.DefaultWebProxy.Credentials = nc; |
941 | } |
942 | else |
943 | { |
944 | - System.Diagnostics.Debug.WriteLine("No Proxy.", "SetGlobalProxy"); |
945 | + Debug.WriteLine("No Proxy.", "SetGlobalProxy"); |
946 | WebRequest.DefaultWebProxy.Credentials = null; |
947 | } |
948 | |
949 | // What if the URL for XMDS has a SSL certificate? |
950 | ServicePointManager.ServerCertificateValidationCallback += delegate(object sender, X509Certificate certificate, X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors) |
951 | { |
952 | - System.Diagnostics.Debug.WriteLine("[IN]", "ServerCertificateValidationCallback"); |
953 | + Debug.WriteLine("[IN]", "ServerCertificateValidationCallback"); |
954 | bool validationResult = false; |
955 | |
956 | - System.Diagnostics.Debug.WriteLine(certificate.Subject); |
957 | - System.Diagnostics.Debug.WriteLine(certificate.Issuer); |
958 | + Debug.WriteLine(certificate.Subject); |
959 | + Debug.WriteLine(certificate.Issuer); |
960 | |
961 | if (sslPolicyErrors != System.Net.Security.SslPolicyErrors.None) |
962 | { |
963 | - System.Diagnostics.Debug.WriteLine(sslPolicyErrors.ToString()); |
964 | + Debug.WriteLine(sslPolicyErrors.ToString()); |
965 | } |
966 | |
967 | validationResult = true; |
968 | |
969 | - System.Diagnostics.Debug.WriteLine("[OUT]", "ServerCertificateValidationCallback"); |
970 | + Debug.WriteLine("[OUT]", "ServerCertificateValidationCallback"); |
971 | return validationResult; |
972 | }; |
973 | |
974 | - System.Diagnostics.Debug.WriteLine("[OUT]", "SetGlobalProxy"); |
975 | + Debug.WriteLine("[OUT]", "SetGlobalProxy"); |
976 | |
977 | return; |
978 | } |
979 | - |
980 | - private void numericUpDown1_ValueChanged(object sender, EventArgs e) |
981 | - { |
982 | - buttonSaveSettings.Enabled = true; |
983 | - } |
984 | - |
985 | - private void cbExpireModifiedLayouts_CheckedChanged(object sender, EventArgs e) |
986 | - { |
987 | - buttonSaveSettings.Enabled = true; |
988 | - } |
989 | - |
990 | - private void clientWidth_ValueChanged_1(object sender, EventArgs e) |
991 | - { |
992 | - buttonSaveSettings.Enabled = true; |
993 | - } |
994 | - |
995 | - private void clientHeight_ValueChanged_1(object sender, EventArgs e) |
996 | - { |
997 | - buttonSaveSettings.Enabled = true; |
998 | - } |
999 | - |
1000 | - private void offsetX_ValueChanged_1(object sender, EventArgs e) |
1001 | - { |
1002 | - buttonSaveSettings.Enabled = true; |
1003 | - } |
1004 | - |
1005 | - private void offsetY_ValueChanged_1(object sender, EventArgs e) |
1006 | - { |
1007 | - buttonSaveSettings.Enabled = true; |
1008 | - } |
1009 | - |
1010 | - private void textBoxDisplayName_TextChanged(object sender, EventArgs e) |
1011 | - { |
1012 | - buttonSaveSettings.Enabled = true; |
1013 | - } |
1014 | - |
1015 | - private void checkBox1_CheckedChanged(object sender, EventArgs e) |
1016 | - { |
1017 | - buttonSaveSettings.Enabled = true; |
1018 | - } |
1019 | } |
1020 | } |
1021 | \ No newline at end of file |
1022 | |
1023 | === modified file 'client/dotNET/Properties/Settings.Designer.cs' |
1024 | --- client/dotNET/Properties/Settings.Designer.cs 2011-09-24 11:06:51 +0000 |
1025 | +++ client/dotNET/Properties/Settings.Designer.cs 2012-01-22 15:34:34 +0000 |
1026 | @@ -1,7 +1,7 @@ |
1027 | //------------------------------------------------------------------------------ |
1028 | // <auto-generated> |
1029 | // This code was generated by a tool. |
1030 | -// Runtime Version:2.0.50727.4961 |
1031 | +// Runtime Version:2.0.50727.5448 |
1032 | // |
1033 | // Changes to this file may cause incorrect behavior and will be lost if |
1034 | // the code is regenerated. |
1035 | @@ -394,5 +394,17 @@ |
1036 | this["EnableMouse"] = value; |
1037 | } |
1038 | } |
1039 | + |
1040 | + [global::System.Configuration.UserScopedSettingAttribute()] |
1041 | + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
1042 | + [global::System.Configuration.DefaultSettingValueAttribute("True")] |
1043 | + public bool DoubleBuffering { |
1044 | + get { |
1045 | + return ((bool)(this["DoubleBuffering"])); |
1046 | + } |
1047 | + set { |
1048 | + this["DoubleBuffering"] = value; |
1049 | + } |
1050 | + } |
1051 | } |
1052 | } |
1053 | |
1054 | === modified file 'client/dotNET/Properties/Settings.settings' |
1055 | --- client/dotNET/Properties/Settings.settings 2011-09-24 11:06:51 +0000 |
1056 | +++ client/dotNET/Properties/Settings.settings 2012-01-22 15:34:34 +0000 |
1057 | @@ -101,5 +101,8 @@ |
1058 | <Setting Name="EnableMouse" Type="System.Boolean" Scope="User"> |
1059 | <Value Profile="(Default)">False</Value> |
1060 | </Setting> |
1061 | + <Setting Name="DoubleBuffering" Type="System.Boolean" Scope="User"> |
1062 | + <Value Profile="(Default)">True</Value> |
1063 | + </Setting> |
1064 | </Settings> |
1065 | </SettingsFile> |
1066 | \ No newline at end of file |
1067 | |
1068 | === modified file 'client/dotNET/Region.cs' |
1069 | --- client/dotNET/Region.cs 2011-09-06 20:46:43 +0000 |
1070 | +++ client/dotNET/Region.cs 2012-01-22 15:34:34 +0000 |
1071 | @@ -23,6 +23,7 @@ |
1072 | using System.Windows.Forms; |
1073 | using System.Xml; |
1074 | using System.Diagnostics; |
1075 | +using XiboClient.Properties; |
1076 | |
1077 | namespace XiboClient |
1078 | { |
1079 | @@ -68,8 +69,11 @@ |
1080 | this.Size = new System.Drawing.Size(options.width, options.height); |
1081 | this.BackColor = System.Drawing.Color.Transparent; |
1082 | |
1083 | - SetStyle(ControlStyles.OptimizedDoubleBuffer, true); |
1084 | - SetStyle(ControlStyles.AllPaintingInWmPaint, true); |
1085 | + if (Settings.Default.DoubleBuffering) |
1086 | + { |
1087 | + SetStyle(ControlStyles.OptimizedDoubleBuffer, true); |
1088 | + SetStyle(ControlStyles.AllPaintingInWmPaint, true); |
1089 | + } |
1090 | |
1091 | // Create a new BlackList for us to use |
1092 | blackList = new BlackList(); |
1093 | |
1094 | === modified file 'client/dotNET/RequiredFiles.cs' |
1095 | --- client/dotNET/RequiredFiles.cs 2011-02-16 11:25:56 +0000 |
1096 | +++ client/dotNET/RequiredFiles.cs 2012-01-22 15:34:34 +0000 |
1097 | @@ -187,7 +187,7 @@ |
1098 | rf.FileType, rf.Id.ToString(), rf.Complete.ToString(), rf.LastChecked.ToString(), rf.Md5); |
1099 | } |
1100 | |
1101 | - xml = string.Format("<files>{0}</files>", xml); |
1102 | + xml = string.Format("<files macAddress=\"{1}\">{0}</files>", xml, hardwareKey.MacAddress); |
1103 | |
1104 | _report.MediaInventoryAsync(Properties.Settings.Default.Version, Properties.Settings.Default.ServerKey, |
1105 | hardwareKey.Key, xml); |
1106 | |
1107 | === modified file 'client/dotNET/app.config' |
1108 | --- client/dotNET/app.config 2011-09-24 11:06:51 +0000 |
1109 | +++ client/dotNET/app.config 2012-01-22 15:34:34 +0000 |
1110 | @@ -85,6 +85,9 @@ |
1111 | <setting name="EnableMouse" serializeAs="String"> |
1112 | <value>False</value> |
1113 | </setting> |
1114 | + <setting name="DoubleBuffering" serializeAs="String"> |
1115 | + <value>True</value> |
1116 | + </setting> |
1117 | </XiboClient.Properties.Settings> |
1118 | </userSettings> |
1119 | <applicationSettings> |