Skip to content

Commit

Permalink
Merge branch 'master' of metageek.codebasehq.com:metageek/inssider/do…
Browse files Browse the repository at this point in the history
…nate-inssider

Conflicts:
	MetaScanner.v11.suo
  • Loading branch information
ajmorgan committed Jan 16, 2012
2 parents 0d4d7b2 + 5831822 commit 314e086
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -18,3 +18,4 @@ tools
/PackagerReadme.txt
/TestProject/bin
/TestProject/obj
MetaScanner.v11.suo
2 changes: 1 addition & 1 deletion MetaScanner/Localization/LocalizerResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion MetaScanner/Localization/LocalizerResources.resx
Expand Up @@ -121,7 +121,7 @@
<value>Altitude {0}</value>
</data>
<data name="AmplitudedBm" xml:space="preserve">
<value>Amplitude [dB]</value>
<value>Amplitude [dBm]</value>
</data>
<data name="ApplicationUpToDate" xml:space="preserve">
<value>The application is up to date</value>
Expand Down
23 changes: 14 additions & 9 deletions MetaScanner/Misc/XmlHelper.cs
Expand Up @@ -22,6 +22,7 @@


////////////////////////////////////////////////////////////////
using System.Globalization;
using System.Text;
using System.Xml;

Expand Down Expand Up @@ -59,8 +60,8 @@ public static string CleanString(string input)
break;
// all other weird characters change directly to unicode
default:
byte[] tempByte = Encoding.Unicode.GetBytes(new char[] { input[j] });
string unicodeValue = System.Convert.ToString(tempByte[0] + (tempByte[1] << 8));
byte[] tempByte = Encoding.Unicode.GetBytes(new[] { input[j] });
string unicodeValue = System.Convert.ToString(tempByte[0] + (tempByte[1] << 8), CultureInfo.InvariantCulture);
string output = "&amp;#" + unicodeValue + ";";
input = input.Substring(0, j) + output + input.Substring(j + 1);
j += output.Length - 1;
Expand Down Expand Up @@ -111,7 +112,7 @@ public static XmlElement CreatePlacemark(XmlDocument document, Waypoint wp, bool
xeIconStyle.AppendChild(xeIcon);

xeIconStyle.AppendChild(CreateElementWithText(document, "color", color));
xeIconStyle.AppendChild(CreateElementWithText(document, "scale", KmlWriter.IconScale(wp.Extensions.Rssi).ToString()));
xeIconStyle.AppendChild(CreateElementWithText(document, "scale", KmlWriter.IconScale(wp.Extensions.Rssi).ToString(CultureInfo.InvariantCulture)));

//Add element
xeStyle.AppendChild(xeIconStyle);
Expand All @@ -128,16 +129,18 @@ public static XmlElement CreatePlacemark(XmlDocument document, Waypoint wp, bool
xeMain.AppendChild(xeStyle);

//Add name element
xeMain.AppendChild(CreateElementWithText(document, "name", ssidLabel ? wp.Extensions.Ssid + ": " + wp.Extensions.Rssi : wp.Extensions.Rssi.ToString()));
xeMain.AppendChild(CreateElementWithText(document, "name", ssidLabel ? wp.Extensions.Ssid + ": " + wp.Extensions.Rssi : wp.Extensions.Rssi.ToString(CultureInfo.InvariantCulture)));

//Add description element
xeMain.AppendChild(CreateElementWithText(document, "description", wp.BuildKmlDescription()));
//Location
//KML requires Lon,Lat,Alt. It's backwards!
XmlElement xePoint = document.CreateElement("Point");
xePoint.AppendChild(CreateElementWithText(document, "coordinates",
string.Format("{0},{1},{2}", wp.Longitude, wp.Latitude,
wp.Elevation)));
string.Format("{0},{1},{2}",
wp.Longitude.ToString(CultureInfo.InvariantCulture.NumberFormat),
wp.Latitude.ToString(CultureInfo.InvariantCulture.NumberFormat),
wp.Elevation.ToString(CultureInfo.InvariantCulture.NumberFormat))));
xeMain.AppendChild(xePoint);

return xeMain;
Expand Down Expand Up @@ -197,7 +200,7 @@ public static XmlElement CreatePlacemark(XmlDocument document, Waypoint wp, bool
}
else if (showLabel)
{
tempName = wp.Extensions.Rssi.ToString();
tempName = wp.Extensions.Rssi.ToString(CultureInfo.InvariantCulture);
}
else if(ssidLabel)
{
Expand All @@ -212,8 +215,10 @@ public static XmlElement CreatePlacemark(XmlDocument document, Waypoint wp, bool
//KML requires Lon,Lat,Alt. It's backwards!
XmlElement xePoint = document.CreateElement("Point");
xePoint.AppendChild(CreateElementWithText(document, "coordinates",
string.Format("{0},{1},{2}", longitude, latitude,
elevation)));
string.Format("{0},{1},{2}",
longitude.ToString(CultureInfo.InvariantCulture.NumberFormat),
latitude.ToString(CultureInfo.InvariantCulture.NumberFormat),
elevation.ToString(CultureInfo.InvariantCulture.NumberFormat))));
xeMain.AppendChild(xePoint);

return xeMain;
Expand Down
4 changes: 2 additions & 2 deletions MetaScanner/Properties/AssemblyInfo.cs
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.7.1317")]
[assembly: AssemblyFileVersion("2.0.7.1317")]
[assembly: AssemblyVersion("2.0.7.1318")]
[assembly: AssemblyFileVersion("2.0.7.1318")]
2 changes: 1 addition & 1 deletion MetaScanner/UI/Controls/ChannelView.cs
Expand Up @@ -305,7 +305,7 @@ private void DrawGrid(Graphics graphics)
var matrix = new Matrix();
matrix.RotateAt(270, rotationPoint);
graphics.Transform = matrix;
graphics.DrawString("Amplitude [dB]"/*Localizer.GetString("AmplitudedBm")*/, Font, brush, 8, y);
graphics.DrawString(Localizer.GetString("AmplitudedBm"), Font, brush, 8, y);
matrix.RotateAt(90, rotationPoint);
graphics.Transform = matrix;

Expand Down
2 changes: 1 addition & 1 deletion tools
Submodule tools updated from 10a7ae to 12448f

0 comments on commit 314e086

Please sign in to comment.