Merge lp:~dangarner/xibo/client-162 into lp:xibo/1.6

Proposed by Dan Garner
Status: Merged
Approved by: Dan Garner
Approved revision: 342
Merged at revision: 338
Proposed branch: lp:~dangarner/xibo/client-162
Merge into: lp:xibo/1.6
Diff against target: 213 lines (+40/-25)
8 files modified
client/dotNET/MainForm.cs (+9/-8)
client/dotNET/Properties/Settings.Designer.cs (+2/-2)
client/dotNET/Properties/Settings.settings (+2/-2)
client/dotNET/RequiredFiles.cs (+16/-1)
client/dotNET/Text.cs (+1/-1)
client/dotNET/WebContent.cs (+7/-8)
client/dotNET/XmdsAgents/RequiredFilesAgent.cs (+1/-1)
client/dotNET/app.config (+2/-2)
To merge this branch: bzr merge lp:~dangarner/xibo/client-162
Reviewer Review Type Date Requested Status
Xibo Maintainters Pending
Review via email: mp+226868@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
1=== modified file 'client/dotNET/MainForm.cs'
2--- client/dotNET/MainForm.cs 2014-05-25 12:41:34 +0000
3+++ client/dotNET/MainForm.cs 2014-07-15 15:29:40 +0000
4@@ -36,6 +36,7 @@
5 using System.Threading;
6 using XiboClient.Properties;
7 using System.Runtime.InteropServices;
8+using System.Globalization;
9
10 namespace XiboClient
11 {
12@@ -414,8 +415,8 @@
13 XmlAttributeCollection layoutAttributes = layoutNode.Attributes;
14
15 // Set the background and size of the form
16- _layoutWidth = int.Parse(layoutAttributes["width"].Value);
17- _layoutHeight = int.Parse(layoutAttributes["height"].Value);
18+ _layoutWidth = int.Parse(layoutAttributes["width"].Value, CultureInfo.InvariantCulture);
19+ _layoutHeight = int.Parse(layoutAttributes["height"].Value, CultureInfo.InvariantCulture);
20
21
22 // Scaling factor, will be applied to all regions
23@@ -539,15 +540,15 @@
24 options.scheduleId = _scheduleId;
25 options.layoutId = _layoutId;
26 options.regionId = nodeAttibutes["id"].Value.ToString();
27- options.width = (int)(Convert.ToDouble(nodeAttibutes["width"].Value) * _scaleFactor);
28- options.height = (int)(Convert.ToDouble(nodeAttibutes["height"].Value) * _scaleFactor);
29- options.left = (int)(Convert.ToDouble(nodeAttibutes["left"].Value) * _scaleFactor);
30- options.top = (int)(Convert.ToDouble(nodeAttibutes["top"].Value) * _scaleFactor);
31+ options.width = (int)(Convert.ToDouble(nodeAttibutes["width"].Value, CultureInfo.InvariantCulture) * _scaleFactor);
32+ options.height = (int)(Convert.ToDouble(nodeAttibutes["height"].Value, CultureInfo.InvariantCulture) * _scaleFactor);
33+ options.left = (int)(Convert.ToDouble(nodeAttibutes["left"].Value, CultureInfo.InvariantCulture) * _scaleFactor);
34+ options.top = (int)(Convert.ToDouble(nodeAttibutes["top"].Value, CultureInfo.InvariantCulture) * _scaleFactor);
35 options.scaleFactor = _scaleFactor;
36
37 // Store the original width and original height for scaling
38- options.originalWidth = (int)Convert.ToDouble(nodeAttibutes["width"].Value);
39- options.originalHeight = (int)Convert.ToDouble(nodeAttibutes["height"].Value);
40+ options.originalWidth = (int)Convert.ToDouble(nodeAttibutes["width"].Value, CultureInfo.InvariantCulture);
41+ options.originalHeight = (int)Convert.ToDouble(nodeAttibutes["height"].Value, CultureInfo.InvariantCulture);
42
43 // Set the backgrounds (used for Web content offsets)
44 options.backgroundLeft = options.left * -1;
45
46=== modified file 'client/dotNET/Properties/Settings.Designer.cs'
47--- client/dotNET/Properties/Settings.Designer.cs 2014-05-10 10:22:49 +0000
48+++ client/dotNET/Properties/Settings.Designer.cs 2014-07-15 15:29:40 +0000
49@@ -271,7 +271,7 @@
50
51 [global::System.Configuration.ApplicationScopedSettingAttribute()]
52 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
53- [global::System.Configuration.DefaultSettingValueAttribute("1.6.0")]
54+ [global::System.Configuration.DefaultSettingValueAttribute("1.6.2")]
55 public string ClientVersion {
56 get {
57 return ((string)(this["ClientVersion"]));
58@@ -535,7 +535,7 @@
59
60 [global::System.Configuration.ApplicationScopedSettingAttribute()]
61 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
62- [global::System.Configuration.DefaultSettingValueAttribute("83")]
63+ [global::System.Configuration.DefaultSettingValueAttribute("84")]
64 public int ClientCodeVersion {
65 get {
66 return ((int)(this["ClientCodeVersion"]));
67
68=== modified file 'client/dotNET/Properties/Settings.settings'
69--- client/dotNET/Properties/Settings.settings 2014-05-10 10:22:49 +0000
70+++ client/dotNET/Properties/Settings.settings 2014-07-15 15:29:40 +0000
71@@ -69,7 +69,7 @@
72 <Value Profile="(Default)">cacheManager.xml</Value>
73 </Setting>
74 <Setting Name="ClientVersion" Type="System.String" Scope="Application">
75- <Value Profile="(Default)">1.6.0</Value>
76+ <Value Profile="(Default)">1.6.2</Value>
77 </Setting>
78 <Setting Name="scrollStepAmount" Type="System.Decimal" Scope="User">
79 <Value Profile="(Default)">1</Value>
80@@ -138,7 +138,7 @@
81 <Value Profile="(Default)">Bottom Right</Value>
82 </Setting>
83 <Setting Name="ClientCodeVersion" Type="System.Int32" Scope="Application">
84- <Value Profile="(Default)">83</Value>
85+ <Value Profile="(Default)">84</Value>
86 </Setting>
87 <Setting Name="ClientInformationKeyCode" Type="System.String" Scope="User">
88 <Value Profile="(Default)">I</Value>
89
90=== modified file 'client/dotNET/RequiredFiles.cs'
91--- client/dotNET/RequiredFiles.cs 2014-03-09 14:46:20 +0000
92+++ client/dotNET/RequiredFiles.cs 2014-07-15 15:29:40 +0000
93@@ -147,7 +147,22 @@
94
95 // Check to see if this has already been downloaded
96 if (File.Exists(Settings.Default.LibraryPath + @"\" + rf.MediaId + ".htm"))
97- rf.Complete = true;
98+ {
99+ // Has it expired?
100+ int updated = 0;
101+
102+ try
103+ {
104+ updated = int.Parse(attributes["updated"].Value);
105+ }
106+ catch (Exception) {}
107+
108+ DateTime updatedDt = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
109+ updatedDt = updatedDt.AddSeconds(updated);
110+
111+ if (File.GetLastWriteTimeUtc(Settings.Default.LibraryPath + @"\" + rf.MediaId + ".htm") > updatedDt)
112+ rf.Complete = true;
113+ }
114
115 // Add to the Rf Node
116 RequiredFileList.Add(rf);
117
118=== modified file 'client/dotNET/Text.cs'
119--- client/dotNET/Text.cs 2013-11-09 12:14:38 +0000
120+++ client/dotNET/Text.cs 2014-07-15 15:29:40 +0000
121@@ -1,6 +1,6 @@
122 /*
123 * Xibo - Digitial Signage - http://www.xibo.org.uk
124- * Copyright (C) 2006-2012 Daniel Garner and James Packer
125+ * Copyright (C) 2006-2014 Daniel Garner and James Packer
126 *
127 * This file is part of Xibo.
128 *
129
130=== modified file 'client/dotNET/WebContent.cs'
131--- client/dotNET/WebContent.cs 2013-09-28 14:00:01 +0000
132+++ client/dotNET/WebContent.cs 2014-07-15 15:29:40 +0000
133@@ -22,6 +22,7 @@
134 using System.Text;
135 using System.Windows.Forms;
136 using System.Diagnostics;
137+using System.Globalization;
138
139 namespace XiboClient
140 {
141@@ -98,22 +99,23 @@
142 // Alter the width and height
143 w = w * (1 / scaling);
144 h = h * (1 / scaling);
145- zoom = "zoom: " + scaling.ToString() + ";";
146+ zoom = "zoom: " + scaling.ToString(CultureInfo.InvariantCulture) + ";";
147 }
148
149 // Load an IFRAME into the DocumentText
150- string iframe = "<html><body style='margin:0; border:0;'><iframe style='border:0;margin-left:-" + offsetLeft.ToString() + "px; margin-top:-" + offsetTop.ToString() + "px;" + zoom + "' scrolling=\"no\" width=\"" + (w + offsetLeft).ToString() + "px\" height=\"" + (h + offsetTop).ToString() + "px\" src=\"" + _filePath + "\"></body></html>";
151+ string iframe = "<html><body style='margin:0; border:0;'><iframe style='border:0;margin-left:-" + offsetLeft.ToString(CultureInfo.InvariantCulture) + "px; margin-top:-" + offsetTop.ToString(CultureInfo.InvariantCulture) + "px;" + zoom + "' scrolling=\"no\" width=\"" + (w + offsetLeft).ToString(CultureInfo.InvariantCulture) + "px\" height=\"" + (h + offsetTop).ToString(CultureInfo.InvariantCulture) + "px\" src=\"" + _filePath + "\"></body></html>";
152 webBrowser.DocumentText = iframe;
153 }
154 }
155 catch (Exception ex)
156 {
157- System.Diagnostics.Trace.WriteLine(String.Format("[*]ScheduleID:{1},LayoutID:{2},MediaID:{3},Message:{0}", ex.Message, scheduleId, layoutId, mediaId));
158-
159 webBrowser.DocumentText = "<html><body><h1>Unable to show this web location - invalid address.</h1></body></html>";
160
161- System.Diagnostics.Trace.WriteLine(String.Format("[*]ScheduleID:{1},LayoutID:{2},MediaID:{3},Message:{0}", "Unable to show the powerpoint, cannot be located", scheduleId, layoutId, mediaId));
162+ Trace.WriteLine(new LogMessage("WebContent", "Unable to show webpage. Exception: " + ex.Message, scheduleId, layoutId), LogType.Error.ToString());
163 }
164+
165+ base.Duration = duration;
166+ base.RenderMedia();
167 }
168 }
169
170@@ -125,9 +127,6 @@
171
172 void webBrowser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
173 {
174- base.Duration = duration;
175- base.RenderMedia();
176-
177 // Get ready to show the control
178 Show();
179 Controls.Add(webBrowser);
180
181=== modified file 'client/dotNET/XmdsAgents/RequiredFilesAgent.cs'
182--- client/dotNET/XmdsAgents/RequiredFilesAgent.cs 2014-02-17 20:01:38 +0000
183+++ client/dotNET/XmdsAgents/RequiredFilesAgent.cs 2014-07-15 15:29:40 +0000
184@@ -1,6 +1,6 @@
185 /*
186 * Xibo - Digitial Signage - http://www.xibo.org.uk
187- * Copyright (C) 2006 - 2012 Daniel Garner
188+ * Copyright (C) 2006 - 2014 Daniel Garner
189 *
190 * This file is part of Xibo.
191 *
192
193=== modified file 'client/dotNET/app.config'
194--- client/dotNET/app.config 2014-05-10 10:22:49 +0000
195+++ client/dotNET/app.config 2014-07-15 15:29:40 +0000
196@@ -144,7 +144,7 @@
197 <value>cacheManager.xml</value>
198 </setting>
199 <setting name="ClientVersion" serializeAs="String">
200- <value>1.6.0</value>
201+ <value>1.6.2</value>
202 </setting>
203 <setting name="xmdsResetTimeout" serializeAs="String">
204 <value>900</value>
205@@ -156,7 +156,7 @@
206 <value>True</value>
207 </setting>
208 <setting name="ClientCodeVersion" serializeAs="String">
209- <value>83</value>
210+ <value>84</value>
211 </setting>
212 </XiboClient.Properties.Settings>
213 </applicationSettings>

Subscribers

People subscribed via source and target branches

to all changes: