~dangarner/xibo/server-164

« back to all changes in this revision

Viewing changes to client/dotNET/MainForm.cs

  • Committer: Dan Garner
  • Date: 2014-07-15 15:40:28 UTC
  • mfrom: (337.1.5 client-162)
  • Revision ID: dan@xibo.org.uk-20140715154028-66vt4pqghsqp81s3
MergedĀ lp:~dangarner/xibo/client-162

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
using System.Threading;
37
37
using XiboClient.Properties;
38
38
using System.Runtime.InteropServices;
 
39
using System.Globalization;
39
40
 
40
41
namespace XiboClient
41
42
{
414
415
            XmlAttributeCollection layoutAttributes = layoutNode.Attributes;
415
416
 
416
417
            // Set the background and size of the form
417
 
            _layoutWidth = int.Parse(layoutAttributes["width"].Value);
418
 
            _layoutHeight = int.Parse(layoutAttributes["height"].Value);
 
418
            _layoutWidth = int.Parse(layoutAttributes["width"].Value, CultureInfo.InvariantCulture);
 
419
            _layoutHeight = int.Parse(layoutAttributes["height"].Value, CultureInfo.InvariantCulture);
419
420
 
420
421
 
421
422
            // Scaling factor, will be applied to all regions
539
540
                options.scheduleId = _scheduleId;
540
541
                options.layoutId = _layoutId;
541
542
                options.regionId = nodeAttibutes["id"].Value.ToString();
542
 
                options.width = (int)(Convert.ToDouble(nodeAttibutes["width"].Value) * _scaleFactor);
543
 
                options.height = (int)(Convert.ToDouble(nodeAttibutes["height"].Value) * _scaleFactor);
544
 
                options.left = (int)(Convert.ToDouble(nodeAttibutes["left"].Value) * _scaleFactor);
545
 
                options.top = (int)(Convert.ToDouble(nodeAttibutes["top"].Value) * _scaleFactor);
 
543
                options.width = (int)(Convert.ToDouble(nodeAttibutes["width"].Value, CultureInfo.InvariantCulture) * _scaleFactor);
 
544
                options.height = (int)(Convert.ToDouble(nodeAttibutes["height"].Value, CultureInfo.InvariantCulture) * _scaleFactor);
 
545
                options.left = (int)(Convert.ToDouble(nodeAttibutes["left"].Value, CultureInfo.InvariantCulture) * _scaleFactor);
 
546
                options.top = (int)(Convert.ToDouble(nodeAttibutes["top"].Value, CultureInfo.InvariantCulture) * _scaleFactor);
546
547
                options.scaleFactor = _scaleFactor;
547
548
 
548
549
                // Store the original width and original height for scaling
549
 
                options.originalWidth = (int)Convert.ToDouble(nodeAttibutes["width"].Value);
550
 
                options.originalHeight = (int)Convert.ToDouble(nodeAttibutes["height"].Value);
 
550
                options.originalWidth = (int)Convert.ToDouble(nodeAttibutes["width"].Value, CultureInfo.InvariantCulture);
 
551
                options.originalHeight = (int)Convert.ToDouble(nodeAttibutes["height"].Value, CultureInfo.InvariantCulture);
551
552
 
552
553
                // Set the backgrounds (used for Web content offsets)
553
554
                options.backgroundLeft = options.left * -1;