incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [4/51] [abbrv] git commit: Acceleromter fix #CB-141 - InvariantCulture
Date Thu, 12 Jan 2012 19:30:13 GMT
Acceleromter fix #CB-141 - InvariantCulture


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/commit/667eabc2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/tree/667eabc2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/diff/667eabc2

Branch: refs/heads/master
Commit: 667eabc29401a0e77ad1c10b339f57234d2c9b59
Parents: aafbe25
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Tue Dec 20 10:50:18 2011 -0800
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Tue Dec 20 10:50:18 2011 -0800

----------------------------------------------------------------------
 framework/PhoneGap/Commands/Accelerometer.cs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-wp7/blob/667eabc2/framework/PhoneGap/Commands/Accelerometer.cs
----------------------------------------------------------------------
diff --git a/framework/PhoneGap/Commands/Accelerometer.cs b/framework/PhoneGap/Commands/Accelerometer.cs
index 7e61caa..df851a7 100644
--- a/framework/PhoneGap/Commands/Accelerometer.cs
+++ b/framework/PhoneGap/Commands/Accelerometer.cs
@@ -18,6 +18,7 @@ using System.Collections.Generic;
 using System.Runtime.Serialization;
 using System.Threading;
 using Microsoft.Devices.Sensors;
+using System.Globalization;
 
 namespace WP7GapClassLib.PhoneGap.Commands
 {
@@ -293,9 +294,9 @@ namespace WP7GapClassLib.PhoneGap.Commands
         private string GetCurrentAccelerationFormatted()
         {
             string resultCoordinates = String.Format("\"x\":{0},\"y\":{1},\"z\":{2}",
-                            accelerometer.CurrentValue.Acceleration.X.ToString("0.00000"),
-                            accelerometer.CurrentValue.Acceleration.Y.ToString("0.00000"),
-                            accelerometer.CurrentValue.Acceleration.Z.ToString("0.00000"));
+                            accelerometer.CurrentValue.Acceleration.X.ToString("0.00000",CultureInfo.InvariantCulture),
+                            accelerometer.CurrentValue.Acceleration.Y.ToString("0.00000",
CultureInfo.InvariantCulture),
+                            accelerometer.CurrentValue.Acceleration.Z.ToString("0.00000",
CultureInfo.InvariantCulture));
             resultCoordinates = "{" + resultCoordinates + "}";
             return resultCoordinates;
         }


Mime
View raw message