Skip to content

Commit

Permalink
GMap.NET.WindowsMobile: sync
Browse files Browse the repository at this point in the history
  • Loading branch information
radioman committed Apr 1, 2015
1 parent 8a56cfc commit a65ba8d
Show file tree
Hide file tree
Showing 16 changed files with 483 additions and 64 deletions.
2 changes: 1 addition & 1 deletion Build/Build Demos NET4.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

set msbuildexe=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe

set builddir=Release-NET%TargetFrameworkVersion4%
set builddir=Release-NETv4.0
mkdir .\%builddir%
del /q /s .\%builddir%\*.*

Expand Down
2 changes: 1 addition & 1 deletion Build/release-cf.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cd .\Release-NETv3.5CF
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsMobile.zip GMap.NET.WindowsMobile.dll
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsMobile.zip System.Data.SQLite.dll
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsMobile.zip System.Data.SQLite.xml
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsMobile.zip SQLite.Interop.081.dll
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsMobile.zip SQLite.Interop.*.dll

"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsMobile.zip OpenNETCF.Configuration.dll
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsMobile.zip OpenNETCF.Configuration.xml
Expand Down
12 changes: 6 additions & 6 deletions Build/release-mono.bat
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar .\Release\Demo.WindowsForms.exe
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar .\Release\GMap.NET.Core.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar .\Release\GMap.NET.Core.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar .\Release\GMap.NET.WindowsForms.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar .\Release\GMap.NET.WindowsForms.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar ..\Info\License.txt
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar Release-NETv2.0\Demo.WindowsForms.exe
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar Release-NETv2.0\GMap.NET.Core.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar Release-NETv2.0\GMap.NET.Core.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar Release-NETv2.0\GMap.NET.WindowsForms.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar Release-NETv2.0\GMap.NET.WindowsForms.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.Mono.tar Release-NETv2.0\License.txt

"C:\Program Files\7-Zip\7z.exe" t GMap.NET.WindowsForms.Mono.tar

Expand Down
47 changes: 29 additions & 18 deletions Build/release.bat
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@

cd .\Release-NETv3.5

"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsPresentation.zip Demo.WindowsPresentation.exe
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsPresentation.zip GMap.NET.Core.dll
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsPresentation.zip GMap.NET.Core.xml
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsPresentation.zip GMap.NET.WindowsPresentation.dll
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsPresentation.zip GMap.NET.WindowsPresentation.xml
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsPresentation.zip ..\..\Info\License.txt

"C:\Program Files\7-Zip\7z.exe" t ..\GMap.NET.WindowsPresentation.zip
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv3.5\Demo.WindowsPresentation.exe
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv3.5\GMap.NET.Core.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv3.5\GMap.NET.Core.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv3.5\GMap.NET.WindowsPresentation.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv3.5\GMap.NET.WindowsPresentation.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv3.5\License.txt

"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv4.0\Demo.WindowsPresentation.exe
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv4.0\GMap.NET.Core.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv4.0\GMap.NET.Core.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv4.0\GMap.NET.WindowsPresentation.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv4.0\GMap.NET.WindowsPresentation.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsPresentation.zip Release-NETv4.0\License.txt

"C:\Program Files\7-Zip\7z.exe" t GMap.NET.WindowsPresentation.zip

pause

cd ..\Release-NETv2.0
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv4.0\Demo.WindowsForms.exe
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv4.0\GMap.NET.Core.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv4.0\GMap.NET.Core.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv4.0\GMap.NET.WindowsForms.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv4.0\GMap.NET.WindowsForms.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv4.0\License.txt

"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsForms.zip Demo.WindowsForms.exe
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsForms.zip GMap.NET.Core.dll
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsForms.zip GMap.NET.Core.xml
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsForms.zip GMap.NET.WindowsForms.dll
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsForms.zip GMap.NET.WindowsForms.xml
"C:\Program Files\7-Zip\7z.exe" a ..\GMap.NET.WindowsForms.zip ..\..\Info\License.txt
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv2.0\Demo.WindowsForms.exe
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv2.0\GMap.NET.Core.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv2.0\GMap.NET.Core.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv2.0\GMap.NET.WindowsForms.dll
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv2.0\GMap.NET.WindowsForms.xml
"C:\Program Files\7-Zip\7z.exe" a GMap.NET.WindowsForms.zip Release-NETv2.0\License.txt

"C:\Program Files\7-Zip\7z.exe" t ..\GMap.NET.WindowsForms.zip
"C:\Program Files\7-Zip\7z.exe" t GMap.NET.WindowsForms.zip

pause

1 change: 0 additions & 1 deletion Demo.WindowsForms/Demo.WindowsForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@
</Compile>
<Compile Include="Source\DemoStuff.cs" />
<Compile Include="Source\Map.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Source\Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
Expand Down
31 changes: 2 additions & 29 deletions Demo.WindowsForms/Properties/Resources.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 Demo.WindowsForms/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ChevronDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\BSE.Windows.Forms\Resources\ChevronDown.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand Down
2 changes: 2 additions & 0 deletions Demo.WindowsForms/Source/DemoStuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ public static void GetVilniusTransportData(TransportType type, string line, List

static string sessionId = string.Empty;

#if !PocketPC
public static void GetFlightRadarData(List<FlightRadarData> ret, RectLatLng bounds)
{
ret.Clear();
Expand Down Expand Up @@ -517,5 +518,6 @@ static string GetFlightRadarContentUsingHttp(string url)

return ret;
}
#endif
}
}
3 changes: 2 additions & 1 deletion GMap.NET.Core/GMap.NET.MapProviders/GMapProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ protected string GetContentUsingHttp(string url)
return ret;
}

#if !PocketPC
/// <summary>
/// use at your own risk, storing tiles in files is slow and hard on the file system
/// </summary>
Expand All @@ -547,7 +548,7 @@ protected virtual PureImage GetTileImageFromFile(string fileName)
{
return GetTileImageFromArray(File.ReadAllBytes(fileName));
}
#endif
protected virtual PureImage GetTileImageFromArray(byte [] data)
{
return TileImageProxy.FromArray(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ namespace GMap.NET.MapProviders
using System.Globalization;
using System.Xml;
using System.Text;
#if PocketPC
using OpenNETCF.Security.Cryptography;
#endif

public abstract class GoogleMapProviderBase : GMapProvider, RoutingProvider, GeocodingProvider, DirectionsProvider
{
Expand Down
16 changes: 15 additions & 1 deletion GMap.NET.WindowsForms/GMap.NET.WindowsForms/GMapControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,9 @@ public Image ToImage()

if (!r)
{
#if !PocketPC
ForceDoubleBuffer = true;
#endif
}

Refresh();
Expand All @@ -1002,7 +1004,11 @@ public Image ToImage()
{
frame.Save(ms, ImageFormat.Png);
}
#if !PocketPC
ret = Image.FromStream(ms);
#else
ret = new Bitmap(ms);
#endif
}
}
catch (Exception)
Expand All @@ -1013,7 +1019,9 @@ public Image ToImage()
{
if (!r)
{
#if !PocketPC
ForceDoubleBuffer = false;
#endif
ClearBackBuffer();
}
}
Expand All @@ -1029,13 +1037,15 @@ public void Offset(int x, int y)
{
if (IsHandleCreated)
{
#if !PocketPC
if (IsRotated)
{
System.Drawing.Point[] p = new System.Drawing.Point[] { new System.Drawing.Point(x, y) };
rotationMatrixInvert.TransformVectors(p);
x = (int)p[0].X;
y = (int)p[0].Y;
}
#endif
Core.DragOffset(new GPoint(x, y));

ForceUpdateOverlays();
Expand Down Expand Up @@ -2790,7 +2800,8 @@ public RectLatLng ViewArea
{
get
{
if (!IsRotated)
#if !PocketPC
if (!IsRotated)
{
return Core.ViewArea;
}
Expand All @@ -2802,6 +2813,9 @@ public RectLatLng ViewArea
return RectLatLng.FromLTRB(p.Lng, p.Lat, p2.Lng, p2.Lat);
}
return RectLatLng.Empty;
#else
return Core.ViewArea;
#endif
}
}

Expand Down
4 changes: 2 additions & 2 deletions GMap.NET.WindowsForms/Properties/Resources.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 GMap.NET.WindowsForms/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="arrow" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrow.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand Down
Loading

0 comments on commit a65ba8d

Please sign in to comment.