Merge lp:~dangarner/xibo/client-170-alpha2 into lp:xibo/1.7
- client-170-alpha2
- Merge into tuttle
Proposed by
Dan Garner
Status: | Merged | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 346 | ||||||||||||||||||||||||
Proposed branch: | lp:~dangarner/xibo/client-170-alpha2 | ||||||||||||||||||||||||
Merge into: | lp:xibo/1.7 | ||||||||||||||||||||||||
Diff against target: |
1291 lines (+337/-382) 20 files modified
client/dotNET/Forms/OptionForm.cs (+1/-1) client/dotNET/Log/ClientInfo.Designer.cs (+33/-27) client/dotNET/Log/ClientInfo.cs (+8/-2) client/dotNET/Log/ClientInfo.resx (+21/-18) client/dotNET/Log/StatLog.cs (+63/-125) client/dotNET/Logic/ApplicationSettings.cs (+2/-2) client/dotNET/Logic/RequiredFiles.cs (+3/-3) client/dotNET/Logic/ScheduleManager.cs (+41/-33) client/dotNET/Logic/ScreenShot.cs (+1/-0) client/dotNET/Media/CefWebMedia.cs (+69/-40) client/dotNET/Media/IeWebMedia.cs (+70/-41) client/dotNET/Media/ShellCommand.cs (+5/-1) client/dotNET/Media/TemporaryFile.cs (+0/-71) client/dotNET/Web References/xmds/Reference.cs (+10/-8) client/dotNET/Web References/xmds/Reference.map (+1/-1) client/dotNET/Web References/xmds/xmds.wsdl (+4/-3) client/dotNET/XiboClient.csproj (+2/-3) client/dotNET/XmdsAgents/FileAgent.cs (+1/-1) client/dotNET/XmdsAgents/RegisterAgent.cs (+1/-1) client/dotNET/default.config.xml (+1/-1) |
||||||||||||||||||||||||
To merge this branch: | bzr merge lp:~dangarner/xibo/client-170-alpha2 | ||||||||||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xibo Maintainters | Pending | ||
Review via email: mp+239096@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/Forms/OptionForm.cs' |
2 | --- client/dotNET/Forms/OptionForm.cs 2014-08-29 19:31:56 +0000 |
3 | +++ client/dotNET/Forms/OptionForm.cs 2014-10-21 16:06:26 +0000 |
4 | @@ -149,7 +149,7 @@ |
5 | ApplicationSettings.Default.Save(); |
6 | |
7 | // Call register |
8 | - xmds1.RegisterDisplayAsync(ApplicationSettings.Default.ServerKey, ApplicationSettings.Default.HardwareKey, ApplicationSettings.Default.DisplayName, "windows", ApplicationSettings.Default.ClientVersion, ApplicationSettings.Default.ClientCodeVersion, _hardwareKey.MacAddress, ApplicationSettings.Default.Version); |
9 | + xmds1.RegisterDisplayAsync(ApplicationSettings.Default.ServerKey, ApplicationSettings.Default.HardwareKey, ApplicationSettings.Default.DisplayName, "windows", ApplicationSettings.Default.ClientVersion, ApplicationSettings.Default.ClientCodeVersion, Environment.OSVersion.ToString(), _hardwareKey.MacAddress, ApplicationSettings.Default.Version); |
10 | } |
11 | catch (Exception ex) |
12 | { |
13 | |
14 | === modified file 'client/dotNET/Log/ClientInfo.Designer.cs' |
15 | --- client/dotNET/Log/ClientInfo.Designer.cs 2013-05-01 19:24:35 +0000 |
16 | +++ client/dotNET/Log/ClientInfo.Designer.cs 2014-10-21 16:06:26 +0000 |
17 | @@ -28,9 +28,9 @@ |
18 | /// </summary> |
19 | private void InitializeComponent() |
20 | { |
21 | - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); |
22 | - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); |
23 | - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); |
24 | + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); |
25 | + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); |
26 | + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); |
27 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClientInfo)); |
28 | this.logDataGridView = new System.Windows.Forms.DataGridView(); |
29 | this.Thread = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
30 | @@ -45,6 +45,7 @@ |
31 | this.requiredFilesTextBox = new System.Windows.Forms.TextBox(); |
32 | this.scheduleManagerStatus = new System.Windows.Forms.TextBox(); |
33 | this.saveLogToDisk = new System.Windows.Forms.Button(); |
34 | + this.saveFileDialog = new System.Windows.Forms.SaveFileDialog(); |
35 | ((System.ComponentModel.ISupportInitialize)(this.logDataGridView)).BeginInit(); |
36 | this.SuspendLayout(); |
37 | // |
38 | @@ -52,14 +53,14 @@ |
39 | // |
40 | this.logDataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells; |
41 | this.logDataGridView.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable; |
42 | - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
43 | - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; |
44 | - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
45 | - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; |
46 | - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
47 | - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
48 | - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; |
49 | - this.logDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; |
50 | + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
51 | + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control; |
52 | + dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
53 | + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; |
54 | + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
55 | + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
56 | + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; |
57 | + this.logDataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4; |
58 | this.logDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; |
59 | this.logDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { |
60 | this.Thread, |
61 | @@ -67,25 +68,25 @@ |
62 | this.Type, |
63 | this.Method, |
64 | this.Message}); |
65 | - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
66 | - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; |
67 | - dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
68 | - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; |
69 | - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
70 | - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
71 | - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; |
72 | - this.logDataGridView.DefaultCellStyle = dataGridViewCellStyle2; |
73 | + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
74 | + dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Window; |
75 | + dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
76 | + dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.ControlText; |
77 | + dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
78 | + dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
79 | + dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False; |
80 | + this.logDataGridView.DefaultCellStyle = dataGridViewCellStyle5; |
81 | this.logDataGridView.Location = new System.Drawing.Point(12, 314); |
82 | this.logDataGridView.Name = "logDataGridView"; |
83 | this.logDataGridView.ReadOnly = true; |
84 | - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
85 | - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control; |
86 | - dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
87 | - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText; |
88 | - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
89 | - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
90 | - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; |
91 | - this.logDataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; |
92 | + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; |
93 | + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; |
94 | + dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); |
95 | + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; |
96 | + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; |
97 | + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; |
98 | + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; |
99 | + this.logDataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; |
100 | this.logDataGridView.Size = new System.Drawing.Size(786, 408); |
101 | this.logDataGridView.TabIndex = 0; |
102 | // |
103 | @@ -190,6 +191,10 @@ |
104 | this.saveLogToDisk.UseVisualStyleBackColor = true; |
105 | this.saveLogToDisk.Click += new System.EventHandler(this.saveLogToDisk_Click); |
106 | // |
107 | + // saveFileDialog |
108 | + // |
109 | + this.saveFileDialog.FileOk += new System.ComponentModel.CancelEventHandler(this.saveFileDialog_FileOk); |
110 | + // |
111 | // ClientInfo |
112 | // |
113 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
114 | @@ -227,5 +232,6 @@ |
115 | private System.Windows.Forms.DataGridViewTextBoxColumn Message; |
116 | private System.Windows.Forms.TextBox scheduleManagerStatus; |
117 | private System.Windows.Forms.Button saveLogToDisk; |
118 | + private System.Windows.Forms.SaveFileDialog saveFileDialog; |
119 | } |
120 | } |
121 | \ No newline at end of file |
122 | |
123 | === modified file 'client/dotNET/Log/ClientInfo.cs' |
124 | --- client/dotNET/Log/ClientInfo.cs 2014-08-27 14:37:13 +0000 |
125 | +++ client/dotNET/Log/ClientInfo.cs 2014-10-21 16:06:26 +0000 |
126 | @@ -216,7 +216,13 @@ |
127 | /// <param name="e"></param> |
128 | private void saveLogToDisk_Click(object sender, EventArgs e) |
129 | { |
130 | - using (StreamWriter wrt = new StreamWriter(Path.GetDirectoryName(Application.ExecutablePath) + "\\XiboLog.txt")) |
131 | + saveFileDialog.InitialDirectory = ApplicationSettings.Default.LibraryPath; |
132 | + saveFileDialog.ShowDialog(); |
133 | + } |
134 | + |
135 | + private void saveFileDialog_FileOk(object sender, CancelEventArgs e) |
136 | + { |
137 | + using (StreamWriter wrt = new StreamWriter(saveFileDialog.FileName)) |
138 | { |
139 | foreach (DataGridViewRow row in logDataGridView.Rows) |
140 | { |
141 | @@ -232,7 +238,7 @@ |
142 | } |
143 | } |
144 | |
145 | - MessageBox.Show("Log saved as " + Path.GetDirectoryName(Application.ExecutablePath) + "\\XiboLog.txt", "Log Saved"); |
146 | + MessageBox.Show("Log saved as " + saveFileDialog.FileName, "Log Saved"); |
147 | } |
148 | } |
149 | } |
150 | \ No newline at end of file |
151 | |
152 | === modified file 'client/dotNET/Log/ClientInfo.resx' |
153 | --- client/dotNET/Log/ClientInfo.resx 2013-05-01 19:24:35 +0000 |
154 | +++ client/dotNET/Log/ClientInfo.resx 2014-10-21 16:06:26 +0000 |
155 | @@ -112,27 +112,30 @@ |
156 | <value>2.0</value> |
157 | </resheader> |
158 | <resheader name="reader"> |
159 | - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
160 | + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
161 | </resheader> |
162 | <resheader name="writer"> |
163 | - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
164 | + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
165 | </resheader> |
166 | - <metadata name="Thread.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
167 | - <value>True</value> |
168 | - </metadata> |
169 | - <metadata name="Date.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
170 | - <value>True</value> |
171 | - </metadata> |
172 | - <metadata name="Type.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
173 | - <value>True</value> |
174 | - </metadata> |
175 | - <metadata name="Method.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
176 | - <value>True</value> |
177 | - </metadata> |
178 | - <metadata name="Message.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
179 | - <value>True</value> |
180 | - </metadata> |
181 | - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
182 | + <metadata name="Thread.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
183 | + <value>True</value> |
184 | + </metadata> |
185 | + <metadata name="Date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
186 | + <value>True</value> |
187 | + </metadata> |
188 | + <metadata name="Type.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
189 | + <value>True</value> |
190 | + </metadata> |
191 | + <metadata name="Method.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
192 | + <value>True</value> |
193 | + </metadata> |
194 | + <metadata name="Message.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
195 | + <value>True</value> |
196 | + </metadata> |
197 | + <metadata name="saveFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> |
198 | + <value>17, 17</value> |
199 | + </metadata> |
200 | + <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
201 | <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
202 | <value> |
203 | AAABAAkAICAQAAEABADoAgAAlgAAABAQEAABAAQAKAEAAH4DAAAwMAAAAQAIAKgOAACmBAAAICAAAAEA |
204 | |
205 | === modified file 'client/dotNET/Log/StatLog.cs' |
206 | --- client/dotNET/Log/StatLog.cs 2014-08-29 19:31:56 +0000 |
207 | +++ client/dotNET/Log/StatLog.cs 2014-10-21 16:06:26 +0000 |
208 | @@ -1,6 +1,6 @@ |
209 | /* |
210 | * Xibo - Digitial Signage - http://www.xibo.org.uk |
211 | - * Copyright (C) 2009 Daniel Garner |
212 | + * Copyright (C) 2009-2014 Spring Signage Ltd |
213 | * |
214 | * This file is part of Xibo. |
215 | * |
216 | @@ -24,13 +24,14 @@ |
217 | using System.IO; |
218 | using System.Windows.Forms; |
219 | using System.Xml; |
220 | +using System.Diagnostics; |
221 | +using System.Threading; |
222 | |
223 | namespace XiboClient |
224 | { |
225 | class StatLog |
226 | { |
227 | private Collection<Stat> _stats; |
228 | - private xmds.xmds _xmds; |
229 | private String _lastSubmit; |
230 | private HardwareKey _hardwareKey; |
231 | private Boolean _xmdsProcessing; |
232 | @@ -38,12 +39,7 @@ |
233 | public StatLog() |
234 | { |
235 | _stats = new Collection<Stat>(); |
236 | - _xmds = new xmds.xmds(); |
237 | - _xmds.Url = ApplicationSettings.Default.XiboClient_xmds_xmds; |
238 | - |
239 | - // Register a listener for the XMDS stats |
240 | - _xmds.SubmitStatsCompleted += new XiboClient.xmds.SubmitStatsCompletedEventHandler(_xmds_SubmitStatsCompleted); |
241 | - |
242 | + |
243 | // Get the key for this display |
244 | _hardwareKey = new HardwareKey(); |
245 | |
246 | @@ -126,9 +122,10 @@ |
247 | /// <param name="stat"></param> |
248 | public void RecordStat(Stat stat) |
249 | { |
250 | - if (!ApplicationSettings.Default.StatsEnabled) return; |
251 | + if (!ApplicationSettings.Default.StatsEnabled) |
252 | + return; |
253 | |
254 | - System.Diagnostics.Debug.WriteLine(String.Format("Recording a Stat Record. Current Count = {0}", _stats.Count.ToString()), LogType.Audit.ToString()); |
255 | + Debug.WriteLine(String.Format("Recording a Stat Record. Current Count = {0}", _stats.Count.ToString()), LogType.Audit.ToString()); |
256 | |
257 | _stats.Add(stat); |
258 | |
259 | @@ -146,24 +143,20 @@ |
260 | /// </summary> |
261 | public void Flush() |
262 | { |
263 | - System.Diagnostics.Debug.WriteLine(new LogMessage("Flush", String.Format("IN")), LogType.Audit.ToString()); |
264 | + Debug.WriteLine(new LogMessage("Flush", String.Format("IN")), LogType.Audit.ToString()); |
265 | |
266 | // Determine if there is anything to flush |
267 | - if (_stats.Count < 1 || _xmdsProcessing) return; |
268 | - |
269 | - int threshold = ((int)ApplicationSettings.Default.CollectInterval * 5); |
270 | - |
271 | - // Determine where we want to log. |
272 | - if (ApplicationSettings.Default.XmdsLastConnection.AddSeconds(threshold) < DateTime.Now) |
273 | - { |
274 | - FlushToFile(); |
275 | - } |
276 | - else |
277 | - { |
278 | - FlushToXmds(); |
279 | - } |
280 | - |
281 | - System.Diagnostics.Debug.WriteLine(new LogMessage("Flush", String.Format("OUT")), LogType.Audit.ToString()); |
282 | + if (_stats.Count < 1) |
283 | + return; |
284 | + |
285 | + // Flush to File |
286 | + FlushToFile(); |
287 | + |
288 | + // See if there are any records to flush to XMDS |
289 | + Thread logSubmit = new Thread(new ThreadStart(ProcessQueueToXmds)); |
290 | + logSubmit.Start(); |
291 | + |
292 | + Debug.WriteLine(new LogMessage("Flush", String.Format("OUT")), LogType.Audit.ToString()); |
293 | } |
294 | |
295 | /// <summary> |
296 | @@ -171,36 +164,24 @@ |
297 | /// </summary> |
298 | private void FlushToFile() |
299 | { |
300 | - System.Diagnostics.Debug.WriteLine(new LogMessage("FlushToFile", String.Format("IN")), LogType.Audit.ToString()); |
301 | + Debug.WriteLine(new LogMessage("FlushToFile", String.Format("IN")), LogType.Audit.ToString()); |
302 | |
303 | // There is something to flush - we want to parse the collection adding to the TextWriter each time. |
304 | try |
305 | { |
306 | // Open the Text Writer |
307 | - StreamWriter tw = new StreamWriter(File.Open(ApplicationSettings.Default.LibraryPath + @"\" + ApplicationSettings.Default.StatsLogFile, FileMode.Append, FileAccess.Write, FileShare.Read), Encoding.UTF8); |
308 | - |
309 | - try |
310 | + using (StreamWriter tw = new StreamWriter(File.Open(string.Format("{0}_{1}", ApplicationSettings.Default.LibraryPath + @"\" + ApplicationSettings.Default.StatsLogFile, DateTime.Now.ToFileTimeUtc().ToString()), FileMode.Append, FileAccess.Write, FileShare.Read), Encoding.UTF8)) |
311 | { |
312 | foreach (Stat stat in _stats) |
313 | { |
314 | tw.WriteLine(stat.ToString()); |
315 | } |
316 | } |
317 | - catch (Exception ex) |
318 | - { |
319 | - System.Diagnostics.Trace.WriteLine(new LogMessage("FlushToFile", String.Format("Error writing stats line to file with exception {0}", ex.Message)), LogType.Error.ToString()); |
320 | - } |
321 | - finally |
322 | - { |
323 | - // Close the tw. |
324 | - tw.Close(); |
325 | - tw.Dispose(); |
326 | - } |
327 | } |
328 | catch (Exception ex) |
329 | { |
330 | // Log this exception |
331 | - System.Diagnostics.Trace.WriteLine(new LogMessage("FlushToFile", String.Format("Error writing stats to file with exception {0}", ex.Message)), LogType.Error.ToString()); |
332 | + Trace.WriteLine(new LogMessage("FlushToFile", String.Format("Error writing stats to file with exception {0}", ex.Message)), LogType.Error.ToString()); |
333 | } |
334 | finally |
335 | { |
336 | @@ -208,103 +189,60 @@ |
337 | _stats.Clear(); |
338 | } |
339 | |
340 | - System.Diagnostics.Debug.WriteLine(new LogMessage("FlushToFile", String.Format("OUT")), LogType.Audit.ToString()); |
341 | + Debug.WriteLine(new LogMessage("FlushToFile", String.Format("OUT")), LogType.Audit.ToString()); |
342 | } |
343 | |
344 | /// <summary> |
345 | /// Send the Stats to XMDS |
346 | /// </summary> |
347 | - private void FlushToXmds() |
348 | + private void ProcessQueueToXmds() |
349 | { |
350 | - System.Diagnostics.Debug.WriteLine(new LogMessage("FlushToXmds", String.Format("IN")), LogType.Audit.ToString()); |
351 | - |
352 | - String stats; |
353 | - |
354 | - stats = "<log>"; |
355 | - |
356 | - // Load the Stats collection into a string |
357 | - try |
358 | - { |
359 | - foreach (Stat stat in _stats) |
360 | + Debug.WriteLine(new LogMessage("FlushToXmds", String.Format("IN")), LogType.Audit.ToString()); |
361 | + |
362 | + int threshold = ((int)ApplicationSettings.Default.CollectInterval * 5); |
363 | + |
364 | + // Determine where we want to log. |
365 | + if (ApplicationSettings.Default.XmdsLastConnection.AddSeconds(threshold) < DateTime.Now && true) |
366 | + { |
367 | + return; |
368 | + } |
369 | + |
370 | + // Get a list of all the log files waiting to be sent to XMDS. |
371 | + string[] logFiles = Directory.GetFiles(ApplicationSettings.Default.LibraryPath, "*" + ApplicationSettings.Default.StatsLogFile + "*"); |
372 | + |
373 | + foreach (string fileName in logFiles) |
374 | + { |
375 | + // If we have some, create an XMDS object |
376 | + using (xmds.xmds logtoXmds = new xmds.xmds()) |
377 | { |
378 | - stats += stat.ToString(); |
379 | + logtoXmds.Url = ApplicationSettings.Default.XiboClient_xmds_xmds; |
380 | + |
381 | + // construct the log message |
382 | + StringBuilder builder = new StringBuilder(); |
383 | + builder.Append("<log>"); |
384 | + |
385 | + foreach (string entry in File.ReadAllLines(fileName)) |
386 | + builder.Append(entry); |
387 | + |
388 | + builder.Append("</log>"); |
389 | + |
390 | + try |
391 | + { |
392 | + logtoXmds.SubmitStats(ApplicationSettings.Default.Version, ApplicationSettings.Default.ServerKey, _hardwareKey.Key, builder.ToString()); |
393 | + |
394 | + // Delete the file we are on |
395 | + File.Delete(fileName); |
396 | + } |
397 | + catch (Exception e) |
398 | + { |
399 | + Trace.WriteLine(new LogMessage("FlushToXmds", string.Format("Exception when submitting to XMDS: {0}", e.Message)), LogType.Error.ToString()); |
400 | + } |
401 | } |
402 | } |
403 | - catch (Exception ex) |
404 | - { |
405 | - System.Diagnostics.Trace.WriteLine(new LogMessage("FlushToXmds", String.Format("Error converting stat to a string {0}", ex.Message)), LogType.Error.ToString()); |
406 | - } |
407 | - |
408 | - stats += "</log>"; |
409 | - |
410 | - // Store the stats as the last sent (so we have a record if it fails) |
411 | - _lastSubmit = stats; |
412 | - |
413 | - // Clear the stats collection |
414 | - _stats.Clear(); |
415 | - |
416 | - // Submit the string to XMDS |
417 | - _xmdsProcessing = true; |
418 | - |
419 | - _xmds.SubmitStatsAsync(ApplicationSettings.Default.Version, ApplicationSettings.Default.ServerKey, _hardwareKey.Key, stats); |
420 | |
421 | // Log out |
422 | System.Diagnostics.Debug.WriteLine(new LogMessage("FlushToXmds", String.Format("OUT")), LogType.Audit.ToString()); |
423 | } |
424 | - |
425 | - /// <summary> |
426 | - /// Capture the XMDS call and see if it went well |
427 | - /// </summary> |
428 | - /// <param name="sender"></param> |
429 | - /// <param name="e"></param> |
430 | - void _xmds_SubmitStatsCompleted(object sender, XiboClient.xmds.SubmitStatsCompletedEventArgs e) |
431 | - { |
432 | - System.Diagnostics.Debug.WriteLine(new LogMessage("_xmds_SubmitStatsCompleted", String.Format("IN")), LogType.Audit.ToString()); |
433 | - |
434 | - _xmdsProcessing = false; |
435 | - |
436 | - // Test if we succeeded or not |
437 | - if (e.Error != null) |
438 | - { |
439 | - // We had an error, log it. |
440 | - System.Diagnostics.Trace.WriteLine(new LogMessage("_xmds_SubmitStatsCompleted", String.Format("Error during Submit to XMDS {0}", e.Error.Message)), LogType.Error.ToString()); |
441 | - |
442 | - // Dump the stats to a file instead |
443 | - if (_lastSubmit != "") |
444 | - { |
445 | - try |
446 | - { |
447 | - // Open the Text Writer |
448 | - StreamWriter tw = new StreamWriter(File.Open(ApplicationSettings.Default.LibraryPath + @"\" + ApplicationSettings.Default.StatsLogFile, FileMode.Append, FileAccess.Write, FileShare.Read), Encoding.UTF8); |
449 | - |
450 | - try |
451 | - { |
452 | - tw.Write(_lastSubmit); |
453 | - } |
454 | - catch (Exception ex) |
455 | - { |
456 | - // Log this exception |
457 | - System.Diagnostics.Trace.WriteLine(new LogMessage("_xmds_SubmitStatsCompleted", String.Format("Error writing stats to file with exception {0}", ex.Message)), LogType.Error.ToString()); |
458 | - } |
459 | - finally |
460 | - { |
461 | - tw.Close(); |
462 | - tw.Dispose(); |
463 | - } |
464 | - } |
465 | - catch (Exception ex) |
466 | - { |
467 | - // Log this exception |
468 | - System.Diagnostics.Trace.WriteLine(new LogMessage("_xmds_SubmitStatsCompleted", String.Format("Could not open the file with exception {0}", ex.Message)), LogType.Error.ToString()); |
469 | - } |
470 | - } |
471 | - } |
472 | - |
473 | - // Clear the last sumbit |
474 | - _lastSubmit = ""; |
475 | - |
476 | - System.Diagnostics.Debug.WriteLine(new LogMessage("_xmds_SubmitStatsCompleted", String.Format("OUT")), LogType.Audit.ToString()); |
477 | - } |
478 | } |
479 | |
480 | class Stat |
481 | |
482 | === modified file 'client/dotNET/Logic/ApplicationSettings.cs' |
483 | --- client/dotNET/Logic/ApplicationSettings.cs 2014-09-16 10:27:10 +0000 |
484 | +++ client/dotNET/Logic/ApplicationSettings.cs 2014-10-21 16:06:26 +0000 |
485 | @@ -36,9 +36,9 @@ |
486 | private static string _default = "default"; |
487 | |
488 | // Application Specific Settings we want to protect |
489 | - private string _clientVersion = "1.7.0-alpha"; |
490 | + private string _clientVersion = "1.7.0-alpha2"; |
491 | private string _version = "4"; |
492 | - private int _clientCodeVersion = 100; |
493 | + private int _clientCodeVersion = 101; |
494 | |
495 | public string ClientVersion { get { return _clientVersion; } } |
496 | public string Version { get { return _version; } } |
497 | |
498 | === modified file 'client/dotNET/Logic/RequiredFiles.cs' |
499 | --- client/dotNET/Logic/RequiredFiles.cs 2014-08-30 14:17:18 +0000 |
500 | +++ client/dotNET/Logic/RequiredFiles.cs 2014-10-21 16:06:26 +0000 |
501 | @@ -435,9 +435,9 @@ |
502 | public bool Complete; |
503 | public bool Http; |
504 | |
505 | - public int ChunkOffset; |
506 | - public int ChunkSize; |
507 | - public int Size; |
508 | + public double ChunkOffset; |
509 | + public double ChunkSize; |
510 | + public double Size; |
511 | public int Retrys; |
512 | |
513 | // Resource nodes |
514 | |
515 | === modified file 'client/dotNET/Logic/ScheduleManager.cs' |
516 | --- client/dotNET/Logic/ScheduleManager.cs 2014-09-16 16:40:30 +0000 |
517 | +++ client/dotNET/Logic/ScheduleManager.cs 2014-10-21 16:06:26 +0000 |
518 | @@ -30,6 +30,7 @@ |
519 | using XiboClient.Log; |
520 | using System.Threading; |
521 | using XiboClient.Logic; |
522 | +using System.Globalization; |
523 | |
524 | /// 17/02/12 Dan Added a static method to get the schedule XML from disk into a string and to write it to the disk |
525 | /// 20/02/12 Dan Tweaked log types on a few trace messages |
526 | @@ -351,39 +352,46 @@ |
527 | // Node name |
528 | temp.NodeName = node.Name; |
529 | |
530 | - // Pull attributes from layout nodes |
531 | - XmlAttributeCollection attributes = node.Attributes; |
532 | - |
533 | - // All nodes have file properties |
534 | - temp.layoutFile = attributes["file"].Value; |
535 | - |
536 | - // Replace the .xml extension with nothing |
537 | - string replace = ".xml"; |
538 | - string layoutFile = temp.layoutFile.TrimEnd(replace.ToCharArray()); |
539 | - |
540 | - // Set these on the temp layoutschedule |
541 | - temp.layoutFile = ApplicationSettings.Default.LibraryPath + @"\" + layoutFile + @".xlf"; |
542 | - temp.id = int.Parse(layoutFile); |
543 | - |
544 | - // Get attributes that only exist on the default |
545 | - if (temp.NodeName != "default") |
546 | - { |
547 | - // Priority flag |
548 | - temp.Priority = (attributes["priority"].Value == "1") ? true : false; |
549 | - |
550 | - // Get the fromdt,todt |
551 | - temp.FromDt = DateTime.Parse(attributes["fromdt"].Value); |
552 | - temp.ToDt = DateTime.Parse(attributes["todt"].Value); |
553 | - |
554 | - // Pull out the scheduleid if there is one |
555 | - string scheduleId = ""; |
556 | - if (attributes["scheduleid"] != null) scheduleId = attributes["scheduleid"].Value; |
557 | - |
558 | - // Add it to the layout schedule |
559 | - if (scheduleId != "") temp.scheduleid = int.Parse(scheduleId); |
560 | - } |
561 | - |
562 | - _layoutSchedule.Add(temp); |
563 | + if (temp.NodeName == "dependants") |
564 | + { |
565 | + // Do nothing for now |
566 | + } |
567 | + else |
568 | + { |
569 | + // Pull attributes from layout nodes |
570 | + XmlAttributeCollection attributes = node.Attributes; |
571 | + |
572 | + // All nodes have file properties |
573 | + temp.layoutFile = attributes["file"].Value; |
574 | + |
575 | + // Replace the .xml extension with nothing |
576 | + string replace = ".xml"; |
577 | + string layoutFile = temp.layoutFile.TrimEnd(replace.ToCharArray()); |
578 | + |
579 | + // Set these on the temp layoutschedule |
580 | + temp.layoutFile = ApplicationSettings.Default.LibraryPath + @"\" + layoutFile + @".xlf"; |
581 | + temp.id = int.Parse(layoutFile); |
582 | + |
583 | + // Get attributes that only exist on the default |
584 | + if (temp.NodeName != "default") |
585 | + { |
586 | + // Priority flag |
587 | + temp.Priority = (attributes["priority"].Value == "1") ? true : false; |
588 | + |
589 | + // Get the fromdt,todt |
590 | + temp.FromDt = DateTime.Parse(attributes["fromdt"].Value, CultureInfo.InvariantCulture); |
591 | + temp.ToDt = DateTime.Parse(attributes["todt"].Value, CultureInfo.InvariantCulture); |
592 | + |
593 | + // Pull out the scheduleid if there is one |
594 | + string scheduleId = ""; |
595 | + if (attributes["scheduleid"] != null) scheduleId = attributes["scheduleid"].Value; |
596 | + |
597 | + // Add it to the layout schedule |
598 | + if (scheduleId != "") temp.scheduleid = int.Parse(scheduleId); |
599 | + } |
600 | + |
601 | + _layoutSchedule.Add(temp); |
602 | + } |
603 | } |
604 | |
605 | // Clean up |
606 | |
607 | === modified file 'client/dotNET/Logic/ScreenShot.cs' |
608 | --- client/dotNET/Logic/ScreenShot.cs 2014-09-16 10:27:10 +0000 |
609 | +++ client/dotNET/Logic/ScreenShot.cs 2014-10-21 16:06:26 +0000 |
610 | @@ -30,6 +30,7 @@ |
611 | |
612 | using (xmds.xmds screenShotXmds = new xmds.xmds()) |
613 | { |
614 | + screenShotXmds.Url = ApplicationSettings.Default.XiboClient_xmds_xmds; |
615 | screenShotXmds.SubmitScreenShotCompleted += screenShotXmds_SubmitScreenShotCompleted; |
616 | screenShotXmds.SubmitScreenShotAsync(ApplicationSettings.Default.Version, ApplicationSettings.Default.ServerKey, ApplicationSettings.Default.HardwareKey, bytes); |
617 | } |
618 | |
619 | === modified file 'client/dotNET/Media/CefWebMedia.cs' |
620 | --- client/dotNET/Media/CefWebMedia.cs 2014-09-01 13:33:50 +0000 |
621 | +++ client/dotNET/Media/CefWebMedia.cs 2014-10-21 16:06:26 +0000 |
622 | @@ -19,7 +19,6 @@ |
623 | private bool _startWhenReady = false; |
624 | private string _filePath; |
625 | private RegionOptions _options; |
626 | - private TemporaryFile _temporaryFile; |
627 | private CefWebBrowser _webView; |
628 | |
629 | public CefWebMedia(RegionOptions options) |
630 | @@ -31,10 +30,7 @@ |
631 | |
632 | // Set the file path |
633 | _filePath = ApplicationSettings.Default.LibraryPath + @"\" + _options.mediaid + ".htm"; |
634 | - |
635 | - // We will need a temporary file to store this HTML |
636 | - _temporaryFile = new TemporaryFile(); |
637 | - |
638 | + |
639 | Color backgroundColor = ColorTranslator.FromHtml(_options.backgroundColor); |
640 | |
641 | CefBrowserSettings settings = new CefBrowserSettings(); |
642 | @@ -52,7 +48,7 @@ |
643 | if (HtmlReady()) |
644 | { |
645 | // Write to temporary file |
646 | - SaveToTemporaryFile(); |
647 | + ReadControlMeta(); |
648 | |
649 | _startWhenReady = true; |
650 | } |
651 | @@ -86,7 +82,7 @@ |
652 | |
653 | if (_startWhenReady) |
654 | // Navigate to temp file |
655 | - _webView.Browser.GetMainFrame().LoadUrl(_temporaryFile.Path); |
656 | + _webView.Browser.GetMainFrame().LoadUrl(_filePath); |
657 | } |
658 | |
659 | void _webView_LoadEnd(object sender, LoadEndEventArgs e) |
660 | @@ -116,32 +112,21 @@ |
661 | if (_options.LayoutModifiedDate.CompareTo(lastWriteDate) > 0 || DateTime.Now.CompareTo(lastWriteDate.AddHours(_options.updateInterval * 1.0 / 60.0)) > 0) |
662 | return false; |
663 | else |
664 | + { |
665 | + UpdateCacheIfNecessary(); |
666 | return true; |
667 | + } |
668 | } |
669 | |
670 | /// <summary> |
671 | /// Updates the position of the background and saves to a temporary file |
672 | /// </summary> |
673 | - private void SaveToTemporaryFile() |
674 | + private void ReadControlMeta() |
675 | { |
676 | // read the contents of the file |
677 | using (StreamReader reader = new StreamReader(_filePath)) |
678 | { |
679 | - string cachedFile = reader.ReadToEnd(); |
680 | - |
681 | - // Handle the background |
682 | - String bodyStyle; |
683 | - |
684 | - if (_options.backgroundImage == null || _options.backgroundImage == "") |
685 | - { |
686 | - bodyStyle = "background-color:" + _options.backgroundColor + " ;"; |
687 | - } |
688 | - else |
689 | - { |
690 | - bodyStyle = "background-image: url('" + _options.backgroundImage.Replace('\\', '/') + "'); background-attachment:fixed; background-color:" + _options.backgroundColor + "; background-repeat: no-repeat; background-position: " + _options.backgroundLeft + "px " + _options.backgroundTop + "px;"; |
691 | - } |
692 | - |
693 | - string html = cachedFile.Replace("</head>", "<style type='text/css'>body {" + bodyStyle + " }</style></head>"); |
694 | + string html = reader.ReadToEnd(); |
695 | |
696 | // We also want to parse out the duration using a regular expression |
697 | try |
698 | @@ -158,8 +143,6 @@ |
699 | { |
700 | Trace.WriteLine(new LogMessage("Html - SaveToTemporaryFile", "Unable to pull duration using RegEx").ToString()); |
701 | } |
702 | - |
703 | - _temporaryFile.FileContent = html; |
704 | } |
705 | } |
706 | |
707 | @@ -194,18 +177,36 @@ |
708 | } |
709 | else |
710 | { |
711 | + // Ammend the resource file so that we can open it directly from the library (this is better than using a tempoary file) |
712 | + string cachedFile = e.Result; |
713 | + |
714 | + // Handle the background |
715 | + String bodyStyle; |
716 | + |
717 | + if (_options.backgroundImage == null || _options.backgroundImage == "") |
718 | + { |
719 | + bodyStyle = "background-color:" + _options.backgroundColor + " ;"; |
720 | + } |
721 | + else |
722 | + { |
723 | + bodyStyle = "background-image: url('" + _options.backgroundImage.Replace('\\', '/') + "'); background-attachment:fixed; background-color:" + _options.backgroundColor + "; background-repeat: no-repeat; background-position: " + _options.backgroundLeft + "px " + _options.backgroundTop + "px;"; |
724 | + } |
725 | + |
726 | + string html = cachedFile.Replace("</head>", "<style type='text/css'>body {" + bodyStyle + " }</style></head>"); |
727 | + html = html.Replace("[[ViewPortWidth]]", _width.ToString()); |
728 | + |
729 | // Write to the library |
730 | using (StreamWriter sw = new StreamWriter(File.Open(_filePath, FileMode.Create, FileAccess.Write, FileShare.Read))) |
731 | { |
732 | - sw.Write(e.Result); |
733 | + sw.Write(html); |
734 | sw.Close(); |
735 | } |
736 | |
737 | - // Write to temporary file |
738 | - SaveToTemporaryFile(); |
739 | + // Read the control meta back out |
740 | + ReadControlMeta(); |
741 | |
742 | // Handle Navigate in here because we will not have done it during first load |
743 | - _webView.Browser.GetMainFrame().LoadUrl(_temporaryFile.Path); |
744 | + _webView.Browser.GetMainFrame().LoadUrl(_filePath); |
745 | } |
746 | } |
747 | catch (ObjectDisposedException) |
748 | @@ -223,6 +224,45 @@ |
749 | } |
750 | |
751 | /// <summary> |
752 | + /// Updates the Cache File with the necessary client side injected items |
753 | + /// </summary> |
754 | + private void UpdateCacheIfNecessary() |
755 | + { |
756 | + // Ammend the resource file so that we can open it directly from the library (this is better than using a tempoary file) |
757 | + string cachedFile = ""; |
758 | + |
759 | + using (StreamReader reader = new StreamReader(File.Open(_filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))) |
760 | + { |
761 | + cachedFile = reader.ReadToEnd(); |
762 | + } |
763 | + |
764 | + if (cachedFile.Contains("[[ViewPortWidth]]")) |
765 | + { |
766 | + // Handle the background |
767 | + String bodyStyle; |
768 | + |
769 | + if (_options.backgroundImage == null || _options.backgroundImage == "") |
770 | + { |
771 | + bodyStyle = "background-color:" + _options.backgroundColor + " ;"; |
772 | + } |
773 | + else |
774 | + { |
775 | + bodyStyle = "background-image: url('" + _options.backgroundImage.Replace('\\', '/') + "'); background-attachment:fixed; background-color:" + _options.backgroundColor + "; background-repeat: no-repeat; background-position: " + _options.backgroundLeft + "px " + _options.backgroundTop + "px;"; |
776 | + } |
777 | + |
778 | + string html = cachedFile.Replace("</head>", "<style type='text/css'>body {" + bodyStyle + " }</style></head>"); |
779 | + html = html.Replace("[[ViewPortWidth]]", _width.ToString()); |
780 | + |
781 | + // Write to the library |
782 | + using (StreamWriter sw = new StreamWriter(File.Open(_filePath, FileMode.Create, FileAccess.Write, FileShare.Read))) |
783 | + { |
784 | + sw.Write(html); |
785 | + sw.Close(); |
786 | + } |
787 | + } |
788 | + } |
789 | + |
790 | + /// <summary> |
791 | /// Dispose of this text item |
792 | /// </summary> |
793 | /// <param name="disposing"></param> |
794 | @@ -242,17 +282,6 @@ |
795 | { |
796 | Trace.WriteLine(new LogMessage("WebBrowser still in use.", String.Format("Dispose"))); |
797 | } |
798 | - |
799 | - // Delete the temporary file |
800 | - try |
801 | - { |
802 | - if (_temporaryFile != null) |
803 | - _temporaryFile.Dispose(); |
804 | - } |
805 | - catch |
806 | - { |
807 | - Debug.WriteLine("Unable to delete temporary file", "CefWebMedia - Dispose"); |
808 | - } |
809 | } |
810 | |
811 | base.Dispose(disposing); |
812 | |
813 | === modified file 'client/dotNET/Media/IeWebMedia.cs' |
814 | --- client/dotNET/Media/IeWebMedia.cs 2014-09-01 13:33:50 +0000 |
815 | +++ client/dotNET/Media/IeWebMedia.cs 2014-10-21 16:06:26 +0000 |
816 | @@ -36,7 +36,6 @@ |
817 | private bool _disposed = false; |
818 | private string _filePath; |
819 | private RegionOptions _options; |
820 | - private TemporaryFile _temporaryFile; |
821 | private WebBrowser _webBrowser; |
822 | |
823 | public IeWebMedia(RegionOptions options) |
824 | @@ -49,9 +48,6 @@ |
825 | // Set the file path |
826 | _filePath = ApplicationSettings.Default.LibraryPath + @"\" + _options.mediaid + ".htm"; |
827 | |
828 | - // We will need a temporary file to store this HTML |
829 | - _temporaryFile = new TemporaryFile(); |
830 | - |
831 | // Create the web view we will use |
832 | _webBrowser = new WebBrowser(); |
833 | _webBrowser.DocumentCompleted += _webBrowser_DocumentCompleted; |
834 | @@ -64,10 +60,10 @@ |
835 | if (HtmlReady()) |
836 | { |
837 | // Write to temporary file |
838 | - SaveToTemporaryFile(); |
839 | + ReadControlMeta(); |
840 | |
841 | // Navigate to temp file |
842 | - _webBrowser.Navigate(_temporaryFile.Path); |
843 | + _webBrowser.Navigate(_filePath); |
844 | } |
845 | else |
846 | { |
847 | @@ -109,34 +105,23 @@ |
848 | if (_options.LayoutModifiedDate.CompareTo(lastWriteDate) > 0 || DateTime.Now.CompareTo(lastWriteDate.AddHours(_options.updateInterval * 1.0 / 60.0)) > 0) |
849 | return false; |
850 | else |
851 | + { |
852 | + UpdateCacheIfNecessary(); |
853 | return true; |
854 | + } |
855 | } |
856 | |
857 | /// <summary> |
858 | /// Updates the position of the background and saves to a temporary file |
859 | /// </summary> |
860 | - private void SaveToTemporaryFile() |
861 | + private void ReadControlMeta() |
862 | { |
863 | // read the contents of the file |
864 | using (StreamReader reader = new StreamReader(_filePath)) |
865 | { |
866 | - string cachedFile = reader.ReadToEnd(); |
867 | - |
868 | - // Handle the background |
869 | - String bodyStyle; |
870 | - |
871 | - if (_options.backgroundImage == null || _options.backgroundImage == "") |
872 | - { |
873 | - bodyStyle = "background-color:" + _options.backgroundColor + " ;"; |
874 | - } |
875 | - else |
876 | - { |
877 | - bodyStyle = "background-image: url('" + _options.backgroundImage.Replace('\\', '/') + "'); background-attachment:fixed; background-color:" + _options.backgroundColor + "; background-repeat: no-repeat; background-position: " + _options.backgroundLeft + "px " + _options.backgroundTop + "px;"; |
878 | - } |
879 | - |
880 | - string html = cachedFile.Replace("</head>", "<style type='text/css'>body {" + bodyStyle + " }</style></head>"); |
881 | - |
882 | - // We also want to parse out the duration using a regular expression |
883 | + string html = reader.ReadToEnd(); |
884 | + |
885 | + // Parse out the duration using a regular expression |
886 | try |
887 | { |
888 | Match match = Regex.Match(html, "<!-- DURATION=(.*?) -->"); |
889 | @@ -151,8 +136,6 @@ |
890 | { |
891 | Trace.WriteLine(new LogMessage("Html - SaveToTemporaryFile", "Unable to pull duration using RegEx").ToString()); |
892 | } |
893 | - |
894 | - _temporaryFile.FileContent = html; |
895 | } |
896 | } |
897 | |
898 | @@ -187,18 +170,36 @@ |
899 | } |
900 | else |
901 | { |
902 | + // Ammend the resource file so that we can open it directly from the library (this is better than using a tempoary file) |
903 | + string cachedFile = e.Result; |
904 | + |
905 | + // Handle the background |
906 | + String bodyStyle; |
907 | + |
908 | + if (_options.backgroundImage == null || _options.backgroundImage == "") |
909 | + { |
910 | + bodyStyle = "background-color:" + _options.backgroundColor + " ;"; |
911 | + } |
912 | + else |
913 | + { |
914 | + bodyStyle = "background-image: url('" + _options.backgroundImage.Replace('\\', '/') + "'); background-attachment:fixed; background-color:" + _options.backgroundColor + "; background-repeat: no-repeat; background-position: " + _options.backgroundLeft + "px " + _options.backgroundTop + "px;"; |
915 | + } |
916 | + |
917 | + string html = cachedFile.Replace("</head>", "<style type='text/css'>body {" + bodyStyle + " }</style></head>"); |
918 | + html = html.Replace("[[ViewPortWidth]]", _width.ToString()); |
919 | + |
920 | // Write to the library |
921 | using (StreamWriter sw = new StreamWriter(File.Open(_filePath, FileMode.Create, FileAccess.Write, FileShare.Read))) |
922 | { |
923 | - sw.Write(e.Result); |
924 | + sw.Write(html); |
925 | sw.Close(); |
926 | } |
927 | |
928 | - // Write to temporary file |
929 | - SaveToTemporaryFile(); |
930 | + // Read the control meta back out |
931 | + ReadControlMeta(); |
932 | |
933 | // Handle Navigate in here because we will not have done it during first load |
934 | - _webBrowser.Navigate(_temporaryFile.Path); |
935 | + _webBrowser.Navigate(_filePath); |
936 | } |
937 | } |
938 | catch (ObjectDisposedException) |
939 | @@ -216,6 +217,45 @@ |
940 | } |
941 | |
942 | /// <summary> |
943 | + /// Updates the Cache File with the necessary client side injected items |
944 | + /// </summary> |
945 | + private void UpdateCacheIfNecessary() |
946 | + { |
947 | + // Ammend the resource file so that we can open it directly from the library (this is better than using a tempoary file) |
948 | + string cachedFile = ""; |
949 | + |
950 | + using (StreamReader reader = new StreamReader(File.Open(_filePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))) |
951 | + { |
952 | + cachedFile = reader.ReadToEnd(); |
953 | + } |
954 | + |
955 | + if (cachedFile.Contains("[[ViewPortWidth]]")) |
956 | + { |
957 | + // Handle the background |
958 | + String bodyStyle; |
959 | + |
960 | + if (_options.backgroundImage == null || _options.backgroundImage == "") |
961 | + { |
962 | + bodyStyle = "background-color:" + _options.backgroundColor + " ;"; |
963 | + } |
964 | + else |
965 | + { |
966 | + bodyStyle = "background-image: url('" + _options.backgroundImage.Replace('\\', '/') + "'); background-attachment:fixed; background-color:" + _options.backgroundColor + "; background-repeat: no-repeat; background-position: " + _options.backgroundLeft + "px " + _options.backgroundTop + "px;"; |
967 | + } |
968 | + |
969 | + string html = cachedFile.Replace("</head>", "<style type='text/css'>body {" + bodyStyle + " }</style></head>"); |
970 | + html = html.Replace("[[ViewPortWidth]]", _width.ToString()); |
971 | + |
972 | + // Write to the library |
973 | + using (StreamWriter sw = new StreamWriter(File.Open(_filePath, FileMode.Create, FileAccess.Write, FileShare.Read))) |
974 | + { |
975 | + sw.Write(html); |
976 | + sw.Close(); |
977 | + } |
978 | + } |
979 | + } |
980 | + |
981 | + /// <summary> |
982 | /// Dispose of this text item |
983 | /// </summary> |
984 | /// <param name="disposing"></param> |
985 | @@ -234,17 +274,6 @@ |
986 | { |
987 | Debug.WriteLine(new LogMessage("WebBrowser still in use.", String.Format("Dispose"))); |
988 | } |
989 | - |
990 | - // Delete the temporary file |
991 | - try |
992 | - { |
993 | - if (_temporaryFile != null) |
994 | - _temporaryFile.Dispose(); |
995 | - } |
996 | - catch |
997 | - { |
998 | - Debug.WriteLine("Unable to delete temporary file", "WebMedia - Dispose"); |
999 | - } |
1000 | } |
1001 | |
1002 | base.Dispose(disposing); |
1003 | |
1004 | === modified file 'client/dotNET/Media/ShellCommand.cs' |
1005 | --- client/dotNET/Media/ShellCommand.cs 2014-08-29 19:31:56 +0000 |
1006 | +++ client/dotNET/Media/ShellCommand.cs 2014-10-21 16:06:26 +0000 |
1007 | @@ -47,16 +47,20 @@ |
1008 | string[] allowedCommands = ApplicationSettings.Default.ShellCommandAllowList.Split(','); |
1009 | |
1010 | // Check we are allowed to execute the command |
1011 | + bool found = false; |
1012 | + |
1013 | foreach (string allowedCommand in allowedCommands) |
1014 | { |
1015 | if (_command.StartsWith(allowedCommand)) |
1016 | { |
1017 | + found = true; |
1018 | ExecuteShellCommand(); |
1019 | break; |
1020 | } |
1021 | } |
1022 | |
1023 | - Trace.WriteLine(new LogMessage("ShellCommand - RenderMedia", "Shell Commands not in allow list: " + ApplicationSettings.Default.ShellCommandAllowList), LogType.Error.ToString()); |
1024 | + if (!found) |
1025 | + Trace.WriteLine(new LogMessage("ShellCommand - RenderMedia", "Shell Commands not in allow list: " + ApplicationSettings.Default.ShellCommandAllowList), LogType.Error.ToString()); |
1026 | } |
1027 | else |
1028 | { |
1029 | |
1030 | === removed file 'client/dotNET/Media/TemporaryFile.cs' |
1031 | --- client/dotNET/Media/TemporaryFile.cs 2014-08-29 19:31:56 +0000 |
1032 | +++ client/dotNET/Media/TemporaryFile.cs 1970-01-01 00:00:00 +0000 |
1033 | @@ -1,71 +0,0 @@ |
1034 | -using System; |
1035 | -using System.Collections.Generic; |
1036 | -using System.IO; |
1037 | -using System.Text; |
1038 | -using System.Reflection; |
1039 | -using System.Diagnostics; |
1040 | - |
1041 | -namespace XiboClient |
1042 | -{ |
1043 | - /// <summary> |
1044 | - /// A temporary html object. |
1045 | - /// Once FileContent is set it will contain the complete HTML page |
1046 | - /// </summary> |
1047 | - class TemporaryFile : IDisposable |
1048 | - { |
1049 | - private String _fileContent; |
1050 | - private String _filePath; |
1051 | - |
1052 | - /// <summary> |
1053 | - /// The File content - can only be set once. |
1054 | - /// </summary> |
1055 | - public String FileContent |
1056 | - { |
1057 | - set |
1058 | - { |
1059 | - // Set the contents of the file |
1060 | - _fileContent = value; |
1061 | - |
1062 | - // Create the temporary file |
1063 | - Store(); |
1064 | - } |
1065 | - } |
1066 | - |
1067 | - public String Path |
1068 | - { |
1069 | - get |
1070 | - { |
1071 | - return _filePath; |
1072 | - } |
1073 | - } |
1074 | - |
1075 | - /// <summary> |
1076 | - /// Stores the file |
1077 | - /// </summary> |
1078 | - private void Store() |
1079 | - { |
1080 | - // Create a temporary file |
1081 | - _filePath = System.IO.Path.GetTempFileName(); |
1082 | - |
1083 | - Debug.WriteLine(_filePath); |
1084 | - |
1085 | - // Write it to the file |
1086 | - using (StreamWriter sw = new StreamWriter(File.Open(_filePath, FileMode.Create, FileAccess.Write, FileShare.Read))) |
1087 | - { |
1088 | - sw.Write(_fileContent); |
1089 | - sw.Close(); |
1090 | - } |
1091 | - } |
1092 | - |
1093 | - |
1094 | - #region IDisposable Members |
1095 | - |
1096 | - public void Dispose() |
1097 | - { |
1098 | - // Remove the temporary file |
1099 | - File.Delete(_filePath); |
1100 | - } |
1101 | - |
1102 | - #endregion |
1103 | - } |
1104 | -} |
1105 | |
1106 | === modified file 'client/dotNET/Web References/xmds/Reference.cs' |
1107 | --- client/dotNET/Web References/xmds/Reference.cs 2014-09-15 16:58:36 +0000 |
1108 | +++ client/dotNET/Web References/xmds/Reference.cs 2014-10-21 16:06:26 +0000 |
1109 | @@ -55,7 +55,7 @@ |
1110 | |
1111 | /// <remarks/> |
1112 | public xmds() { |
1113 | - this.Url = "http://172.28.128.4/xmds.php"; |
1114 | + this.Url = "http://172.28.128.3/xmds.php"; |
1115 | if ((this.IsLocalFileSystemWebService(this.Url) == true)) { |
1116 | this.UseDefaultCredentials = true; |
1117 | this.useDefaultCredentialsSetExplicitly = false; |
1118 | @@ -125,7 +125,7 @@ |
1119 | /// <remarks/> |
1120 | [System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:xmds#RegisterDisplay", RequestNamespace="urn:xmds", ResponseNamespace="urn:xmds")] |
1121 | [return: System.Xml.Serialization.SoapElementAttribute("ActivationMessage")] |
1122 | - public string RegisterDisplay(string serverKey, string hardwareKey, string displayName, string clientType, string clientVersion, int clientCode, string macAddress, string version) { |
1123 | + public string RegisterDisplay(string serverKey, string hardwareKey, string displayName, string clientType, string clientVersion, int clientCode, string operatingSystem, string macAddress, string version) { |
1124 | object[] results = this.Invoke("RegisterDisplay", new object[] { |
1125 | serverKey, |
1126 | hardwareKey, |
1127 | @@ -133,18 +133,19 @@ |
1128 | clientType, |
1129 | clientVersion, |
1130 | clientCode, |
1131 | + operatingSystem, |
1132 | macAddress, |
1133 | version}); |
1134 | return ((string)(results[0])); |
1135 | } |
1136 | |
1137 | /// <remarks/> |
1138 | - public void RegisterDisplayAsync(string serverKey, string hardwareKey, string displayName, string clientType, string clientVersion, int clientCode, string macAddress, string version) { |
1139 | - this.RegisterDisplayAsync(serverKey, hardwareKey, displayName, clientType, clientVersion, clientCode, macAddress, version, null); |
1140 | + public void RegisterDisplayAsync(string serverKey, string hardwareKey, string displayName, string clientType, string clientVersion, int clientCode, string operatingSystem, string macAddress, string version) { |
1141 | + this.RegisterDisplayAsync(serverKey, hardwareKey, displayName, clientType, clientVersion, clientCode, operatingSystem, macAddress, version, null); |
1142 | } |
1143 | |
1144 | /// <remarks/> |
1145 | - public void RegisterDisplayAsync(string serverKey, string hardwareKey, string displayName, string clientType, string clientVersion, int clientCode, string macAddress, string version, object userState) { |
1146 | + public void RegisterDisplayAsync(string serverKey, string hardwareKey, string displayName, string clientType, string clientVersion, int clientCode, string operatingSystem, string macAddress, string version, object userState) { |
1147 | if ((this.RegisterDisplayOperationCompleted == null)) { |
1148 | this.RegisterDisplayOperationCompleted = new System.Threading.SendOrPostCallback(this.OnRegisterDisplayOperationCompleted); |
1149 | } |
1150 | @@ -155,6 +156,7 @@ |
1151 | clientType, |
1152 | clientVersion, |
1153 | clientCode, |
1154 | + operatingSystem, |
1155 | macAddress, |
1156 | version}, this.RegisterDisplayOperationCompleted, userState); |
1157 | } |
1158 | @@ -203,7 +205,7 @@ |
1159 | /// <remarks/> |
1160 | [System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:xmds#GetFile", RequestNamespace="urn:xmds", ResponseNamespace="urn:xmds")] |
1161 | [return: System.Xml.Serialization.SoapElementAttribute("file", DataType="base64Binary")] |
1162 | - public byte[] GetFile(string serverKey, string hardwareKey, int fileId, string fileType, int chunkOffset, int chuckSize, string version) { |
1163 | + public byte[] GetFile(string serverKey, string hardwareKey, int fileId, string fileType, double chunkOffset, double chuckSize, string version) { |
1164 | object[] results = this.Invoke("GetFile", new object[] { |
1165 | serverKey, |
1166 | hardwareKey, |
1167 | @@ -216,12 +218,12 @@ |
1168 | } |
1169 | |
1170 | /// <remarks/> |
1171 | - public void GetFileAsync(string serverKey, string hardwareKey, int fileId, string fileType, int chunkOffset, int chuckSize, string version) { |
1172 | + public void GetFileAsync(string serverKey, string hardwareKey, int fileId, string fileType, double chunkOffset, double chuckSize, string version) { |
1173 | this.GetFileAsync(serverKey, hardwareKey, fileId, fileType, chunkOffset, chuckSize, version, null); |
1174 | } |
1175 | |
1176 | /// <remarks/> |
1177 | - public void GetFileAsync(string serverKey, string hardwareKey, int fileId, string fileType, int chunkOffset, int chuckSize, string version, object userState) { |
1178 | + public void GetFileAsync(string serverKey, string hardwareKey, int fileId, string fileType, double chunkOffset, double chuckSize, string version, object userState) { |
1179 | if ((this.GetFileOperationCompleted == null)) { |
1180 | this.GetFileOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetFileOperationCompleted); |
1181 | } |
1182 | |
1183 | === modified file 'client/dotNET/Web References/xmds/Reference.map' |
1184 | --- client/dotNET/Web References/xmds/Reference.map 2014-09-13 12:58:57 +0000 |
1185 | +++ client/dotNET/Web References/xmds/Reference.map 2014-10-21 16:06:26 +0000 |
1186 | @@ -1,6 +1,6 @@ |
1187 | <?xml version="1.0" encoding="utf-8"?> |
1188 | <DiscoveryClientResultsFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> |
1189 | <Results> |
1190 | - <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://172.28.128.4/xmds.php?WSDL" filename="xmds.wsdl" /> |
1191 | + <DiscoveryClientResult referenceType="System.Web.Services.Discovery.ContractReference" url="http://172.28.128.3/xmds.php?WSDL" filename="xmds.wsdl" /> |
1192 | </Results> |
1193 | </DiscoveryClientResultsFile> |
1194 | \ No newline at end of file |
1195 | |
1196 | === modified file 'client/dotNET/Web References/xmds/xmds.wsdl' |
1197 | --- client/dotNET/Web References/xmds/xmds.wsdl 2014-09-15 16:58:36 +0000 |
1198 | +++ client/dotNET/Web References/xmds/xmds.wsdl 2014-10-21 16:06:26 +0000 |
1199 | @@ -13,6 +13,7 @@ |
1200 | <wsdl:part name="clientType" type="xsd:string" /> |
1201 | <wsdl:part name="clientVersion" type="xsd:string" /> |
1202 | <wsdl:part name="clientCode" type="xsd:int" /> |
1203 | + <wsdl:part name="operatingSystem" type="xsd:string" /> |
1204 | <wsdl:part name="macAddress" type="xsd:string" /> |
1205 | <wsdl:part name="version" type="xsd:string" /> |
1206 | </wsdl:message> |
1207 | @@ -32,8 +33,8 @@ |
1208 | <wsdl:part name="hardwareKey" type="xsd:string" /> |
1209 | <wsdl:part name="fileId" type="xsd:int" /> |
1210 | <wsdl:part name="fileType" type="xsd:string" /> |
1211 | - <wsdl:part name="chunkOffset" type="xsd:int" /> |
1212 | - <wsdl:part name="chuckSize" type="xsd:int" /> |
1213 | + <wsdl:part name="chunkOffset" type="xsd:double" /> |
1214 | + <wsdl:part name="chuckSize" type="xsd:double" /> |
1215 | <wsdl:part name="version" type="xsd:string" /> |
1216 | </wsdl:message> |
1217 | <wsdl:message name="GetFileResponse"> |
1218 | @@ -275,7 +276,7 @@ |
1219 | </wsdl:binding> |
1220 | <wsdl:service name="xmds"> |
1221 | <wsdl:port name="xmdsPort" binding="tns:xmdsBinding"> |
1222 | - <soap:address location="http://172.28.128.4/xmds.php" /> |
1223 | + <soap:address location="http://172.28.128.3/xmds.php" /> |
1224 | </wsdl:port> |
1225 | </wsdl:service> |
1226 | </wsdl:definitions> |
1227 | \ No newline at end of file |
1228 | |
1229 | === modified file 'client/dotNET/XiboClient.csproj' |
1230 | --- client/dotNET/XiboClient.csproj 2014-09-19 11:39:04 +0000 |
1231 | +++ client/dotNET/XiboClient.csproj 2014-10-21 16:06:26 +0000 |
1232 | @@ -124,7 +124,6 @@ |
1233 | <Compile Include="Media\PowerPoint.cs"> |
1234 | <SubType>Form</SubType> |
1235 | </Compile> |
1236 | - <Compile Include="Media\TemporaryFile.cs" /> |
1237 | <Compile Include="Media\VideoDS.cs"> |
1238 | <SubType>Form</SubType> |
1239 | </Compile> |
1240 | @@ -263,10 +262,10 @@ |
1241 | <WebReferences Include="Web References\" /> |
1242 | </ItemGroup> |
1243 | <ItemGroup> |
1244 | - <WebReferenceUrl Include="http://172.28.128.4/xmds.php%3fWSDL"> |
1245 | + <WebReferenceUrl Include="http://172.28.128.3/xmds.php%3fWSDL"> |
1246 | <UrlBehavior>Static</UrlBehavior> |
1247 | <RelPath>Web References\xmds\</RelPath> |
1248 | - <UpdateFromURL>http://172.28.128.4/xmds.php%3fWSDL</UpdateFromURL> |
1249 | + <UpdateFromURL>http://172.28.128.3/xmds.php%3fWSDL</UpdateFromURL> |
1250 | <ServiceLocationURL> |
1251 | </ServiceLocationURL> |
1252 | <CachedDynamicPropName> |
1253 | |
1254 | === modified file 'client/dotNET/XmdsAgents/FileAgent.cs' |
1255 | --- client/dotNET/XmdsAgents/FileAgent.cs 2014-08-28 12:59:20 +0000 |
1256 | +++ client/dotNET/XmdsAgents/FileAgent.cs 2014-10-21 16:06:26 +0000 |
1257 | @@ -240,7 +240,7 @@ |
1258 | // Has the offset reached the total size? |
1259 | if (file.Size > file.ChunkOffset) |
1260 | { |
1261 | - int remaining = file.Size - file.ChunkOffset; |
1262 | + double remaining = file.Size - file.ChunkOffset; |
1263 | |
1264 | // There is still more to come |
1265 | if (remaining < file.ChunkSize) |
1266 | |
1267 | === modified file 'client/dotNET/XmdsAgents/RegisterAgent.cs' |
1268 | --- client/dotNET/XmdsAgents/RegisterAgent.cs 2014-09-16 10:27:10 +0000 |
1269 | +++ client/dotNET/XmdsAgents/RegisterAgent.cs 2014-10-21 16:06:26 +0000 |
1270 | @@ -71,7 +71,7 @@ |
1271 | xmds.Url = ApplicationSettings.Default.XiboClient_xmds_xmds; |
1272 | xmds.UseDefaultCredentials = false; |
1273 | |
1274 | - RegisterAgent.ProcessRegisterXml(xmds.RegisterDisplay(ApplicationSettings.Default.ServerKey, key.Key, ApplicationSettings.Default.DisplayName, "windows", ApplicationSettings.Default.ClientVersion, ApplicationSettings.Default.ClientCodeVersion, key.MacAddress, ApplicationSettings.Default.Version)); |
1275 | + RegisterAgent.ProcessRegisterXml(xmds.RegisterDisplay(ApplicationSettings.Default.ServerKey, key.Key, ApplicationSettings.Default.DisplayName, "windows", ApplicationSettings.Default.ClientVersion, ApplicationSettings.Default.ClientCodeVersion, Environment.OSVersion.ToString(), key.MacAddress, ApplicationSettings.Default.Version)); |
1276 | |
1277 | // Set the flag to indicate we have a connection to XMDS |
1278 | ApplicationSettings.Default.XmdsLastConnection = DateTime.Now; |
1279 | |
1280 | === modified file 'client/dotNET/default.config.xml' |
1281 | --- client/dotNET/default.config.xml 2014-09-16 16:40:30 +0000 |
1282 | +++ client/dotNET/default.config.xml 2014-10-21 16:06:26 +0000 |
1283 | @@ -32,7 +32,7 @@ |
1284 | <CursorStartPosition>Bottom Right</CursorStartPosition> |
1285 | <ClientInformationKeyCode>I</ClientInformationKeyCode> |
1286 | <Licensed>0</Licensed> |
1287 | - <StatsFlushCount>50</StatsFlushCount> |
1288 | + <StatsFlushCount>10</StatsFlushCount> |
1289 | <CollectInterval>900</CollectInterval> |
1290 | <MaxConcurrentDownloads>5</MaxConcurrentDownloads> |
1291 | <PowerpointEnabled>false</PowerpointEnabled> |