Merge lp:~dangarner/xibo/client-132 into lp:xibo/1.3

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
Reviewer Review Type Date Requested Status
Xibo Maintainters Pending
Review via email: mp+89591@code.launchpad.net
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
=== modified file 'client/dotNET/CacheManager.cs'
--- client/dotNET/CacheManager.cs 2011-02-16 17:06:01 +0000
+++ client/dotNET/CacheManager.cs 2012-01-22 15:34:34 +0000
@@ -222,7 +222,7 @@
222 /// <returns></returns>222 /// <returns></returns>
223 public bool IsValidLayout(string layoutFile)223 public bool IsValidLayout(string layoutFile)
224 {224 {
225 Debug.WriteLine("Checking Layout " + layoutFile + " is valid");225 Debug.WriteLine("Checking if Layout " + layoutFile + " is valid");
226226
227 if (!IsValidPath(layoutFile))227 if (!IsValidPath(layoutFile))
228 return false;228 return false;
@@ -245,7 +245,10 @@
245245
246 // Get the path and see if its valid246 // Get the path and see if its valid
247 if (!IsValidPath(media.InnerText))247 if (!IsValidPath(media.InnerText))
248 {
249 Debug.WriteLine("Invalid Media: " + media.Attributes["id"].Value.ToString());
248 return false;250 return false;
251 }
249252
250 break;253 break;
251254
@@ -254,6 +257,8 @@
254 }257 }
255 }258 }
256259
260 Debug.WriteLine("Layout " + layoutFile + " is valid");
261
257 return true;262 return true;
258 }263 }
259264
260265
=== modified file 'client/dotNET/HardwareKey.cs'
--- client/dotNET/HardwareKey.cs 2010-04-19 21:45:10 +0000
+++ client/dotNET/HardwareKey.cs 2012-01-22 15:34:34 +0000
@@ -27,30 +27,44 @@
27{27{
28 class HardwareKey28 class HardwareKey
29 {29 {
30 private string _hardwareKey;
31 private string _macAddress;
32
33 public string MacAddress
34 {
35 get
36 {
37 return _macAddress;
38 }
39 }
40
30 public HardwareKey()41 public HardwareKey()
31 {42 {
32 System.Diagnostics.Debug.WriteLine("[IN]", "HardwareKey");43 System.Diagnostics.Debug.WriteLine("[IN]", "HardwareKey");
3344
34 // Get the key from the Settings45 // Get the key from the Settings
35 hardwareKey = Properties.Settings.Default.hardwareKey;46 _hardwareKey = Properties.Settings.Default.hardwareKey;
3647
37 // Is the key empty?48 // Is the key empty?
38 if (hardwareKey == "")49 if (_hardwareKey == "")
39 {50 {
40 try51 try
41 {52 {
42 // Calculate the Hardware key from the CPUID and Volume Serial53 // Calculate the Hardware key from the CPUID and Volume Serial
43 hardwareKey = Hashes.MD5(GetCPUId() + GetVolumeSerial("C"));54 _hardwareKey = Hashes.MD5(GetCPUId() + GetVolumeSerial("C"));
44 }55 }
45 catch56 catch
46 {57 {
47 hardwareKey = "Change for Unique Key";58 _hardwareKey = "Change for Unique Key";
48 }59 }
4960
50 // Store the key61 // Store the key
51 Properties.Settings.Default.hardwareKey = hardwareKey;62 Properties.Settings.Default.hardwareKey = _hardwareKey;
52 }63 }
5364
65 // Get the Mac Address
66 _macAddress = GetMACAddress();
67
54 System.Diagnostics.Debug.WriteLine("[OUT]", "HardwareKey");68 System.Diagnostics.Debug.WriteLine("[OUT]", "HardwareKey");
55 }69 }
5670
@@ -61,7 +75,7 @@
61 {75 {
62 get 76 get
63 { 77 {
64 return this.hardwareKey; 78 return this._hardwareKey;
65 }79 }
66 }80 }
6781
@@ -71,10 +85,10 @@
71 public void Regenerate()85 public void Regenerate()
72 {86 {
73 // Calculate the Hardware key from the CPUID and Volume Serial87 // Calculate the Hardware key from the CPUID and Volume Serial
74 hardwareKey = Hashes.MD5(GetCPUId() + GetVolumeSerial("C"));88 _hardwareKey = Hashes.MD5(GetCPUId() + GetVolumeSerial("C"));
7589
76 // Store the key90 // Store the key
77 Properties.Settings.Default.hardwareKey = hardwareKey;91 Properties.Settings.Default.hardwareKey = _hardwareKey;
78 Properties.Settings.Default.Save();92 Properties.Settings.Default.Save();
79 }93 }
8094
@@ -105,6 +119,7 @@
105 ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");119 ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
106 ManagementObjectCollection moc = mc.GetInstances();120 ManagementObjectCollection moc = mc.GetInstances();
107 string MACAddress = String.Empty;121 string MACAddress = String.Empty;
122
108 foreach (ManagementObject mo in moc)123 foreach (ManagementObject mo in moc)
109 {124 {
110 if (MACAddress == String.Empty) // only return MAC Address from first card125 if (MACAddress == String.Empty) // only return MAC Address from first card
@@ -113,7 +128,7 @@
113 }128 }
114 mo.Dispose();129 mo.Dispose();
115 }130 }
116 MACAddress = MACAddress.Replace(":", "");131
117 return MACAddress;132 return MACAddress;
118 }133 }
119134
@@ -141,7 +156,5 @@
141156
142 return cpuInfo;157 return cpuInfo;
143 }158 }
144
145 private string hardwareKey;
146 }159 }
147}160}
148161
=== modified file 'client/dotNET/MainForm.Designer.cs'
--- client/dotNET/MainForm.Designer.cs 2009-12-31 11:38:50 +0000
+++ client/dotNET/MainForm.Designer.cs 2012-01-22 15:34:34 +0000
@@ -1,3 +1,4 @@
1using XiboClient.Properties;
1namespace XiboClient2namespace XiboClient
2{3{
3 partial class MainForm4 partial class MainForm
@@ -38,7 +39,7 @@
38 this.BackColor = System.Drawing.Color.Black;39 this.BackColor = System.Drawing.Color.Black;
39 this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;40 this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
40 this.ClientSize = new System.Drawing.Size(1024, 768);41 this.ClientSize = new System.Drawing.Size(1024, 768);
41 this.DoubleBuffered = true;42 this.DoubleBuffered = Settings.Default.DoubleBuffering;
42 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;43 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
43 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));44 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
44 this.Name = "MainForm";45 this.Name = "MainForm";
4546
=== modified file 'client/dotNET/MainForm.cs'
--- client/dotNET/MainForm.cs 2011-09-06 20:46:43 +0000
+++ client/dotNET/MainForm.cs 2012-01-22 15:34:34 +0000
@@ -70,6 +70,9 @@
70 _clientSize = SystemInformation.PrimaryMonitorSize;70 _clientSize = SystemInformation.PrimaryMonitorSize;
71 }71 }
7272
73 // Setup the proxy information
74 OptionForm.SetGlobalProxy();
75
73 _statLog = new StatLog();76 _statLog = new StatLog();
7477
75 this.FormClosing += new FormClosingEventHandler(MainForm_FormClosing);78 this.FormClosing += new FormClosingEventHandler(MainForm_FormClosing);
@@ -419,6 +422,7 @@
419 if (region.ChildNodes.Count == 0)422 if (region.ChildNodes.Count == 0)
420 {423 {
421 Debug.WriteLine("A region with no media detected");424 Debug.WriteLine("A region with no media detected");
425 continue;
422 }426 }
423427
424 //each region428 //each region
425429
=== modified file 'client/dotNET/Media.cs'
--- client/dotNET/Media.cs 2011-06-05 15:21:16 +0000
+++ client/dotNET/Media.cs 2012-01-22 15:34:34 +0000
@@ -21,6 +21,7 @@
21using System.Collections.Generic;21using System.Collections.Generic;
22using System.Text;22using System.Text;
23using System.Windows.Forms;23using System.Windows.Forms;
24using XiboClient.Properties;
2425
25namespace XiboClient26namespace XiboClient
26{27{
@@ -48,8 +49,11 @@
48 this.BackColor = System.Drawing.Color.Transparent;49 this.BackColor = System.Drawing.Color.Transparent;
49 this.TransparencyKey = System.Drawing.Color.White;50 this.TransparencyKey = System.Drawing.Color.White;
5051
51 SetStyle(ControlStyles.OptimizedDoubleBuffer, true);52 if (Settings.Default.DoubleBuffering)
52 SetStyle(ControlStyles.AllPaintingInWmPaint, true);53 {
54 SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
55 SetStyle(ControlStyles.AllPaintingInWmPaint, true);
56 }
53 }57 }
5458
55 protected void StartTimer()59 protected void StartTimer()
5660
=== modified file 'client/dotNET/OptionForm.Designer.cs'
--- client/dotNET/OptionForm.Designer.cs 2011-07-16 13:13:44 +0000
+++ client/dotNET/OptionForm.Designer.cs 2012-01-22 15:34:34 +0000
@@ -75,11 +75,11 @@
75 this.clientHeight = new System.Windows.Forms.NumericUpDown();75 this.clientHeight = new System.Windows.Forms.NumericUpDown();
76 this.clientWidth = new System.Windows.Forms.NumericUpDown();76 this.clientWidth = new System.Windows.Forms.NumericUpDown();
77 this.tabPage5 = new System.Windows.Forms.TabPage();77 this.tabPage5 = new System.Windows.Forms.TabPage();
78 this.doubleBufferingCheckBox = new System.Windows.Forms.CheckBox();
78 this.enableMouseCb = new System.Windows.Forms.CheckBox();79 this.enableMouseCb = new System.Windows.Forms.CheckBox();
79 this.cbExpireModifiedLayouts = new System.Windows.Forms.CheckBox();80 this.cbExpireModifiedLayouts = new System.Windows.Forms.CheckBox();
80 this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();81 this.numericUpDownEmptyRegions = new System.Windows.Forms.NumericUpDown();
81 this.label15 = new System.Windows.Forms.Label();82 this.label15 = new System.Windows.Forms.Label();
82 this.buttonReset = new System.Windows.Forms.Button();
83 this.menuStrip1 = new System.Windows.Forms.MenuStrip();83 this.menuStrip1 = new System.Windows.Forms.MenuStrip();
84 this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();84 this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
85 this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();85 this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -101,7 +101,7 @@
101 ((System.ComponentModel.ISupportInitialize)(this.clientHeight)).BeginInit();101 ((System.ComponentModel.ISupportInitialize)(this.clientHeight)).BeginInit();
102 ((System.ComponentModel.ISupportInitialize)(this.clientWidth)).BeginInit();102 ((System.ComponentModel.ISupportInitialize)(this.clientWidth)).BeginInit();
103 this.tabPage5.SuspendLayout();103 this.tabPage5.SuspendLayout();
104 ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();104 ((System.ComponentModel.ISupportInitialize)(this.numericUpDownEmptyRegions)).BeginInit();
105 this.menuStrip1.SuspendLayout();105 this.menuStrip1.SuspendLayout();
106 this.SuspendLayout();106 this.SuspendLayout();
107 // 107 //
@@ -134,7 +134,6 @@
134 // 134 //
135 // buttonSaveSettings135 // buttonSaveSettings
136 // 136 //
137 this.buttonSaveSettings.Enabled = false;
138 this.buttonSaveSettings.Location = new System.Drawing.Point(200, 320);137 this.buttonSaveSettings.Location = new System.Drawing.Point(200, 320);
139 this.buttonSaveSettings.Name = "buttonSaveSettings";138 this.buttonSaveSettings.Name = "buttonSaveSettings";
140 this.buttonSaveSettings.Size = new System.Drawing.Size(75, 23);139 this.buttonSaveSettings.Size = new System.Drawing.Size(75, 23);
@@ -183,7 +182,6 @@
183 // 182 //
184 // nupScrollStepAmount183 // nupScrollStepAmount
185 // 184 //
186 this.nupScrollStepAmount.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "scrollStepAmount", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
187 this.nupScrollStepAmount.Location = new System.Drawing.Point(184, 145);185 this.nupScrollStepAmount.Location = new System.Drawing.Point(184, 145);
188 this.nupScrollStepAmount.Minimum = new decimal(new int[] {186 this.nupScrollStepAmount.Minimum = new decimal(new int[] {
189 1,187 1,
@@ -193,7 +191,11 @@
193 this.nupScrollStepAmount.Name = "nupScrollStepAmount";191 this.nupScrollStepAmount.Name = "nupScrollStepAmount";
194 this.nupScrollStepAmount.Size = new System.Drawing.Size(76, 20);192 this.nupScrollStepAmount.Size = new System.Drawing.Size(76, 20);
195 this.nupScrollStepAmount.TabIndex = 16;193 this.nupScrollStepAmount.TabIndex = 16;
196 this.nupScrollStepAmount.Value = global::XiboClient.Properties.Settings.Default.scrollStepAmount;194 this.nupScrollStepAmount.Value = new decimal(new int[] {
195 1,
196 0,
197 0,
198 0});
197 // 199 //
198 // label10200 // label10
199 // 201 //
@@ -257,66 +259,56 @@
257 // 259 //
258 // tbHardwareKey260 // tbHardwareKey
259 // 261 //
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.Location = new System.Drawing.Point(184, 119);
262 this.tbHardwareKey.Name = "tbHardwareKey";263 this.tbHardwareKey.Name = "tbHardwareKey";
263 this.tbHardwareKey.Size = new System.Drawing.Size(237, 20);264 this.tbHardwareKey.Size = new System.Drawing.Size(237, 20);
264 this.tbHardwareKey.TabIndex = 14;265 this.tbHardwareKey.TabIndex = 14;
265 this.tbHardwareKey.Text = global::XiboClient.Properties.Settings.Default.hardwareKey;
266 // 266 //
267 // checkBoxStats267 // checkBoxStats
268 // 268 //
269 this.checkBoxStats.AutoSize = true;269 this.checkBoxStats.AutoSize = true;
270 this.checkBoxStats.Checked = global::XiboClient.Properties.Settings.Default.statsEnabled;270 this.checkBoxStats.Checked = true;
271 this.checkBoxStats.CheckState = System.Windows.Forms.CheckState.Checked;271 this.checkBoxStats.CheckState = System.Windows.Forms.CheckState.Checked;
272 this.checkBoxStats.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::XiboClient.Properties.Settings.Default, "statsEnabled", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
273 this.checkBoxStats.Location = new System.Drawing.Point(184, 204);272 this.checkBoxStats.Location = new System.Drawing.Point(184, 204);
274 this.checkBoxStats.Name = "checkBoxStats";273 this.checkBoxStats.Name = "checkBoxStats";
275 this.checkBoxStats.Size = new System.Drawing.Size(104, 17);274 this.checkBoxStats.Size = new System.Drawing.Size(104, 17);
276 this.checkBoxStats.TabIndex = 0;275 this.checkBoxStats.TabIndex = 0;
277 this.checkBoxStats.Text = "Enable Statistics";276 this.checkBoxStats.Text = "Enable Statistics";
278 this.checkBoxStats.UseVisualStyleBackColor = true;277 this.checkBoxStats.UseVisualStyleBackColor = true;
279 this.checkBoxStats.CheckedChanged += new System.EventHandler(this.checkBoxStats_CheckedChanged);
280 // 278 //
281 // checkBoxPowerPoint279 // checkBoxPowerPoint
282 // 280 //
283 this.checkBoxPowerPoint.AutoSize = true;281 this.checkBoxPowerPoint.AutoSize = true;
284 this.checkBoxPowerPoint.Checked = global::XiboClient.Properties.Settings.Default.powerpointEnabled;
285 this.checkBoxPowerPoint.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::XiboClient.Properties.Settings.Default, "powerpointEnabled", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
286 this.checkBoxPowerPoint.Location = new System.Drawing.Point(184, 181);282 this.checkBoxPowerPoint.Location = new System.Drawing.Point(184, 181);
287 this.checkBoxPowerPoint.Name = "checkBoxPowerPoint";283 this.checkBoxPowerPoint.Name = "checkBoxPowerPoint";
288 this.checkBoxPowerPoint.Size = new System.Drawing.Size(116, 17);284 this.checkBoxPowerPoint.Size = new System.Drawing.Size(116, 17);
289 this.checkBoxPowerPoint.TabIndex = 12;285 this.checkBoxPowerPoint.TabIndex = 12;
290 this.checkBoxPowerPoint.Text = "Enable PowerPoint";286 this.checkBoxPowerPoint.Text = "Enable PowerPoint";
291 this.checkBoxPowerPoint.UseVisualStyleBackColor = true;287 this.checkBoxPowerPoint.UseVisualStyleBackColor = true;
292 this.checkBoxPowerPoint.CheckedChanged += new System.EventHandler(this.checkBoxPowerPoint_CheckedChanged);
293 // 288 //
294 // textBoxXmdsUri289 // textBoxXmdsUri
295 // 290 //
296 this.textBoxXmdsUri.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "serverURI", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
297 this.textBoxXmdsUri.Location = new System.Drawing.Point(184, 11);291 this.textBoxXmdsUri.Location = new System.Drawing.Point(184, 11);
298 this.textBoxXmdsUri.Name = "textBoxXmdsUri";292 this.textBoxXmdsUri.Name = "textBoxXmdsUri";
299 this.textBoxXmdsUri.Size = new System.Drawing.Size(237, 20);293 this.textBoxXmdsUri.Size = new System.Drawing.Size(237, 20);
300 this.textBoxXmdsUri.TabIndex = 0;294 this.textBoxXmdsUri.TabIndex = 0;
301 this.textBoxXmdsUri.Text = global::XiboClient.Properties.Settings.Default.serverURI;295 this.textBoxXmdsUri.Text = "http://localhost/xibo";
302 // 296 //
303 // textBoxServerKey297 // textBoxServerKey
304 // 298 //
305 this.textBoxServerKey.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "ServerKey", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
306 this.textBoxServerKey.Location = new System.Drawing.Point(184, 38);299 this.textBoxServerKey.Location = new System.Drawing.Point(184, 38);
307 this.textBoxServerKey.Name = "textBoxServerKey";300 this.textBoxServerKey.Name = "textBoxServerKey";
308 this.textBoxServerKey.Size = new System.Drawing.Size(237, 20);301 this.textBoxServerKey.Size = new System.Drawing.Size(237, 20);
309 this.textBoxServerKey.TabIndex = 2;302 this.textBoxServerKey.TabIndex = 2;
310 this.textBoxServerKey.Text = global::XiboClient.Properties.Settings.Default.ServerKey;303 this.textBoxServerKey.Text = "yourserverkey";
311 // 304 //
312 // textBoxLibraryPath305 // textBoxLibraryPath
313 // 306 //
314 this.textBoxLibraryPath.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "LibraryPath", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
315 this.textBoxLibraryPath.Location = new System.Drawing.Point(184, 65);307 this.textBoxLibraryPath.Location = new System.Drawing.Point(184, 65);
316 this.textBoxLibraryPath.Name = "textBoxLibraryPath";308 this.textBoxLibraryPath.Name = "textBoxLibraryPath";
317 this.textBoxLibraryPath.Size = new System.Drawing.Size(156, 20);309 this.textBoxLibraryPath.Size = new System.Drawing.Size(156, 20);
318 this.textBoxLibraryPath.TabIndex = 4;310 this.textBoxLibraryPath.TabIndex = 4;
319 this.textBoxLibraryPath.Text = global::XiboClient.Properties.Settings.Default.LibraryPath;311 this.textBoxLibraryPath.Text = "DEFAULT";
320 // 312 //
321 // tabPage2313 // tabPage2
322 // 314 //
@@ -396,19 +388,17 @@
396 this.labelXmdsUrl.AutoSize = true;388 this.labelXmdsUrl.AutoSize = true;
397 this.labelXmdsUrl.Location = new System.Drawing.Point(139, 10);389 this.labelXmdsUrl.Location = new System.Drawing.Point(139, 10);
398 this.labelXmdsUrl.Name = "labelXmdsUrl";390 this.labelXmdsUrl.Name = "labelXmdsUrl";
399 this.labelXmdsUrl.Size = new System.Drawing.Size(338, 13);391 this.labelXmdsUrl.Size = new System.Drawing.Size(299, 13);
400 this.labelXmdsUrl.TabIndex = 3;392 this.labelXmdsUrl.TabIndex = 3;
401 this.labelXmdsUrl.Text = global::XiboClient.Properties.Settings.Default.XiboClient_xmds_xmds;393 this.labelXmdsUrl.Text = "http://localhost/Series%201.3/131-datasets/server/xmds.php";
402 // 394 //
403 // textBoxDisplayName395 // textBoxDisplayName
404 // 396 //
405 this.textBoxDisplayName.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "displayName", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
406 this.textBoxDisplayName.Location = new System.Drawing.Point(142, 37);397 this.textBoxDisplayName.Location = new System.Drawing.Point(142, 37);
407 this.textBoxDisplayName.Name = "textBoxDisplayName";398 this.textBoxDisplayName.Name = "textBoxDisplayName";
408 this.textBoxDisplayName.Size = new System.Drawing.Size(264, 20);399 this.textBoxDisplayName.Size = new System.Drawing.Size(264, 20);
409 this.textBoxDisplayName.TabIndex = 0;400 this.textBoxDisplayName.TabIndex = 0;
410 this.textBoxDisplayName.Text = global::XiboClient.Properties.Settings.Default.displayName;401 this.textBoxDisplayName.Text = "COMPUTERNAME";
411 this.textBoxDisplayName.TextChanged += new System.EventHandler(this.textBoxDisplayName_TextChanged);
412 // 402 //
413 // tabPage3403 // tabPage3
414 // 404 //
@@ -448,31 +438,25 @@
448 // 438 //
449 // textBoxProxyDomain439 // textBoxProxyDomain
450 // 440 //
451 this.textBoxProxyDomain.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "ProxyDomain", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
452 this.textBoxProxyDomain.Location = new System.Drawing.Point(99, 95);441 this.textBoxProxyDomain.Location = new System.Drawing.Point(99, 95);
453 this.textBoxProxyDomain.Name = "textBoxProxyDomain";442 this.textBoxProxyDomain.Name = "textBoxProxyDomain";
454 this.textBoxProxyDomain.Size = new System.Drawing.Size(171, 20);443 this.textBoxProxyDomain.Size = new System.Drawing.Size(171, 20);
455 this.textBoxProxyDomain.TabIndex = 7;444 this.textBoxProxyDomain.TabIndex = 7;
456 this.textBoxProxyDomain.Text = global::XiboClient.Properties.Settings.Default.ProxyDomain;
457 // 445 //
458 // maskedTextBoxProxyPass446 // maskedTextBoxProxyPass
459 // 447 //
460 this.maskedTextBoxProxyPass.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "ProxyPassword", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
461 this.maskedTextBoxProxyPass.Location = new System.Drawing.Point(99, 67);448 this.maskedTextBoxProxyPass.Location = new System.Drawing.Point(99, 67);
462 this.maskedTextBoxProxyPass.Name = "maskedTextBoxProxyPass";449 this.maskedTextBoxProxyPass.Name = "maskedTextBoxProxyPass";
463 this.maskedTextBoxProxyPass.Size = new System.Drawing.Size(171, 20);450 this.maskedTextBoxProxyPass.Size = new System.Drawing.Size(171, 20);
464 this.maskedTextBoxProxyPass.TabIndex = 5;451 this.maskedTextBoxProxyPass.TabIndex = 5;
465 this.maskedTextBoxProxyPass.Text = global::XiboClient.Properties.Settings.Default.ProxyPassword;
466 this.maskedTextBoxProxyPass.UseSystemPasswordChar = true;452 this.maskedTextBoxProxyPass.UseSystemPasswordChar = true;
467 // 453 //
468 // textBoxProxyUser454 // textBoxProxyUser
469 // 455 //
470 this.textBoxProxyUser.DataBindings.Add(new System.Windows.Forms.Binding("Text", global::XiboClient.Properties.Settings.Default, "ProxyUser", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
471 this.textBoxProxyUser.Location = new System.Drawing.Point(99, 41);456 this.textBoxProxyUser.Location = new System.Drawing.Point(99, 41);
472 this.textBoxProxyUser.Name = "textBoxProxyUser";457 this.textBoxProxyUser.Name = "textBoxProxyUser";
473 this.textBoxProxyUser.Size = new System.Drawing.Size(171, 20);458 this.textBoxProxyUser.Size = new System.Drawing.Size(171, 20);
474 this.textBoxProxyUser.TabIndex = 3;459 this.textBoxProxyUser.TabIndex = 3;
475 this.textBoxProxyUser.Text = global::XiboClient.Properties.Settings.Default.ProxyUser;
476 // 460 //
477 // labelProxyDomain461 // labelProxyDomain
478 // 462 //
@@ -557,7 +541,6 @@
557 // 541 //
558 // offsetX542 // offsetX
559 // 543 //
560 this.offsetX.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "offsetX", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
561 this.offsetX.Location = new System.Drawing.Point(77, 67);544 this.offsetX.Location = new System.Drawing.Point(77, 67);
562 this.offsetX.Maximum = new decimal(new int[] {545 this.offsetX.Maximum = new decimal(new int[] {
563 10000,546 10000,
@@ -567,12 +550,9 @@
567 this.offsetX.Name = "offsetX";550 this.offsetX.Name = "offsetX";
568 this.offsetX.Size = new System.Drawing.Size(77, 20);551 this.offsetX.Size = new System.Drawing.Size(77, 20);
569 this.offsetX.TabIndex = 6;552 this.offsetX.TabIndex = 6;
570 this.offsetX.Value = global::XiboClient.Properties.Settings.Default.offsetX;
571 this.offsetX.ValueChanged += new System.EventHandler(this.offsetX_ValueChanged_1);
572 // 553 //
573 // offsetY554 // offsetY
574 // 555 //
575 this.offsetY.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "offsetY", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
576 this.offsetY.Location = new System.Drawing.Point(77, 94);556 this.offsetY.Location = new System.Drawing.Point(77, 94);
577 this.offsetY.Maximum = new decimal(new int[] {557 this.offsetY.Maximum = new decimal(new int[] {
578 10000,558 10000,
@@ -582,12 +562,9 @@
582 this.offsetY.Name = "offsetY";562 this.offsetY.Name = "offsetY";
583 this.offsetY.Size = new System.Drawing.Size(77, 20);563 this.offsetY.Size = new System.Drawing.Size(77, 20);
584 this.offsetY.TabIndex = 7;564 this.offsetY.TabIndex = 7;
585 this.offsetY.Value = global::XiboClient.Properties.Settings.Default.offsetY;
586 this.offsetY.ValueChanged += new System.EventHandler(this.offsetY_ValueChanged_1);
587 // 565 //
588 // clientHeight566 // clientHeight
589 // 567 //
590 this.clientHeight.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "sizeY", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
591 this.clientHeight.Location = new System.Drawing.Point(77, 41);568 this.clientHeight.Location = new System.Drawing.Point(77, 41);
592 this.clientHeight.Maximum = new decimal(new int[] {569 this.clientHeight.Maximum = new decimal(new int[] {
593 10000,570 10000,
@@ -597,12 +574,9 @@
597 this.clientHeight.Name = "clientHeight";574 this.clientHeight.Name = "clientHeight";
598 this.clientHeight.Size = new System.Drawing.Size(77, 20);575 this.clientHeight.Size = new System.Drawing.Size(77, 20);
599 this.clientHeight.TabIndex = 5;576 this.clientHeight.TabIndex = 5;
600 this.clientHeight.Value = global::XiboClient.Properties.Settings.Default.sizeY;
601 this.clientHeight.ValueChanged += new System.EventHandler(this.clientHeight_ValueChanged_1);
602 // 577 //
603 // clientWidth578 // clientWidth
604 // 579 //
605 this.clientWidth.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "sizeX", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
606 this.clientWidth.Location = new System.Drawing.Point(77, 15);580 this.clientWidth.Location = new System.Drawing.Point(77, 15);
607 this.clientWidth.Maximum = new decimal(new int[] {581 this.clientWidth.Maximum = new decimal(new int[] {
608 10000,582 10000,
@@ -612,14 +586,13 @@
612 this.clientWidth.Name = "clientWidth";586 this.clientWidth.Name = "clientWidth";
613 this.clientWidth.Size = new System.Drawing.Size(77, 20);587 this.clientWidth.Size = new System.Drawing.Size(77, 20);
614 this.clientWidth.TabIndex = 4;588 this.clientWidth.TabIndex = 4;
615 this.clientWidth.Value = global::XiboClient.Properties.Settings.Default.sizeX;
616 this.clientWidth.ValueChanged += new System.EventHandler(this.clientWidth_ValueChanged_1);
617 // 589 //
618 // tabPage5590 // tabPage5
619 // 591 //
592 this.tabPage5.Controls.Add(this.doubleBufferingCheckBox);
620 this.tabPage5.Controls.Add(this.enableMouseCb);593 this.tabPage5.Controls.Add(this.enableMouseCb);
621 this.tabPage5.Controls.Add(this.cbExpireModifiedLayouts);594 this.tabPage5.Controls.Add(this.cbExpireModifiedLayouts);
622 this.tabPage5.Controls.Add(this.numericUpDown1);595 this.tabPage5.Controls.Add(this.numericUpDownEmptyRegions);
623 this.tabPage5.Controls.Add(this.label15);596 this.tabPage5.Controls.Add(this.label15);
624 this.tabPage5.Location = new System.Drawing.Point(4, 22);597 this.tabPage5.Location = new System.Drawing.Point(4, 22);
625 this.tabPage5.Name = "tabPage5";598 this.tabPage5.Name = "tabPage5";
@@ -629,43 +602,51 @@
629 this.tabPage5.Text = "Advanced";602 this.tabPage5.Text = "Advanced";
630 this.tabPage5.UseVisualStyleBackColor = true;603 this.tabPage5.UseVisualStyleBackColor = true;
631 // 604 //
605 // doubleBufferingCheckBox
606 //
607 this.doubleBufferingCheckBox.AutoSize = true;
608 this.doubleBufferingCheckBox.Location = new System.Drawing.Point(176, 140);
609 this.doubleBufferingCheckBox.Name = "doubleBufferingCheckBox";
610 this.doubleBufferingCheckBox.Size = new System.Drawing.Size(141, 17);
611 this.doubleBufferingCheckBox.TabIndex = 4;
612 this.doubleBufferingCheckBox.Text = "Enable Double Buffering";
613 this.doubleBufferingCheckBox.UseVisualStyleBackColor = true;
614 //
632 // enableMouseCb615 // enableMouseCb
633 // 616 //
634 this.enableMouseCb.AutoSize = true;617 this.enableMouseCb.AutoSize = true;
635 this.enableMouseCb.Checked = global::XiboClient.Properties.Settings.Default.EnableMouse;618 this.enableMouseCb.Checked = true;
636 this.enableMouseCb.CheckState = System.Windows.Forms.CheckState.Checked;619 this.enableMouseCb.CheckState = System.Windows.Forms.CheckState.Checked;
637 this.enableMouseCb.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::XiboClient.Properties.Settings.Default, "EnableMouse", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
638 this.enableMouseCb.Location = new System.Drawing.Point(176, 103);620 this.enableMouseCb.Location = new System.Drawing.Point(176, 103);
639 this.enableMouseCb.Name = "enableMouseCb";621 this.enableMouseCb.Name = "enableMouseCb";
640 this.enableMouseCb.Size = new System.Drawing.Size(94, 17);622 this.enableMouseCb.Size = new System.Drawing.Size(94, 17);
641 this.enableMouseCb.TabIndex = 3;623 this.enableMouseCb.TabIndex = 3;
642 this.enableMouseCb.Text = "Enable Mouse";624 this.enableMouseCb.Text = "Enable Mouse";
643 this.enableMouseCb.UseVisualStyleBackColor = true;625 this.enableMouseCb.UseVisualStyleBackColor = true;
644 this.enableMouseCb.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
645 // 626 //
646 // cbExpireModifiedLayouts627 // cbExpireModifiedLayouts
647 // 628 //
648 this.cbExpireModifiedLayouts.AutoSize = true;629 this.cbExpireModifiedLayouts.AutoSize = true;
649 this.cbExpireModifiedLayouts.Checked = global::XiboClient.Properties.Settings.Default.expireModifiedLayouts;630 this.cbExpireModifiedLayouts.Checked = true;
650 this.cbExpireModifiedLayouts.CheckState = System.Windows.Forms.CheckState.Checked;631 this.cbExpireModifiedLayouts.CheckState = System.Windows.Forms.CheckState.Checked;
651 this.cbExpireModifiedLayouts.DataBindings.Add(new System.Windows.Forms.Binding("Checked", global::XiboClient.Properties.Settings.Default, "expireModifiedLayouts", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
652 this.cbExpireModifiedLayouts.Location = new System.Drawing.Point(176, 66);632 this.cbExpireModifiedLayouts.Location = new System.Drawing.Point(176, 66);
653 this.cbExpireModifiedLayouts.Name = "cbExpireModifiedLayouts";633 this.cbExpireModifiedLayouts.Name = "cbExpireModifiedLayouts";
654 this.cbExpireModifiedLayouts.Size = new System.Drawing.Size(243, 17);634 this.cbExpireModifiedLayouts.Size = new System.Drawing.Size(243, 17);
655 this.cbExpireModifiedLayouts.TabIndex = 2;635 this.cbExpireModifiedLayouts.TabIndex = 2;
656 this.cbExpireModifiedLayouts.Text = "Expire modified layouts while they are playing?";636 this.cbExpireModifiedLayouts.Text = "Expire modified layouts while they are playing?";
657 this.cbExpireModifiedLayouts.UseVisualStyleBackColor = true;637 this.cbExpireModifiedLayouts.UseVisualStyleBackColor = true;
658 this.cbExpireModifiedLayouts.CheckedChanged += new System.EventHandler(this.cbExpireModifiedLayouts_CheckedChanged);638 //
659 // 639 // numericUpDownEmptyRegions
660 // numericUpDown1640 //
661 // 641 this.numericUpDownEmptyRegions.Location = new System.Drawing.Point(176, 23);
662 this.numericUpDown1.DataBindings.Add(new System.Windows.Forms.Binding("Value", global::XiboClient.Properties.Settings.Default, "emptyLayoutDuration", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));642 this.numericUpDownEmptyRegions.Name = "numericUpDownEmptyRegions";
663 this.numericUpDown1.Location = new System.Drawing.Point(176, 23);643 this.numericUpDownEmptyRegions.Size = new System.Drawing.Size(91, 20);
664 this.numericUpDown1.Name = "numericUpDown1";644 this.numericUpDownEmptyRegions.TabIndex = 1;
665 this.numericUpDown1.Size = new System.Drawing.Size(91, 20);645 this.numericUpDownEmptyRegions.Value = new decimal(new int[] {
666 this.numericUpDown1.TabIndex = 1;646 10,
667 this.numericUpDown1.Value = global::XiboClient.Properties.Settings.Default.emptyLayoutDuration;647 0,
668 this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);648 0,
649 0});
669 // 650 //
670 // label15651 // label15
671 // 652 //
@@ -676,16 +657,6 @@
676 this.label15.TabIndex = 0;657 this.label15.TabIndex = 0;
677 this.label15.Text = "Duration for Empty Regions";658 this.label15.Text = "Duration for Empty Regions";
678 // 659 //
679 // buttonReset
680 //
681 this.buttonReset.Location = new System.Drawing.Point(281, 320);
682 this.buttonReset.Name = "buttonReset";
683 this.buttonReset.Size = new System.Drawing.Size(75, 23);
684 this.buttonReset.TabIndex = 11;
685 this.buttonReset.Text = "Reset";
686 this.buttonReset.UseVisualStyleBackColor = true;
687 this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click);
688 //
689 // menuStrip1660 // menuStrip1
690 // 661 //
691 this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {662 this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -749,7 +720,6 @@
749 this.Controls.Add(this.menuStrip1);720 this.Controls.Add(this.menuStrip1);
750 this.Controls.Add(this.tabControl1);721 this.Controls.Add(this.tabControl1);
751 this.Controls.Add(this.buttonSaveSettings);722 this.Controls.Add(this.buttonSaveSettings);
752 this.Controls.Add(this.buttonReset);
753 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));723 this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
754 this.MainMenuStrip = this.menuStrip1;724 this.MainMenuStrip = this.menuStrip1;
755 this.Name = "OptionForm";725 this.Name = "OptionForm";
@@ -773,7 +743,7 @@
773 ((System.ComponentModel.ISupportInitialize)(this.clientWidth)).EndInit();743 ((System.ComponentModel.ISupportInitialize)(this.clientWidth)).EndInit();
774 this.tabPage5.ResumeLayout(false);744 this.tabPage5.ResumeLayout(false);
775 this.tabPage5.PerformLayout();745 this.tabPage5.PerformLayout();
776 ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();746 ((System.ComponentModel.ISupportInitialize)(this.numericUpDownEmptyRegions)).EndInit();
777 this.menuStrip1.ResumeLayout(false);747 this.menuStrip1.ResumeLayout(false);
778 this.menuStrip1.PerformLayout();748 this.menuStrip1.PerformLayout();
779 this.ResumeLayout(false);749 this.ResumeLayout(false);
@@ -810,7 +780,6 @@
810 private System.Windows.Forms.NumericUpDown numericUpDownCollect;780 private System.Windows.Forms.NumericUpDown numericUpDownCollect;
811 private System.Windows.Forms.FolderBrowserDialog folderBrowserLibrary;781 private System.Windows.Forms.FolderBrowserDialog folderBrowserLibrary;
812 private System.Windows.Forms.Button buttonLibrary;782 private System.Windows.Forms.Button buttonLibrary;
813 private System.Windows.Forms.Button buttonReset;
814 private System.Windows.Forms.ToolStripMenuItem onlineHelpToolStripMenuItem;783 private System.Windows.Forms.ToolStripMenuItem onlineHelpToolStripMenuItem;
815 private System.Windows.Forms.CheckBox checkBoxPowerPoint;784 private System.Windows.Forms.CheckBox checkBoxPowerPoint;
816 private System.Windows.Forms.CheckBox checkBoxStats;785 private System.Windows.Forms.CheckBox checkBoxStats;
@@ -838,9 +807,10 @@
838 private System.Windows.Forms.NumericUpDown offsetX;807 private System.Windows.Forms.NumericUpDown offsetX;
839 private System.Windows.Forms.NumericUpDown clientHeight;808 private System.Windows.Forms.NumericUpDown clientHeight;
840 private System.Windows.Forms.TabPage tabPage5;809 private System.Windows.Forms.TabPage tabPage5;
841 private System.Windows.Forms.NumericUpDown numericUpDown1;810 private System.Windows.Forms.NumericUpDown numericUpDownEmptyRegions;
842 private System.Windows.Forms.Label label15;811 private System.Windows.Forms.Label label15;
843 private System.Windows.Forms.CheckBox cbExpireModifiedLayouts;812 private System.Windows.Forms.CheckBox cbExpireModifiedLayouts;
844 private System.Windows.Forms.CheckBox enableMouseCb;813 private System.Windows.Forms.CheckBox enableMouseCb;
814 private System.Windows.Forms.CheckBox doubleBufferingCheckBox;
845 }815 }
846}816}
847\ No newline at end of file817\ No newline at end of file
848818
=== modified file 'client/dotNET/OptionForm.cs'
--- client/dotNET/OptionForm.cs 2011-07-16 13:13:44 +0000
+++ client/dotNET/OptionForm.cs 2012-01-22 15:34:34 +0000
@@ -1,6 +1,6 @@
1/*1/*
2 * Xibo - Digitial Signage - http://www.xibo.org.uk2 * Xibo - Digitial Signage - http://www.xibo.org.uk
3 * Copyright (C) 2006,2007,2008 Daniel Garner and James Packer3 * Copyright (C) 2006-11 Daniel Garner and James Packer
4 *4 *
5 * This file is part of Xibo.5 * This file is part of Xibo.
6 *6 *
@@ -26,109 +26,86 @@
26using System.Text;26using System.Text;
27using System.Net;27using System.Net;
28using System.Windows.Forms;28using System.Windows.Forms;
29using XiboClient.Properties;
30using System.Diagnostics;
2931
30namespace XiboClient32namespace XiboClient
31{33{
32 public partial class OptionForm : Form34 public partial class OptionForm : Form
33 {35 {
36 private HardwareKey _hardwareKey;
37
38
34 public OptionForm()39 public OptionForm()
35 {40 {
36 System.Diagnostics.Debug.WriteLine("[IN]", "OptionForm");41 InitializeComponent();
42
37 System.Diagnostics.Debug.WriteLine("Initialise Option Form Components", "OptionForm");43 System.Diagnostics.Debug.WriteLine("Initialise Option Form Components", "OptionForm");
3844
39 // Get a hardware key here, just in case we havent been able to get one before45 // Get a hardware key here, just in case we havent been able to get one before
40 hardwareKey = new HardwareKey();46 _hardwareKey = new HardwareKey();
4147
42 InitializeComponent();48 // XMDS completed event
4349 xmds1.RegisterDisplayCompleted += new XiboClient.xmds.RegisterDisplayCompletedEventHandler(xmds1_RegisterDisplayCompleted);
44 System.Diagnostics.Debug.WriteLine("Register some Event Handlers", "OptionForm");
45
46 this.xmds1.RegisterDisplayCompleted += new XiboClient.xmds.RegisterDisplayCompletedEventHandler(xmds1_RegisterDisplayCompleted);
47 50
48 // Bind some events to the settings fields51 // Library Path
49 textBoxXmdsUri.TextChanged += new EventHandler(setting_TextChanged);
50 textBoxServerKey.TextChanged += new EventHandler(setting_TextChanged);
51 textBoxLibraryPath.TextChanged += new EventHandler(setting_TextChanged);
52 numericUpDownCollect.ValueChanged += new EventHandler(setting_TextChanged);
53 nupScrollStepAmount.ValueChanged += new EventHandler(nupScrollStepAmount_ValueChanged);
54
55 // Bind some events to the proxy settings fields
56 textBoxProxyUser.TextChanged += new EventHandler(proxySetting_TextChanged);
57 maskedTextBoxProxyPass.TextChanged += new EventHandler(proxySetting_TextChanged);
58 textBoxProxyDomain.TextChanged += new EventHandler(proxySetting_TextChanged);
59 tbHardwareKey.TextChanged += new EventHandler(tbHardwareKey_TextChanged);
60
61 clientHeight.ValueChanged += new EventHandler(clientHeight_ValueChanged);
62 clientWidth.ValueChanged += new EventHandler(clientWidth_ValueChanged);
63 offsetX.ValueChanged += new EventHandler(offsetX_ValueChanged);
64 offsetY.ValueChanged += new EventHandler(offsetY_ValueChanged);
65
66 System.Diagnostics.Debug.WriteLine("Getting the Library Path", "OptionForm");
67 if (Properties.Settings.Default.LibraryPath == "DEFAULT")52 if (Properties.Settings.Default.LibraryPath == "DEFAULT")
68 {53 {
54 Debug.WriteLine("Getting the Library Path", "OptionForm");
69 Properties.Settings.Default.LibraryPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Xibo Library";55 Properties.Settings.Default.LibraryPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Xibo Library";
70 Properties.Settings.Default.Save();56 Properties.Settings.Default.Save();
71 }57 }
7258
73 System.Diagnostics.Debug.WriteLine("Getting the display Name", "OptionForm");59 // Computer name if the display name hasnt been set yet
74 if (Properties.Settings.Default.displayName == "COMPUTERNAME")60 if (Settings.Default.displayName == "COMPUTERNAME")
75 {61 {
76 Properties.Settings.Default.displayName = Environment.MachineName;62 Debug.WriteLine("Getting the display Name", "OptionForm");
77 Properties.Settings.Default.Save();63 Settings.Default.displayName = Environment.MachineName;
64 Settings.Default.Save();
78 }65 }
7966
80 System.Diagnostics.Debug.WriteLine("About to call SetGlobalProxy", "OptionForm");67 // Set global proxy information
81 OptionForm.SetGlobalProxy();68 OptionForm.SetGlobalProxy();
8269
83 System.Diagnostics.Debug.WriteLine("[OUT]", "OptionForm");70 // Settings Tab
84 }71 textBoxXmdsUri.Text = Settings.Default.serverURI;
8572 textBoxServerKey.Text = Settings.Default.ServerKey;
86 void offsetY_ValueChanged(object sender, EventArgs e)73 textBoxLibraryPath.Text = Settings.Default.LibraryPath;
87 {74 tbHardwareKey.Text = Settings.Default.hardwareKey;
88 buttonSaveSettings.Enabled = true;75 numericUpDownCollect.Value = Settings.Default.collectInterval;
89 }76 checkBoxPowerPoint.Checked = Settings.Default.powerpointEnabled;
9077 checkBoxStats.Checked = Settings.Default.statsEnabled;
91 void offsetX_ValueChanged(object sender, EventArgs e)78 nupScrollStepAmount.Value = Settings.Default.scrollStepAmount;
92 {79
93 buttonSaveSettings.Enabled = true;80 // Register Tab
94 }81 labelXmdsUrl.Text = Settings.Default.XiboClient_xmds_xmds;
9582 textBoxDisplayName.Text = Settings.Default.displayName;
96 void clientWidth_ValueChanged(object sender, EventArgs e)83
97 {84 // Proxy Tab
98 buttonSaveSettings.Enabled = true;85 textBoxProxyUser.Text = Settings.Default.ProxyUser;
99 }86 maskedTextBoxProxyPass.Text = Settings.Default.ProxyPassword;
10087 textBoxProxyDomain.Text = Settings.Default.ProxyDomain;
101 void clientHeight_ValueChanged(object sender, EventArgs e)88
102 {89 // Client Tab
103 buttonSaveSettings.Enabled = true;90 clientWidth.Value = Settings.Default.sizeX;
104 }91 clientHeight.Value = Settings.Default.sizeY;
10592 offsetX.Value = Settings.Default.offsetX;
106 void nupScrollStepAmount_ValueChanged(object sender, EventArgs e)93 offsetY.Value = Settings.Default.offsetY;
107 {94
108 buttonSaveSettings.Enabled = true;95 // Advanced Tab
109 }96 numericUpDownEmptyRegions.Value = Settings.Default.emptyLayoutDuration;
11097 cbExpireModifiedLayouts.Checked = Settings.Default.expireModifiedLayouts;
111 void tbHardwareKey_TextChanged(object sender, EventArgs e)98 enableMouseCb.Checked = Settings.Default.EnableMouse;
112 {99 doubleBufferingCheckBox.Checked = Settings.Default.DoubleBuffering;
113 buttonSaveSettings.Enabled = true;100
114 }101 System.Diagnostics.Debug.WriteLine("Loaded Options Form", "OptionForm");
115
116 void proxySetting_TextChanged(object sender, EventArgs e)
117 {
118 buttonSaveSettings.Enabled = true;
119 }102 }
120103
121 /// <summary>104 /// <summary>
122 /// Fired when a setting is changed105 /// Register display completed
123 /// </summary>106 /// </summary>
124 /// <param name="sender"></param>107 /// <param name="sender"></param>
125 /// <param name="e"></param>108 /// <param name="e"></param>
126 void setting_TextChanged(object sender, EventArgs e)
127 {
128 //Set the button to be enabled
129 buttonSaveSettings.Enabled = true;
130 }
131
132 void xmds1_RegisterDisplayCompleted(object sender, XiboClient.xmds.RegisterDisplayCompletedEventArgs e)109 void xmds1_RegisterDisplayCompleted(object sender, XiboClient.xmds.RegisterDisplayCompletedEventArgs e)
133 {110 {
134 if (e.Error != null)111 if (e.Error != null)
@@ -145,19 +122,25 @@
145 }122 }
146 }123 }
147124
125 /// <summary>
126 /// Register display clicked
127 /// </summary>
128 /// <param name="sender"></param>
129 /// <param name="e"></param>
148 private void buttonRegister_Click(object sender, EventArgs e)130 private void buttonRegister_Click(object sender, EventArgs e)
149 {131 {
150 // Make a new hardware key just in case we have changed it in the form.132 // Make a new hardware key just in case we have changed it in the form.
151 hardwareKey = new HardwareKey();133 _hardwareKey = new HardwareKey();
152134
153 textBoxResults.Text = "Sending Request";135 textBoxResults.Text = "Sending Request";
154136
155 this.xmds1.Url = Properties.Settings.Default.XiboClient_xmds_xmds;137 Settings.Default.XiboClient_xmds_xmds = textBoxXmdsUri.Text.TrimEnd('/') + @"/xmds.php";
138 xmds1.Url = Settings.Default.XiboClient_xmds_xmds;
156139
157 Properties.Settings.Default.displayName = textBoxDisplayName.Text;140 Properties.Settings.Default.displayName = textBoxDisplayName.Text;
158 Properties.Settings.Default.Save();141 Properties.Settings.Default.Save();
159142
160 xmds1.RegisterDisplayAsync(Properties.Settings.Default.ServerKey, hardwareKey.Key, textBoxDisplayName.Text, Properties.Settings.Default.Version);143 xmds1.RegisterDisplayAsync(Properties.Settings.Default.ServerKey, _hardwareKey.Key, textBoxDisplayName.Text, Properties.Settings.Default.Version);
161 }144 }
162145
163 /// <summary>146 /// <summary>
@@ -169,44 +152,43 @@
169 {152 {
170 try153 try
171 {154 {
172 buttonSaveSettings.Enabled = false;
173
174 // Simple settings155 // Simple settings
175 Properties.Settings.Default.ServerKey = textBoxServerKey.Text;156 Settings.Default.ServerKey = textBoxServerKey.Text;
176 Properties.Settings.Default.LibraryPath = textBoxLibraryPath.Text.TrimEnd('\\');157 Settings.Default.LibraryPath = textBoxLibraryPath.Text.TrimEnd('\\');
177 Properties.Settings.Default.serverURI = textBoxXmdsUri.Text;158 Settings.Default.serverURI = textBoxXmdsUri.Text;
178 Properties.Settings.Default.collectInterval = numericUpDownCollect.Value;159 Settings.Default.collectInterval = numericUpDownCollect.Value;
179 Properties.Settings.Default.powerpointEnabled = checkBoxPowerPoint.Checked;160 Settings.Default.powerpointEnabled = checkBoxPowerPoint.Checked;
180 Properties.Settings.Default.statsEnabled = checkBoxStats.Checked;161 Settings.Default.statsEnabled = checkBoxStats.Checked;
181 Properties.Settings.Default.XiboClient_xmds_xmds = textBoxXmdsUri.Text.TrimEnd('/') + @"/xmds.php";162 Settings.Default.XiboClient_xmds_xmds = textBoxXmdsUri.Text.TrimEnd('/') + @"/xmds.php";
182 Properties.Settings.Default.hardwareKey = tbHardwareKey.Text;163 Settings.Default.hardwareKey = tbHardwareKey.Text;
183 Properties.Settings.Default.scrollStepAmount = nupScrollStepAmount.Value;164 Settings.Default.scrollStepAmount = nupScrollStepAmount.Value;
184 Properties.Settings.Default.EnableMouse = enableMouseCb.Checked;165 Settings.Default.EnableMouse = enableMouseCb.Checked;
166 Settings.Default.DoubleBuffering = doubleBufferingCheckBox.Checked;
185167
186 // Also tweak the address of the xmds1168 // Also tweak the address of the xmds1
187 xmds1.Url = Properties.Settings.Default.XiboClient_xmds_xmds;169 xmds1.Url = Properties.Settings.Default.XiboClient_xmds_xmds;
188 labelXmdsUrl.Text = Properties.Settings.Default.XiboClient_xmds_xmds;170 labelXmdsUrl.Text = Properties.Settings.Default.XiboClient_xmds_xmds;
189171
190 // Proxy Settings172 // Proxy Settings
191 Properties.Settings.Default.ProxyUser = textBoxProxyUser.Text;173 Settings.Default.ProxyUser = textBoxProxyUser.Text;
192 Properties.Settings.Default.ProxyPassword = maskedTextBoxProxyPass.Text;174 Settings.Default.ProxyPassword = maskedTextBoxProxyPass.Text;
193 Properties.Settings.Default.ProxyDomain = textBoxProxyDomain.Text;175 Settings.Default.ProxyDomain = textBoxProxyDomain.Text;
194176
195 // Change the default Proxy class177 // Change the default Proxy class
196 OptionForm.SetGlobalProxy();178 OptionForm.SetGlobalProxy();
197179
198 // Client settings180 // Client settings
199 Properties.Settings.Default.sizeX = clientWidth.Value;181 Settings.Default.sizeX = clientWidth.Value;
200 Properties.Settings.Default.sizeY = clientHeight.Value;182 Settings.Default.sizeY = clientHeight.Value;
201 Properties.Settings.Default.offsetX = offsetX.Value;183 Settings.Default.offsetX = offsetX.Value;
202 Properties.Settings.Default.offsetY = offsetY.Value;184 Settings.Default.offsetY = offsetY.Value;
203185
204 // Advanced settings186 // Advanced settings
205 Properties.Settings.Default.expireModifiedLayouts = cbExpireModifiedLayouts.Checked;187 Settings.Default.expireModifiedLayouts = cbExpireModifiedLayouts.Checked;
206 Properties.Settings.Default.emptyLayoutDuration = numericUpDown1.Value;188 Settings.Default.emptyLayoutDuration = numericUpDownEmptyRegions.Value;
207189
208 // Commit these changes back to the user settings190 // Commit these changes back to the user settings
209 Properties.Settings.Default.Save();191 Settings.Default.Save();
210 }192 }
211 catch (Exception ex)193 catch (Exception ex)
212 {194 {
@@ -219,7 +201,6 @@
219 this.Close();201 this.Close();
220 }202 }
221203
222 private HardwareKey hardwareKey;
223204
224 private void buttonLibrary_Click(object sender, EventArgs e)205 private void buttonLibrary_Click(object sender, EventArgs e)
225 {206 {
@@ -233,25 +214,12 @@
233 }214 }
234 }215 }
235216
236 private void buttonReset_Click(object sender, EventArgs e)
237 {
238 if (MessageBox.Show("Reset to Default Settings?", "Xibo: Are you sure", MessageBoxButtons.YesNo) == DialogResult.Yes)
239 {
240 Properties.Settings.Default.Reset();
241 }
242
243 // Make sure the special settings are delt with
244 Properties.Settings.Default.LibraryPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\Xibo Library";
245 Properties.Settings.Default.displayName = Environment.MachineName;
246 Properties.Settings.Default.Save();
247 }
248
249 private void onlineHelpToolStripMenuItem_Click(object sender, EventArgs e)217 private void onlineHelpToolStripMenuItem_Click(object sender, EventArgs e)
250 {218 {
251 // open URL in separate instance of default browser219 // open URL in separate instance of default browser
252 try220 try
253 {221 {
254 System.Diagnostics.Process.Start("http://www.xibo.org.uk/manual");222 System.Diagnostics.Process.Start("http://wiki.xibo.org.uk/wiki/Manual:TOC");
255 }223 }
256 catch224 catch
257 {225 {
@@ -265,31 +233,6 @@
265 about.ShowDialog();233 about.ShowDialog();
266 }234 }
267235
268 private void checkBoxPowerPoint_CheckedChanged(object sender, EventArgs e)
269 {
270 buttonSaveSettings.Enabled = true;
271
272 if (checkBoxPowerPoint.Checked)
273 {
274 // PowerPoint enabled
275 // check for it installed
276
277 // enable the IE setting?
278 }
279
280 return;
281 }
282
283 private void checkBoxStats_CheckedChanged(object sender, EventArgs e)
284 {
285 buttonSaveSettings.Enabled = true;
286 }
287
288 private void checkBoxAudit_CheckedChanged(object sender, EventArgs e)
289 {
290 buttonSaveSettings.Enabled = true;
291 }
292
293 private void buttonDisplayAdmin_Click(object sender, EventArgs e)236 private void buttonDisplayAdmin_Click(object sender, EventArgs e)
294 {237 {
295 // open URL in separate instance of default browser238 // open URL in separate instance of default browser
@@ -303,97 +246,58 @@
303 }246 }
304 }247 }
305248
306 private void buttonProxySave_Click(object sender, EventArgs e)
307 {
308
309 }
310
311 /// <summary>249 /// <summary>
312 /// Sets up the global proxy250 /// Sets up the global proxy
313 /// </summary>251 /// </summary>
314 public static void SetGlobalProxy()252 public static void SetGlobalProxy()
315 {253 {
316 System.Diagnostics.Debug.WriteLine("[IN]", "SetGlobalProxy");254 Debug.WriteLine("[IN]", "SetGlobalProxy");
317255
318 System.Diagnostics.Debug.WriteLine("Trying to detect a proxy.", "SetGlobalProxy");256 Debug.WriteLine("Trying to detect a proxy.", "SetGlobalProxy");
319 257
320 if (Properties.Settings.Default.ProxyUser != "")258 if (Properties.Settings.Default.ProxyUser != "")
321 {259 {
322 System.Diagnostics.Debug.WriteLine("Creating a network credential using the Proxy User.", "SetGlobalProxy");260 // disable expect100Continue
323 NetworkCredential nc = new NetworkCredential(Properties.Settings.Default.ProxyUser, Properties.Settings.Default.ProxyPassword);261 ServicePointManager.Expect100Continue = false;
324 if (Properties.Settings.Default.ProxyDomain != "") nc.Domain = Properties.Settings.Default.ProxyDomain;262
263 Debug.WriteLine("Creating a network credential using the Proxy User.", "SetGlobalProxy");
264
265 NetworkCredential nc = new NetworkCredential(Settings.Default.ProxyUser, Settings.Default.ProxyPassword);
266
267 if (Properties.Settings.Default.ProxyDomain != "")
268 nc.Domain = Properties.Settings.Default.ProxyDomain;
325269
326 WebRequest.DefaultWebProxy.Credentials = nc;270 WebRequest.DefaultWebProxy.Credentials = nc;
327 }271 }
328 else272 else
329 {273 {
330 System.Diagnostics.Debug.WriteLine("No Proxy.", "SetGlobalProxy");274 Debug.WriteLine("No Proxy.", "SetGlobalProxy");
331 WebRequest.DefaultWebProxy.Credentials = null;275 WebRequest.DefaultWebProxy.Credentials = null;
332 }276 }
333277
334 // What if the URL for XMDS has a SSL certificate?278 // What if the URL for XMDS has a SSL certificate?
335 ServicePointManager.ServerCertificateValidationCallback += delegate(object sender, X509Certificate certificate, X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)279 ServicePointManager.ServerCertificateValidationCallback += delegate(object sender, X509Certificate certificate, X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
336 {280 {
337 System.Diagnostics.Debug.WriteLine("[IN]", "ServerCertificateValidationCallback");281 Debug.WriteLine("[IN]", "ServerCertificateValidationCallback");
338 bool validationResult = false;282 bool validationResult = false;
339283
340 System.Diagnostics.Debug.WriteLine(certificate.Subject);284 Debug.WriteLine(certificate.Subject);
341 System.Diagnostics.Debug.WriteLine(certificate.Issuer);285 Debug.WriteLine(certificate.Issuer);
342286
343 if (sslPolicyErrors != System.Net.Security.SslPolicyErrors.None)287 if (sslPolicyErrors != System.Net.Security.SslPolicyErrors.None)
344 {288 {
345 System.Diagnostics.Debug.WriteLine(sslPolicyErrors.ToString());289 Debug.WriteLine(sslPolicyErrors.ToString());
346 }290 }
347291
348 validationResult = true;292 validationResult = true;
349293
350 System.Diagnostics.Debug.WriteLine("[OUT]", "ServerCertificateValidationCallback");294 Debug.WriteLine("[OUT]", "ServerCertificateValidationCallback");
351 return validationResult;295 return validationResult;
352 };296 };
353297
354 System.Diagnostics.Debug.WriteLine("[OUT]", "SetGlobalProxy");298 Debug.WriteLine("[OUT]", "SetGlobalProxy");
355299
356 return;300 return;
357 }301 }
358
359 private void numericUpDown1_ValueChanged(object sender, EventArgs e)
360 {
361 buttonSaveSettings.Enabled = true;
362 }
363
364 private void cbExpireModifiedLayouts_CheckedChanged(object sender, EventArgs e)
365 {
366 buttonSaveSettings.Enabled = true;
367 }
368
369 private void clientWidth_ValueChanged_1(object sender, EventArgs e)
370 {
371 buttonSaveSettings.Enabled = true;
372 }
373
374 private void clientHeight_ValueChanged_1(object sender, EventArgs e)
375 {
376 buttonSaveSettings.Enabled = true;
377 }
378
379 private void offsetX_ValueChanged_1(object sender, EventArgs e)
380 {
381 buttonSaveSettings.Enabled = true;
382 }
383
384 private void offsetY_ValueChanged_1(object sender, EventArgs e)
385 {
386 buttonSaveSettings.Enabled = true;
387 }
388
389 private void textBoxDisplayName_TextChanged(object sender, EventArgs e)
390 {
391 buttonSaveSettings.Enabled = true;
392 }
393
394 private void checkBox1_CheckedChanged(object sender, EventArgs e)
395 {
396 buttonSaveSettings.Enabled = true;
397 }
398 }302 }
399}303}
400\ No newline at end of file304\ No newline at end of file
401305
=== modified file 'client/dotNET/Properties/Settings.Designer.cs'
--- client/dotNET/Properties/Settings.Designer.cs 2011-09-24 11:06:51 +0000
+++ client/dotNET/Properties/Settings.Designer.cs 2012-01-22 15:34:34 +0000
@@ -1,7 +1,7 @@
1//------------------------------------------------------------------------------1//------------------------------------------------------------------------------
2// <auto-generated>2// <auto-generated>
3// This code was generated by a tool.3// This code was generated by a tool.
4// Runtime Version:2.0.50727.49614// Runtime Version:2.0.50727.5448
5//5//
6// Changes to this file may cause incorrect behavior and will be lost if6// Changes to this file may cause incorrect behavior and will be lost if
7// the code is regenerated.7// the code is regenerated.
@@ -394,5 +394,17 @@
394 this["EnableMouse"] = value;394 this["EnableMouse"] = value;
395 }395 }
396 }396 }
397
398 [global::System.Configuration.UserScopedSettingAttribute()]
399 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
400 [global::System.Configuration.DefaultSettingValueAttribute("True")]
401 public bool DoubleBuffering {
402 get {
403 return ((bool)(this["DoubleBuffering"]));
404 }
405 set {
406 this["DoubleBuffering"] = value;
407 }
408 }
397 }409 }
398}410}
399411
=== modified file 'client/dotNET/Properties/Settings.settings'
--- client/dotNET/Properties/Settings.settings 2011-09-24 11:06:51 +0000
+++ client/dotNET/Properties/Settings.settings 2012-01-22 15:34:34 +0000
@@ -101,5 +101,8 @@
101 <Setting Name="EnableMouse" Type="System.Boolean" Scope="User">101 <Setting Name="EnableMouse" Type="System.Boolean" Scope="User">
102 <Value Profile="(Default)">False</Value>102 <Value Profile="(Default)">False</Value>
103 </Setting>103 </Setting>
104 <Setting Name="DoubleBuffering" Type="System.Boolean" Scope="User">
105 <Value Profile="(Default)">True</Value>
106 </Setting>
104 </Settings>107 </Settings>
105</SettingsFile>108</SettingsFile>
106\ No newline at end of file109\ No newline at end of file
107110
=== modified file 'client/dotNET/Region.cs'
--- client/dotNET/Region.cs 2011-09-06 20:46:43 +0000
+++ client/dotNET/Region.cs 2012-01-22 15:34:34 +0000
@@ -23,6 +23,7 @@
23using System.Windows.Forms;23using System.Windows.Forms;
24using System.Xml;24using System.Xml;
25using System.Diagnostics;25using System.Diagnostics;
26using XiboClient.Properties;
2627
27namespace XiboClient28namespace XiboClient
28{29{
@@ -68,8 +69,11 @@
68 this.Size = new System.Drawing.Size(options.width, options.height);69 this.Size = new System.Drawing.Size(options.width, options.height);
69 this.BackColor = System.Drawing.Color.Transparent;70 this.BackColor = System.Drawing.Color.Transparent;
7071
71 SetStyle(ControlStyles.OptimizedDoubleBuffer, true);72 if (Settings.Default.DoubleBuffering)
72 SetStyle(ControlStyles.AllPaintingInWmPaint, true);73 {
74 SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
75 SetStyle(ControlStyles.AllPaintingInWmPaint, true);
76 }
7377
74 // Create a new BlackList for us to use78 // Create a new BlackList for us to use
75 blackList = new BlackList();79 blackList = new BlackList();
7680
=== modified file 'client/dotNET/RequiredFiles.cs'
--- client/dotNET/RequiredFiles.cs 2011-02-16 11:25:56 +0000
+++ client/dotNET/RequiredFiles.cs 2012-01-22 15:34:34 +0000
@@ -187,7 +187,7 @@
187 rf.FileType, rf.Id.ToString(), rf.Complete.ToString(), rf.LastChecked.ToString(), rf.Md5);187 rf.FileType, rf.Id.ToString(), rf.Complete.ToString(), rf.LastChecked.ToString(), rf.Md5);
188 }188 }
189189
190 xml = string.Format("<files>{0}</files>", xml);190 xml = string.Format("<files macAddress=\"{1}\">{0}</files>", xml, hardwareKey.MacAddress);
191191
192 _report.MediaInventoryAsync(Properties.Settings.Default.Version, Properties.Settings.Default.ServerKey,192 _report.MediaInventoryAsync(Properties.Settings.Default.Version, Properties.Settings.Default.ServerKey,
193 hardwareKey.Key, xml);193 hardwareKey.Key, xml);
194194
=== modified file 'client/dotNET/app.config'
--- client/dotNET/app.config 2011-09-24 11:06:51 +0000
+++ client/dotNET/app.config 2012-01-22 15:34:34 +0000
@@ -85,6 +85,9 @@
85 <setting name="EnableMouse" serializeAs="String">85 <setting name="EnableMouse" serializeAs="String">
86 <value>False</value>86 <value>False</value>
87 </setting>87 </setting>
88 <setting name="DoubleBuffering" serializeAs="String">
89 <value>True</value>
90 </setting>
88 </XiboClient.Properties.Settings>91 </XiboClient.Properties.Settings>
89 </userSettings>92 </userSettings>
90 <applicationSettings>93 <applicationSettings>

Subscribers

People subscribed via source and target branches

to status/vote changes: