Skip to content

Commit

Permalink
GMap.NET.Core: MONO update
Browse files Browse the repository at this point in the history
  • Loading branch information
radioman committed Apr 29, 2015
1 parent 5313b90 commit 3e707cf
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 45 deletions.
61 changes: 51 additions & 10 deletions Demo.WindowsForms/Demo.WindowsForms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -102,25 +102,65 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
<StartAction>Project</StartAction>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<BaseAddress>4194304</BaseAddress>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v2.0' ">
<TargetFrameworkVersionNumber>2.0</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v3.0' ">
<TargetFrameworkVersionNumber>3.0</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v3.5' ">
<TargetFrameworkVersionNumber>3.5</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v4.0' ">
<TargetFrameworkVersionNumber>4.0</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v4.5' ">
<TargetFrameworkVersionNumber>4.5</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v4.5.1' ">
<TargetFrameworkVersionNumber>4.51</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v5.0' ">
<TargetFrameworkVersionNumber>5.0</TargetFrameworkVersionNumber>
</PropertyGroup>
<Choose>
<When Condition=" '$(TargetFrameworkVersionNumber)' >= '4.0' ">
<ItemGroup>
<Reference Include="Mono.Data.Sqlite">
<HintPath>..\References\Windows\NET4\Mono.Data.Sqlite.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data.SQLite">
<HintPath>..\References\Windows\NET4\System.Data.SQLite.DLL</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Mono.Data.Sqlite">
<HintPath>..\References\Windows\Mono.Data.Sqlite.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data.SQLite">
<HintPath>..\References\Windows\System.Data.SQLite.DLL</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<Reference Include="Mono.Data.SqliteClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Windows\Mono.Data.SqliteClient.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Windows\System.Data.SQLite.DLL</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
Expand Down Expand Up @@ -228,6 +268,7 @@
</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
10 changes: 5 additions & 5 deletions Demo.WindowsForms/Source/DemoStuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
using System.Data.SQLite;
#endif
#else
using SQLiteConnection=Mono.Data.SqliteClient.SqliteConnection;
using SQLiteTransaction=Mono.Data.SqliteClient.SqliteTransaction;
using SQLiteCommand=Mono.Data.SqliteClient.SqliteCommand;
using SQLiteDataReader=Mono.Data.SqliteClient.SqliteDataReader;
using SQLiteParameter=Mono.Data.SqliteClient.SqliteParameter;
using SQLiteConnection=Mono.Data.Sqlite.SqliteConnection;
using SQLiteTransaction=Mono.Data.Sqlite.SqliteTransaction;
using SQLiteCommand=Mono.Data.Sqlite.SqliteCommand;
using SQLiteDataReader=Mono.Data.Sqlite.SqliteDataReader;
using SQLiteParameter=Mono.Data.Sqlite.SqliteParameter;
#endif

namespace Demo.WindowsForms
Expand Down
10 changes: 5 additions & 5 deletions Demo.WindowsForms/Source/SQLiteIpCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ namespace Demo.WindowsForms
#if !MONO
using System.Data.SQLite;
#else
using SQLiteConnection=Mono.Data.SqliteClient.SqliteConnection;
using SQLiteTransaction=Mono.Data.SqliteClient.SqliteTransaction;
using SQLiteCommand=Mono.Data.SqliteClient.SqliteCommand;
using SQLiteDataReader=Mono.Data.SqliteClient.SqliteDataReader;
using SQLiteParameter=Mono.Data.SqliteClient.SqliteParameter;
using SQLiteConnection=Mono.Data.Sqlite.SqliteConnection;
using SQLiteTransaction=Mono.Data.Sqlite.SqliteTransaction;
using SQLiteCommand=Mono.Data.Sqlite.SqliteCommand;
using SQLiteDataReader=Mono.Data.Sqlite.SqliteDataReader;
using SQLiteParameter=Mono.Data.Sqlite.SqliteParameter;
#endif
using System.IO;
using System.Text;
Expand Down
14 changes: 5 additions & 9 deletions GMap.NET.Core/GMap.NET.CacheProviders/SQLitePureImageCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ namespace GMap.NET.CacheProviders
#if !MONO
using System.Data.SQLite;
#else
using SQLiteConnection = Mono.Data.SqliteClient.SqliteConnection;
using SQLiteTransaction = Mono.Data.SqliteClient.SqliteTransaction;
using SQLiteCommand = Mono.Data.SqliteClient.SqliteCommand;
using SQLiteDataReader = Mono.Data.SqliteClient.SqliteDataReader;
using SQLiteParameter = Mono.Data.SqliteClient.SqliteParameter;
using SQLiteConnection = Mono.Data.Sqlite.SqliteConnection;
using SQLiteTransaction = Mono.Data.Sqlite.SqliteTransaction;
using SQLiteCommand = Mono.Data.Sqlite.SqliteCommand;
using SQLiteDataReader = Mono.Data.Sqlite.SqliteDataReader;
using SQLiteParameter = Mono.Data.Sqlite.SqliteParameter;
#endif

/// <summary>
Expand Down Expand Up @@ -549,11 +549,7 @@ public static bool ExportMapDataToDB(string sourceFile, string destFile)
cmd.ExecuteNonQuery();
}

#if !MONO
using(SQLiteTransaction tr = cn2.BeginTransaction())
#else
using(DbTransaction tr = cn2.BeginTransaction())
#endif
{
try
{
Expand Down
88 changes: 72 additions & 16 deletions GMap.NET.Core/GMap.NET.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,18 @@
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkSubset>
</TargetFrameworkSubset>
<NoWin32Manifest>False</NoWin32Manifest>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG;MONO_disabled; MySQL_disabled; PostgreSQL_disabled; SQLite</DefineConstants>
<DebugType>full</DebugType>
<DebugType>Full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\x86\Debug\GMap.NET.Core.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
Expand All @@ -56,8 +62,6 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;MONO_disabled; MySQL_disabled; PostgreSQL_disabled; SQLite</DefineConstants>
<DocumentationFile>bin\x86\Release\GMap.NET.Core.XML</DocumentationFile>
<Optimize>true</Optimize>
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisLogFile>bin\x86\Release\GMap.NET.Core.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
Expand All @@ -70,34 +74,86 @@
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
<CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<Optimize>true</Optimize>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<BaseIntermediateOutputPath>obj\</BaseIntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<BaseAddress>4194304</BaseAddress>
<RegisterForComInterop>False</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v2.0' ">
<TargetFrameworkVersionNumber>2.0</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v3.0' ">
<TargetFrameworkVersionNumber>3.0</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v3.5' ">
<TargetFrameworkVersionNumber>3.5</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v4.0' ">
<TargetFrameworkVersionNumber>4.0</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v4.5' ">
<TargetFrameworkVersionNumber>4.5</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v4.5.1' ">
<TargetFrameworkVersionNumber>4.51</TargetFrameworkVersionNumber>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetFrameworkVersion)' == 'v5.0' ">
<TargetFrameworkVersionNumber>5.0</TargetFrameworkVersionNumber>
</PropertyGroup>
<Choose>
<When Condition=" '$(TargetFrameworkVersionNumber)' >= '4.0' ">
<ItemGroup>
<Reference Include="Mono.Data.Sqlite">
<HintPath>..\References\Windows\NET4\Mono.Data.Sqlite.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data.SQLite">
<HintPath>..\References\Windows\NET4\System.Data.SQLite.DLL</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<Reference Include="Mono.Data.Sqlite">
<HintPath>..\References\Windows\Mono.Data.Sqlite.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data.SQLite">
<HintPath>..\References\Windows\System.Data.SQLite.DLL</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
</ItemGroup>
</Otherwise>
</Choose>
<ItemGroup>
<Reference Include="Mono.Data.SqliteClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Windows\Mono.Data.SqliteClient.dll</HintPath>
</Reference>
<Reference Include="Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
<Reference Include="Mono.Security">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Windows\Npgsql\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=6.2.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<Reference Include="MySql.Data">
<HintPath>..\References\Windows\MySql.Data.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Reference Include="Npgsql, Version=2.0.11.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
<Reference Include="Npgsql">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\References\Windows\Npgsql\Npgsql.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data">
<Private>False</Private>
</Reference>
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
<HintPath>..\References\Windows\System.Data.SQLite.DLL</HintPath>
<SpecificVersion>False</SpecificVersion>
<Private>False</Private>
</Reference>
<Reference Include="System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL">
<Reference Include="System.Data.SqlServerCe">
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
Expand Down
Binary file added References/Windows/Mono.Data.Sqlite.dll
Binary file not shown.
Binary file removed References/Windows/Mono.Data.SqliteClient.dll
Binary file not shown.
Binary file added References/Windows/NET4/Mono.Data.Sqlite.dll
Binary file not shown.

0 comments on commit 3e707cf

Please sign in to comment.