Showing preview only (1,210K chars total). Download the full file or copy to clipboard to get everything.
Repository: sherlockchou86/BMap.NET
Branch: master
Commit: a85128edd0c4
Files: 159
Total size: 1.1 MB
Directory structure:
gitextract_d4njwb7z/
├── .gitattributes
├── .gitignore
├── Asserts/
│ ├── ico.psd
│ ├── ico1.psd
│ ├── points.psd
│ ├── strange_point.psd
│ ├── 未标题-2.psd
│ └── 未标题-3.psd
├── BMap.NET/
│ ├── BMap.NET.csproj
│ ├── BMapConfiguration.cs
│ ├── HTTPService/
│ │ ├── AKSNCaculater.cs
│ │ ├── CoordinateTransService.cs
│ │ ├── DirectionService.cs
│ │ ├── GeocodingService.cs
│ │ ├── IPService.cs
│ │ ├── MapService.cs
│ │ ├── PlaceService.cs
│ │ ├── PlaceSuggestionService.cs
│ │ └── ServiceBase.cs
│ ├── LoadMapMode.cs
│ ├── MapMode.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ ├── BMap.Designer.cs
│ │ └── BMap.settings
│ ├── VerificationMode.cs
│ └── app.config
├── BMap.NET.DownloadDemo/
│ ├── BMap.NET.DownloadDemo.csproj
│ ├── MainForm.Designer.cs
│ ├── MainForm.cs
│ ├── MainForm.resx
│ ├── Program.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ └── app.config
├── BMap.NET.WindowsForm/
│ ├── BCityControl.Designer.cs
│ ├── BCityControl.cs
│ ├── BCityControl.resx
│ ├── BDirectionBoard.Designer.cs
│ ├── BDirectionBoard.cs
│ ├── BDirectionBoard.resx
│ ├── BDrivingRouteItem.Designer.cs
│ ├── BDrivingRouteItem.cs
│ ├── BDrivingRouteItem.resx
│ ├── BDrivingStepItem.Designer.cs
│ ├── BDrivingStepItem.cs
│ ├── BDrivingStepItem.resx
│ ├── BLoadMapModeControl.Designer.cs
│ ├── BLoadMapModeControl.cs
│ ├── BLoadMapModeControl.resx
│ ├── BMap.NET.WindowsForm.csproj
│ ├── BMapControl.Designer.cs
│ ├── BMapControl.cs
│ ├── BMapControl.resx
│ ├── BMapElements/
│ │ ├── BBound.cs
│ │ ├── BDistance.cs
│ │ ├── BMapElement.cs
│ │ ├── BMarker.cs
│ │ ├── BNearBy.cs
│ │ ├── BPOI.cs
│ │ ├── BPoint.cs
│ │ ├── BRoute.cs
│ │ └── BTile.cs
│ ├── BMarkerEditorControl.Designer.cs
│ ├── BMarkerEditorControl.cs
│ ├── BMarkerEditorControl.resx
│ ├── BMarkerTipControl.Designer.cs
│ ├── BMarkerTipControl.cs
│ ├── BMarkerTipControl.resx
│ ├── BPOITipControl.Designer.cs
│ ├── BPOITipControl.cs
│ ├── BPOITipControl.resx
│ ├── BPlaceBox.Designer.cs
│ ├── BPlaceBox.cs
│ ├── BPlaceBox.resx
│ ├── BPlaceItem.Designer.cs
│ ├── BPlaceItem.cs
│ ├── BPlaceItem.resx
│ ├── BPlacesBoard.Designer.cs
│ ├── BPlacesBoard.cs
│ ├── BPlacesBoard.resx
│ ├── BPlacesSuggestionControl.Designer.cs
│ ├── BPlacesSuggestionControl.cs
│ ├── BPlacesSuggestionControl.resx
│ ├── BPlacesSuggestionItem.Designer.cs
│ ├── BPlacesSuggestionItem.cs
│ ├── BPlacesSuggestionItem.resx
│ ├── BPointTipControl.Designer.cs
│ ├── BPointTipControl.cs
│ ├── BPointTipControl.resx
│ ├── BQuickSearchBoardcs.Designer.cs
│ ├── BQuickSearchBoardcs.cs
│ ├── BQuickSearchBoardcs.resx
│ ├── BQuickSearchControl.Designer.cs
│ ├── BQuickSearchControl.cs
│ ├── BQuickSearchControl.resx
│ ├── BScreenshotMenu.Designer.cs
│ ├── BScreenshotMenu.cs
│ ├── BScreenshotMenu.resx
│ ├── BStepStartAndEndItem.Designer.cs
│ ├── BStepStartAndEndItem.cs
│ ├── BStepStartAndEndItem.resx
│ ├── BTaxiTipControl.Designer.cs
│ ├── BTaxiTipControl.cs
│ ├── BTaxiTipControl.resx
│ ├── BTransitRouteItem.Designer.cs
│ ├── BTransitRouteItem.cs
│ ├── BTransitRouteItem.resx
│ ├── BTransitStepItem.Designer.cs
│ ├── BTransitStepItem.cs
│ ├── BTransitStepItem.resx
│ ├── BWalkingRouteItem.Designer.cs
│ ├── BWalkingRouteItem.cs
│ ├── BWalkingRouteItem.resx
│ ├── BWalkingStepItem.Designer.cs
│ ├── BWalkingStepItem.cs
│ ├── BWalkingStepItem.resx
│ ├── BaiduJSAPI_cracker.js
│ ├── DrawingObjects/
│ │ ├── BCircle.cs
│ │ ├── BDownloadRectangle.cs
│ │ ├── BLine.cs
│ │ ├── BPolygon.cs
│ │ ├── BRectangle.cs
│ │ ├── BScreenShotRectangle.cs
│ │ └── DrawingObject.cs
│ ├── FunctionalControls/
│ │ ├── BTabControl.cs
│ │ ├── CityList.Designer.cs
│ │ ├── CityList.cs
│ │ └── CityList.resx
│ ├── LatLngPoint.cs
│ ├── MapDownloadDialog.Designer.cs
│ ├── MapDownloadDialog.cs
│ ├── MapDownloadDialog.resx
│ ├── MapDownloaderControl.Designer.cs
│ ├── MapDownloaderControl.cs
│ ├── PointType.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ ├── BMap.Designer.cs
│ │ ├── BMap.resx
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── Resources/
│ │ └── baidu_citys.txt
│ └── RouteType.cs
├── BMap.NET.WinformDemo/
│ ├── BMap.NET.WinformDemo.csproj
│ ├── MainForm.Designer.cs
│ ├── MainForm.cs
│ ├── MainForm.resx
│ ├── Program.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ └── app.config
├── BMap.NET.sln
├── README.md
└── licences.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
================================================
FILE: .gitignore
================================================
#################
## Eclipse
#################
*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath
#################
## Visual Studio
#################
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.Publish.xml
*.pubxml
*.publishproj
# NuGet Packages Directory
## TODO: If you have NuGet Package Restore enabled, uncomment the next line
#packages/
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
App_Data/*.mdf
App_Data/*.ldf
#############
## Windows detritus
#############
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Mac crap
.DS_Store
#############
## Python
#############
*.py[cod]
# Packages
*.egg
*.egg-info
dist/
build/
eggs/
parts/
var/
sdist/
develop-eggs/
.installed.cfg
# Installer logs
pip-log.txt
# Unit test / coverage reports
.coverage
.tox
#Translations
*.mo
#Mr Developer
.mr.developer.cfg
================================================
FILE: BMap.NET/BMap.NET.csproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BMap.NET</RootNamespace>
<AssemblyName>BMap.NET</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>libs\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="BMapConfiguration.cs" />
<Compile Include="HTTPService\AKSNCaculater.cs" />
<Compile Include="HTTPService\CoordinateTransService.cs" />
<Compile Include="HTTPService\DirectionService.cs" />
<Compile Include="HTTPService\GeocodingService.cs" />
<Compile Include="HTTPService\IPService.cs" />
<Compile Include="HTTPService\MapService.cs" />
<Compile Include="HTTPService\PlaceService.cs" />
<Compile Include="HTTPService\PlaceSuggestionService.cs" />
<Compile Include="HTTPService\ServiceBase.cs" />
<Compile Include="LoadMapMode.cs" />
<Compile Include="MapMode.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\BMap.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>BMap.settings</DependentUpon>
</Compile>
<Compile Include="VerificationMode.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="Properties\BMap.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>BMap.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="libs\Newtonsoft.Json.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
================================================
FILE: BMap.NET/BMapConfiguration.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BMap.NET
{
/// <summary>
/// 负责读/写配置
/// </summary>
public class BMapConfiguration
{
/// <summary>
/// 访问WebAPI的AK
/// </summary>
public static string AK
{
get
{
return Properties.BMap.Default.ServiceAK;
}
set
{
Properties.BMap.Default.ServiceAK = value;
Properties.BMap.Default.Save();
}
}
/// <summary>
/// 访问WebAPI的SK
/// </summary>
public static string SK
{
get
{
return Properties.BMap.Default.ServiceSK;
}
set
{
Properties.BMap.Default.ServiceSK = value;
Properties.BMap.Default.Save();
}
}
/// <summary>
/// Web API校验方式
/// </summary>
public static VerificationMode VerificationMode
{
get
{
return (VerificationMode)Properties.BMap.Default.VerificationMode;
}
set
{
Properties.BMap.Default.VerificationMode = (int)value;
Properties.BMap.Default.Save();
}
}
/// <summary>
/// 地图加载方式
/// </summary>
public static LoadMapMode LoadMapMode
{
get
{
return (LoadMapMode)Properties.BMap.Default.LoadMapMode;
}
set
{
Properties.BMap.Default.LoadMapMode = (int)value;
Properties.BMap.Default.Save();
}
}
/// <summary>
/// 地图缓存路径
/// </summary>
public static string MapCachePath
{
get
{
return Properties.BMap.Default.MapCachePath;
}
set
{
Properties.BMap.Default.MapCachePath = value;
Properties.BMap.Default.Save();
}
}
}
}
================================================
FILE: BMap.NET/HTTPService/AKSNCaculater.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
public class AKSNCaculater
{
/// <summary>
/// 计算SN
/// </summary>
/// <param name="password"></param>
/// <returns></returns>
private static string MD5(string password)
{
byte[] textBytes = System.Text.Encoding.UTF8.GetBytes(password);
try
{
System.Security.Cryptography.MD5CryptoServiceProvider cryptHandler;
cryptHandler = new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] hash = cryptHandler.ComputeHash(textBytes);
string ret = "";
foreach (byte a in hash)
{
ret += a.ToString("x");
}
return ret;
}
catch
{
throw;
}
}
private static string UrlEncode(string str)
{
str = System.Web.HttpUtility.UrlEncode(str, Encoding.UTF8);
byte[] buf = Encoding.ASCII.GetBytes(str);//等同于Encoding.ASCII.GetBytes(str)
for (int i = 0; i < buf.Length; i++)
if (buf[i] == '%')
{
if (buf[i + 1] >= 'a') buf[i + 1] -= 32;
if (buf[i + 2] >= 'a') buf[i + 2] -= 32;
i += 2;
}
return Encoding.ASCII.GetString(buf);//同上,等同于Encoding.ASCII.GetString(buf)
}
private static string HttpBuildQuery(IDictionary<string, string> querystring_arrays)
{
StringBuilder sb = new StringBuilder();
foreach (var item in querystring_arrays)
{
sb.Append(UrlEncode(item.Key));
sb.Append("=");
sb.Append(UrlEncode(item.Value));
sb.Append("&");
}
sb.Remove(sb.Length - 1, 1);
return sb.ToString();
}
public static string CaculateAKSN(string ak, string sk, string url, IDictionary<string, string> querystring_arrays)
{
var queryString = HttpBuildQuery(querystring_arrays);
var str = UrlEncode(url + "?" + queryString + sk);
return MD5(str);
}
}
================================================
FILE: BMap.NET/HTTPService/CoordinateTransService.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
namespace BMap.NET.HTTPService
{
/// <summary>
/// 提供坐标转换相关服务
/// </summary>
public class CoordinateTransService:ServiceBase
{
private static string _coordinate_url = "http://api.map.baidu.com/geoconv/v1/?";
/// <summary>
/// 将指定坐标转换成另一种指定坐标
/// 1:GPS设备获取的角度坐标
/// 2:GPS获取的米制坐标、sogou地图所用坐标
/// 3:google地图、soso地图、aliyun地图、mapabc地图和amap地图所用坐标
/// 4:3中列表地图坐标对应的米制坐标
/// 5:百度地图采用的经纬度坐标
/// 6:百度地图采用的米制坐标
/// 7:mapbar地图坐标;
/// 8:51地图坐标
/// </summary>
/// <param name="source1">原坐标1(经度、X值)</param>
/// <param name="source2">原坐标2(纬度、Y值)</param>
/// <param name="from">原坐标类型</param>
/// <param name="to">转换类型</param>
/// <returns></returns>
public JObject CoordinateTransform(string source1, string source2, int from, int to)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _coordinate_url + "coords=" + source1 + "," + source2 + "&from=" + from + "&to=" + to + "&output=json&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _coordinate_url + "coords=" + source1 + "," + source2 + "&from=" + from + "&to=" + to + "&output=json&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "coords", source1+","+source2 }, { "from", from.ToString() }, { "to", to.ToString() }, { "output", "json" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _coordinate_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
}
}
================================================
FILE: BMap.NET/HTTPService/DirectionService.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BMap.NET.HTTPService
{
/// <summary>
/// 提供导航相关服务
/// </summary>
public class DirectionService:ServiceBase
{
private static string _direction_url = "http://api.map.baidu.com/direction/v1"; //导航相关
/// <summary>
/// 驾车导航
/// </summary>
/// <param name="origin">起点</param>
/// <param name="destination">终点</param>
/// <param name="origin_region">起点城市</param>
/// <param name="destination_region">终点城市</param>
/// <param name="tactics">方案 10:不走高速 11:最短时间 12:最短路径</param>
/// <returns></returns>
public JObject DirectionByDriving(string origin, string destination, string origin_region, string destination_region, int tactics = 11)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _direction_url + "?origin=" + origin + "&destination=" + destination + "&origin_region=" + origin_region + "&destination_region=" + destination_region + "&tactics=" + tactics + "&output=json&mode=driving&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _direction_url + "?origin=" + origin + "&destination=" + destination + "&origin_region=" + origin_region + "&destination_region=" + destination_region + "&tactics=" + tactics + "&output=json&mode=driving&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "origin", origin }, { "destination", destination }, { "origin_region", origin_region }, { "destination_region", destination_region }, { "tactics", tactics.ToString() }, {"output","json"}, {"mode","driving"}, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _direction_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
/// <summary>
/// 步行导航
/// </summary>
/// <param name="origin">起点</param>
/// <param name="destination">终点</param>
/// <param name="region">所在城市</param>
/// <returns></returns>
public JObject DirectionByWalking(string origin, string destination, string region)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _direction_url + "?origin=" + origin + "&destination=" + destination + "®ion=" + region + "&output=json&mode=walking&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _direction_url + "?origin=" + origin + "&destination=" + destination + "®ion=" + region + "&output=json&mode=walking&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "origin", origin }, { "destination", destination }, { "region", region }, {"output","json"}, {"mode","walking"}, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _direction_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
/// <summary>
/// 公交导航
/// </summary>
/// <param name="origin">起点</param>
/// <param name="destination">终点</param>
/// <param name="region">所在城市</param>
/// <returns></returns>
public JObject DirectionByTransit(string origin, string destination, string region)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _direction_url + "?origin=" + origin + "&destination=" + destination + "®ion=" + region + "&output=json&mode=transit&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _direction_url + "?origin=" + origin + "&destination=" + destination + "®ion=" + region + "&output=json&mode=transit&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "origin", origin }, { "destination", destination }, { "region", region }, { "output", "json" }, {"mode","transit"}, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _direction_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
}
}
================================================
FILE: BMap.NET/HTTPService/GeocodingService.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BMap.NET.HTTPService
{
/// <summary>
/// 提供地址解析相关服务
/// </summary>
public class GeocodingService:ServiceBase
{
private static string _geocoding_url = "http://api.map.baidu.com/geocoder/v2/"; //地理编码
/// <summary>
/// 地址编码 地址转坐标
/// </summary>
/// <param name="address">地址</param>
/// <returns></returns>
public JObject Geocoding(string address)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _geocoding_url + "?address=" + address + "&output=json&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _geocoding_url + "?address=" + address + "&output=json&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "address", address }, { "output", "json" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _geocoding_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
/// <summary>
/// 逆地址编码 坐标转地址
/// </summary>
/// <param name="location">坐标 维度,经度</param>
/// <returns></returns>
public JObject DeGeocoding(string location)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _geocoding_url + "?location=" + location + "&pois=1&output=json&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _geocoding_url + "?location=" + location + "&pois=1&output=json&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "location", location }, { "pois", "1" }, { "output", "json" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _geocoding_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
}
}
================================================
FILE: BMap.NET/HTTPService/IPService.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
namespace BMap.NET.HTTPService
{
/// <summary>
/// 提供IP定位相关服务
/// </summary>
public class IPService:ServiceBase
{
private static string _ip_url = "http://api.map.baidu.com/location/ip";
/// <summary>
/// 根据IP获取对应位置
/// </summary>
/// <param name="ip">IP地址 为空表示访问者IP</param>
/// <returns></returns>
public JObject LocationByIP(string ip = null)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _ip_url + "?ip=" + (ip == null ? "" : ip) + "&coor=bd09ll&output=json&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _ip_url + "?ip=" + (ip == null ? "" : ip) + "&coor=bd09ll&output=json&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "ip", ip == null ? "" : ip }, { "coor", "bd09ll" }, { "output", "json" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _ip_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
}
}
================================================
FILE: BMap.NET/HTTPService/MapService.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.IO;
namespace BMap.NET.HTTPService
{
/// <summary>
/// 提供地图相关服务
/// </summary>
public class MapService:ServiceBase
{
private static string _road_url = "http://online{0}.map.bdimg.com/onlinelabel/"; //地图切片URL
private static string _sate_url = "http://shangetu{0}.map.bdimg.com/it/"; //卫星图切片URL
/* http://online9.map.bdimg.com/onlinelabel/?qt=tile&x=796&y=287&z=12&styles=pl */
/* http://shangetu9.map.bdimg.com/it/u=x=796;y=287;z=13;v=009;type=sate&fm=46 */
/// <summary>
/// 下载地图瓦片
/// </summary>
/// <param name="x">瓦片方块横坐标</param>
/// <param name="y">瓦片方块纵坐标</param>
/// <param name="zoom">当前地图缩放级别(1-18)</param>
/// <param name="map_mode">地图模式</param>
/// <param name="load_mode">加载瓦片方式</param>
/// <returns></returns>
public Bitmap LoadMapTile(int x, int y, int zoom, MapMode map_mode, LoadMapMode load_mode)
{
if (load_mode == LoadMapMode.Server) //直接从服务器下载图片
{
return TileFromServer(zoom, x, y, map_mode);
}
else if (load_mode == LoadMapMode.Cache) //从本地缓存中下载图片
{
return TileFromCache(zoom, x, y, map_mode);
}
else if (load_mode == LoadMapMode.CacheServer) //先从本地缓存中找,如果没有则从服务器上下载
{
Bitmap bitmap = TileFromCache(zoom, x, y, map_mode);
if (bitmap == null)
{
bitmap = TileFromServer(zoom, x, y, map_mode);
}
return bitmap;
}
else
{
return null;
}
}
/// <summary>
/// 清空瓦片缓存
/// </summary>
public void ClearTileCache()
{
try
{
string cache_path = Properties.BMap.Default.MapCachePath;
DirectoryInfo dir = new DirectoryInfo(cache_path);
foreach (DirectoryInfo d in dir.GetDirectories())
{
if (d.Name == MapMode.Normal.ToString() || d.Name == MapMode.RoadNet.ToString() || d.Name == MapMode.Satellite.ToString())
{
d.Delete(true);
}
}
}
catch
{
}
}
/// <summary>
/// 从缓存中加载瓦片
/// </summary>
/// <param name="zoom"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="map_mode"></param>
/// <returns></returns>
private Bitmap TileFromCache(int zoom, int x, int y, MapMode map_mode)
{
try
{
string cache_path = Properties.BMap.Default.MapCachePath;
if (Directory.Exists(cache_path + "\\" + map_mode.ToString()))
{
string cache_name = cache_path + "\\" + map_mode.ToString() + "\\" + zoom + "_" + x + "_" + y + ".bmp";
if (File.Exists(cache_name))
{
return new Bitmap(cache_name);
}
else
{
return null;
}
}
else
{
return null;
}
}
catch
{
return null;
}
}
/// <summary>
/// 从服务器上加载瓦片
/// </summary>
/// <param name="zoom"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="map_mode"></param>
/// <returns></returns>
private Bitmap TileFromServer(int zoom, int x, int y, MapMode map_mode)
{
try
{
Random r = new Random(DateTime.Now.Millisecond);
int server_index = r.Next(0, 10); //随即产生0~9之间的整数
string url = "";
if (map_mode == MapMode.Normal) //地图
{
url = String.Format(_road_url, server_index) + "?qt=tile&x=" + x + "&y=" + y + "&z=" + zoom + "&styles=pl";
}
if (map_mode == MapMode.Satellite) //卫星图
{
url = String.Format(_sate_url, server_index) + "u=x=" + x + ";y=" + y + ";z=" + zoom + ";v=009;type=sate&fm=46";
}
if (map_mode == MapMode.RoadNet) //道路网
{
url = String.Format(_road_url, server_index) + "?qt=tile&x=" + x + "&y=" + y + "&z=" + zoom + "&styles=sl";
}
byte[] bytes = DownloadData(url);
Bitmap bitmap = Image.FromStream(new MemoryStream(bytes)) as Bitmap;
SaveTile2Cache(zoom, x, y, map_mode, bitmap);
return bitmap;
}
catch
{
return null;
}
}
/// <summary>
/// 将从服务器上下载的瓦片保存到缓存
/// </summary>
/// <param name="zoom"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="map_mode"></param>
/// <param name="tile"></param>
private void SaveTile2Cache(int zoom, int x, int y, MapMode map_mode, Bitmap tile)
{
try
{
string cache_path = Properties.BMap.Default.MapCachePath;
if (!Directory.Exists(cache_path + "\\" + map_mode.ToString()))
{
Directory.CreateDirectory(cache_path + "\\" + map_mode.ToString());
}
tile.Save(cache_path + "\\" + map_mode.ToString() + "\\" + zoom + "_" + x + "_" + y + ".bmp");
}
catch
{
}
}
}
}
================================================
FILE: BMap.NET/HTTPService/PlaceService.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json;
namespace BMap.NET.HTTPService
{
/// <summary>
/// 提供位置相关服务
/// </summary>
public class PlaceService : ServiceBase
{
private static string _search_url = "http://api.map.baidu.com/place/v2/search"; //v2 place区域检索POI服务
private static string _detail_url = "http://api.map.baidu.com/place/v2/detail"; //v2 POI详情服务
private static string _eventsearch_url = "http://api.map.baidu.com/place/v2/eventsearch"; //v2 团购信息检索服务
private static string _eventdetail_url = "http://api.map.baidu.com/place/v2/eventdetail"; //v2 商家团购信息查询
/// <summary>
/// 城市内检索POI
/// </summary>
/// <param name="query">检索关键字</param>
/// <param name="region">城市名、代码</param>
/// <returns></returns>
public JObject SearchInCity(string query, string region)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _search_url + "?query=" + query + "®ion=" + region + "&output=json&page_size=20&scope=2&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _search_url + "?query=" + query + "®ion=" + region + "&output=json&page_size=20&scope=2&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "query", query }, { "region", region }, { "output", "json" }, {"page_size","20"}, { "scope", "2" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _search_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
/// <summary>
/// 矩形区域内检索POI
/// </summary>
/// <param name="query">检索关键字</param>
/// <param name="bounds">矩形区域,左下角纬度,经度,右上角纬度,经度</param>
/// <returns></returns>
public JObject SearchInBound(string query,string bounds)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _search_url + "?query=" + query + "&bounds=" + bounds + "&output=json&page_size=20&scope=2&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _search_url + "?query=" + query + "&bounds=" + bounds + "&output=json&page_size=20&scope=2&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "query", query }, { "bounds", bounds }, { "output", "json" }, {"page_size","20"}, { "scope", "2" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _search_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
/// <summary>
/// 圆形区域内检索POI
/// </summary>
/// <param name="query">检索关键字</param>
/// <param name="location">中心点纬度,经度</param>
/// <param name="radius">半径,单位为m</param>
/// <returns></returns>
public JObject SearchInCircle(string query, string location, int radius)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _search_url + "?query=" + query + "&location=" + location + "&radius=" + radius + "&output=json&page_size=20&scope=2&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _search_url + "?query=" + query + "&location=" + location + "&radius=" + radius + "&output=json&page_size=20&scope=2&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "query", query }, { "location",location }, {"radius",radius.ToString()}, { "output", "json" }, {"page_size","20"},{ "scope", "2" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _search_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
/// <summary>
/// 查询POI详细信息
/// </summary>
/// <param name="uid">POI的唯一标识</param>
/// <returns></returns>
public JObject Detail(string uid)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _detail_url + "?uid=" + uid + "&output=json&scope=2&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _detail_url + "?uid=" + uid + "&output=json&scope=2&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "uid", uid }, { "output", "json" }, { "scope", "2" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _detail_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
/// <summary>
/// 矩形区域内检索商业活动POI
/// </summary>
/// <param name="query">检索关键字</param>
/// <param name="events">事件名称,可以是团购、打折,全部(groupon、discount、all) 目前只支持团购</param>
/// <param name="region">城市名、代码</param>
/// <param name="bounds">矩形区域,左下角纬度,经度,右上角纬度,经度</param>
/// <returns></returns>
public JObject EventSearchInBound(string query, string events, string region, string bounds)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _eventsearch_url + "?query=" + query + "&event=" + events + "®ion=" + region + "&bounds=" + bounds + "&output=json&page_size=20&scope=2&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _eventsearch_url + "?query=" + query + "&event=" + events + "®ion=" + region + "&bounds=" + bounds + "&output=json&page_size=20&scope=2&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "query", query }, { "event", events }, { "region", region }, { "bounds", bounds }, { "output", "json" }, {"page_size","20"}, { "scope", "2" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _eventsearch_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
/// <summary>
/// 圆形区域内检索商业活动POI
/// </summary>
/// <param name="query">检索关键字</param>
/// <param name="events">事件名称,可以是团购、打折,全部(groupon、discount、all) 目前只支持团购</param>
/// <param name="region">城市名、代码</param>
/// <param name="location">中心点,纬度,经度</param>
/// <param name="radius">半径,单位为m</param>
/// <returns></returns>
public JObject EventSearchInCircle(string query, string events, string region, string location, int radius)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _eventsearch_url + "?query=" + query + "&event=" + events + "®ion=" + region + "&location=" + location + "&radius=" + radius + "&output=json&page_size=20&scope=2&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _eventsearch_url + "?query=" + query + "&event=" + events + "®ion=" + region + "&location=" + location + "&radius=" + radius + "&output=json&page_size=20&scope=2&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "query", query }, { "event", events }, { "region", region }, { "location", location }, {"radius",radius.ToString()}, { "output", "json" }, {"page_size","20"}, { "scope", "2" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _eventsearch_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
/// <summary>
/// 查询商业活动POI详细信息
/// </summary>
/// <param name="uid"></param>
/// <returns></returns>
public JObject EventDetail(string uid)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _eventdetail_url + "?uid=" + uid + "&output=json&scope=2&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _eventdetail_url + "?uid=" + uid + "&output=json&scope=2&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "uid", uid }, { "output", "json" }, { "scope", "2" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _eventdetail_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
}
}
================================================
FILE: BMap.NET/HTTPService/PlaceSuggestionService.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace BMap.NET.HTTPService
{
/// <summary>
/// 提供位置建议相关服务
/// </summary>
public class PlaceSuggestionService : ServiceBase
{
private static string _suggestion_url = "http://api.map.baidu.com/place/v2/suggestion"; //位置建议服务
/// <summary>
/// 检索相似位置
/// </summary>
/// <param name="query">检索关键字</param>
/// <param name="region">所在城市</param>
/// <returns></returns>
public JObject Suggestion(string query, string region)
{
try
{
if (_vm == VerificationMode.IPWhiteList) //IP 白名单校验
{
string url = _suggestion_url + "?query=" + query + "®ion=" + region + "&output=json&ak=" + _ak;
string json = DownloadString(url);
return JsonConvert.DeserializeObject(json) as JObject;
}
else //SN校验
{
string url = _suggestion_url + "?query=" + query + "®ion=" + region + "&output=json&ak=" + _ak;
IDictionary<string, string> param = new Dictionary<string, string> { { "query", query }, { "region", region }, { "output", "json" }, { "ak", _ak } };
string sn = AKSNCaculater.CaculateAKSN(_ak, _sk, _suggestion_url.Split(new string[] { ".com" }, StringSplitOptions.None)[1], param); //计算sn
string json = DownloadString(url + "&sn=" + sn);
return JsonConvert.DeserializeObject(json) as JObject;
}
}
catch
{
return null;
}
}
}
}
================================================
FILE: BMap.NET/HTTPService/ServiceBase.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
namespace BMap.NET.HTTPService
{
/// <summary>
/// 服务基类
/// </summary>
public class ServiceBase
{
protected static string _ak = Properties.BMap.Default.ServiceAK; //AK
protected static string _sk = Properties.BMap.Default.ServiceSK; //SK
protected static VerificationMode _vm = (VerificationMode)Properties.BMap.Default.VerificationMode; //校验方式 0表示IP白名单校验(忽略SK) 1表示SN校验(需要SK)
/// <summary>
/// 从服务器上下载字符串
/// </summary>
/// <param name="url"></param>
/// <returns></returns>
protected string DownloadString(string url)
{
try
{
WebClient client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
client.Encoding = Encoding.UTF8;
return client.DownloadString(url);
}
catch
{
return null;
}
}
/// <summary>
/// 从服务器上下载字节流
/// </summary>
/// <param name="url"></param>
/// <returns></returns>
protected byte[] DownloadData(string url)
{
try
{
WebClient client = new WebClient();
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
return client.DownloadData(url);
}
catch
{
return null;
}
}
}
}
================================================
FILE: BMap.NET/LoadMapMode.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BMap.NET
{
/// <summary>
/// 加载地图的方式
/// </summary>
public enum LoadMapMode
{
Server,
Cache,
CacheServer
}
}
================================================
FILE: BMap.NET/MapMode.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BMap.NET
{
/// <summary>
/// 地图模式
/// </summary>
public enum MapMode
{
Normal, //地图
Satellite, //卫星图
RoadNet, //路网
Sate_RoadNet //卫星图+路网
}
}
================================================
FILE: BMap.NET/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BMap.NET")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BMap.NET")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1db6c54d-5163-49ea-a7e2-4631f63e7435")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// 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("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
================================================
FILE: BMap.NET/Properties/BMap.Designer.cs
================================================
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BMap.NET.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class BMap : global::System.Configuration.ApplicationSettingsBase {
private static BMap defaultInstance = ((BMap)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new BMap())));
public static BMap Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("TMzlZXetCzK9t9fSdKO7v35T")]
public string ServiceAK {
get {
return ((string)(this["ServiceAK"]));
}
set {
this["ServiceAK"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string ServiceSK {
get {
return ((string)(this["ServiceSK"]));
}
set {
this["ServiceSK"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int VerificationMode {
get {
return ((int)(this["VerificationMode"]));
}
set {
this["VerificationMode"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public int LoadMapMode {
get {
return ((int)(this["LoadMapMode"]));
}
set {
this["LoadMapMode"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("C:\\maps\\")]
public string MapCachePath {
get {
return ((string)(this["MapCachePath"]));
}
set {
this["MapCachePath"] = value;
}
}
}
}
================================================
FILE: BMap.NET/Properties/BMap.settings
================================================
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="BMap.NET.Properties" GeneratedClassName="BMap">
<Profiles />
<Settings>
<Setting Name="ServiceAK" Type="System.String" Scope="User">
<Value Profile="(Default)">TMzlZXetCzK9t9fSdKO7v35T</Value>
</Setting>
<Setting Name="ServiceSK" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="VerificationMode" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="LoadMapMode" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="MapCachePath" Type="System.String" Scope="User">
<Value Profile="(Default)">E:\</Value>
</Setting>
</Settings>
</SettingsFile>
================================================
FILE: BMap.NET/VerificationMode.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BMap.NET
{
/// <summary>
/// Web API校验方式
/// </summary>
public enum VerificationMode
{
IPWhiteList,
SN
}
}
================================================
FILE: BMap.NET/app.config
================================================
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="BMap.NET.Properties.BMap" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="BMap.NET.Properties.Settings1" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
<section name="BMap.NET.Properties.BMap.NET" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<userSettings>
<BMap.NET.Properties.BMap>
<setting name="ServiceAK" serializeAs="String">
<value>TMzlZXetCzK9t9fSdKO7v35T</value>
</setting>
<setting name="ServiceSK" serializeAs="String">
<value />
</setting>
<setting name="VerificationMode" serializeAs="String">
<value>0</value>
</setting>
<setting name="LoadMapMode" serializeAs="String">
<value>0</value>
</setting>
<setting name="MapCachePath" serializeAs="String">
<value>C:\maps\</value>
</setting>
</BMap.NET.Properties.BMap>
<BMap.NET.Properties.Settings1>
<setting name="ServiceAK" serializeAs="String">
<value>E4805d16520de693a3fe707cdc962045</value>
</setting>
</BMap.NET.Properties.Settings1>
<BMap.NET.Properties.BMap.NET>
<setting name="ServiceAK" serializeAs="String">
<value>E4805d16520de693a3fe707cdc962045</value>
</setting>
</BMap.NET.Properties.BMap.NET>
</userSettings>
</configuration>
================================================
FILE: BMap.NET.DownloadDemo/BMap.NET.DownloadDemo.csproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7341A85E-0A31-479A-B79E-A8A166DFD649}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>BMap.NET.DownloadDemo</RootNamespace>
<AssemblyName>BMap.NET.DownloadDemo</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json">
<HintPath>..\BMap.NET.WindowsForm\libs\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BMap.NET.WindowsForm\BMap.NET.WindowsForm.csproj">
<Project>{1B32D6FD-3C74-40DC-9D43-102B19D40785}</Project>
<Name>BMap.NET.WindowsForm</Name>
</ProjectReference>
<ProjectReference Include="..\BMap.NET\BMap.NET.csproj">
<Project>{AFFEB71C-54B6-4A9B-A445-BB287EDBAC19}</Project>
<Name>BMap.NET</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
================================================
FILE: BMap.NET.DownloadDemo/MainForm.Designer.cs
================================================
namespace BMap.NET.DownloadDemo
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.mapDownloaderControl1 = new BMap.NET.WindowsForm.MapDownloaderControl();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// mapDownloaderControl1
//
this.mapDownloaderControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.mapDownloaderControl1.LoadMode = BMap.NET.LoadMapMode.CacheServer;
this.mapDownloaderControl1.Location = new System.Drawing.Point(1, 42);
this.mapDownloaderControl1.Mode = BMap.NET.MapMode.Normal;
this.mapDownloaderControl1.Name = "mapDownloaderControl1";
this.mapDownloaderControl1.Size = new System.Drawing.Size(596, 361);
this.mapDownloaderControl1.TabIndex = 0;
this.mapDownloaderControl1.Zoom = 12;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(431, 12);
this.label1.TabIndex = 1;
this.label1.Text = "鼠标右键选择区域,下载地图瓦片。瓦片保存格式:缩放级别/缩放级别_X_Y.jpg";
//
// button1
//
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.button1.Location = new System.Drawing.Point(512, 10);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "清空缓存";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(599, 405);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Controls.Add(this.mapDownloaderControl1);
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MainForm";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private BMap.NET.WindowsForm.MapDownloaderControl mapDownloaderControl1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
}
}
================================================
FILE: BMap.NET.DownloadDemo/MainForm.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BMap.NET.DownloadDemo
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
mapDownloaderControl1.RefreshTitles();
}
}
}
================================================
FILE: BMap.NET.DownloadDemo/MainForm.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
================================================
FILE: BMap.NET.DownloadDemo/Program.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace BMap.NET.DownloadDemo
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}
================================================
FILE: BMap.NET.DownloadDemo/Properties/AssemblyInfo.cs
================================================
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("BMap.NET.DownloadDemo")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BMap.NET.DownloadDemo")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("7bba903d-19aa-45e2-8f66-6177d69376a7")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 内部版本号
// 修订号
//
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
================================================
FILE: BMap.NET.DownloadDemo/Properties/Resources.Designer.cs
================================================
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace BMap.NET.DownloadDemo.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("BMap.NET.DownloadDemo.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}
================================================
FILE: BMap.NET.DownloadDemo/Properties/Resources.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
================================================
FILE: BMap.NET.DownloadDemo/Properties/Settings.Designer.cs
================================================
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace BMap.NET.DownloadDemo.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}
================================================
FILE: BMap.NET.DownloadDemo/Properties/Settings.settings
================================================
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
================================================
FILE: BMap.NET.DownloadDemo/app.config
================================================
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>
================================================
FILE: BMap.NET.WindowsForm/BCityControl.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BCityControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BCityControl));
this.lbl_current_city = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.flp_hot_cities = new System.Windows.Forms.FlowLayoutPanel();
this.rdo_by_province = new System.Windows.Forms.RadioButton();
this.rdo_by_pinyin = new System.Windows.Forms.RadioButton();
this.cityList1 = new BMap.NET.WindowsForm.FunctionalControls.CityList();
this.pic_close = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pic_close)).BeginInit();
this.SuspendLayout();
//
// lbl_current_city
//
this.lbl_current_city.AutoSize = true;
this.lbl_current_city.Font = new System.Drawing.Font("Microsoft YaHei", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbl_current_city.Location = new System.Drawing.Point(7, 17);
this.lbl_current_city.Name = "lbl_current_city";
this.lbl_current_city.Size = new System.Drawing.Size(59, 17);
this.lbl_current_city.TabIndex = 1;
this.lbl_current_city.Text = "当前城市:";
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label2.BackColor = System.Drawing.Color.LightGray;
this.label2.Location = new System.Drawing.Point(11, 37);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(244, 1);
this.label2.TabIndex = 2;
//
// flp_hot_cities
//
this.flp_hot_cities.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flp_hot_cities.Location = new System.Drawing.Point(11, 48);
this.flp_hot_cities.Name = "flp_hot_cities";
this.flp_hot_cities.Size = new System.Drawing.Size(244, 36);
this.flp_hot_cities.TabIndex = 3;
//
// rdo_by_province
//
this.rdo_by_province.AutoSize = true;
this.rdo_by_province.Checked = true;
this.rdo_by_province.Location = new System.Drawing.Point(11, 96);
this.rdo_by_province.Name = "rdo_by_province";
this.rdo_by_province.Size = new System.Drawing.Size(59, 16);
this.rdo_by_province.TabIndex = 4;
this.rdo_by_province.TabStop = true;
this.rdo_by_province.Text = "按省份";
this.rdo_by_province.UseVisualStyleBackColor = true;
this.rdo_by_province.Click += new System.EventHandler(this.rdo_CheckedChanged);
//
// rdo_by_pinyin
//
this.rdo_by_pinyin.AutoSize = true;
this.rdo_by_pinyin.Location = new System.Drawing.Point(76, 96);
this.rdo_by_pinyin.Name = "rdo_by_pinyin";
this.rdo_by_pinyin.Size = new System.Drawing.Size(59, 16);
this.rdo_by_pinyin.TabIndex = 5;
this.rdo_by_pinyin.Text = "按拼音";
this.rdo_by_pinyin.UseVisualStyleBackColor = true;
this.rdo_by_pinyin.Click += new System.EventHandler(this.rdo_CheckedChanged);
//
// cityList1
//
this.cityList1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.cityList1.DataByOrganization = null;
this.cityList1.DataByPinyin = null;
this.cityList1.Location = new System.Drawing.Point(13, 118);
this.cityList1.Mode = BMap.NET.WindowsForm.FunctionalControls.CityListMode.Pinyin;
this.cityList1.Name = "cityList1";
this.cityList1.Size = new System.Drawing.Size(242, 271);
this.cityList1.TabIndex = 0;
this.cityList1.SelectedCityChanged += new BMap.NET.WindowsForm.FunctionalControls.SelectedCityChangedEventHandler(this.cityList1_SelectedCityChanged);
//
// pic_close
//
this.pic_close.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.pic_close.Cursor = System.Windows.Forms.Cursors.Hand;
this.pic_close.Image = ((System.Drawing.Image)(resources.GetObject("pic_close.Image")));
this.pic_close.Location = new System.Drawing.Point(244, 9);
this.pic_close.Name = "pic_close";
this.pic_close.Size = new System.Drawing.Size(13, 14);
this.pic_close.TabIndex = 6;
this.pic_close.TabStop = false;
this.pic_close.Click += new System.EventHandler(this.pic_close_Click);
//
// BCityControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.pic_close);
this.Controls.Add(this.rdo_by_pinyin);
this.Controls.Add(this.rdo_by_province);
this.Controls.Add(this.flp_hot_cities);
this.Controls.Add(this.label2);
this.Controls.Add(this.lbl_current_city);
this.Controls.Add(this.cityList1);
this.Name = "BCityControl";
this.Size = new System.Drawing.Size(264, 396);
this.Load += new System.EventHandler(this.BCityControl_Load);
((System.ComponentModel.ISupportInitialize)(this.pic_close)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private FunctionalControls.CityList cityList1;
private System.Windows.Forms.Label lbl_current_city;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.FlowLayoutPanel flp_hot_cities;
private System.Windows.Forms.RadioButton rdo_by_province;
private System.Windows.Forms.RadioButton rdo_by_pinyin;
private System.Windows.Forms.PictureBox pic_close;
}
}
================================================
FILE: BMap.NET.WindowsForm/BCityControl.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BMap.NET.WindowsForm.FunctionalControls;
namespace BMap.NET.WindowsForm
{
/// <summary>
/// 城市切换控件
/// </summary>
partial class BCityControl : UserControl
{
public event SelectedCityChangedEventHandler SelectedCityChanged;
private string _currentCity = "";
/// <summary>
/// 当前城市
/// </summary>
public string CurrentCity
{
get
{
return _currentCity;
}
set
{
_currentCity = value;
lbl_current_city.Text = "当前城市:" + _currentCity;
}
}
/// <summary>
/// 构造方法
/// </summary>
public BCityControl()
{
InitializeComponent();
}
/// <summary>
/// 控件加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BCityControl_Load(object sender, EventArgs e)
{
LoadCities();
Init();
}
/// <summary>
/// 初始化城市列表
/// </summary>
private void LoadCities()
{
Dictionary<string, List<string>> data_pinyin = new Dictionary<string, List<string>>(); //拼音数据源
CityNode root = new CityNode("中国", "1", null, "0"); //组织结构数据源
((Action)delegate()
{
string areas = Properties.BMap.baidu_citys;
string[] cities = areas.Split(new string[] { "\r\n" }, StringSplitOptions.None);
foreach (string city in cities)
{
string[] items = city.Split('|');
if (items.Length == 4)
{
if (items[3] != "0" && items[3] != "1") //忽略国家 省份
{
string pinyin = GetSpellCodeAt(items[0][0].ToString()); //首汉字拼音
if (!data_pinyin.ContainsKey(pinyin))
{
data_pinyin.Add(pinyin, new List<string> { items[0] });
}
data_pinyin[pinyin].Add(items[0]);
}
if (items[3] != "0") //忽略国家
{
if (items[2] == root.CityCode) //省份、直辖市
{
if (root.Nexts == null)
{
root.Nexts = new List<CityNode>();
}
root.Nexts.Add(new CityNode(items[0], items[1], items[2], items[3]));
}
else //地级市 直辖市中的县区
{
foreach (CityNode province in root.Nexts)
{
if (province.CityCode == items[2])
{
if (province.Nexts == null)
{
province.Nexts = new List<CityNode>();
}
province.Nexts.Add(new CityNode(items[0], items[1], items[2], items[3]));
break;
}
}
}
}
}
}
this.Invoke((Action)delegate()
{
cityList1.DataByOrganization = root;
cityList1.DataByPinyin = data_pinyin;
cityList1.Mode = CityListMode.Pinyin;
cityList1.RefreshList();
});
}).BeginInvoke(null, null);
}
/// <summary>
/// 获取汉字拼音开头字母
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
private static string GetSpellCodeAt(string s)
{
long iCnChar;
byte[] ZW = System.Text.Encoding.Default.GetBytes(s);
if (ZW.Length == 1)
{
return s.ToUpper();
}
int i1 = (short)ZW[0];
int i2 = (short)ZW[1];
iCnChar = i1 * 256 + i2;
if ((iCnChar >= 45217) && (iCnChar <= 45252))
{
return "A";
}
else if ((iCnChar >= 45253) && (iCnChar <= 45760))
{
return "B";
}
else if ((iCnChar >= 45761) && (iCnChar <= 46317))
{
return "C";
}
else if ((iCnChar >= 46318) && (iCnChar <= 46825))
{
return "D";
}
else if ((iCnChar >= 46826) && (iCnChar <= 47009))
{
return "E";
}
else if ((iCnChar >= 47010) && (iCnChar <= 47296))
{
return "F";
}
else if ((iCnChar >= 47297) && (iCnChar <= 47613))
{
return "G";
}
else if ((iCnChar >= 47614) && (iCnChar <= 48118))
{
return "H";
}
else if ((iCnChar >= 48119) && (iCnChar <= 49061))
{
return "J";
}
else if ((iCnChar >= 49062) && (iCnChar <= 49323))
{
return "K";
}
else if ((iCnChar >= 49324) && (iCnChar <= 49895))
{
return "L";
}
else if ((iCnChar >= 49896) && (iCnChar <= 50370))
{
return "M";
}
else if ((iCnChar >= 50371) && (iCnChar <= 50613))
{
return "N";
}
else if ((iCnChar >= 50614) && (iCnChar <= 50621))
{
return "O";
}
else if ((iCnChar >= 50622) && (iCnChar <= 50905))
{
return "P";
}
else if ((iCnChar >= 50906) && (iCnChar <= 51386))
{
return "Q";
}
else if ((iCnChar >= 51387) && (iCnChar <= 51445))
{
return "R";
}
else if ((iCnChar >= 51446) && (iCnChar <= 52217))
{
return "S";
}
else if ((iCnChar >= 52218) && (iCnChar <= 52697))
{
return "T";
}
else if ((iCnChar >= 52698) && (iCnChar <= 52979))
{
return "W";
}
else if ((iCnChar >= 52980) && (iCnChar <= 53640))
{
return "X";
}
else if ((iCnChar >= 53689) && (iCnChar <= 54480))
{
return "Y";
}
else if ((iCnChar >= 54481) && (iCnChar <= 55289))
{
return "Z";
}
else return ("?");
}
/// <summary>
/// 初始化工作
/// </summary>
private void Init()
{
string[] hot_cities = new string[] { "北京", "天津", "上海", "重庆", "广州", "武汉", "成都", "南京", "深圳", "合肥", "厦门" };
foreach (string city in hot_cities)
{
LinkLabel lkb = new LinkLabel();
lkb.Text = city;
lkb.AutoSize = true;
lkb.VisitedLinkColor = Color.Blue;
lkb.Click += new EventHandler(lkb_Click);
flp_hot_cities.Controls.Add(lkb);
}
}
/// <summary>
/// 点击热门城市
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void lkb_Click(object sender, EventArgs e)
{
CurrentCity = (sender as LinkLabel).Text;
if (SelectedCityChanged != null)
{
SelectedCityChanged((sender as LinkLabel).Text);
}
}
/// <summary>
/// 排列方式
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void rdo_CheckedChanged(object sender, EventArgs e)
{
if (rdo_by_pinyin.Checked)
{
cityList1.Mode = CityListMode.Pinyin;
}
else
{
cityList1.Mode = CityListMode.Organization;
}
rdo_by_pinyin.Enabled = false;
rdo_by_province.Enabled = false;
cityList1.RefreshList();
rdo_by_province.Enabled = true;
rdo_by_pinyin.Enabled = true;
}
/// <summary>
/// 选择城市变化
/// </summary>
/// <param name="cityName"></param>
private void cityList1_SelectedCityChanged(string cityName)
{
CurrentCity = cityName;
if (SelectedCityChanged != null)
{
SelectedCityChanged(cityName);
}
}
/// <summary>
/// 关闭
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void pic_close_Click(object sender, EventArgs e)
{
Visible = false;
}
}
}
================================================
FILE: BMap.NET.WindowsForm/BCityControl.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pic_close.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhDQANAIEBAAkkPP///wAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQBAAABACwAAAAADQAN
AAAIMQADBABAsGBBgQMNKgSQcKFDhg0FLkQIsaFBhBIfUtSI0SHFjRcjWnx4kSRBkBMDBAQAOw==
</value>
</data>
</root>
================================================
FILE: BMap.NET.WindowsForm/BDirectionBoard.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BDirectionBoard
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BDirectionBoard));
this.picExchange = new System.Windows.Forms.PictureBox();
this.lblSearch = new System.Windows.Forms.Label();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.label2 = new System.Windows.Forms.Label();
this.flpRoutes = new System.Windows.Forms.FlowLayoutPanel();
this.bPlaceBoxDestination = new BMap.NET.WindowsForm.BPlaceBox();
this.bPlaceBoxSource = new BMap.NET.WindowsForm.BPlaceBox();
((System.ComponentModel.ISupportInitialize)(this.picExchange)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
this.SuspendLayout();
//
// picExchange
//
this.picExchange.BackColor = System.Drawing.Color.White;
this.picExchange.Cursor = System.Windows.Forms.Cursors.Hand;
this.picExchange.Image = ((System.Drawing.Image)(resources.GetObject("picExchange.Image")));
this.picExchange.Location = new System.Drawing.Point(1, 47);
this.picExchange.Name = "picExchange";
this.picExchange.Size = new System.Drawing.Size(33, 58);
this.picExchange.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.picExchange.TabIndex = 2;
this.picExchange.TabStop = false;
this.picExchange.Click += new System.EventHandler(this.picExchange_Click);
//
// lblSearch
//
this.lblSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblSearch.BackColor = System.Drawing.Color.WhiteSmoke;
this.lblSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblSearch.Font = new System.Drawing.Font("Microsoft YaHei", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblSearch.ForeColor = System.Drawing.Color.DarkGray;
this.lblSearch.Location = new System.Drawing.Point(266, 46);
this.lblSearch.Name = "lblSearch";
this.lblSearch.Size = new System.Drawing.Size(46, 59);
this.lblSearch.TabIndex = 3;
this.lblSearch.Text = "搜索";
this.lblSearch.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblSearch.Click += new System.EventHandler(this.lblSearch_Click);
this.lblSearch.MouseEnter += new System.EventHandler(this.label1_MouseEnter);
this.lblSearch.MouseLeave += new System.EventHandler(this.label1_MouseLeave);
//
// pictureBox2
//
this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
this.pictureBox2.Location = new System.Drawing.Point(33, 50);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(17, 17);
this.pictureBox2.TabIndex = 4;
this.pictureBox2.TabStop = false;
//
// pictureBox3
//
this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
this.pictureBox3.Location = new System.Drawing.Point(33, 85);
this.pictureBox3.Name = "pictureBox3";
this.pictureBox3.Size = new System.Drawing.Size(17, 17);
this.pictureBox3.TabIndex = 5;
this.pictureBox3.TabStop = false;
//
// label2
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.label2.BackColor = System.Drawing.Color.LightGray;
this.label2.Location = new System.Drawing.Point(2, 120);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(310, 1);
this.label2.TabIndex = 6;
this.label2.Text = "label2";
//
// flpRoutes
//
this.flpRoutes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flpRoutes.AutoScroll = true;
this.flpRoutes.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flpRoutes.Location = new System.Drawing.Point(0, 171);
this.flpRoutes.Name = "flpRoutes";
this.flpRoutes.Size = new System.Drawing.Size(313, 286);
this.flpRoutes.TabIndex = 7;
this.flpRoutes.WrapContents = false;
//
// bPlaceBoxDestination
//
this.bPlaceBoxDestination.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.bPlaceBoxDestination.BPlacesBoard = null;
this.bPlaceBoxDestination.CurrentCity = null;
this.bPlaceBoxDestination.Enter2Search = false;
this.bPlaceBoxDestination.InputFont = new System.Drawing.Font("Microsoft YaHei", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.bPlaceBoxDestination.Location = new System.Drawing.Point(51, 83);
this.bPlaceBoxDestination.Name = "bPlaceBoxDestination";
this.bPlaceBoxDestination.QueryText = "";
this.bPlaceBoxDestination.Size = new System.Drawing.Size(212, 21);
this.bPlaceBoxDestination.TabIndex = 1;
//
// bPlaceBoxSource
//
this.bPlaceBoxSource.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.bPlaceBoxSource.BPlacesBoard = null;
this.bPlaceBoxSource.CurrentCity = null;
this.bPlaceBoxSource.Enter2Search = false;
this.bPlaceBoxSource.InputFont = new System.Drawing.Font("Microsoft YaHei", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.bPlaceBoxSource.Location = new System.Drawing.Point(51, 46);
this.bPlaceBoxSource.Name = "bPlaceBoxSource";
this.bPlaceBoxSource.QueryText = "";
this.bPlaceBoxSource.Size = new System.Drawing.Size(212, 21);
this.bPlaceBoxSource.TabIndex = 0;
//
// BDirectionBoard
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.flpRoutes);
this.Controls.Add(this.label2);
this.Controls.Add(this.pictureBox3);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.lblSearch);
this.Controls.Add(this.picExchange);
this.Controls.Add(this.bPlaceBoxDestination);
this.Controls.Add(this.bPlaceBoxSource);
this.Name = "BDirectionBoard";
this.Size = new System.Drawing.Size(313, 457);
this.Click += new System.EventHandler(this.BDirectionBoard_Click);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BDirectionBoard_Paint);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.BDirectionBoard_MouseMove);
((System.ComponentModel.ISupportInitialize)(this.picExchange)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
this.ResumeLayout(false);
}
#endregion
private BPlaceBox bPlaceBoxSource;
private BPlaceBox bPlaceBoxDestination;
private System.Windows.Forms.PictureBox picExchange;
private System.Windows.Forms.Label lblSearch;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.FlowLayoutPanel flpRoutes;
}
}
================================================
FILE: BMap.NET.WindowsForm/BDirectionBoard.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
using BMap.NET.HTTPService;
using BMap.NET.WindowsForm.BMapElements;
namespace BMap.NET.WindowsForm
{
/// <summary>
/// 导航控件
/// </summary>
public partial class BDirectionBoard : UserControl
{
private string _currentCity;
/// <summary>
/// 当前建议搜索城市
/// </summary>
[Description("当前建议搜索城市"),Category("BMap.NET")]
public string CurrentCity
{
get
{
return _currentCity;
}
set
{
_currentCity = value;
bPlaceBoxSource.CurrentCity = _currentCity;
bPlaceBoxDestination.CurrentCity = _currentCity;
}
}
/// <summary>
/// 与之关联的地图控件
/// </summary>
[Description("与之关联的地图控件"),Category("BMap.NET")]
public BMapControl BMapControl
{
get;
set;
}
/// <summary>
/// 与之关联的位置列表控件
/// </summary>
[Description("与之关联的位置列表控件"),Category("BMap.NET")]
public BPlacesBoard BPlacesBoard
{
get;
set;
}
/// <summary>
/// 导航起始位置
/// </summary>
[Description("导航起始位置"),Category("BMap.NET")]
internal string SourcePlace
{
get
{
return bPlaceBoxSource.QueryText;
}
set
{
bPlaceBoxSource.DontSearchNextTime();
bPlaceBoxSource.QueryText = value;
if (bPlaceBoxSource.QueryText != "" && bPlaceBoxDestination.QueryText != "") //导航起点、终点不为空
{
StartSearch();
}
if (Parent != null && Parent is TabPage) //如果父控件是tabpage 则选中
{
((Parent as TabPage).Parent as TabControl).SelectedTab = (Parent as TabPage);
}
}
}
/// <summary>
/// 导航结束位置
/// </summary>
[Description("导航结束位置"),Category("BMap.NET")]
internal string DestinationPlace
{
get
{
return bPlaceBoxDestination.QueryText;
}
set
{
bPlaceBoxDestination.DontSearchNextTime();
bPlaceBoxDestination.QueryText = value;
if (bPlaceBoxDestination.QueryText != "" && bPlaceBoxSource.QueryText != "") //导航起点、终点不为空
{
StartSearch();
}
if (Parent != null && Parent is TabPage) //如果父控件是tabpage 则选中
{
((Parent as TabPage).Parent as TabControl).SelectedTab = (Parent as TabPage);
}
}
}
/// <summary>
/// 当前方案 0公交 1驾车 2步行
/// </summary>
private int _current_method = 0;
/// <summary>
/// 方案类型 0时间短 1少换乘 2少步行 3最短路程 4最短时间 5不走高速
/// </summary>
private int _method_filter = 0;
private Label _wait = new Label(); //等待框
/// <summary>
/// 构造方法
/// </summary>
public BDirectionBoard()
{
InitializeComponent();
SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
UpdateStyles();
_wait.AutoSize = false; _wait.Font = new System.Drawing.Font("微软雅黑", 10);
_wait.Width = Width; _wait.Height = Height; _wait.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
_wait.BackColor = Color.FromArgb(200, Color.White);
_wait.TextAlign = ContentAlignment.MiddleCenter;
_wait.Text = "正在搜索,请稍候...";
_wait.Visible = false;
_wait.Location = new Point(0, 0);
Controls.Add(_wait);
_wait.BringToFront();
}
#region 事件处理
/// <summary>
/// 重绘
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDirectionBoard_Paint(object sender, PaintEventArgs e)
{
//顶部 方案选择
if (_current_method == 0) //公交
{
e.Graphics.DrawImage(Properties.BMap.ico_transit_blue, new Point(Width / 3 / 2 - 30, 3));
e.Graphics.DrawImage(Properties.BMap.ico_driving_gray, new Point(Width / 3 + Width / 3 / 2 - 30, 3));
e.Graphics.DrawImage(Properties.BMap.ico_walking_gray, new Point(Width * 2 / 3 + Width / 3 / 2 - 30, 3));
e.Graphics.DrawLine(Pens.LightBlue, new Point(0, 33), new Point(Width / 3 / 2 - 3, 33));
e.Graphics.DrawLine(Pens.LightBlue, new Point(Width / 3 / 2 + 3, 33), new Point(Width, 33));
e.Graphics.DrawLine(Pens.LightBlue, new Point(Width / 3 / 2 - 3, 33), new Point(Width / 3 / 2, 30));
e.Graphics.DrawLine(Pens.LightBlue, new Point(Width / 3 / 2 + 3, 33), new Point(Width / 3 / 2, 30));
}
else if (_current_method == 1) //驾车
{
e.Graphics.DrawImage(Properties.BMap.ico_transit_gray, new Point(Width / 3 / 2 - 30, 3));
e.Graphics.DrawImage(Properties.BMap.ico_driving_blue, new Point(Width / 3 + Width / 3 / 2 - 30, 3));
e.Graphics.DrawImage(Properties.BMap.ico_walking_gray, new Point(Width * 2 / 3 + Width / 3 / 2 - 30, 3));
e.Graphics.DrawLine(Pens.LightBlue, new Point(0, 33), new Point(Width / 3 + Width / 3 / 2 - 3, 33));
e.Graphics.DrawLine(Pens.LightBlue, new Point(Width / 3 + Width / 3 / 2 + 3, 33), new Point(Width, 33));
e.Graphics.DrawLine(Pens.LightBlue, new Point(Width / 3 + Width / 3 / 2 - 3, 33), new Point(Width / 3 + Width / 3 / 2, 30));
e.Graphics.DrawLine(Pens.LightBlue, new Point(Width / 3 + Width / 3 / 2 + 3, 33), new Point(Width / 3 + Width / 3 / 2, 30));
}
else //步行
{
e.Graphics.DrawImage(Properties.BMap.ico_transit_gray, new Point(Width / 3 / 2 - 30, 3));
e.Graphics.DrawImage(Properties.BMap.ico_driving_gray, new Point(Width / 3 + Width / 3 / 2 - 30, 3));
e.Graphics.DrawImage(Properties.BMap.ico_walking_blue, new Point(Width * 2 / 3 + Width / 3 / 2 - 30, 3));
e.Graphics.DrawLine(Pens.LightBlue, new Point(0, 33), new Point(Width * 2 / 3 + Width / 3 / 2 - 3, 33));
e.Graphics.DrawLine(Pens.LightBlue, new Point(Width * 2 / 3 + Width / 3 / 2 + 3, 33), new Point(Width, 33));
e.Graphics.DrawLine(Pens.LightBlue, new Point(Width * 2 / 3 + Width / 3 / 2 - 3, 33), new Point(Width * 2 / 3 + Width / 3 / 2, 30));
e.Graphics.DrawLine(Pens.LightBlue, new Point(Width * 2 / 3 + Width / 3 / 2 + 3, 33), new Point(Width * 2 / 3 + Width / 3 / 2, 30));
}
//中部 方案类型
if (_current_method == 0) //公交
{
if (_method_filter == 0) //时间短
{
e.Graphics.FillRectangle(Brushes.WhiteSmoke, new Rectangle(3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawImage(Properties.BMap.ico_select, new Point(3 + 3, 135 + 5));
}
else if (_method_filter == 1) //少换乘
{
e.Graphics.FillRectangle(Brushes.WhiteSmoke, new Rectangle(3 + (Width - 25) / 3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawImage(Properties.BMap.ico_select, new Point(3 + (Width - 25) / 3 + 3, 135 + 5));
}
else if (_method_filter == 2) //少步行
{
e.Graphics.FillRectangle(Brushes.WhiteSmoke, new Rectangle(3 + 2 * (Width - 25) / 3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawImage(Properties.BMap.ico_select, new Point(3 + 2 * (Width - 25) / 3 + 3, 135 + 5));
}
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(3 + (Width - 25) / 3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(3 + 2 * (Width - 25) / 3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawString("时间短", new Font("微软雅黑", 10), Brushes.Gray, new PointF(3 + 21, 135 + 3));
e.Graphics.DrawString("少换乘", new Font("微软雅黑", 10), Brushes.Gray, new PointF(3 + (Width - 25) / 3 + 21, 135 + 3));
e.Graphics.DrawString("少步行", new Font("微软雅黑", 10), Brushes.Gray, new PointF(3 + 2 * (Width - 25) / 3 + 21, 135 + 3));
}
else if (_current_method == 1) //驾车
{
if (_method_filter == 3) //最短路程
{
e.Graphics.FillRectangle(Brushes.WhiteSmoke, new Rectangle(3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawImage(Properties.BMap.ico_select, new Point(3 + 3, 135 + 5));
}
else if (_method_filter == 4) //最短距离
{
e.Graphics.FillRectangle(Brushes.WhiteSmoke, new Rectangle(3 + (Width - 25) / 3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawImage(Properties.BMap.ico_select, new Point(3 + (Width - 25) / 3 + 3, 135 + 5));
}
else if (_method_filter == 5) //不走高速
{
e.Graphics.FillRectangle(Brushes.WhiteSmoke, new Rectangle(3 + 2 * (Width - 25) / 3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawImage(Properties.BMap.ico_select, new Point(3 + 2 * (Width - 25) / 3 + 3, 135 + 5));
}
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(3 + (Width - 25) / 3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(3 + 2 * (Width - 25) / 3, 135, (Width - 25) / 3, 25));
e.Graphics.DrawString("最短时间", new Font("微软雅黑", 10), Brushes.Gray, new PointF(3 + 20, 135 + 3));
e.Graphics.DrawString("最短路程", new Font("微软雅黑", 10), Brushes.Gray, new PointF(3 + (Width - 25) / 3 + 20, 135 + 3));
e.Graphics.DrawString("不走高速", new Font("微软雅黑", 10), Brushes.Gray, new PointF(3 + 2 * (Width - 25) / 3 + 20, 135 + 3));
}
//步行没有方案类型
}
/// <summary>
/// 鼠标移动
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDirectionBoard_MouseMove(object sender, MouseEventArgs e)
{
if (new Rectangle(0, 0, Width, 33).Contains(e.Location)
|| ((new Rectangle(5, 135, Width - 10, 25).Contains(e.Location)) && _current_method != 2)) //顶端 中部 鼠标成手型
{
Cursor = Cursors.Hand;
}
else
{
Cursor = Cursors.Arrow;
}
}
/// <summary>
/// 鼠标点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDirectionBoard_Click(object sender, EventArgs e)
{
Point p = this.PointToClient(Cursor.Position);
if (new Rectangle(0, 0, Width / 3, 33).Contains(p)) //公交模式
{
if (_current_method != 0)
{
if (_current_method == 2)
{
flpRoutes.Height = flpRoutes.Height - (171 - 138);
}
_current_method = 0;
_method_filter = 0;
flpRoutes.Location = new Point(flpRoutes.Location.X, 171);
StartSearch(); //开启搜索
}
}
else if (new Rectangle(Width / 3, 0, Width / 3, 33).Contains(p)) //驾车模式
{
if (_current_method != 1)
{
if (_current_method == 2)
{
flpRoutes.Height = flpRoutes.Height - (171 - 138);
}
_current_method = 1;
_method_filter = 3;
flpRoutes.Location = new Point(flpRoutes.Location.X, 171);
StartSearch(); //开启搜索
}
}
else if (new Rectangle(Width * 2 / 3, 0, Width / 3, 33).Contains(p)) //步行模式
{
if (_current_method != 2)
{
_current_method = 2;
flpRoutes.Height = flpRoutes.Height + (171 - 138);
flpRoutes.Location = new Point(flpRoutes.Location.X, 138);
StartSearch(); //开启搜索
}
}
if (_current_method == 0) //公交
{
if (new Rectangle(5, 135, (Width - 10) / 3, 25).Contains(p)) //时间短
{
_method_filter = 0;
}
else if (new Rectangle(5 + (Width - 10)/3, 135, (Width - 10) / 3, 25).Contains(p)) //少换乘
{
_method_filter = 1;
}
else if (new Rectangle(5 + 2 * (Width - 10) / 3, 135, (Width - 10) / 3, 25).Contains(p)) //少步行
{
_method_filter = 2;
}
}
if (_current_method == 1) //驾车
{
if (new Rectangle(5, 135, (Width - 10) / 3, 25).Contains(p)) //最短距离
{
_method_filter = 3;
}
else if (new Rectangle(5 + (Width - 10) / 3, 135, (Width - 10) / 3, 25).Contains(p)) //最短时间
{
_method_filter = 4;
}
else if (new Rectangle(5 + 2 * (Width - 10) / 3, 135, (Width - 10) / 3, 25).Contains(p)) //不走高速
{
_method_filter = 5;
}
}
Invalidate();
}
/// <summary>
/// 鼠标进入搜索按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void label1_MouseEnter(object sender, EventArgs e)
{
lblSearch.ForeColor = Color.White;
lblSearch.BackColor = Color.FromArgb(51, 133, 255);
}
/// <summary>
/// 鼠标移出搜索按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void label1_MouseLeave(object sender, EventArgs e)
{
lblSearch.ForeColor = Color.DarkGray;
lblSearch.BackColor = Color.WhiteSmoke;
}
/// <summary>
/// 互换位置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void picExchange_Click(object sender, EventArgs e)
{
string te = bPlaceBoxDestination.QueryText;
bPlaceBoxDestination.DontSearchNextTime();
bPlaceBoxSource.DontSearchNextTime();
bPlaceBoxDestination.QueryText = bPlaceBoxSource.QueryText;
bPlaceBoxSource.QueryText = te;
}
/// <summary>
/// 发起搜索
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lblSearch_Click(object sender, EventArgs e)
{
StartSearch();
}
/// <summary>
/// 路线选中
/// </summary>
/// <param name="bRoute"></param>
void item_RouteSelected(BRoute bRoute)
{
foreach (Control c in flpRoutes.Controls)
{
if (c as BTransitRouteItem != null && (c as BTransitRouteItem).DataSource != bRoute)
{
(c as BTransitRouteItem).Selected = false;
}
if (c as BWalkingRouteItem != null && (c as BWalkingRouteItem).DataSource != bRoute)
{
(c as BWalkingRouteItem).Selected = false;
}
if (c as BDrivingRouteItem != null && (c as BDrivingRouteItem).DataSource != bRoute)
{
(c as BDrivingRouteItem).Selected = false;
}
}
if (BMapControl != null)
{
BMapControl.SetRoute(bRoute); //更新地图中的路线
}
}
/// <summary>
/// 路线步骤选中
/// </summary>
/// <param name="stepPath"></param>
/// <param name="enlarge"></param>
void item_StepSelected(string stepPath, bool enlarge)
{
if (BMapControl != null)
{
BMapControl.SetHighlightPath(stepPath, enlarge); //高亮设置
}
}
/// <summary>
/// 路线起点终点选中
/// </summary>
/// <param name="bPoint"></param>
void item_StepEndPointSelected(BPoint bPoint)
{
//
if (BMapControl != null)
{
BMapControl.SelectBPoint(bPoint);
}
}
/// <summary>
/// 选择终点
/// </summary>
/// <param name="placeName"></param>
/// <param name="type"></param>
void sugg_end_EndPointSelected(string placeName, PointType type)
{
DestinationPlace = placeName;
}
/// <summary>
/// 选择起点
/// </summary>
/// <param name="placeName"></param>
/// <param name="type"></param>
void sugg_start_EndPointSelected(string placeName, PointType type)
{
SourcePlace = placeName;
}
#endregion
#region 公开方法
/// <summary>
/// 开启搜索
/// </summary>
internal void StartSearch()
{
flpRoutes.Controls.Clear();
if (BMapControl != null)
{
BMapControl.SetRoute(null); //
BMapControl.SetRouteStartAndEnd(null, null);
}
if (BPlacesBoard != null) //位置列表初始化
{
BPlacesBoard.Clear();
}
_wait.Visible = true; //等待
((Action)delegate()
{
JObject routes;
DirectionService ds = new DirectionService();
if (_current_method == 0) //公交
{
if (bPlaceBoxSource.City != "" && bPlaceBoxDestination.City != "" && bPlaceBoxSource.City != bPlaceBoxDestination.City)
{
MessageBox.Show("公交导航时,两地城市必须一致!");
return;
}
routes = ds.DirectionByTransit(bPlaceBoxSource.QueryText, bPlaceBoxDestination.QueryText, _currentCity);
}
else if (_current_method == 1) //驾车
{
routes = ds.DirectionByDriving(bPlaceBoxSource.QueryText, bPlaceBoxDestination.QueryText, bPlaceBoxSource.City == "" ? bPlaceBoxSource.CurrentCity : bPlaceBoxSource.City
, bPlaceBoxDestination.City == "" ? bPlaceBoxDestination.CurrentCity : bPlaceBoxDestination.City);
}
else //步行
{
if (bPlaceBoxSource.City != "" && bPlaceBoxDestination.City != "" && bPlaceBoxSource.City != bPlaceBoxDestination.City)
{
MessageBox.Show("步行导航时,两地城市必须一致!");
return;
}
routes = ds.DirectionByWalking(bPlaceBoxSource.QueryText, bPlaceBoxDestination.QueryText, _currentCity);
}
if (routes != null && (string)routes["status"] == "0") //搜索成功
{
this.Invoke((Action)delegate()
{
_wait.Visible = false;
if ((string)routes["type"] == "2") //正常结果
{
//生成起点终点
BPoint start = new BPoint { Type = PointType.RouteStart, Selected = false, Address = bPlaceBoxSource.QueryText, Location = new LatLngPoint(double.Parse((string)routes["result"]["origin"]["originPt"]["lng"]), double.Parse((string)routes["result"]["origin"]["originPt"]["lat"])) };
BPoint end = new BPoint { Type = PointType.RouteEnd, Selected = false, Address = bPlaceBoxDestination.QueryText, Location = new LatLngPoint(double.Parse((string)routes["result"]["destination"]["destinationPt"]["lng"]), double.Parse((string)routes["result"]["destination"]["destinationPt"]["lat"])) };
if (BMapControl != null)
{
BMapControl.SetRouteStartAndEnd(start, end); //设置地图中对应的起点 终点
}
if (_current_method == 0) //公交
{
BTaxiTipControl taxi = new BTaxiTipControl();
taxi.DataSource = routes["result"]["taxi"]; //打车信息
taxi.Width = flpRoutes.Width - 25;
flpRoutes.Controls.Add(taxi);
foreach (JObject route in routes["result"]["routes"])
{
BTransitRouteItem item = new BTransitRouteItem();
BStepStartAndEndItem origin = new BStepStartAndEndItem();
origin.EndPoint = start;
item.Origin = origin; //起点
BStepStartAndEndItem destination = new BStepStartAndEndItem();
destination.EndPoint = end;
item.Destination = destination; //终点
item.DataSource = new BRoute { Type = RouteType.Transit, DataSource = route };
flpRoutes.Controls.Add(item);
item.Width = flpRoutes.Width - 25;
item.StepEndPointSelected += new StepEndPointSelectedEventHandler(item_StepEndPointSelected);
item.StepSelected += new StepSelectedEventHandler(item_StepSelected);
item.RouteSelected += new RouteSelectedEventHandler(item_RouteSelected);
}
}
else if (_current_method == 1) //驾车
{
BTaxiTipControl taxi = new BTaxiTipControl();
taxi.DataSource = routes["result"]["taxi"]; //打车信息
taxi.Width = flpRoutes.Width - 25;
flpRoutes.Controls.Add(taxi);
foreach (JObject route in routes["result"]["routes"])
{
BDrivingRouteItem item = new BDrivingRouteItem();
BStepStartAndEndItem origin = new BStepStartAndEndItem();
origin.EndPoint = start;
item.Origin = origin; //起点
BStepStartAndEndItem destination = new BStepStartAndEndItem();
destination.EndPoint = end;
item.Destination = destination; //终点
item.DataSource = new BRoute { DataSource = route, Type = RouteType.Driving };
flpRoutes.Controls.Add(item);
item.Width = flpRoutes.Width - 25;
item.StepEndPointSelected += new StepEndPointSelectedEventHandler(item_StepEndPointSelected);
item.StepSelected += new StepSelectedEventHandler(item_StepSelected);
item.RouteSelected += new RouteSelectedEventHandler(item_RouteSelected);
}
}
else //步行
{
//步行没有打车信息
foreach (JObject route in routes["result"]["routes"])
{
BWalkingRouteItem item = new BWalkingRouteItem();
BStepStartAndEndItem origin = new BStepStartAndEndItem();
origin.EndPoint = start;
item.Origin = origin; //起点
BStepStartAndEndItem destination = new BStepStartAndEndItem();
destination.EndPoint = end;
item.Destination = destination; //终点
item.DataSource = new BRoute { DataSource = route, Type = RouteType.Walking };
flpRoutes.Controls.Add(item);
item.Width = flpRoutes.Width - 25;
item.StepEndPointSelected += new StepEndPointSelectedEventHandler(item_StepEndPointSelected);
item.StepSelected += new StepSelectedEventHandler(item_StepSelected);
item.RouteSelected += new RouteSelectedEventHandler(item_RouteSelected);
}
}
}
else //地址模糊 需重新选择 具体json格式参见api文档
{
//
string start_keyword = (string)routes["result"]["originInfo"]["wd"];
string end_keyword = (string)routes["result"]["destinationInfo"]["wd"];
Label l = new Label();
l.AutoSize = false;
l.ForeColor = Color.Red;
l.Width = flpRoutes.Width - 25; l.Height = 20;
l.TextAlign = ContentAlignment.MiddleCenter;
l.Text = "请选择准确的位置";
flpRoutes.Controls.Add(l);
if (routes["result"]["origin"] != null) //起点模糊
{
if (routes["result"]["origin"] is JArray) //公交
{
BPlacesSuggestionControl sugg_start = new BPlacesSuggestionControl();
sugg_start.Type = PointType.RouteStart;
sugg_start.KeyWord = start_keyword;
sugg_start.Content = routes["result"]["origin"];
sugg_start.Width = flpRoutes.Width - 25;
sugg_start.EndPointSelected += new EndPointSelectedEventHandler(sugg_start_EndPointSelected);
flpRoutes.Controls.Add(sugg_start);
}
else //驾车 步行
{
BPlacesSuggestionControl sugg_start = new BPlacesSuggestionControl();
sugg_start.Type = PointType.RouteStart;
sugg_start.KeyWord = start_keyword;
sugg_start.Content = routes["result"]["origin"]["content"];
sugg_start.Width = flpRoutes.Width - 25;
sugg_start.EndPointSelected += new EndPointSelectedEventHandler(sugg_start_EndPointSelected);
flpRoutes.Controls.Add(sugg_start);
}
}
if (routes["result"]["destination"] != null) //终点模糊
{
if (routes["result"]["destination"] is JArray) //公交
{
BPlacesSuggestionControl sugg_end = new BPlacesSuggestionControl();
sugg_end.Type = PointType.RouteEnd;
sugg_end.KeyWord = end_keyword;
sugg_end.Content = routes["result"]["destination"];
sugg_end.Width = flpRoutes.Width - 25;
sugg_end.EndPointSelected += new EndPointSelectedEventHandler(sugg_end_EndPointSelected);
flpRoutes.Controls.Add(sugg_end);
}
else
{
BPlacesSuggestionControl sugg_end = new BPlacesSuggestionControl();
sugg_end.Type = PointType.RouteEnd;
sugg_end.KeyWord = end_keyword;
sugg_end.Content = routes["result"]["destination"]["content"];
sugg_end.Width = flpRoutes.Width - 25;
sugg_end.EndPointSelected += new EndPointSelectedEventHandler(sugg_end_EndPointSelected);
flpRoutes.Controls.Add(sugg_end);
}
}
}
});
}
}).BeginInvoke(null, null);
}
/// <summary>
/// 清空导航控件(初始化)
/// </summary>
public void Clear()
{
flpRoutes.Controls.Clear();
if (BMapControl != null)
{
BMapControl.SetRoute(null); //
BMapControl.SetRouteStartAndEnd(null, null);
}
}
#endregion
}
}
================================================
FILE: BMap.NET.WindowsForm/BDirectionBoard.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="picExchange.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAmCAIAAABVkBxPAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAAGYktHRAD/AP8A/6C9p5MAAAD1SURBVEhL7ZI9C4MwEIb7
//+Ji/g1uLjqqIhYcXFSHBT8BAuCPbyrWA3ShA6F5pl8L3cPScxt+SpSJ47UicPWdV1n23bTNJRf1HVd
lmVVVZRPMHR93xuGoSiKpmlt21J1RVVVqAOUTxx1wzCgC9F1HXZKa7y6cRxN08SBDbDDfrGBT1cUxX3F
siwc830fYp7n2MB9WMRxHBw7/I1/0M3z/FjZdBixec9HuizLMB7A5j2fHjZNU6xsJEmCS3s47i6OYywC
URRR9R22Dt6a67qe503TRKWVMAzBFQQB5RNs3QXw1OmLBbfuGqkTR+rEkTpxflm3LE+JGC/8U9qGcgAA
AABJRU5ErkJggg==
</value>
</data>
<data name="pictureBox2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAAGYktHRAD/AP8A/6C9p5MAAAC5SURBVDhPvZGxDoIwEIZ9
c6Mxgg8CuuoziOIuiot2JHGBBKgLwS/10OpSGfTPDf3v+uXu2kHbU/8HknI/zwJfeb6ahlmAlUKnN2B1
XY7Ow48gKWWjF5CUCeXJZbwrYt3oW6M5YEmm1VEu2cAiC6nFxVa80SaPSDKbeBuYKZ9a3dTijehDkn3E
OwFmM4An3jlSlK9J8m7ibeDQLQ1DH+K59KlK5ZINoH7P+hB9mI19CA6Oj/tGvwba9g6zhMUAKbYqsQAA
AABJRU5ErkJggg==
</value>
</data>
<data name="pictureBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADrwAAA68AZW8ckkAAAAGYktHRAD/AP8A/6C9p5MAAACeSURBVDhPxZExCoRQDET3
/pUg6DXU1iMIaq3gNdRq9oWNkL8Iq4XskMLMZML8+NJN/MEwz2oalaUVH9Pk/IHU0LbKsu+CDAgGdiPn
ufpe62o1DNZCLovPJAYCoDEd0XVG1rW3iYHQaCyO2DYjkQ5cMxSFtyeRyB1BC3keiQui8UqGWLzvGkd/
dDhuMIB7Z/2AZQQgNFVVv37cBTxtkN4/o9GrfLGpTQAAAABJRU5ErkJggg==
</value>
</data>
</root>
================================================
FILE: BMap.NET.WindowsForm/BDrivingRouteItem.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BDrivingRouteItem
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.flpSteps = new System.Windows.Forms.FlowLayoutPanel();
this.SuspendLayout();
//
// flpSteps
//
this.flpSteps.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.flpSteps.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flpSteps.Location = new System.Drawing.Point(0, 70);
this.flpSteps.Margin = new System.Windows.Forms.Padding(0);
this.flpSteps.Name = "flpSteps";
this.flpSteps.Size = new System.Drawing.Size(298, 303);
this.flpSteps.TabIndex = 0;
this.flpSteps.WrapContents = false;
//
// BDrivingRouteItem
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.Controls.Add(this.flpSteps);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.Name = "BDrivingRouteItem";
this.Size = new System.Drawing.Size(298, 373);
this.Click += new System.EventHandler(this.BDrivingRouteItem_Click);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BDrivingRouteItem_Paint);
this.MouseEnter += new System.EventHandler(this.BDrivingRouteItem_MouseEnter);
this.MouseLeave += new System.EventHandler(this.BDrivingRouteItem_MouseLeave);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flpSteps;
}
}
================================================
FILE: BMap.NET.WindowsForm/BDrivingRouteItem.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
using BMap.NET.WindowsForm.BMapElements;
namespace BMap.NET.WindowsForm
{
/// <summary>
/// 驾车路线控件
/// </summary>
partial class BDrivingRouteItem : UserControl
{
/// <summary>
/// 步骤选择时激发该事件
/// </summary>
public event StepSelectedEventHandler StepSelected;
/// <summary>
/// 路线选择时激发该事件
/// </summary>
public event RouteSelectedEventHandler RouteSelected;
/// <summary>
/// 路线起点终点选中时激发该事件
/// </summary>
public event StepEndPointSelectedEventHandler StepEndPointSelected;
private BRoute _dataSource;
/// <summary>
/// 路线数据源
/// </summary>
public BRoute DataSource
{
get
{
return _dataSource;
}
set
{
_dataSource = value;
if (_dataSource != null) //解析 具体json格式参见api文档
{
_distance = double.Parse((string)_dataSource.DataSource["distance"]);
_duration = double.Parse((string)_dataSource.DataSource["duration"]);
_toll = double.Parse((string)_dataSource.DataSource["toll"]);
if (Origin != null) //起点
{
flpSteps.Controls.Add(Origin);
Origin.StepEndPointSelected+=new StepEndPointSelectedEventHandler(Origin_StepEndPointSelected);
}
foreach (JObject step in _dataSource.DataSource["steps"])
{
BDrivingStepItem item = new BDrivingStepItem();
item.DataSource = step;
item.Width = flpSteps.Width - 17;
flpSteps.Controls.Add(item);
item.Margin = new Padding(0);
item.StepSelected+=new StepSelectedEventHandler(item_StepSelected);
if (item.Step_POIs != null)
_pois_near += item.Step_POIs + ",";
}
if (Destination != null) //终点
{
flpSteps.Controls.Add(Destination);
Destination.StepEndPointSelected+=new StepEndPointSelectedEventHandler(Destination_StepEndPointSelected);
}
if (_pois_near != null)
{
_pois_near = _pois_near.TrimEnd(new char[] { ',' });
}
foreach (Control c in flpSteps.Controls)
{
_steps_height += c.Height;
}
Selected = false;
}
}
}
private double _distance;
private double _duration;
private string _pois_near;
private double _toll;
private int _steps_height;
private bool _mouse_hover;
private bool _selected;
/// <summary>
/// 是否被选中
/// </summary>
public bool Selected
{
get
{
return _selected;
}
set
{
_selected = value;
if (_selected)
{
Height = 70 + _steps_height;
}
else
{
Height = 70;
}
}
}
/// <summary>
/// 起点
/// </summary>
public BStepStartAndEndItem Origin
{
get;
set;
}
/// <summary>
/// 终点
/// </summary>
public BStepStartAndEndItem Destination
{
get;
set;
}
/// <summary>
/// 构造方法
/// </summary>
public BDrivingRouteItem()
{
InitializeComponent();
SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true);
}
#region 事件处理
/// <summary>
/// 鼠标进入
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDrivingRouteItem_MouseEnter(object sender, EventArgs e)
{
_mouse_hover = true;
Invalidate();
}
/// <summary>
/// 鼠标移出
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDrivingRouteItem_MouseLeave(object sender, EventArgs e)
{
_mouse_hover = false;
Invalidate();
}
/// <summary>
/// 鼠标点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDrivingRouteItem_Click(object sender, EventArgs e)
{
Selected = true;
if (_selected)
{
if (RouteSelected != null)
{
RouteSelected(_dataSource);
}
}
}
/// <summary>
/// 重绘
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDrivingRouteItem_Paint(object sender, PaintEventArgs e)
{
if (Selected || _mouse_hover)
{
using (SolidBrush sb = new SolidBrush(Color.FromArgb(235, 241, 251)))
{
e.Graphics.FillRectangle(sb, new Rectangle(0, 0, Width - 1, 70 - 1));
}
}
e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(0, 0, Width - 1, 70 - 1));
using (Font f = new Font("微软雅黑", 9))
{
e.Graphics.DrawString(Math.Round(_duration / 60, 0) + "分钟 | " + Math.Round(_distance / 1000, 1) + "公里 | 过路费" + Math.Round(_toll,1) + "元", f, Brushes.Gray, new PointF(20, 10));
e.Graphics.DrawString("途径:" + _pois_near, f, Brushes.DarkGray, new PointF(20, 35));
}
}
/// <summary>
/// 路线步骤选中
/// </summary>
/// <param name="stepPath"></param>
/// <param name="enlarge"></param>
void item_StepSelected(string stepPath, bool enlarge)
{
if (StepSelected != null)
{
StepSelected(stepPath, enlarge);
}
}
/// <summary>
/// 路线终点选中
/// </summary>
/// <param name="bPoint"></param>
void Destination_StepEndPointSelected(BPoint bPoint)
{
if (StepEndPointSelected != null)
{
StepEndPointSelected(bPoint);
}
}
/// <summary>
/// 路线起点选中
/// </summary>
/// <param name="bPoint"></param>
void Origin_StepEndPointSelected(BPoint bPoint)
{
if (StepEndPointSelected != null)
{
StepEndPointSelected(bPoint);
}
}
#endregion
}
}
================================================
FILE: BMap.NET.WindowsForm/BDrivingRouteItem.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
================================================
FILE: BMap.NET.WindowsForm/BDrivingStepItem.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BDrivingStepItem
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblStepInfo = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblStepInfo
//
this.lblStepInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblStepInfo.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblStepInfo.Font = new System.Drawing.Font("SimSun", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblStepInfo.ForeColor = System.Drawing.Color.DimGray;
this.lblStepInfo.Location = new System.Drawing.Point(37, 7);
this.lblStepInfo.Name = "lblStepInfo";
this.lblStepInfo.Size = new System.Drawing.Size(262, 43);
this.lblStepInfo.TabIndex = 0;
this.lblStepInfo.Text = "这里是步骤说明这里是步骤说明这里是步骤说明这里是步\r\n撒旦法阿斯蒂芬撒旦法撒旦发射点发\r\n撒旦法骤说明";
this.lblStepInfo.Click += new System.EventHandler(this.lblStepInfo_Click);
this.lblStepInfo.MouseEnter += new System.EventHandler(this.BDrivingStepItem_MouseEnter);
this.lblStepInfo.MouseLeave += new System.EventHandler(this.BDrivingStepItem_MouseLeave);
//
// BDrivingStepItem
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.lblStepInfo);
this.Cursor = System.Windows.Forms.Cursors.Hand;
this.Name = "BDrivingStepItem";
this.Size = new System.Drawing.Size(306, 56);
this.Click += new System.EventHandler(this.lblStepInfo_Click);
this.Paint += new System.Windows.Forms.PaintEventHandler(this.BDrivingStepItem_Paint);
this.MouseEnter += new System.EventHandler(this.BDrivingStepItem_MouseEnter);
this.MouseLeave += new System.EventHandler(this.BDrivingStepItem_MouseLeave);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label lblStepInfo;
}
}
================================================
FILE: BMap.NET.WindowsForm/BDrivingStepItem.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Newtonsoft.Json.Linq;
using System.Text.RegularExpressions;
namespace BMap.NET.WindowsForm
{
/// <summary>
/// 驾车路线步骤控件
/// </summary>
partial class BDrivingStepItem : UserControl
{
/// <summary>
/// 路线步骤选中时激发该事件
/// </summary>
public event StepSelectedEventHandler StepSelected;
private JObject _dataSource;
/// <summary>
/// 步骤数据源
/// </summary>
public JObject DataSource
{
get
{
return _dataSource;
}
set
{
_dataSource = value;
if (_dataSource != null) //解析 详细json结构参见api文档
{
_step_direction = int.Parse((string)_dataSource["turn"]);
_step_info = (string)_dataSource["instructions"];
Paths = (string)_dataSource["path"];
foreach (JObject poi in _dataSource["pois"])
{
Step_POIs += (string)poi["name"] + ",";
}
if (Step_POIs != null)
Step_POIs = Step_POIs.TrimEnd(new char[] { ',' });
Regex reg = new Regex(@"<(!|/)?\w+( ((.|\n)*?"")?)? *>");
_step_info = reg.Replace(_step_info, "").Replace("<br/>","");
lblStepInfo.Text = _step_info;
}
}
}
private int _step_direction;
private string _step_info;
/// <summary>
/// 路过POI信息点
/// </summary>
public string Step_POIs
{
get;
set;
}
/// <summary>
/// 当前步骤路线
/// </summary>
public string Paths
{
get;
set;
}
/// <summary>
/// 构造方法
/// </summary>
public BDrivingStepItem()
{
InitializeComponent();
}
#region 事件处理
/// <summary>
/// 重绘
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDrivingStepItem_Paint(object sender, PaintEventArgs e)
{
//e.Graphics.DrawRectangle(Pens.LightGray, new Rectangle(0, 0, Width - 2, Height));
}
/// <summary>
/// 鼠标进入
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDrivingStepItem_MouseEnter(object sender, EventArgs e)
{
BackColor = Color.FromArgb(235, 241, 251);
if (StepSelected != null)
{
StepSelected(Paths, false);
}
}
/// <summary>
/// 鼠标移出
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void BDrivingStepItem_MouseLeave(object sender, EventArgs e)
{
BackColor = Color.White;
}
/// <summary>
/// 鼠标点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void lblStepInfo_Click(object sender, EventArgs e)
{
if (StepSelected != null)
{
StepSelected(Paths, true);
}
}
#endregion
}
}
================================================
FILE: BMap.NET.WindowsForm/BDrivingStepItem.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
================================================
FILE: BMap.NET.WindowsForm/BLoadMapModeControl.Designer.cs
================================================
namespace BMap.NET.WindowsForm
{
partial class BLoadMapModeControl
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BLoadMapModeControl));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.rdoCache = new System.Windows.Forms.RadioButton();
this.rdoCachefirst = new System.Windows.Forms.RadioButton();
this.rdoServer = new System.Windows.Forms.RadioButton();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Cursor = System.Windows.Forms.Cursors.Hand;
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(101, 9);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(13, 13);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
//
// rdoCache
//
this.rdoCache.AutoSize = true;
this.rdoCache.BackColor = System.Drawing.SystemColors.Control;
this.rdoCache.Checked = true;
this.rdoCache.Location = new System.Drawing.Point(15, 34);
this.rdoCache.Name = "rdoCache";
this.rdoCache.Size = new System.Drawing.Size(71, 16);
this.rdoCache.TabIndex = 1;
this.rdoCache.TabStop = true;
this.rdoCache.Text = "仅从本地";
this.rdoCache.UseVisualStyleBackColor = true;
this.rdoCache.CheckedChanged += new System.EventHandler(this.rdo_CheckedChanged);
//
// rdoCachefirst
//
this.rdoCachefirst.AutoSize = true;
this.rdoCachefirst.Location = new System.Drawing.Point(15, 56);
this.rdoCachefirst.Name = "rdoCachefirst";
this.rdoCachefirst.Size = new System.Drawing.Size(71, 16);
this.rdoCachefirst.TabIndex = 2;
this.rdoCachefirst.Text = "本地优先";
this.rdoCachefirst.UseVisualStyleBackColor = true;
this.rdoCachefirst.CheckedChanged += new System.EventHandler(this.rdo_CheckedChanged);
//
// rdoServer
//
this.rdoServer.AutoSize = true;
this.rdoServer.Location = new System.Drawing.Point(15, 78);
this.rdoServer.Name = "rdoServer";
this.rdoServer.Size = new System.Drawing.Size(71, 16);
this.rdoServer.TabIndex = 3;
this.rdoServer.Text = "仅从远程";
this.rdoServer.UseVisualStyleBackColor = true;
this.rdoServer.CheckedChanged += new System.EventHandler(this.rdo_CheckedChanged);
//
// label1
//
this.label1.BackColor = System.Drawing.Color.LightGray;
this.label1.Location = new System.Drawing.Point(14, 25);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(100, 1);
this.label1.TabIndex = 4;
this.label1.Text = "label1";
//
// BLoadMapModeControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.label1);
this.Controls.Add(this.rdoServer);
this.Controls.Add(this.rdoCachefirst);
this.Controls.Add(this.rdoCache);
this.Controls.Add(this.pictureBox1);
this.Name = "BLoadMapModeControl";
this.Size = new System.Drawing.Size(126, 105);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.RadioButton rdoCache;
private System.Windows.Forms.RadioButton rdoCachefirst;
private System.Windows.Forms.RadioButton rdoServer;
private System.Windows.Forms.Label label1;
}
}
================================================
FILE: BMap.NET.WindowsForm/BLoadMapModeControl.cs
================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BMap.NET.WindowsForm
{
/// <summary>
/// 地图加载模式选择控件
/// </summary>
partial class BLoadMapModeControl : UserControl
{
public event LoadMapModeChangedEventHandler LoadMapModeChanged;
private LoadMapMode _loadMode = LoadMapMode.Cache;
public LoadMapMode LoadMode
{
get
{
return _loadMode;
}
set
{
if (value != _loadMode)
{
_loadMode = value;
if (_loadMode == LoadMapMode.Cache)
{
rdoCache.Checked = true;
}
if (_loadMode == LoadMapMode.CacheServer)
{
rdoCachefirst.Checked = true;
}
if (_loadMode == LoadMapMode.Server)
{
rdoServer.Checked = true;
}
}
}
}
/// <summary>
///
/// </summary>
public BLoadMapModeControl()
{
InitializeComponent();
}
/// <summary>
/// 隐藏
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void pictureBox1_Click(object sender, EventArgs e)
{
Visible = false;
}
/// <summary>
/// 选择改变
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void rdo_CheckedChanged(object sender, EventArgs e)
{
LoadMapMode lm = LoadMapMode.Cache;
if (rdoCache.Checked)
{
lm = LoadMapMode.Cache;
}
if (rdoCachefirst.Checked)
{
lm = LoadMapMode.CacheServer;
}
if (rdoServer.Checked)
{
lm = LoadMapMode.Server;
}
if (lm != _loadMode)
{
_loadMode = lm;
if (LoadMapModeChanged != null)
{
LoadMapModeChanged(_loadMode);
}
Visible = false;
}
}
}
delegate void LoadMapModeChangedEventHandler(LoadMapMode loadMode);
}
================================================
FILE: BMap.NET.WindowsForm/BLoadMapModeControl.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhDQANAIEBAAkkPP///wAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQBAAABACwAAAAADQAN
AAAIMQADBABAsGBBgQMNKgSQcKFDhg0FLkQIsaFBhBIfUtSI0SHFjRcjWnx4kSRBkBMDBAQAOw==
</value>
</data>
</root>
================================================
FILE: BMap.NET.WindowsForm/BMap.NET.WindowsForm.csproj
================================================
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition
gitextract_d4njwb7z/ ├── .gitattributes ├── .gitignore ├── Asserts/ │ ├── ico.psd │ ├── ico1.psd │ ├── points.psd │ ├── strange_point.psd │ ├── 未标题-2.psd │ └── 未标题-3.psd ├── BMap.NET/ │ ├── BMap.NET.csproj │ ├── BMapConfiguration.cs │ ├── HTTPService/ │ │ ├── AKSNCaculater.cs │ │ ├── CoordinateTransService.cs │ │ ├── DirectionService.cs │ │ ├── GeocodingService.cs │ │ ├── IPService.cs │ │ ├── MapService.cs │ │ ├── PlaceService.cs │ │ ├── PlaceSuggestionService.cs │ │ └── ServiceBase.cs │ ├── LoadMapMode.cs │ ├── MapMode.cs │ ├── Properties/ │ │ ├── AssemblyInfo.cs │ │ ├── BMap.Designer.cs │ │ └── BMap.settings │ ├── VerificationMode.cs │ └── app.config ├── BMap.NET.DownloadDemo/ │ ├── BMap.NET.DownloadDemo.csproj │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── Program.cs │ ├── Properties/ │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── app.config ├── BMap.NET.WindowsForm/ │ ├── BCityControl.Designer.cs │ ├── BCityControl.cs │ ├── BCityControl.resx │ ├── BDirectionBoard.Designer.cs │ ├── BDirectionBoard.cs │ ├── BDirectionBoard.resx │ ├── BDrivingRouteItem.Designer.cs │ ├── BDrivingRouteItem.cs │ ├── BDrivingRouteItem.resx │ ├── BDrivingStepItem.Designer.cs │ ├── BDrivingStepItem.cs │ ├── BDrivingStepItem.resx │ ├── BLoadMapModeControl.Designer.cs │ ├── BLoadMapModeControl.cs │ ├── BLoadMapModeControl.resx │ ├── BMap.NET.WindowsForm.csproj │ ├── BMapControl.Designer.cs │ ├── BMapControl.cs │ ├── BMapControl.resx │ ├── BMapElements/ │ │ ├── BBound.cs │ │ ├── BDistance.cs │ │ ├── BMapElement.cs │ │ ├── BMarker.cs │ │ ├── BNearBy.cs │ │ ├── BPOI.cs │ │ ├── BPoint.cs │ │ ├── BRoute.cs │ │ └── BTile.cs │ ├── BMarkerEditorControl.Designer.cs │ ├── BMarkerEditorControl.cs │ ├── BMarkerEditorControl.resx │ ├── BMarkerTipControl.Designer.cs │ ├── BMarkerTipControl.cs │ ├── BMarkerTipControl.resx │ ├── BPOITipControl.Designer.cs │ ├── BPOITipControl.cs │ ├── BPOITipControl.resx │ ├── BPlaceBox.Designer.cs │ ├── BPlaceBox.cs │ ├── BPlaceBox.resx │ ├── BPlaceItem.Designer.cs │ ├── BPlaceItem.cs │ ├── BPlaceItem.resx │ ├── BPlacesBoard.Designer.cs │ ├── BPlacesBoard.cs │ ├── BPlacesBoard.resx │ ├── BPlacesSuggestionControl.Designer.cs │ ├── BPlacesSuggestionControl.cs │ ├── BPlacesSuggestionControl.resx │ ├── BPlacesSuggestionItem.Designer.cs │ ├── BPlacesSuggestionItem.cs │ ├── BPlacesSuggestionItem.resx │ ├── BPointTipControl.Designer.cs │ ├── BPointTipControl.cs │ ├── BPointTipControl.resx │ ├── BQuickSearchBoardcs.Designer.cs │ ├── BQuickSearchBoardcs.cs │ ├── BQuickSearchBoardcs.resx │ ├── BQuickSearchControl.Designer.cs │ ├── BQuickSearchControl.cs │ ├── BQuickSearchControl.resx │ ├── BScreenshotMenu.Designer.cs │ ├── BScreenshotMenu.cs │ ├── BScreenshotMenu.resx │ ├── BStepStartAndEndItem.Designer.cs │ ├── BStepStartAndEndItem.cs │ ├── BStepStartAndEndItem.resx │ ├── BTaxiTipControl.Designer.cs │ ├── BTaxiTipControl.cs │ ├── BTaxiTipControl.resx │ ├── BTransitRouteItem.Designer.cs │ ├── BTransitRouteItem.cs │ ├── BTransitRouteItem.resx │ ├── BTransitStepItem.Designer.cs │ ├── BTransitStepItem.cs │ ├── BTransitStepItem.resx │ ├── BWalkingRouteItem.Designer.cs │ ├── BWalkingRouteItem.cs │ ├── BWalkingRouteItem.resx │ ├── BWalkingStepItem.Designer.cs │ ├── BWalkingStepItem.cs │ ├── BWalkingStepItem.resx │ ├── BaiduJSAPI_cracker.js │ ├── DrawingObjects/ │ │ ├── BCircle.cs │ │ ├── BDownloadRectangle.cs │ │ ├── BLine.cs │ │ ├── BPolygon.cs │ │ ├── BRectangle.cs │ │ ├── BScreenShotRectangle.cs │ │ └── DrawingObject.cs │ ├── FunctionalControls/ │ │ ├── BTabControl.cs │ │ ├── CityList.Designer.cs │ │ ├── CityList.cs │ │ └── CityList.resx │ ├── LatLngPoint.cs │ ├── MapDownloadDialog.Designer.cs │ ├── MapDownloadDialog.cs │ ├── MapDownloadDialog.resx │ ├── MapDownloaderControl.Designer.cs │ ├── MapDownloaderControl.cs │ ├── PointType.cs │ ├── Properties/ │ │ ├── AssemblyInfo.cs │ │ ├── BMap.Designer.cs │ │ ├── BMap.resx │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── Resources/ │ │ └── baidu_citys.txt │ └── RouteType.cs ├── BMap.NET.WinformDemo/ │ ├── BMap.NET.WinformDemo.csproj │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── Program.cs │ ├── Properties/ │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── app.config ├── BMap.NET.sln ├── README.md └── licences.txt
SYMBOL INDEX (544 symbols across 101 files)
FILE: BMap.NET.DownloadDemo/MainForm.Designer.cs
class MainForm (line 3) | partial class MainForm
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.DownloadDemo/MainForm.cs
class MainForm (line 12) | public partial class MainForm : Form
method MainForm (line 14) | public MainForm()
method button1_Click (line 19) | private void button1_Click(object sender, EventArgs e)
FILE: BMap.NET.DownloadDemo/Program.cs
class Program (line 8) | static class Program
method Main (line 13) | [STAThread]
FILE: BMap.NET.DownloadDemo/Properties/Resources.Designer.cs
class Resources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
method Resources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...
FILE: BMap.NET.DownloadDemo/Properties/Settings.Designer.cs
class Settings (line 14) | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
FILE: BMap.NET.WindowsForm/BCityControl.Designer.cs
class BCityControl (line 3) | partial class BCityControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BCityControl.cs
class BCityControl (line 16) | partial class BCityControl : UserControl
method BCityControl (line 38) | public BCityControl()
method BCityControl_Load (line 47) | private void BCityControl_Load(object sender, EventArgs e)
method LoadCities (line 55) | private void LoadCities()
method GetSpellCodeAt (line 120) | private static string GetSpellCodeAt(string s)
method Init (line 232) | private void Init()
method lkb_Click (line 250) | void lkb_Click(object sender, EventArgs e)
method rdo_CheckedChanged (line 263) | private void rdo_CheckedChanged(object sender, EventArgs e)
method cityList1_SelectedCityChanged (line 283) | private void cityList1_SelectedCityChanged(string cityName)
method pic_close_Click (line 296) | private void pic_close_Click(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BDirectionBoard.Designer.cs
class BDirectionBoard (line 3) | partial class BDirectionBoard
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BDirectionBoard.cs
class BDirectionBoard (line 18) | public partial class BDirectionBoard : UserControl
method BDirectionBoard (line 118) | public BDirectionBoard()
method BDirectionBoard_Paint (line 141) | private void BDirectionBoard_Paint(object sender, PaintEventArgs e)
method BDirectionBoard_MouseMove (line 234) | private void BDirectionBoard_MouseMove(object sender, MouseEventArgs e)
method BDirectionBoard_Click (line 251) | private void BDirectionBoard_Click(object sender, EventArgs e)
method label1_MouseEnter (line 330) | private void label1_MouseEnter(object sender, EventArgs e)
method label1_MouseLeave (line 340) | private void label1_MouseLeave(object sender, EventArgs e)
method picExchange_Click (line 350) | private void picExchange_Click(object sender, EventArgs e)
method lblSearch_Click (line 364) | private void lblSearch_Click(object sender, EventArgs e)
method item_RouteSelected (line 373) | void item_RouteSelected(BRoute bRoute)
method item_StepSelected (line 400) | void item_StepSelected(string stepPath, bool enlarge)
method item_StepEndPointSelected (line 411) | void item_StepEndPointSelected(BPoint bPoint)
method sugg_end_EndPointSelected (line 424) | void sugg_end_EndPointSelected(string placeName, PointType type)
method sugg_start_EndPointSelected (line 433) | void sugg_start_EndPointSelected(string placeName, PointType type)
method StartSearch (line 443) | internal void StartSearch()
method Clear (line 642) | public void Clear()
FILE: BMap.NET.WindowsForm/BDrivingRouteItem.Designer.cs
class BDrivingRouteItem (line 3) | partial class BDrivingRouteItem
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BDrivingRouteItem.cs
class BDrivingRouteItem (line 17) | partial class BDrivingRouteItem : UserControl
method BDrivingRouteItem (line 134) | public BDrivingRouteItem()
method BDrivingRouteItem_MouseEnter (line 146) | private void BDrivingRouteItem_MouseEnter(object sender, EventArgs e)
method BDrivingRouteItem_MouseLeave (line 156) | private void BDrivingRouteItem_MouseLeave(object sender, EventArgs e)
method BDrivingRouteItem_Click (line 166) | private void BDrivingRouteItem_Click(object sender, EventArgs e)
method BDrivingRouteItem_Paint (line 182) | private void BDrivingRouteItem_Paint(object sender, PaintEventArgs e)
method item_StepSelected (line 203) | void item_StepSelected(string stepPath, bool enlarge)
method Destination_StepEndPointSelected (line 214) | void Destination_StepEndPointSelected(BPoint bPoint)
method Origin_StepEndPointSelected (line 225) | void Origin_StepEndPointSelected(BPoint bPoint)
FILE: BMap.NET.WindowsForm/BDrivingStepItem.Designer.cs
class BDrivingStepItem (line 3) | partial class BDrivingStepItem
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BDrivingStepItem.cs
class BDrivingStepItem (line 17) | partial class BDrivingStepItem : UserControl
method BDrivingStepItem (line 75) | public BDrivingStepItem()
method BDrivingStepItem_Paint (line 85) | private void BDrivingStepItem_Paint(object sender, PaintEventArgs e)
method BDrivingStepItem_MouseEnter (line 95) | private void BDrivingStepItem_MouseEnter(object sender, EventArgs e)
method BDrivingStepItem_MouseLeave (line 108) | private void BDrivingStepItem_MouseLeave(object sender, EventArgs e)
method lblStepInfo_Click (line 117) | private void lblStepInfo_Click(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BLoadMapModeControl.Designer.cs
class BLoadMapModeControl (line 3) | partial class BLoadMapModeControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BLoadMapModeControl.cs
class BLoadMapModeControl (line 15) | partial class BLoadMapModeControl : UserControl
method BLoadMapModeControl (line 48) | public BLoadMapModeControl()
method pictureBox1_Click (line 57) | private void pictureBox1_Click(object sender, EventArgs e)
method rdo_CheckedChanged (line 66) | private void rdo_CheckedChanged(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BMapControl.Designer.cs
class BMapControl (line 3) | partial class BMapControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BMapControl.cs
class BMapControl (line 21) | public partial class BMapControl : UserControl
method BMapControl (line 263) | public BMapControl()
method OnLoad (line 277) | protected override void OnLoad(EventArgs e)
method OnPaint (line 286) | protected override void OnPaint(PaintEventArgs e)
method OnMouseDown (line 311) | protected override void OnMouseDown(MouseEventArgs e)
method OnMouseMove (line 699) | protected override void OnMouseMove(MouseEventArgs e)
method OnMouseUp (line 877) | protected override void OnMouseUp(MouseEventArgs e)
method OnMouseWheel (line 935) | protected override void OnMouseWheel(MouseEventArgs e)
method OnMouseLeave (line 958) | protected override void OnMouseLeave(EventArgs e)
method OnResize (line 967) | protected override void OnResize(EventArgs e)
method OnMouseHover (line 977) | protected override void OnMouseHover(EventArgs e)
method OnMouseDoubleClick (line 985) | protected override void OnMouseDoubleClick(MouseEventArgs e)
method Init (line 1015) | private void Init()
method Locate (line 1092) | private void Locate(bool mylocation)
method InitializeTiles (line 1161) | private void InitializeTiles()
method SyncControlsLocation (line 1186) | private void SyncControlsLocation()
method DrawTiles (line 1220) | private void DrawTiles(Graphics g)
method DrawMapInfo (line 1235) | private void DrawMapInfo(Graphics g)
method DrawCurrentCity (line 1261) | private void DrawCurrentCity(Graphics g)
method DrawToolsBar (line 1287) | private void DrawToolsBar(Graphics g)
method DrawCursor (line 1390) | private void DrawCursor(Graphics g)
method DrawDrawingObjects (line 1415) | private void DrawDrawingObjects(Graphics g)
method DrawMapElements (line 1430) | private void DrawMapElements(Graphics g)
method AddPlaces (line 1472) | internal void AddPlaces(List<BPOI> places)
method ClearPlaces (line 1488) | internal void ClearPlaces()
method SetRouteStartAndEnd (line 1502) | internal void SetRouteStartAndEnd(BPoint start, BPoint end)
method SetRoute (line 1512) | internal void SetRoute(BRoute route)
method SetHighlightPath (line 1533) | internal void SetHighlightPath(string path, bool enlarge)
method SelectBPOI (line 1554) | internal void SelectBPOI(BPOI poi)
method SelectBPoint (line 1588) | internal void SelectBPoint(BPoint bpoint)
method _bCityControl_SelectedCityChanged (line 1637) | void _bCityControl_SelectedCityChanged(string cityName)
method _chkShowRoadNet_CheckedChanged (line 1678) | void _chkShowRoadNet_CheckedChanged(object sender, EventArgs e)
method _bLoadMapModeControl_LoadMapModeChanged (line 1696) | void _bLoadMapModeControl_LoadMapModeChanged(LoadMapMode loadMode)
method _bScreenshotMenu_ScreenshotDone (line 1704) | void _bScreenshotMenu_ScreenshotDone(bool saved)
method _bQuickSearchControl_QuickSearch (line 1736) | void _bQuickSearchControl_QuickSearch(string searchName)
method _bQuickSearchControl_VisibleChanged (line 1760) | void _bQuickSearchControl_VisibleChanged(object sender, EventArgs e)
method cm_popup_Click (line 1772) | private void cm_popup_Click(object sender, EventArgs e)
method _bMarkerEditorControl_VisibleChanged (line 1893) | void _bMarkerEditorControl_VisibleChanged(object sender, EventArgs e)
method _bPOITipControl_VisibleChanged (line 1917) | void _bPOITipControl_VisibleChanged(object sender, EventArgs e)
method _bPointTipControl_VisibleChanged (line 1930) | void _bPointTipControl_VisibleChanged(object sender, EventArgs e)
method _bMarkerTipControl_VisibleChanged (line 1942) | void _bMarkerTipControl_VisibleChanged(object sender, EventArgs e)
method _bTipControl_DirecttionStarted (line 1971) | void _bTipControl_DirecttionStarted(string source, string destination,...
method _bTipControl_SearchNearbyStarted (line 1984) | void _bTipControl_SearchNearbyStarted(string query, LatLngPoint center)
class MapHelper (line 2006) | public class MapHelper
method rad (line 2009) | private static double rad(double d)
method GetDistanceByLatLng (line 2019) | public static double GetDistanceByLatLng(LatLngPoint p1, LatLngPoint p2)
method GetScreenLocationByLatLng (line 2039) | public static Point GetScreenLocationByLatLng(LatLngPoint p, LatLngPoi...
method GetLatLngByScreenLocation (line 2060) | public static LatLngPoint GetLatLngByScreenLocation(PointF p, LatLngPo...
method GetLocationByLatLng (line 2078) | public static PointF GetLocationByLatLng(LatLngPoint p, int zoom)
method GetLatLngByLocation (line 2089) | public static LatLngPoint GetLatLngByLocation(PointF p, int zoom)
method CreateRoundedRectanglePath (line 2100) | public static GraphicsPath CreateRoundedRectanglePath(Rectangle rect, ...
method GetMapModeTitle (line 2119) | public static string GetMapModeTitle(MapMode mode)
method GetLoadMapModeTitle (line 2144) | public static string GetLoadMapModeTitle(LoadMapMode load_mode)
method LatLng2Mercator (line 2177) | private static PointF LatLng2Mercator(LatLngPoint p)
method Mercator2LatLng (line 2203) | private static LatLngPoint Mercator2LatLng(PointF p)
method Convertor (line 2217) | private static double[] Convertor(double x, double y, double[] param)
type MouseType (line 2230) | public enum MouseType
FILE: BMap.NET.WindowsForm/BMapElements/BBound.cs
class BBound (line 12) | public class BBound:BMapElement
method Draw (line 37) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/BMapElements/BDistance.cs
class BDistance (line 12) | public class BDistance : BMapElement
method UpdateTheEnd (line 26) | public void UpdateTheEnd(LatLngPoint p)
method Draw (line 40) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/BMapElements/BMapElement.cs
class BMapElement (line 12) | public abstract class BMapElement
method Draw (line 21) | public abstract void Draw(Graphics g, LatLngPoint center, int zoom, Si...
FILE: BMap.NET.WindowsForm/BMapElements/BMarker.cs
class BMarker (line 13) | public class BMarker : BMapElement
method Draw (line 88) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/BMapElements/BNearBy.cs
class BNearBy (line 11) | public class BNearBy : BMapElement
method Draw (line 40) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/BMapElements/BPOI.cs
class BPOI (line 13) | public class BPOI : BMapElement
method Draw (line 72) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/BMapElements/BPoint.cs
class BPoint (line 12) | public class BPoint : BMapElement
method Draw (line 71) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/BMapElements/BRoute.cs
class BRoute (line 15) | public class BRoute : BMapElement
method Draw (line 48) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/BMapElements/BTile.cs
class BTile (line 16) | public class BTile : BMapElement
method BTile (line 18) | static BTile()
method BTile (line 117) | public BTile(int x, int y, int z, Control parent, MapMode mode,LoadMap...
method Draw (line 133) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/BMarkerEditorControl.Designer.cs
class BMarkerEditorControl (line 3) | partial class BMarkerEditorControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BMarkerEditorControl.cs
class BMarkerEditorControl (line 17) | partial class BMarkerEditorControl : UserControl
method BMarkerEditorControl (line 47) | public BMarkerEditorControl()
method BMarkerEditorControl_Load (line 58) | private void BMarkerEditorControl_Load(object sender, EventArgs e)
method BMarkerEditorControl_Paint (line 75) | private void BMarkerEditorControl_Paint(object sender, PaintEventArgs e)
method picClose_Click (line 94) | private void picClose_Click(object sender, EventArgs e)
method btnOK_Click (line 103) | private void btnOK_Click(object sender, EventArgs e)
method btnCancel_Click (line 115) | private void btnCancel_Click(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BMarkerTipControl.Designer.cs
class BMarkerTipControl (line 3) | partial class BMarkerTipControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BMarkerTipControl.cs
class BMarkerTipControl (line 17) | partial class BMarkerTipControl : UserControl
method BMarkerTipControl (line 75) | public BMarkerTipControl()
method picEdit_Click (line 88) | private void picEdit_Click(object sender, EventArgs e)
method picDelete_Click (line 98) | private void picDelete_Click(object sender, EventArgs e)
method picClose_Click (line 108) | private void picClose_Click(object sender, EventArgs e)
method BMarkerTipControl_Load (line 117) | private void BMarkerTipControl_Load(object sender, EventArgs e)
method BMarkerTipControl_Paint (line 134) | private void BMarkerTipControl_Paint(object sender, PaintEventArgs e)
method BMarkerTipControl_MouseMove (line 191) | private void BMarkerTipControl_MouseMove(object sender, MouseEventArgs e)
method BMarkerTipControl_Click (line 207) | private void BMarkerTipControl_Click(object sender, EventArgs e)
method btnsearch_Click (line 276) | private void btnsearch_Click(object sender, EventArgs e)
method btntransit_Click (line 288) | private void btntransit_Click(object sender, EventArgs e)
method btndriving_Click (line 307) | private void btndriving_Click(object sender, EventArgs e)
method lnk_LinkClicked (line 326) | private void lnk_LinkClicked(object sender, LinkLabelLinkClickedEventA...
FILE: BMap.NET.WindowsForm/BPOITipControl.Designer.cs
class BPOITipControl (line 3) | partial class BPOITipControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BPOITipControl.cs
class BPOITipControl (line 18) | partial class BPOITipControl : UserControl
method BPOITipControl (line 70) | public BPOITipControl()
method BPOITipControl_Load (line 83) | private void BPOITipControl_Load(object sender, EventArgs e)
method BPOITipControl_Paint (line 100) | private void BPOITipControl_Paint(object sender, PaintEventArgs e)
method BPOITipControl_MouseMove (line 156) | private void BPOITipControl_MouseMove(object sender, MouseEventArgs e)
method BPOITipControl_Click (line 172) | private void BPOITipControl_Click(object sender, EventArgs e)
method pictureBox1_Click (line 241) | private void pictureBox1_Click(object sender, EventArgs e)
method piclogo_Paint (line 250) | private void piclogo_Paint(object sender, PaintEventArgs e)
method btntransit_Click (line 262) | private void btntransit_Click(object sender, EventArgs e)
method btndriving_Click (line 281) | private void btndriving_Click(object sender, EventArgs e)
method btnsearch_Click (line 300) | private void btnsearch_Click(object sender, EventArgs e)
method lnk_LinkClicked (line 312) | private void lnk_LinkClicked(object sender, LinkLabelLinkClickedEventA...
FILE: BMap.NET.WindowsForm/BPlaceBox.Designer.cs
class BPlaceBox (line 3) | partial class BPlaceBox
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BPlaceBox.cs
class BPlaceBox (line 18) | public partial class BPlaceBox : UserControl
method BPlaceBox (line 110) | public BPlaceBox()
method StartSearch (line 117) | public void StartSearch()
method DontSearchNextTime (line 141) | public void DontSearchNextTime()
method txtInput_TextChanged (line 159) | private void txtInput_TextChanged(object sender, EventArgs e)
method FindTheTopControl (line 235) | private Control FindTheTopControl()
method lbl_Click (line 249) | void lbl_Click(object sender, EventArgs e)
method lbl_MouseLeave (line 265) | void lbl_MouseLeave(object sender, EventArgs e)
method lbl_MouseEnter (line 274) | void lbl_MouseEnter(object sender, EventArgs e)
method txtInput_Resize (line 283) | private void txtInput_Resize(object sender, EventArgs e)
method BPlaceBox_Load (line 293) | private void BPlaceBox_Load(object sender, EventArgs e)
method txtInput_KeyDown (line 302) | private void txtInput_KeyDown(object sender, KeyEventArgs e)
method BPlaceBox_Paint (line 315) | private void BPlaceBox_Paint(object sender, PaintEventArgs e)
method txtInput_Leave (line 324) | private void txtInput_Leave(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BPlaceItem.Designer.cs
class BPlaceItem (line 3) | partial class BPlaceItem
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BPlaceItem.cs
class BPlaceItem (line 17) | partial class BPlaceItem : UserControl
method BPlaceItem (line 88) | public BPlaceItem()
method BPlaceItem_MouseEnter (line 97) | private void BPlaceItem_MouseEnter(object sender, EventArgs e)
method BPlaceItem_MouseLeave (line 112) | private void BPlaceItem_MouseLeave(object sender, EventArgs e)
method btn_there_Click (line 127) | private void btn_there_Click(object sender, EventArgs e)
method btn_here_Click (line 139) | private void btn_here_Click(object sender, EventArgs e)
method BPlaceItem_Paint (line 151) | private void BPlaceItem_Paint(object sender, PaintEventArgs e)
method BPlaceItem_Click (line 170) | private void BPlaceItem_Click(object sender, EventArgs e)
method BPlaceItem_Load (line 186) | private void BPlaceItem_Load(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BPlacesBoard.Designer.cs
class BPlacesBoard (line 3) | partial class BPlacesBoard
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BPlacesBoard.cs
class BPlacesBoard (line 19) | public partial class BPlacesBoard : UserControl
method BPlacesBoard (line 53) | public BPlacesBoard()
method Clear (line 69) | public void Clear()
method AddPlaces (line 82) | internal void AddPlaces(JToken places)
method SelectPlace (line 122) | internal void SelectPlace(BPOI poi)
method bQuickSearch_QuickSearch (line 145) | private void bQuickSearch_QuickSearch(string searchName)
method item_PlaceSelectedChanged (line 168) | void item_PlaceSelectedChanged(BPOI poi)
method item_SetSourcePlace (line 187) | void item_SetSourcePlace(string sourceName)
method item_SetDestinationPlace (line 199) | void item_SetDestinationPlace(string destinationName)
FILE: BMap.NET.WindowsForm/BPlacesSuggestionControl.Designer.cs
class BPlacesSuggestionControl (line 3) | partial class BPlacesSuggestionControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BPlacesSuggestionControl.cs
class BPlacesSuggestionControl (line 16) | partial class BPlacesSuggestionControl : UserControl
method BPlacesSuggestionControl (line 102) | public BPlacesSuggestionControl()
method BPlacesSuggestionControl_Paint (line 112) | private void BPlacesSuggestionControl_Paint(object sender, PaintEventA...
method item_EndPointSelected (line 130) | void item_EndPointSelected(string placeName, PointType type)
method BPlacesSuggestionControl_Click (line 144) | private void BPlacesSuggestionControl_Click(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BPlacesSuggestionItem.Designer.cs
class BPlacesSuggestionItem (line 3) | partial class BPlacesSuggestionItem
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BPlacesSuggestionItem.cs
class BPlacesSuggestionItem (line 16) | partial class BPlacesSuggestionItem : UserControl
method BPlacesSuggestionItem (line 68) | public BPlacesSuggestionItem()
method label1_MouseEnter (line 77) | private void label1_MouseEnter(object sender, EventArgs e)
method label1_MouseLeave (line 86) | private void label1_MouseLeave(object sender, EventArgs e)
method lblSelect_Click (line 95) | private void lblSelect_Click(object sender, EventArgs e)
method BPlacesSuggestionItem_Paint (line 107) | private void BPlacesSuggestionItem_Paint(object sender, PaintEventArgs e)
FILE: BMap.NET.WindowsForm/BPointTipControl.Designer.cs
class BPointTipControl (line 3) | partial class BPointTipControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BPointTipControl.cs
class BPointTipControl (line 17) | partial class BPointTipControl : UserControl
method BPointTipControl (line 55) | public BPointTipControl()
method btntransit_Click (line 65) | private void btntransit_Click(object sender, EventArgs e)
method btndriving_Click (line 84) | private void btndriving_Click(object sender, EventArgs e)
method btnsearch_Click (line 103) | private void btnsearch_Click(object sender, EventArgs e)
method BPointTipControl_Load (line 115) | private void BPointTipControl_Load(object sender, EventArgs e)
method picClose_Click (line 132) | private void picClose_Click(object sender, EventArgs e)
method lnk_LinkClicked (line 141) | private void lnk_LinkClicked(object sender, LinkLabelLinkClickedEventA...
method BPointTipControl_Paint (line 153) | private void BPointTipControl_Paint(object sender, PaintEventArgs e)
method BPointTipControl_MouseMove (line 210) | private void BPointTipControl_MouseMove(object sender, MouseEventArgs e)
method BPointTipControl_MouseDown (line 226) | private void BPointTipControl_MouseDown(object sender, MouseEventArgs e)
FILE: BMap.NET.WindowsForm/BQuickSearchBoardcs.Designer.cs
class BQuickSearchBoardcs (line 3) | partial class BQuickSearchBoardcs
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BQuickSearchBoardcs.cs
class BQuickSearchBoardcs (line 15) | partial class BQuickSearchBoardcs : UserControl
method BQuickSearchBoardcs (line 18) | public BQuickSearchBoardcs()
method pictureBox1_Click (line 27) | private void pictureBox1_Click(object sender, EventArgs e)
method linkLabel4_Click (line 39) | private void linkLabel4_Click(object sender, EventArgs e)
method linkLabel1_Click (line 51) | private void linkLabel1_Click(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BQuickSearchControl.Designer.cs
class BQuickSearchControl (line 3) | partial class BQuickSearchControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BQuickSearchControl.cs
class BQuickSearchControl (line 15) | partial class BQuickSearchControl : UserControl
method BQuickSearchControl (line 18) | public BQuickSearchControl()
method pictureBox1_Click (line 27) | private void pictureBox1_Click(object sender, EventArgs e)
method linkLabel2_Click (line 36) | private void linkLabel2_Click(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BScreenshotMenu.Designer.cs
class BScreenshotMenu (line 3) | partial class BScreenshotMenu
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BScreenshotMenu.cs
class BScreenshotMenu (line 15) | partial class BScreenshotMenu : UserControl
method BScreenshotMenu (line 18) | public BScreenshotMenu()
method label1_MouseEnter (line 27) | private void label1_MouseEnter(object sender, EventArgs e)
method label1_MouseLeave (line 36) | private void label1_MouseLeave(object sender, EventArgs e)
method label1_Click (line 45) | private void label1_Click(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BStepStartAndEndItem.Designer.cs
class BStepStartAndEndItem (line 3) | partial class BStepStartAndEndItem
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BStepStartAndEndItem.cs
class BStepStartAndEndItem (line 16) | partial class BStepStartAndEndItem : UserControl
method BStepStartAndEndItem (line 31) | public BStepStartAndEndItem()
method BStepStartAndEndItem_Paint (line 42) | private void BStepStartAndEndItem_Paint(object sender, PaintEventArgs e)
method label1_Click (line 63) | private void label1_Click(object sender, EventArgs e)
method BStepStartAndEndItem_Load (line 75) | private void BStepStartAndEndItem_Load(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BTaxiTipControl.Designer.cs
class BTaxiTipControl (line 3) | partial class BTaxiTipControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BTaxiTipControl.cs
class BTaxiTipControl (line 16) | partial class BTaxiTipControl : UserControl
method BTaxiTipControl (line 56) | public BTaxiTipControl()
method BTaxiTipControl_Paint (line 73) | private void BTaxiTipControl_Paint(object sender, PaintEventArgs e)
method linkLabel1_MouseEnter (line 82) | private void linkLabel1_MouseEnter(object sender, EventArgs e)
method linkLabel1_MouseLeave (line 99) | private void linkLabel1_MouseLeave(object sender, EventArgs e)
method FindTheTopControl (line 107) | private Control FindTheTopControl()
FILE: BMap.NET.WindowsForm/BTransitRouteItem.Designer.cs
class BTransitRouteItem (line 3) | partial class BTransitRouteItem
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BTransitRouteItem.cs
class BTransitRouteItem (line 17) | partial class BTransitRouteItem : UserControl
method BTransitRouteItem (line 136) | public BTransitRouteItem()
method BTransitRouteItem_Paint (line 148) | private void BTransitRouteItem_Paint(object sender, PaintEventArgs e)
method BTransitRouteItem_Click (line 172) | private void BTransitRouteItem_Click(object sender, EventArgs e)
method BTransitRouteItem_MouseEnter (line 188) | private void BTransitRouteItem_MouseEnter(object sender, EventArgs e)
method BTransitRouteItem_MouseLeave (line 198) | private void BTransitRouteItem_MouseLeave(object sender, EventArgs e)
method item_StepSelected (line 208) | void item_StepSelected(string stepPath, bool enlarge)
method Destination_StepEndPointSelected (line 219) | void Destination_StepEndPointSelected(BPoint bPoint)
method Origin_StepEndPointSelected (line 230) | void Origin_StepEndPointSelected(BPoint bPoint)
FILE: BMap.NET.WindowsForm/BTransitStepItem.Designer.cs
class BTransitStepItem (line 3) | partial class BTransitStepItem
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BTransitStepItem.cs
class BTransitStepItem (line 16) | partial class BTransitStepItem : UserControl
method BTransitStepItem (line 112) | public BTransitStepItem()
method BTransitStepItem_Paint (line 122) | private void BTransitStepItem_Paint(object sender, PaintEventArgs e)
method BTransitStepItem_MouseEnter (line 158) | private void BTransitStepItem_MouseEnter(object sender, EventArgs e)
method BTransitStepItem_MouseLeave (line 171) | private void BTransitStepItem_MouseLeave(object sender, EventArgs e)
method BTransitStepItem_Click (line 180) | private void BTransitStepItem_Click(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BWalkingRouteItem.Designer.cs
class BWalkingRouteItem (line 3) | partial class BWalkingRouteItem
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BWalkingRouteItem.cs
class BWalkingRouteItem (line 17) | partial class BWalkingRouteItem : UserControl
method BWalkingRouteItem (line 124) | public BWalkingRouteItem()
method BWalkingRouteItem_Paint (line 137) | private void BWalkingRouteItem_Paint(object sender, PaintEventArgs e)
method BWalkingRouteItem_Click (line 157) | private void BWalkingRouteItem_Click(object sender, EventArgs e)
method BWalkingRouteItem_MouseEnter (line 170) | private void BWalkingRouteItem_MouseEnter(object sender, EventArgs e)
method BWalkingRouteItem_MouseLeave (line 180) | private void BWalkingRouteItem_MouseLeave(object sender, EventArgs e)
method item_StepSelected (line 190) | void item_StepSelected(string stepPath, bool enlarge)
method Destination_StepEndPointSelected (line 201) | void Destination_StepEndPointSelected(BPoint bPoint)
method Origin_StepEndPointSelected (line 212) | void Origin_StepEndPointSelected(BPoint bPoint)
FILE: BMap.NET.WindowsForm/BWalkingStepItem.Designer.cs
class BWalkingStepItem (line 3) | partial class BWalkingStepItem
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/BWalkingStepItem.cs
class BWalkingStepItem (line 17) | partial class BWalkingStepItem : UserControl
method BWalkingStepItem (line 62) | public BWalkingStepItem()
method BWalkingStepItem_Paint (line 73) | private void BWalkingStepItem_Paint(object sender, PaintEventArgs e)
method BWalkingStepItem_Click (line 83) | private void BWalkingStepItem_Click(object sender, EventArgs e)
method BWalkingStepItem_MouseEnter (line 95) | private void BWalkingStepItem_MouseEnter(object sender, EventArgs e)
method BWalkingStepItem_MouseLeave (line 108) | private void BWalkingStepItem_MouseLeave(object sender, EventArgs e)
FILE: BMap.NET.WindowsForm/BaiduJSAPI_cracker.js
function bs (line 600) | function bs(cE, cG) {
function g (line 1387) | function g(cE) {
function ap (line 1556) | function ap(cD, cC, T) {
function bB (line 1572) | function bB(cD, T) {
function cn (line 1577) | function cn(T) {
function w (line 1584) | function w(T) {
function an (line 1587) | function an(cC, T) {
function bQ (line 1591) | function bQ(T) {
function aJ (line 1603) | function aJ(T) {
function ct (line 1607) | function ct(T) {
function cf (line 1612) | function cf(T) {
function cx (line 1616) | function cx() {
function ck (line 1629) | function ck(cC, T) {
function M (line 1635) | function M(T, cD) {
function W (line 1646) | function W(cC, T, cD) {
function aD (line 1653) | function aD(T) {
function G (line 1662) | function G(T) {
function aE (line 1665) | function aE(T) {
function bV (line 1668) | function bV(T) {
function b8 (line 1671) | function b8(T) {
function cA (line 1674) | function cA(T) {
function aS (line 1677) | function aS(T) {
function bN (line 1681) | function bN(cE) {
function av (line 1712) | function av() {
function bG (line 1715) | function bG() {
function az (line 1718) | function az() {
function cr (line 1753) | function cr() { }
function bn (line 1874) | function bn(T, cC) {
function aB (line 1881) | function aB(cC, T) {
function cd (line 1888) | function cd(T, cC) {
function cg (line 1932) | function cg() {
function J (line 2094) | function J(T) {
function ai (line 2132) | function ai(T) {
function cB (line 2202) | function cB(T) {
function bC (line 2260) | function bC(T) {
function aF (line 2326) | function aF(T) {
function cq (line 2360) | function cq(cC) {
function a7 (line 2478) | function a7(cD, cE, cC) {
function bF (line 2529) | function bF(T, cC) {
function b4 (line 2624) | function b4(T, cC) {
function a6 (line 2648) | function a6() { }
function bX (line 2655) | function bX() { }
function a3 (line 3835) | function a3() { }
function cv (line 3991) | function cv() { }
function bz (line 4020) | function bz() {
function cC (line 4084) | function cC(cE, cH) {
function U (line 4094) | function U() {
function cj (line 4161) | function cj() {
function cw (line 4290) | function cw(T) {
function l (line 4453) | function l(T) {
function K (line 4526) | function K(cC, cD, cE) {
function bH (line 4584) | function bH(cD, cC) {
function ac (line 4794) | function ac(cD, cC) {
function Z (line 4895) | function Z(T, cD) {
function ce (line 4994) | function ce(T, cD) {
function f (line 5039) | function f(T, cD) {
function a (line 5049) | function a(cC, T, cD) {
function bJ (line 5102) | function bJ(T) {
function bM (line 5384) | function bM(cI, T, cF, cC, cE) {
function H (line 5498) | function H(cE) {
function n (line 5523) | function n(T) {
function ax (line 5576) | function ax(T) {
function cl (line 5614) | function cl(T, cC, cD) {
function u (line 5771) | function u(cC, T) {
function aO (line 6026) | function aO(cD, cC) {
function o (line 6122) | function o(T, cC) {
function cu (line 6140) | function cu(T, cC) {
function aR (line 6148) | function aR(cC) {
function ag (line 6176) | function ag(cC) {
function b0 (line 6197) | function b0(cC) {
function bf (line 6223) | function bf(cD, cC) {
function br (line 6274) | function br(cC) {
function af (line 6312) | function af(T, cC) {
FILE: BMap.NET.WindowsForm/DrawingObjects/BCircle.cs
class BCircle (line 12) | public class BCircle : DrawingObject
method Draw (line 38) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/DrawingObjects/BDownloadRectangle.cs
class BDownloadRectangle (line 9) | public class BDownloadRectangle : DrawingObject
method Draw (line 52) | public override void Draw(Graphics g, LatLngPoint center, int zoom, Si...
FILE: BMap.NET.WindowsForm/DrawingObjects/BLine.cs
class BLine (line 12) | public class BLine : DrawingObject
method UpdateTheEnd (line 26) | public void UpdateTheEnd(LatLngPoint p)
method Draw (line 40) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/DrawingObjects/BPolygon.cs
class BPolygon (line 12) | public class BPolygon : DrawingObject
method UpdateTheEnd (line 26) | public void UpdateTheEnd(LatLngPoint p)
method Draw (line 40) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/DrawingObjects/BRectangle.cs
class BRectangle (line 12) | public class BRectangle : DrawingObject
method Draw (line 37) | public override void Draw(System.Drawing.Graphics g, LatLngPoint cente...
FILE: BMap.NET.WindowsForm/DrawingObjects/BScreenShotRectangle.cs
class BScreenShotRectangle (line 12) | public class BScreenShotRectangle : DrawingObject
method Draw (line 55) | public override void Draw(Graphics g, LatLngPoint center, int zoom, Si...
FILE: BMap.NET.WindowsForm/DrawingObjects/DrawingObject.cs
class DrawingObject (line 12) | public abstract class DrawingObject
method Draw (line 21) | public abstract void Draw(Graphics g, LatLngPoint center, int zoom, Si...
FILE: BMap.NET.WindowsForm/FunctionalControls/BTabControl.cs
class BTabControl (line 13) | public class BTabControl:TabControl
method BTabControl (line 16) | public BTabControl()
method OnPaint (line 33) | protected override void OnPaint(PaintEventArgs e)
method OnMouseMove (line 69) | protected override void OnMouseMove(MouseEventArgs e)
method OnMouseLeave (line 88) | protected override void OnMouseLeave(EventArgs e)
FILE: BMap.NET.WindowsForm/FunctionalControls/CityList.Designer.cs
class CityList (line 3) | partial class CityList
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/FunctionalControls/CityList.cs
class CityList (line 15) | partial class CityList : UserControl
method CityList (line 21) | public CityList()
method RefreshList (line 52) | public void RefreshList()
method lbl_item_Click (line 136) | void lbl_item_Click(object sender, EventArgs e)
method lbl_item_MouseLeave (line 148) | void lbl_item_MouseLeave(object sender, EventArgs e)
method lbl_item_MouseEnter (line 157) | void lbl_item_MouseEnter(object sender, EventArgs e)
type CityListMode (line 170) | enum CityListMode
class CityNode (line 178) | class CityNode
method CityNode (line 205) | public CityNode(string cityName, string cityCode, string parentCode, s...
FILE: BMap.NET.WindowsForm/LatLngPoint.cs
class LatLngPoint (line 11) | public class LatLngPoint
method LatLngPoint (line 23) | public LatLngPoint(double _lng, double _lat)
FILE: BMap.NET.WindowsForm/MapDownloadDialog.Designer.cs
class MapDownloadDialog (line 3) | partial class MapDownloadDialog
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/MapDownloadDialog.cs
class MapDownloadDialog (line 17) | public partial class MapDownloadDialog : Form
method MapDownloadDialog (line 22) | public MapDownloadDialog(LatLngPoint p1, LatLngPoint p2)
method button1_Click (line 29) | private void button1_Click(object sender, EventArgs e)
method button2_Click (line 40) | private void button2_Click(object sender, EventArgs e)
method DownloadThreadProc (line 127) | public void DownloadThreadProc(object param)
method MapDownloadDialog_Load (line 202) | private void MapDownloadDialog_Load(object sender, EventArgs e)
method linkLabel1_LinkClicked (line 207) | private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClicke...
class RectInfo (line 240) | public class RectInfo
FILE: BMap.NET.WindowsForm/MapDownloaderControl.Designer.cs
class MapDownloaderControl (line 3) | partial class MapDownloaderControl
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WindowsForm/MapDownloaderControl.cs
class MapDownloaderControl (line 21) | public partial class MapDownloaderControl : UserControl
method MapDownloaderControl (line 168) | public MapDownloaderControl()
method OnLoad (line 182) | protected override void OnLoad(EventArgs e)
method OnMouseDown (line 191) | protected override void OnMouseDown(MouseEventArgs e)
method OnMouseMove (line 221) | protected override void OnMouseMove(MouseEventArgs e)
method OnMouseUp (line 251) | protected override void OnMouseUp(MouseEventArgs e)
method OnMouseWheel (line 285) | protected override void OnMouseWheel(MouseEventArgs e)
method OnPaint (line 307) | protected override void OnPaint(PaintEventArgs e)
method Init (line 329) | private void Init()
method InitializeTiles (line 340) | private void InitializeTiles()
method DrawTiles (line 367) | private void DrawTiles(Graphics g)
method DrawMapInfo (line 382) | private void DrawMapInfo(Graphics g)
method DrawCursor (line 409) | private void DrawCursor(Graphics g)
method DrawDrawingObjects (line 434) | private void DrawDrawingObjects(Graphics g)
method DrawMapElements (line 449) | private void DrawMapElements(Graphics g)
method AddPlaces (line 460) | internal void AddPlaces(List<BPOI> places)
method ClearPlaces (line 476) | internal void ClearPlaces()
method RefreshTitles (line 488) | public void RefreshTitles()
FILE: BMap.NET.WindowsForm/PointType.cs
type PointType (line 11) | public enum PointType
FILE: BMap.NET.WindowsForm/Properties/BMap.Designer.cs
class BMap (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
method BMap (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...
FILE: BMap.NET.WindowsForm/Properties/Resources.Designer.cs
class Resources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
method Resources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...
FILE: BMap.NET.WindowsForm/RouteType.cs
type RouteType (line 11) | public enum RouteType
FILE: BMap.NET.WinformDemo/MainForm.Designer.cs
class MainForm (line 3) | partial class MainForm
method Dispose (line 14) | protected override void Dispose(bool disposing)
method InitializeComponent (line 29) | private void InitializeComponent()
FILE: BMap.NET.WinformDemo/MainForm.cs
class MainForm (line 12) | public partial class MainForm : Form
method MainForm (line 14) | public MainForm()
method button1_Click (line 23) | private void button1_Click(object sender, EventArgs e)
FILE: BMap.NET.WinformDemo/Program.cs
class Program (line 8) | static class Program
method Main (line 13) | [STAThread]
FILE: BMap.NET.WinformDemo/Properties/Resources.Designer.cs
class Resources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
method Resources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...
FILE: BMap.NET.WinformDemo/Properties/Settings.Designer.cs
class Settings (line 14) | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
FILE: BMap.NET/BMapConfiguration.cs
class BMapConfiguration (line 11) | public class BMapConfiguration
FILE: BMap.NET/HTTPService/AKSNCaculater.cs
class AKSNCaculater (line 7) | public class AKSNCaculater
method MD5 (line 14) | private static string MD5(string password)
method UrlEncode (line 35) | private static string UrlEncode(string str)
method HttpBuildQuery (line 50) | private static string HttpBuildQuery(IDictionary<string, string> query...
method CaculateAKSN (line 64) | public static string CaculateAKSN(string ak, string sk, string url, ID...
FILE: BMap.NET/HTTPService/CoordinateTransService.cs
class CoordinateTransService (line 13) | public class CoordinateTransService:ServiceBase
method CoordinateTransform (line 33) | public JObject CoordinateTransform(string source1, string source2, int...
FILE: BMap.NET/HTTPService/DirectionService.cs
class DirectionService (line 13) | public class DirectionService:ServiceBase
method DirectionByDriving (line 26) | public JObject DirectionByDriving(string origin, string destination, s...
method DirectionByWalking (line 58) | public JObject DirectionByWalking(string origin, string destination, s...
method DirectionByTransit (line 90) | public JObject DirectionByTransit(string origin, string destination, s...
FILE: BMap.NET/HTTPService/GeocodingService.cs
class GeocodingService (line 13) | public class GeocodingService:ServiceBase
method Geocoding (line 22) | public JObject Geocoding(string address)
method DeGeocoding (line 51) | public JObject DeGeocoding(string location)
FILE: BMap.NET/HTTPService/IPService.cs
class IPService (line 13) | public class IPService:ServiceBase
method LocationByIP (line 22) | public JObject LocationByIP(string ip = null)
FILE: BMap.NET/HTTPService/MapService.cs
class MapService (line 13) | public class MapService:ServiceBase
method LoadMapTile (line 30) | public Bitmap LoadMapTile(int x, int y, int zoom, MapMode map_mode, Lo...
method ClearTileCache (line 57) | public void ClearTileCache()
method TileFromCache (line 84) | private Bitmap TileFromCache(int zoom, int x, int y, MapMode map_mode)
method TileFromServer (line 119) | private Bitmap TileFromServer(int zoom, int x, int y, MapMode map_mode)
method SaveTile2Cache (line 156) | private void SaveTile2Cache(int zoom, int x, int y, MapMode map_mode, ...
FILE: BMap.NET/HTTPService/PlaceService.cs
class PlaceService (line 13) | public class PlaceService : ServiceBase
method SearchInCity (line 26) | public JObject SearchInCity(string query, string region)
method SearchInBound (line 56) | public JObject SearchInBound(string query,string bounds)
method SearchInCircle (line 87) | public JObject SearchInCircle(string query, string location, int radius)
method Detail (line 116) | public JObject Detail(string uid)
method EventSearchInBound (line 148) | public JObject EventSearchInBound(string query, string events, string ...
method EventSearchInCircle (line 181) | public JObject EventSearchInCircle(string query, string events, string...
method EventDetail (line 210) | public JObject EventDetail(string uid)
FILE: BMap.NET/HTTPService/PlaceSuggestionService.cs
class PlaceSuggestionService (line 13) | public class PlaceSuggestionService : ServiceBase
method Suggestion (line 23) | public JObject Suggestion(string query, string region)
FILE: BMap.NET/HTTPService/ServiceBase.cs
class ServiceBase (line 12) | public class ServiceBase
method DownloadString (line 22) | protected string DownloadString(string url)
method DownloadData (line 41) | protected byte[] DownloadData(string url)
FILE: BMap.NET/LoadMapMode.cs
type LoadMapMode (line 11) | public enum LoadMapMode
FILE: BMap.NET/MapMode.cs
type MapMode (line 11) | public enum MapMode
FILE: BMap.NET/Properties/BMap.Designer.cs
class BMap (line 14) | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
FILE: BMap.NET/VerificationMode.cs
type VerificationMode (line 11) | public enum VerificationMode
Condensed preview — 159 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,234K chars).
[
{
"path": ".gitattributes",
"chars": 378,
"preview": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs diff=csharp\n\n# St"
},
{
"path": ".gitignore",
"chars": 2658,
"preview": "#################\n## Eclipse\n#################\n\n*.pydevproject\n.project\n.metadata\nbin/\ntmp/\n*.tmp\n*.bak\n*.swp\n*~.nib\nloc"
},
{
"path": "BMap.NET/BMap.NET.csproj",
"chars": 3746,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microso"
},
{
"path": "BMap.NET/BMapConfiguration.cs",
"chars": 2184,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace BMap.NET\n{\n /// <su"
},
{
"path": "BMap.NET/HTTPService/AKSNCaculater.cs",
"chars": 2095,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\n\npublic class AKSNCaculater\n{\n "
},
{
"path": "BMap.NET/HTTPService/CoordinateTransService.cs",
"chars": 2286,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Newtonsoft.Json.Linq;\nusing"
},
{
"path": "BMap.NET/HTTPService/DirectionService.cs",
"chars": 5697,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Newtonsoft.Json;\nusing Newt"
},
{
"path": "BMap.NET/HTTPService/GeocodingService.cs",
"chars": 3012,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Newtonsoft.Json;\nusing Newt"
},
{
"path": "BMap.NET/HTTPService/IPService.cs",
"chars": 1716,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Newtonsoft.Json.Linq;\nusing"
},
{
"path": "BMap.NET/HTTPService/MapService.cs",
"chars": 6038,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\nusing Syste"
},
{
"path": "BMap.NET/HTTPService/PlaceService.cs",
"chars": 11692,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Newtonsoft.Json.Linq;\nusing"
},
{
"path": "BMap.NET/HTTPService/PlaceSuggestionService.cs",
"chars": 1806,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Newtonsoft.Json;\nusing Newt"
},
{
"path": "BMap.NET/HTTPService/ServiceBase.cs",
"chars": 1698,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Net;\n\nnamespace BMap"
},
{
"path": "BMap.NET/LoadMapMode.cs",
"chars": 255,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace BMap.NET\n{\n /// <su"
},
{
"path": "BMap.NET/MapMode.cs",
"chars": 301,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace BMap.NET\n{\n /// <su"
},
{
"path": "BMap.NET/Properties/AssemblyInfo.cs",
"chars": 1389,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Infor"
},
{
"path": "BMap.NET/Properties/BMap.Designer.cs",
"chars": 3213,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "BMap.NET/Properties/BMap.settings",
"chars": 921,
"preview": "<?xml version='1.0' encoding='utf-8'?>\n<SettingsFile xmlns=\"http://schemas.microsoft.com/VisualStudio/2004/01/settings\""
},
{
"path": "BMap.NET/VerificationMode.cs",
"chars": 245,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace BMap.NET\n{\n /// <su"
},
{
"path": "BMap.NET/app.config",
"chars": 2234,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<configuration>\n <configSections>\n <sectionGroup name=\"userSettings\" "
},
{
"path": "BMap.NET.DownloadDemo/BMap.NET.DownloadDemo.csproj",
"chars": 4251,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microso"
},
{
"path": "BMap.NET.DownloadDemo/MainForm.Designer.cs",
"chars": 3985,
"preview": "namespace BMap.NET.DownloadDemo\n{\n partial class MainForm\n {\n /// <summary>\n /// Required designer "
},
{
"path": "BMap.NET.DownloadDemo/MainForm.cs",
"chars": 491,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "BMap.NET.DownloadDemo/MainForm.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.DownloadDemo/Program.cs",
"chars": 462,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Windows.Forms;\n\nnamespace BMap.NET.Down"
},
{
"path": "BMap.NET.DownloadDemo/Properties/AssemblyInfo.cs",
"chars": 971,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// 有关程序集的常规信息通过以"
},
{
"path": "BMap.NET.DownloadDemo/Properties/Resources.Designer.cs",
"chars": 2469,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// 此代码由工具生成。\n/"
},
{
"path": "BMap.NET.DownloadDemo/Properties/Resources.resx",
"chars": 5494,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.DownloadDemo/Properties/Settings.Designer.cs",
"chars": 987,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// 此代码由工具生成。\n/"
},
{
"path": "BMap.NET.DownloadDemo/Properties/Settings.settings",
"chars": 240,
"preview": "<?xml version='1.0' encoding='utf-8'?>\n<SettingsFile xmlns=\"http://schemas.microsoft.com/VisualStudio/2004/01/settings\""
},
{
"path": "BMap.NET.DownloadDemo/app.config",
"chars": 141,
"preview": "<?xml version=\"1.0\"?>\n<configuration>\n<startup><supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.0\"/></star"
},
{
"path": "BMap.NET.WindowsForm/BCityControl.Designer.cs",
"chars": 7681,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BCityControl\n {\n /// <summary> \n /// Required desig"
},
{
"path": "BMap.NET.WindowsForm/BCityControl.cs",
"chars": 9685,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BCityControl.resx",
"chars": 6168,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BDirectionBoard.Designer.cs",
"chars": 9895,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BDirectionBoard\n {\n /// <summary> \n /// Required de"
},
{
"path": "BMap.NET.WindowsForm/BDirectionBoard.cs",
"chars": 30572,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BDirectionBoard.resx",
"chars": 7796,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BDrivingRouteItem.Designer.cs",
"chars": 2788,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BDrivingRouteItem\n {\n /// <summary> \n /// Required "
},
{
"path": "BMap.NET.WindowsForm/BDrivingRouteItem.cs",
"chars": 7326,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BDrivingRouteItem.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BDrivingStepItem.Designer.cs",
"chars": 3210,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BDrivingStepItem\n {\n /// <summary> \n /// Required d"
},
{
"path": "BMap.NET.WindowsForm/BDrivingStepItem.cs",
"chars": 3563,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BDrivingStepItem.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BLoadMapModeControl.Designer.cs",
"chars": 5351,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BLoadMapModeControl\n {\n /// <summary> \n /// Require"
},
{
"path": "BMap.NET.WindowsForm/BLoadMapModeControl.cs",
"chars": 2559,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BLoadMapModeControl.resx",
"chars": 6170,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BMap.NET.WindowsForm.csproj",
"chars": 17455,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microso"
},
{
"path": "BMap.NET.WindowsForm/BMapControl.Designer.cs",
"chars": 9241,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BMapControl\n {\n /// <summary> \n /// Required design"
},
{
"path": "BMap.NET.WindowsForm/BMapControl.cs",
"chars": 97640,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BMapControl.resx",
"chars": 11619,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BMapElements/BBound.cs",
"chars": 3918,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/BMapElements/BDistance.cs",
"chars": 4380,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/BMapElements/BMapElement.cs",
"chars": 605,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/BMapElements/BMarker.cs",
"chars": 2819,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\nusing Syste"
},
{
"path": "BMap.NET.WindowsForm/BMapElements/BNearBy.cs",
"chars": 1245,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace BMap.NET.WindowsForm.B"
},
{
"path": "BMap.NET.WindowsForm/BMapElements/BPOI.cs",
"chars": 2421,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Newtonsoft.Json.Linq;\nusing"
},
{
"path": "BMap.NET.WindowsForm/BMapElements/BPoint.cs",
"chars": 2249,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/BMapElements/BRoute.cs",
"chars": 15844,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing Newtonsoft.Json.Linq;\nusing"
},
{
"path": "BMap.NET.WindowsForm/BMapElements/BTile.cs",
"chars": 10787,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\nusing BMap."
},
{
"path": "BMap.NET.WindowsForm/BMarkerEditorControl.Designer.cs",
"chars": 8052,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BMarkerEditorControl\n {\n /// <summary> \n /// Requir"
},
{
"path": "BMap.NET.WindowsForm/BMarkerEditorControl.cs",
"chars": 3973,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BMarkerEditorControl.resx",
"chars": 6167,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BMarkerTipControl.Designer.cs",
"chars": 15443,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BMarkerTipControl\n {\n /// <summary> \n /// Required "
},
{
"path": "BMap.NET.WindowsForm/BMarkerTipControl.cs",
"chars": 12913,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BMarkerTipControl.resx",
"chars": 7135,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BPOITipControl.Designer.cs",
"chars": 18753,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BPOITipControl\n {\n /// <summary> \n /// Required des"
},
{
"path": "BMap.NET.WindowsForm/BPOITipControl.cs",
"chars": 13241,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BPOITipControl.resx",
"chars": 11206,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BPlaceBox.Designer.cs",
"chars": 2862,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BPlaceBox\n {\n /// <summary> \n /// Required designer"
},
{
"path": "BMap.NET.WindowsForm/BPlaceBox.cs",
"chars": 11109,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BPlaceBox.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BPlaceItem.Designer.cs",
"chars": 11016,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BPlaceItem\n {\n /// <summary> \n /// Required designe"
},
{
"path": "BMap.NET.WindowsForm/BPlaceItem.cs",
"chars": 7515,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BPlaceItem.resx",
"chars": 7059,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BPlacesBoard.Designer.cs",
"chars": 3141,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BPlacesBoard\n {\n /// <summary> \n /// Required desig"
},
{
"path": "BMap.NET.WindowsForm/BPlacesBoard.cs",
"chars": 6668,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BPlacesBoard.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BPlacesSuggestionControl.Designer.cs",
"chars": 2597,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BPlacesSuggestionControl\n {\n /// <summary> \n /// Re"
},
{
"path": "BMap.NET.WindowsForm/BPlacesSuggestionControl.cs",
"chars": 4548,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BPlacesSuggestionControl.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BPlacesSuggestionItem.Designer.cs",
"chars": 5229,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BPlacesSuggestionItem\n {\n /// <summary> \n /// Requi"
},
{
"path": "BMap.NET.WindowsForm/BPlacesSuggestionItem.cs",
"chars": 2887,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BPlacesSuggestionItem.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BPointTipControl.Designer.cs",
"chars": 12603,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BPointTipControl\n {\n /// <summary> \n /// Required d"
},
{
"path": "BMap.NET.WindowsForm/BPointTipControl.cs",
"chars": 12144,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BPointTipControl.resx",
"chars": 6167,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BQuickSearchBoardcs.Designer.cs",
"chars": 26697,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BQuickSearchBoardcs\n {\n /// <summary> \n /// Require"
},
{
"path": "BMap.NET.WindowsForm/BQuickSearchBoardcs.cs",
"chars": 1556,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BQuickSearchBoardcs.resx",
"chars": 19647,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BQuickSearchControl.Designer.cs",
"chars": 29168,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BQuickSearchControl\n {\n /// <summary> \n /// Require"
},
{
"path": "BMap.NET.WindowsForm/BQuickSearchControl.cs",
"chars": 1300,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BQuickSearchControl.resx",
"chars": 8174,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BScreenshotMenu.Designer.cs",
"chars": 4668,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BScreenshotMenu\n {\n /// <summary> \n /// Required de"
},
{
"path": "BMap.NET.WindowsForm/BScreenshotMenu.cs",
"chars": 1795,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BScreenshotMenu.resx",
"chars": 10609,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BStepStartAndEndItem.Designer.cs",
"chars": 2865,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BStepStartAndEndItem\n {\n /// <summary> \n /// Requir"
},
{
"path": "BMap.NET.WindowsForm/BStepStartAndEndItem.cs",
"chars": 2253,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BStepStartAndEndItem.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BTaxiTipControl.Designer.cs",
"chars": 2809,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BTaxiTipControl\n {\n /// <summary> \n /// Required de"
},
{
"path": "BMap.NET.WindowsForm/BTaxiTipControl.cs",
"chars": 4090,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BTaxiTipControl.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BTransitRouteItem.Designer.cs",
"chars": 2788,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BTransitRouteItem\n {\n /// <summary> \n /// Required "
},
{
"path": "BMap.NET.WindowsForm/BTransitRouteItem.cs",
"chars": 7893,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BTransitRouteItem.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BTransitStepItem.Designer.cs",
"chars": 1724,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BTransitStepItem\n {\n /// <summary> \n /// Required d"
},
{
"path": "BMap.NET.WindowsForm/BTransitStepItem.cs",
"chars": 6599,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BTransitStepItem.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BWalkingRouteItem.Designer.cs",
"chars": 2727,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BWalkingRouteItem\n {\n /// <summary> \n /// Required "
},
{
"path": "BMap.NET.WindowsForm/BWalkingRouteItem.cs",
"chars": 6716,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BWalkingRouteItem.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BWalkingStepItem.Designer.cs",
"chars": 3278,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class BWalkingStepItem\n {\n /// <summary> \n /// Required d"
},
{
"path": "BMap.NET.WindowsForm/BWalkingStepItem.cs",
"chars": 3132,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/BWalkingStepItem.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/BaiduJSAPI_cracker.js",
"chars": 200004,
"preview": "window.VTC = {\n \"ditu\": {\n \"normal\": {\n \"version\": \"087\",\n \"updateDate\": \"20150815\"\n "
},
{
"path": "BMap.NET.WindowsForm/DrawingObjects/BCircle.cs",
"chars": 2173,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/DrawingObjects/BDownloadRectangle.cs",
"chars": 2765,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/DrawingObjects/BLine.cs",
"chars": 1760,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/DrawingObjects/BPolygon.cs",
"chars": 2068,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/DrawingObjects/BRectangle.cs",
"chars": 2039,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/DrawingObjects/BScreenShotRectangle.cs",
"chars": 3159,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/DrawingObjects/DrawingObject.cs",
"chars": 611,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Drawing;\n\nnamespace "
},
{
"path": "BMap.NET.WindowsForm/FunctionalControls/BTabControl.cs",
"chars": 3457,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Windows.Forms;\nusing"
},
{
"path": "BMap.NET.WindowsForm/FunctionalControls/CityList.Designer.cs",
"chars": 2010,
"preview": "namespace BMap.NET.WindowsForm.FunctionalControls\n{\n partial class CityList\n {\n /// <summary> \n ///"
},
{
"path": "BMap.NET.WindowsForm/FunctionalControls/CityList.cs",
"chars": 7193,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/FunctionalControls/CityList.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/LatLngPoint.cs",
"chars": 496,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace BMap.NET.WindowsForm\n{"
},
{
"path": "BMap.NET.WindowsForm/MapDownloadDialog.Designer.cs",
"chars": 12927,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class MapDownloadDialog\n {\n /// <summary>\n /// Required d"
},
{
"path": "BMap.NET.WindowsForm/MapDownloadDialog.cs",
"chars": 9033,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "BMap.NET.WindowsForm/MapDownloadDialog.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/MapDownloaderControl.Designer.cs",
"chars": 950,
"preview": "namespace BMap.NET.WindowsForm\n{\n partial class MapDownloaderControl\n {\n /// <summary> \n /// 必需的设计器"
},
{
"path": "BMap.NET.WindowsForm/MapDownloaderControl.cs",
"chars": 16520,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Data;\nu"
},
{
"path": "BMap.NET.WindowsForm/PointType.cs",
"chars": 460,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace BMap.NET.WindowsForm\n{"
},
{
"path": "BMap.NET.WindowsForm/Properties/AssemblyInfo.cs",
"chars": 1413,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Infor"
},
{
"path": "BMap.NET.WindowsForm/Properties/BMap.Designer.cs",
"chars": 27449,
"preview": "//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n// This code"
},
{
"path": "BMap.NET.WindowsForm/Properties/BMap.resx",
"chars": 21302,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/Properties/Resources.Designer.cs",
"chars": 2803,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "BMap.NET.WindowsForm/Properties/Resources.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WindowsForm/Resources/baidu_citys.txt",
"chars": 7322,
"preview": "中国|1||0\n黑龙江省|2|1|1\n大兴安岭地区|38|2|2\n黑河市|39|2|2\n伊春市|40|2|2\n齐齐哈尔市|41|2|2\n佳木斯市|42|2|2\n鹤岗市|43|2|2\n绥化市|44|2|2\n双鸭山市|45|2|2\n鸡西市|46"
},
{
"path": "BMap.NET.WindowsForm/RouteType.cs",
"chars": 446,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace BMap.NET.WindowsForm\n{"
},
{
"path": "BMap.NET.WinformDemo/BMap.NET.WinformDemo.csproj",
"chars": 4237,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microso"
},
{
"path": "BMap.NET.WinformDemo/MainForm.Designer.cs",
"chars": 8284,
"preview": "namespace BMap.NET.WinformDemo\n{\n partial class MainForm\n {\n /// <summary>\n /// Required designer v"
},
{
"path": "BMap.NET.WinformDemo/MainForm.cs",
"chars": 617,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nu"
},
{
"path": "BMap.NET.WinformDemo/MainForm.resx",
"chars": 5696,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WinformDemo/Program.cs",
"chars": 492,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Windows.Forms;\n\nnamespace BMap.NET.Winf"
},
{
"path": "BMap.NET.WinformDemo/Properties/AssemblyInfo.cs",
"chars": 1413,
"preview": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Infor"
},
{
"path": "BMap.NET.WinformDemo/Properties/Resources.Designer.cs",
"chars": 2803,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "BMap.NET.WinformDemo/Properties/Resources.resx",
"chars": 5494,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n <!-- \n Microsoft ResX Schema \n \n Version 2.0\n \n The prim"
},
{
"path": "BMap.NET.WinformDemo/Properties/Settings.Designer.cs",
"chars": 1075,
"preview": "//------------------------------------------------------------------------------\n// <auto-generated>\n// This code w"
},
{
"path": "BMap.NET.WinformDemo/Properties/Settings.settings",
"chars": 240,
"preview": "<?xml version='1.0' encoding='utf-8'?>\n<SettingsFile xmlns=\"http://schemas.microsoft.com/VisualStudio/2004/01/settings\""
},
{
"path": "BMap.NET.WinformDemo/app.config",
"chars": 141,
"preview": "<?xml version=\"1.0\"?>\n<configuration>\n<startup><supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.0\"/></star"
},
{
"path": "BMap.NET.sln",
"chars": 4547,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 11.00\n# Visual Studio 2010\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C"
},
{
"path": "README.md",
"chars": 3413,
"preview": "# BMap.NET\na library for operating baidu maps,encapsulating Web Service API \nwith C# language,also contains a list of co"
},
{
"path": "licences.txt",
"chars": 660,
"preview": "The MIT License (MIT)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and"
}
]
// ... and 6 more files (download for full content)
About this extraction
This page contains the full source code of the sherlockchou86/BMap.NET GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 159 files (1.1 MB), approximately 295.7k tokens, and a symbol index with 544 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.