Merge lp:~dangarner/xibo/client-161 into lp:xibo/1.6
- client-161
- Merge into ponswinnecke
Proposed by
Dan Garner
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 334 | ||||||||
Proposed branch: | lp:~dangarner/xibo/client-161 | ||||||||
Merge into: | lp:xibo/1.6 | ||||||||
Diff against target: |
688 lines (+349/-81) 8 files modified
client/dotNET/KeyStore.cs (+178/-0) client/dotNET/MainForm.cs (+53/-39) client/dotNET/OptionForm.Designer.cs (+76/-41) client/dotNET/OptionForm.cs (+5/-1) client/dotNET/Properties/Settings.Designer.cs (+24/-0) client/dotNET/Properties/Settings.settings (+6/-0) client/dotNET/XiboClient.csproj (+1/-0) client/dotNET/app.config (+6/-0) |
||||||||
To merge this branch: | bzr merge lp:~dangarner/xibo/client-161 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xibo Maintainters | Pending | ||
Review via email: mp+220934@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 | === added file 'client/dotNET/KeyStore.cs' |
2 | --- client/dotNET/KeyStore.cs 1970-01-01 00:00:00 +0000 |
3 | +++ client/dotNET/KeyStore.cs 2014-05-26 09:22:44 +0000 |
4 | @@ -0,0 +1,178 @@ |
5 | +using System; |
6 | +using System.Collections.Generic; |
7 | +using System.Linq; |
8 | +using System.Runtime.InteropServices; |
9 | +using System.Text; |
10 | +using System.Windows.Forms; |
11 | + |
12 | +namespace XiboClient |
13 | +{ |
14 | + /// <summary> |
15 | + /// The KeyStoreEventHandler is used by the KeyPress event of the KeyStore |
16 | + /// class. It notifies listeners of a named key press. |
17 | + /// </summary> |
18 | + /// <param name="name">The name of the key.</param> |
19 | + public delegate void KeyStoreEventHandler(string name); |
20 | + |
21 | + class KeyStore : IMessageFilter |
22 | + { |
23 | + // Interop |
24 | + [DllImport("user32.dll")] |
25 | + static extern short GetKeyState(Keys key); |
26 | + |
27 | + // Windows message constants |
28 | + private const int WM_KEYDOWN = 0x100; |
29 | + private const int WM_KEYUP = 0x101; |
30 | + |
31 | + // The singleton instance |
32 | + private static KeyStore s_instance = null; |
33 | + |
34 | + // The modifier keys |
35 | + private bool _shift = false; |
36 | + private bool _control = false; |
37 | + |
38 | + // The definitions |
39 | + private Dictionary<Keys, string> _definitions; |
40 | + |
41 | + // The KeyPressed Event |
42 | + public event KeyStoreEventHandler KeyPress; |
43 | + |
44 | + /// <summary> |
45 | + /// Adds a key definition to the store. |
46 | + /// </summary> |
47 | + /// <param name="name">The name of the key.</param> |
48 | + /// <param name="key">The key</param> |
49 | + /// <param name="modifiers">The modifiers (shift, control)</param> |
50 | + public void AddKeyDefinition(string name, Keys key, Keys modifiers) |
51 | + { |
52 | + Keys combined = key | modifiers; |
53 | + |
54 | + _definitions[combined] = name; |
55 | + } |
56 | + |
57 | + /// <summary> |
58 | + /// The filter message. |
59 | + /// </summary> |
60 | + public bool PreFilterMessage(ref Message m) |
61 | + { |
62 | + bool handled = false; |
63 | + Keys key = Keys.None; |
64 | + |
65 | + switch (m.Msg) |
66 | + { |
67 | + case WM_KEYUP: |
68 | + key = (Keys)m.WParam; |
69 | + handled = HandleModifier(key, false); |
70 | + break; |
71 | + |
72 | + case WM_KEYDOWN: |
73 | + key = (Keys)m.WParam; |
74 | + handled = HandleModifier(key, true); |
75 | + if (false == handled) |
76 | + { |
77 | + // If one of the defined keys was pressed then we |
78 | + // raise an event. |
79 | + handled = HandleDefinedKey(key); |
80 | + } |
81 | + break; |
82 | + } |
83 | + |
84 | + return handled; |
85 | + } |
86 | + |
87 | + /// <summary> |
88 | + /// Compares a key against the definitions, and raises an event |
89 | + /// if there is a match. |
90 | + /// </summary> |
91 | + /// <param name="key">The key</param> |
92 | + /// <returns>True if the key was one of the defined key combinations.</returns> |
93 | + private bool HandleDefinedKey(Keys key) |
94 | + { |
95 | + bool handled = false; |
96 | + |
97 | + Keys combined = key; |
98 | + if (_shift) combined |= Keys.Shift; |
99 | + if (_control) combined |= Keys.Control; |
100 | + |
101 | + // If we have found a matching combination then we |
102 | + // raise an event. |
103 | + string name = null; |
104 | + if (true == _definitions.TryGetValue(combined, out name)) |
105 | + { |
106 | + OnKeyPress(name); |
107 | + |
108 | + handled = true; |
109 | + } |
110 | + return handled; |
111 | + } |
112 | + |
113 | + /// <summary> |
114 | + /// Attempt to handle a modifier key, and return a boolean indicating if a modifier key was |
115 | + /// handled. |
116 | + /// </summary> |
117 | + /// <param name="key">The key</param> |
118 | + /// <param name="isDown">True if the key is pressed; False if it is released.</param> |
119 | + /// <returns>True if a modifier key was selected; False otherwise.</returns> |
120 | + private bool HandleModifier(Keys key, bool isDown) |
121 | + { |
122 | + bool handled = false; |
123 | + |
124 | + switch (key) |
125 | + { |
126 | + case Keys.RControlKey: |
127 | + case Keys.ControlKey: |
128 | + _control = isDown; |
129 | + handled = true; |
130 | + break; |
131 | + |
132 | + case Keys.RShiftKey: |
133 | + case Keys.ShiftKey: |
134 | + _shift = isDown; |
135 | + handled = true; |
136 | + break; |
137 | + } |
138 | + |
139 | + return handled; |
140 | + } |
141 | + |
142 | + /// <summary> |
143 | + /// Raises the KeyPress event. |
144 | + /// </summary> |
145 | + /// <param name="name">The name of the key.</param> |
146 | + private void OnKeyPress(string name) |
147 | + { |
148 | + // Raise event |
149 | + if (null != KeyPress) KeyPress(name); |
150 | + |
151 | + // Check if modifier keys were released in the mean time. |
152 | + _control = |
153 | + -127 == GetKeyState(Keys.ControlKey) || |
154 | + -127 == GetKeyState(Keys.RControlKey); |
155 | + |
156 | + _shift = |
157 | + -127 == GetKeyState(Keys.ShiftKey) || |
158 | + -127 == GetKeyState(Keys.RShiftKey); |
159 | + |
160 | + } |
161 | + |
162 | + /// <summary> |
163 | + /// Returns the singleton instance. |
164 | + /// </summary> |
165 | + public static KeyStore Instance |
166 | + { |
167 | + get |
168 | + { |
169 | + if (null == s_instance) |
170 | + s_instance = new KeyStore(); |
171 | + |
172 | + return s_instance; |
173 | + } |
174 | + } |
175 | + |
176 | + // The constructor is private because this is a singleton class. |
177 | + private KeyStore() |
178 | + { |
179 | + _definitions = new Dictionary<Keys, string>(); |
180 | + } |
181 | + } |
182 | +} |
183 | |
184 | === modified file 'client/dotNET/MainForm.cs' |
185 | --- client/dotNET/MainForm.cs 2013-11-03 22:44:50 +0000 |
186 | +++ client/dotNET/MainForm.cs 2014-05-26 09:22:44 +0000 |
187 | @@ -1,6 +1,6 @@ |
188 | /* |
189 | * Xibo - Digitial Signage - http://www.xibo.org.uk |
190 | - * Copyright (C) 2006-13 Daniel Garner |
191 | + * Copyright (C) 2006-14 Daniel Garner |
192 | * |
193 | * This file is part of Xibo. |
194 | * |
195 | @@ -35,6 +35,7 @@ |
196 | using XiboClient.Log; |
197 | using System.Threading; |
198 | using XiboClient.Properties; |
199 | +using System.Runtime.InteropServices; |
200 | |
201 | namespace XiboClient |
202 | { |
203 | @@ -59,6 +60,18 @@ |
204 | |
205 | private delegate void ChangeToNextLayoutDelegate(string layoutPath); |
206 | |
207 | + [FlagsAttribute] |
208 | + enum EXECUTION_STATE : uint |
209 | + { |
210 | + ES_AWAYMODE_REQUIRED = 0x00000040, |
211 | + ES_CONTINUOUS = 0x80000000, |
212 | + ES_DISPLAY_REQUIRED = 0x00000002, |
213 | + ES_SYSTEM_REQUIRED = 0x00000001 |
214 | + } |
215 | + |
216 | + [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] |
217 | + static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); |
218 | + |
219 | public MainForm() |
220 | { |
221 | InitializeComponent(); |
222 | @@ -95,10 +108,24 @@ |
223 | _clientInfoForm.Hide(); |
224 | |
225 | // Add a message filter to listen for the i key |
226 | - KeyFilter keyFilter = new KeyFilter(); |
227 | - keyFilter.ClientInfoForm = _clientInfoForm; |
228 | - |
229 | - Application.AddMessageFilter(keyFilter); |
230 | + Application.AddMessageFilter(KeyStore.Instance); |
231 | + |
232 | + // Define the hotkey |
233 | + Keys key; |
234 | + try |
235 | + { |
236 | + key = (Keys)Enum.Parse(typeof(Keys), Settings.Default.ClientInformationKeyCode.ToUpper()); |
237 | + } |
238 | + catch |
239 | + { |
240 | + // Default back to I |
241 | + key = Keys.I; |
242 | + } |
243 | + |
244 | + KeyStore.Instance.AddKeyDefinition("ClientInfo", key, ((Settings.Default.ClientInfomationCtrlKey) ? Keys.Control : Keys.None)); |
245 | + |
246 | + // Register a handler for the key event |
247 | + KeyStore.Instance.KeyPress += Instance_KeyPress; |
248 | |
249 | // Trace listener for Client Info |
250 | ClientInfoTraceListener clientInfoTraceListener = new ClientInfoTraceListener(_clientInfoForm); |
251 | @@ -116,6 +143,25 @@ |
252 | } |
253 | |
254 | /// <summary> |
255 | + /// Handle the Key Event |
256 | + /// </summary> |
257 | + /// <param name="name"></param> |
258 | + void Instance_KeyPress(string name) |
259 | + { |
260 | + if (name != "ClientInfo") |
261 | + return; |
262 | + |
263 | + // Toggle |
264 | + if (_clientInfoForm.Visible) |
265 | + _clientInfoForm.Hide(); |
266 | + else |
267 | + { |
268 | + _clientInfoForm.Show(); |
269 | + _clientInfoForm.BringToFront(); |
270 | + } |
271 | + } |
272 | + |
273 | + /// <summary> |
274 | /// Called after the form has been shown |
275 | /// </summary> |
276 | /// <param name="sender"></param> |
277 | @@ -271,6 +317,8 @@ |
278 | { |
279 | try |
280 | { |
281 | + SetThreadExecutionState(EXECUTION_STATE.ES_DISPLAY_REQUIRED | EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_CONTINUOUS); |
282 | + |
283 | // TODO: Check we are never out of the UI thread at this point |
284 | |
285 | DestroyLayout(); |
286 | @@ -733,38 +781,4 @@ |
287 | } |
288 | } |
289 | } |
290 | - |
291 | - /// <summary> |
292 | - /// Key Filter to show the Client Information Screen |
293 | - /// </summary> |
294 | - public class KeyFilter : IMessageFilter |
295 | - { |
296 | - public ClientInfo ClientInfoForm; |
297 | - |
298 | - public bool PreFilterMessage(ref Message msg) |
299 | - { |
300 | - const int WM_KEYDOWN = 0x100; |
301 | - const int WM_SYSKEYDOWN = 0x104; |
302 | - |
303 | - // Only interested in Key Down messages |
304 | - if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN)) |
305 | - { |
306 | - Keys keyCode = (Keys)(int)msg.WParam & Keys.KeyCode; |
307 | - |
308 | - if (keyCode == Keys.I) |
309 | - { |
310 | - // Toggle |
311 | - if (ClientInfoForm.Visible) |
312 | - ClientInfoForm.Hide(); |
313 | - else |
314 | - { |
315 | - ClientInfoForm.Show(); |
316 | - ClientInfoForm.BringToFront(); |
317 | - } |
318 | - } |
319 | - } |
320 | - |
321 | - return false; |
322 | - } |
323 | - } |
324 | } |
325 | \ No newline at end of file |
326 | |
327 | === modified file 'client/dotNET/OptionForm.Designer.cs' |
328 | --- client/dotNET/OptionForm.Designer.cs 2013-05-01 19:24:35 +0000 |
329 | +++ client/dotNET/OptionForm.Designer.cs 2014-05-26 09:22:44 +0000 |
330 | @@ -82,6 +82,8 @@ |
331 | this.clientHeight = new System.Windows.Forms.NumericUpDown(); |
332 | this.clientWidth = new System.Windows.Forms.NumericUpDown(); |
333 | this.tabPage5 = new System.Windows.Forms.TabPage(); |
334 | + this.cursorStartPosition = new System.Windows.Forms.ComboBox(); |
335 | + this.label22 = new System.Windows.Forms.Label(); |
336 | this.logToDiskLocation = new System.Windows.Forms.TextBox(); |
337 | this.label21 = new System.Windows.Forms.Label(); |
338 | this.showInTaskbar = new System.Windows.Forms.CheckBox(); |
339 | @@ -104,8 +106,9 @@ |
340 | this.folderBrowserLibrary = new System.Windows.Forms.FolderBrowserDialog(); |
341 | this.splashScreenOverride = new System.Windows.Forms.OpenFileDialog(); |
342 | this.xmds1 = new XiboClient.xmds.xmds(); |
343 | - this.label22 = new System.Windows.Forms.Label(); |
344 | - this.cursorStartPosition = new System.Windows.Forms.ComboBox(); |
345 | + this.label23 = new System.Windows.Forms.Label(); |
346 | + this.clientInfoHotKeyTextBox = new System.Windows.Forms.TextBox(); |
347 | + this.clientInfoCtrlModifierCheckBox = new System.Windows.Forms.CheckBox(); |
348 | this.tabControl1.SuspendLayout(); |
349 | this.tabPage1.SuspendLayout(); |
350 | ((System.ComponentModel.ISupportInitialize)(this.nupScrollStepAmount)).BeginInit(); |
351 | @@ -684,6 +687,9 @@ |
352 | // |
353 | // tabPage5 |
354 | // |
355 | + this.tabPage5.Controls.Add(this.clientInfoCtrlModifierCheckBox); |
356 | + this.tabPage5.Controls.Add(this.clientInfoHotKeyTextBox); |
357 | + this.tabPage5.Controls.Add(this.label23); |
358 | this.tabPage5.Controls.Add(this.cursorStartPosition); |
359 | this.tabPage5.Controls.Add(this.label22); |
360 | this.tabPage5.Controls.Add(this.logToDiskLocation); |
361 | @@ -707,17 +713,39 @@ |
362 | this.tabPage5.Text = "Advanced"; |
363 | this.tabPage5.UseVisualStyleBackColor = true; |
364 | // |
365 | + // cursorStartPosition |
366 | + // |
367 | + this.cursorStartPosition.FormattingEnabled = true; |
368 | + this.cursorStartPosition.Items.AddRange(new object[] { |
369 | + "Top Left", |
370 | + "Top Right", |
371 | + "Bottom Left", |
372 | + "Bottom Right"}); |
373 | + this.cursorStartPosition.Location = new System.Drawing.Point(161, 128); |
374 | + this.cursorStartPosition.Name = "cursorStartPosition"; |
375 | + this.cursorStartPosition.Size = new System.Drawing.Size(263, 21); |
376 | + this.cursorStartPosition.TabIndex = 21; |
377 | + // |
378 | + // label22 |
379 | + // |
380 | + this.label22.AutoSize = true; |
381 | + this.label22.Location = new System.Drawing.Point(5, 131); |
382 | + this.label22.Name = "label22"; |
383 | + this.label22.Size = new System.Drawing.Size(102, 13); |
384 | + this.label22.TabIndex = 20; |
385 | + this.label22.Text = "Cursor Start Position"; |
386 | + // |
387 | // logToDiskLocation |
388 | // |
389 | - this.logToDiskLocation.Location = new System.Drawing.Point(176, 176); |
390 | + this.logToDiskLocation.Location = new System.Drawing.Point(161, 99); |
391 | this.logToDiskLocation.Name = "logToDiskLocation"; |
392 | - this.logToDiskLocation.Size = new System.Drawing.Size(121, 20); |
393 | + this.logToDiskLocation.Size = new System.Drawing.Size(263, 20); |
394 | this.logToDiskLocation.TabIndex = 19; |
395 | // |
396 | // label21 |
397 | // |
398 | this.label21.AutoSize = true; |
399 | - this.label21.Location = new System.Drawing.Point(20, 179); |
400 | + this.label21.Location = new System.Drawing.Point(5, 102); |
401 | this.label21.Name = "label21"; |
402 | this.label21.Size = new System.Drawing.Size(105, 13); |
403 | this.label21.TabIndex = 18; |
404 | @@ -726,7 +754,7 @@ |
405 | // showInTaskbar |
406 | // |
407 | this.showInTaskbar.AutoSize = true; |
408 | - this.showInTaskbar.Location = new System.Drawing.Point(176, 238); |
409 | + this.showInTaskbar.Location = new System.Drawing.Point(51, 220); |
410 | this.showInTaskbar.Name = "showInTaskbar"; |
411 | this.showInTaskbar.Size = new System.Drawing.Size(130, 17); |
412 | this.showInTaskbar.TabIndex = 17; |
413 | @@ -736,7 +764,7 @@ |
414 | // label20 |
415 | // |
416 | this.label20.AutoSize = true; |
417 | - this.label20.Location = new System.Drawing.Point(20, 151); |
418 | + this.label20.Location = new System.Drawing.Point(5, 73); |
419 | this.label20.Name = "label20"; |
420 | this.label20.Size = new System.Drawing.Size(54, 13); |
421 | this.label20.TabIndex = 16; |
422 | @@ -749,15 +777,15 @@ |
423 | "audit", |
424 | "info", |
425 | "error"}); |
426 | - this.logLevel.Location = new System.Drawing.Point(176, 148); |
427 | + this.logLevel.Location = new System.Drawing.Point(161, 70); |
428 | this.logLevel.Name = "logLevel"; |
429 | - this.logLevel.Size = new System.Drawing.Size(121, 21); |
430 | + this.logLevel.Size = new System.Drawing.Size(263, 21); |
431 | this.logLevel.TabIndex = 15; |
432 | // |
433 | // label19 |
434 | // |
435 | this.label19.AutoSize = true; |
436 | - this.label19.Location = new System.Drawing.Point(20, 123); |
437 | + this.label19.Location = new System.Drawing.Point(225, 10); |
438 | this.label19.Name = "label19"; |
439 | this.label19.Size = new System.Drawing.Size(138, 13); |
440 | this.label19.TabIndex = 14; |
441 | @@ -765,14 +793,14 @@ |
442 | // |
443 | // maxConcurrentDownloads |
444 | // |
445 | - this.maxConcurrentDownloads.Location = new System.Drawing.Point(176, 121); |
446 | + this.maxConcurrentDownloads.Location = new System.Drawing.Point(381, 8); |
447 | this.maxConcurrentDownloads.Minimum = new decimal(new int[] { |
448 | 1, |
449 | 0, |
450 | 0, |
451 | 0}); |
452 | this.maxConcurrentDownloads.Name = "maxConcurrentDownloads"; |
453 | - this.maxConcurrentDownloads.Size = new System.Drawing.Size(121, 20); |
454 | + this.maxConcurrentDownloads.Size = new System.Drawing.Size(43, 20); |
455 | this.maxConcurrentDownloads.TabIndex = 13; |
456 | this.maxConcurrentDownloads.Value = new decimal(new int[] { |
457 | 1, |
458 | @@ -783,7 +811,7 @@ |
459 | // label18 |
460 | // |
461 | this.label18.AutoSize = true; |
462 | - this.label18.Location = new System.Drawing.Point(20, 98); |
463 | + this.label18.Location = new System.Drawing.Point(5, 43); |
464 | this.label18.Name = "label18"; |
465 | this.label18.Size = new System.Drawing.Size(127, 13); |
466 | this.label18.TabIndex = 12; |
467 | @@ -791,15 +819,15 @@ |
468 | // |
469 | // shellCommandAllowList |
470 | // |
471 | - this.shellCommandAllowList.Location = new System.Drawing.Point(176, 95); |
472 | + this.shellCommandAllowList.Location = new System.Drawing.Point(161, 40); |
473 | this.shellCommandAllowList.Name = "shellCommandAllowList"; |
474 | - this.shellCommandAllowList.Size = new System.Drawing.Size(121, 20); |
475 | + this.shellCommandAllowList.Size = new System.Drawing.Size(263, 20); |
476 | this.shellCommandAllowList.TabIndex = 11; |
477 | // |
478 | // enableShellCommandsCb |
479 | // |
480 | this.enableShellCommandsCb.AutoSize = true; |
481 | - this.enableShellCommandsCb.Location = new System.Drawing.Point(176, 72); |
482 | + this.enableShellCommandsCb.Location = new System.Drawing.Point(247, 220); |
483 | this.enableShellCommandsCb.Name = "enableShellCommandsCb"; |
484 | this.enableShellCommandsCb.Size = new System.Drawing.Size(140, 17); |
485 | this.enableShellCommandsCb.TabIndex = 10; |
486 | @@ -809,7 +837,7 @@ |
487 | // doubleBufferingCheckBox |
488 | // |
489 | this.doubleBufferingCheckBox.AutoSize = true; |
490 | - this.doubleBufferingCheckBox.Location = new System.Drawing.Point(176, 49); |
491 | + this.doubleBufferingCheckBox.Location = new System.Drawing.Point(247, 197); |
492 | this.doubleBufferingCheckBox.Name = "doubleBufferingCheckBox"; |
493 | this.doubleBufferingCheckBox.Size = new System.Drawing.Size(141, 17); |
494 | this.doubleBufferingCheckBox.TabIndex = 4; |
495 | @@ -818,9 +846,9 @@ |
496 | // |
497 | // numericUpDownEmptyRegions |
498 | // |
499 | - this.numericUpDownEmptyRegions.Location = new System.Drawing.Point(176, 23); |
500 | + this.numericUpDownEmptyRegions.Location = new System.Drawing.Point(161, 8); |
501 | this.numericUpDownEmptyRegions.Name = "numericUpDownEmptyRegions"; |
502 | - this.numericUpDownEmptyRegions.Size = new System.Drawing.Size(121, 20); |
503 | + this.numericUpDownEmptyRegions.Size = new System.Drawing.Size(44, 20); |
504 | this.numericUpDownEmptyRegions.TabIndex = 1; |
505 | this.numericUpDownEmptyRegions.Value = new decimal(new int[] { |
506 | 10, |
507 | @@ -831,7 +859,7 @@ |
508 | // label15 |
509 | // |
510 | this.label15.AutoSize = true; |
511 | - this.label15.Location = new System.Drawing.Point(20, 25); |
512 | + this.label15.Location = new System.Drawing.Point(5, 10); |
513 | this.label15.Name = "label15"; |
514 | this.label15.Size = new System.Drawing.Size(136, 13); |
515 | this.label15.TabIndex = 0; |
516 | @@ -896,27 +924,31 @@ |
517 | this.xmds1.Url = "http://localhost/Xibo/server/xmds.php"; |
518 | this.xmds1.UseDefaultCredentials = false; |
519 | // |
520 | - // label22 |
521 | - // |
522 | - this.label22.AutoSize = true; |
523 | - this.label22.Location = new System.Drawing.Point(23, 206); |
524 | - this.label22.Name = "label22"; |
525 | - this.label22.Size = new System.Drawing.Size(102, 13); |
526 | - this.label22.TabIndex = 20; |
527 | - this.label22.Text = "Cursor Start Position"; |
528 | - // |
529 | - // cursorStartPosition |
530 | - // |
531 | - this.cursorStartPosition.FormattingEnabled = true; |
532 | - this.cursorStartPosition.Items.AddRange(new object[] { |
533 | - "Top Left", |
534 | - "Top Right", |
535 | - "Bottom Left", |
536 | - "Bottom Right"}); |
537 | - this.cursorStartPosition.Location = new System.Drawing.Point(176, 203); |
538 | - this.cursorStartPosition.Name = "cursorStartPosition"; |
539 | - this.cursorStartPosition.Size = new System.Drawing.Size(121, 21); |
540 | - this.cursorStartPosition.TabIndex = 21; |
541 | + // label23 |
542 | + // |
543 | + this.label23.AutoSize = true; |
544 | + this.label23.Location = new System.Drawing.Point(5, 158); |
545 | + this.label23.Name = "label23"; |
546 | + this.label23.Size = new System.Drawing.Size(92, 13); |
547 | + this.label23.TabIndex = 22; |
548 | + this.label23.Text = "Client Info HotKey"; |
549 | + // |
550 | + // clientInfoHotKeyTextBox |
551 | + // |
552 | + this.clientInfoHotKeyTextBox.Location = new System.Drawing.Point(161, 158); |
553 | + this.clientInfoHotKeyTextBox.Name = "clientInfoHotKeyTextBox"; |
554 | + this.clientInfoHotKeyTextBox.Size = new System.Drawing.Size(263, 20); |
555 | + this.clientInfoHotKeyTextBox.TabIndex = 23; |
556 | + // |
557 | + // clientInfoCtrlModifierCheckBox |
558 | + // |
559 | + this.clientInfoCtrlModifierCheckBox.AutoSize = true; |
560 | + this.clientInfoCtrlModifierCheckBox.Location = new System.Drawing.Point(51, 197); |
561 | + this.clientInfoCtrlModifierCheckBox.Name = "clientInfoCtrlModifierCheckBox"; |
562 | + this.clientInfoCtrlModifierCheckBox.Size = new System.Drawing.Size(177, 17); |
563 | + this.clientInfoCtrlModifierCheckBox.TabIndex = 24; |
564 | + this.clientInfoCtrlModifierCheckBox.Text = "Client Info CTRL Key Required?"; |
565 | + this.clientInfoCtrlModifierCheckBox.UseVisualStyleBackColor = true; |
566 | // |
567 | // OptionForm |
568 | // |
569 | @@ -1037,5 +1069,8 @@ |
570 | private System.Windows.Forms.TextBox logToDiskLocation; |
571 | private System.Windows.Forms.Label label22; |
572 | private System.Windows.Forms.ComboBox cursorStartPosition; |
573 | + private System.Windows.Forms.CheckBox clientInfoCtrlModifierCheckBox; |
574 | + private System.Windows.Forms.TextBox clientInfoHotKeyTextBox; |
575 | + private System.Windows.Forms.Label label23; |
576 | } |
577 | } |
578 | \ No newline at end of file |
579 | |
580 | === modified file 'client/dotNET/OptionForm.cs' |
581 | --- client/dotNET/OptionForm.cs 2014-02-09 15:08:13 +0000 |
582 | +++ client/dotNET/OptionForm.cs 2014-05-26 09:22:44 +0000 |
583 | @@ -1,6 +1,6 @@ |
584 | /* |
585 | * Xibo - Digitial Signage - http://www.xibo.org.uk |
586 | - * Copyright (C) 2006-2012 Daniel Garner |
587 | + * Copyright (C) 2006-2014 Daniel Garner |
588 | * |
589 | * This file is part of Xibo. |
590 | * |
591 | @@ -105,6 +105,8 @@ |
592 | logToDiskLocation.Text = Settings.Default.LogToDiskLocation; |
593 | showInTaskbar.Checked = Settings.Default.ShowInTaskbar; |
594 | cursorStartPosition.Text = Settings.Default.CursorStartPosition; |
595 | + clientInfoHotKeyTextBox.Text = Settings.Default.ClientInformationKeyCode; |
596 | + clientInfoCtrlModifierCheckBox.Checked = Settings.Default.ClientInfomationCtrlKey; |
597 | |
598 | Debug.WriteLine("Loaded Options Form", "OptionForm"); |
599 | } |
600 | @@ -202,6 +204,8 @@ |
601 | Settings.Default.LogToDiskLocation = logToDiskLocation.Text; |
602 | Settings.Default.ShowInTaskbar = showInTaskbar.Checked; |
603 | Settings.Default.CursorStartPosition = cursorStartPosition.Text; |
604 | + Settings.Default.ClientInformationKeyCode = clientInfoHotKeyTextBox.Text; |
605 | + Settings.Default.ClientInfomationCtrlKey = clientInfoCtrlModifierCheckBox.Checked; |
606 | |
607 | // Commit these changes back to the user settings |
608 | Settings.Default.Save(); |
609 | |
610 | === modified file 'client/dotNET/Properties/Settings.Designer.cs' |
611 | --- client/dotNET/Properties/Settings.Designer.cs 2014-03-09 14:46:20 +0000 |
612 | +++ client/dotNET/Properties/Settings.Designer.cs 2014-05-26 09:22:44 +0000 |
613 | @@ -541,5 +541,29 @@ |
614 | return ((int)(this["ClientCodeVersion"])); |
615 | } |
616 | } |
617 | + |
618 | + [global::System.Configuration.UserScopedSettingAttribute()] |
619 | + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
620 | + [global::System.Configuration.DefaultSettingValueAttribute("I")] |
621 | + public string ClientInformationKeyCode { |
622 | + get { |
623 | + return ((string)(this["ClientInformationKeyCode"])); |
624 | + } |
625 | + set { |
626 | + this["ClientInformationKeyCode"] = value; |
627 | + } |
628 | + } |
629 | + |
630 | + [global::System.Configuration.UserScopedSettingAttribute()] |
631 | + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
632 | + [global::System.Configuration.DefaultSettingValueAttribute("False")] |
633 | + public bool ClientInfomationCtrlKey { |
634 | + get { |
635 | + return ((bool)(this["ClientInfomationCtrlKey"])); |
636 | + } |
637 | + set { |
638 | + this["ClientInfomationCtrlKey"] = value; |
639 | + } |
640 | + } |
641 | } |
642 | } |
643 | |
644 | === modified file 'client/dotNET/Properties/Settings.settings' |
645 | --- client/dotNET/Properties/Settings.settings 2014-03-09 14:46:20 +0000 |
646 | +++ client/dotNET/Properties/Settings.settings 2014-05-26 09:22:44 +0000 |
647 | @@ -140,5 +140,11 @@ |
648 | <Setting Name="ClientCodeVersion" Type="System.Int32" Scope="Application"> |
649 | <Value Profile="(Default)">83</Value> |
650 | </Setting> |
651 | + <Setting Name="ClientInformationKeyCode" Type="System.String" Scope="User"> |
652 | + <Value Profile="(Default)">I</Value> |
653 | + </Setting> |
654 | + <Setting Name="ClientInfomationCtrlKey" Type="System.Boolean" Scope="User"> |
655 | + <Value Profile="(Default)">False</Value> |
656 | + </Setting> |
657 | </Settings> |
658 | </SettingsFile> |
659 | \ No newline at end of file |
660 | |
661 | === modified file 'client/dotNET/XiboClient.csproj' |
662 | --- client/dotNET/XiboClient.csproj 2013-11-09 12:14:38 +0000 |
663 | +++ client/dotNET/XiboClient.csproj 2014-05-26 09:22:44 +0000 |
664 | @@ -116,6 +116,7 @@ |
665 | </Compile> |
666 | <Compile Include="BlackList.cs" /> |
667 | <Compile Include="CacheManager.cs" /> |
668 | + <Compile Include="KeyStore.cs" /> |
669 | <Compile Include="RegionOptions.cs" /> |
670 | <Compile Include="TemporaryFile.cs" /> |
671 | <Compile Include="VideoDS.cs"> |
672 | |
673 | === modified file 'client/dotNET/app.config' |
674 | --- client/dotNET/app.config 2014-03-09 14:46:20 +0000 |
675 | +++ client/dotNET/app.config 2014-05-26 09:22:44 +0000 |
676 | @@ -115,6 +115,12 @@ |
677 | <setting name="CursorStartPosition" serializeAs="String"> |
678 | <value>Bottom Right</value> |
679 | </setting> |
680 | + <setting name="ClientInformationKeyCode" serializeAs="String"> |
681 | + <value>I</value> |
682 | + </setting> |
683 | + <setting name="ClientInfomationCtrlKey" serializeAs="String"> |
684 | + <value>False</value> |
685 | + </setting> |
686 | </XiboClient.Properties.Settings> |
687 | </userSettings> |
688 | <applicationSettings> |