资源简介
[best]MapWinForms.rar

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//新添加命名空间
using System.Net;
using System.IO;
using System.Security.Permissions; //交互JS
namespace MapWinForms
{
[PermissionSet(SecurityAction.Demand Name = “FullTrust“)]
[System.Runtime.InteropServices.ComVisibleAttribute(true)]
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//载入加载地图
private void Form1_Load(object sender EventArgs e)
{
//本地文件 MapWinForms\bin\Debug
string url = Application.StartupPath + “\\BaiMapJS.html“;
string file = “file:///E:\\WinFormBaiduMap\\test.html“;
webBrowser1.scriptErrorsSuppressed = true; //屏蔽js相关错误
webBrowser1.Navigate(url); //导航显示本地HTML文件
}
//城市搜索
private void button1_Click(object sender EventArgs e)
{
/**
* 参考资料:
* http://bbs.csdn.net/topics/390935011
* http://www.sufeinet.com/thread-7897-1-1.html
*/
//C#调用JS函数
string city;
if (comboBox1.SelectedIndex == -1)
{
city = “北京“;
}
else
{
city = comboBox1.SelectedItem.ToString();
}
webBrowser1.Document.Invokescript(“LoadMap“ new object[] { city });
}
//车间搜索
private void button2_Click(object sender EventArgs e)
{
string city;
if (comboBox1.SelectedIndex == -1)
{
city = “北京“;
}
else
{
city = comboBox1.SelectedItem.ToString();
}
webBrowser1.Document.Invokescript(“SearchCarMap“ new object[] { city });
}
//附近热点搜索
private void button3_Click(object sender EventArgs e)
{
string city;
if (comboBox1.SelectedIndex == -1)
{
city = “北京“;
}
else
{
city = comboBox1.SelectedItem.ToString();
}
string key;
if (comboBox2.SelectedIndex == -1)
{
key = “学校“;
}
else
{
key = comboBox2.SelectedItem.ToString();
}
webBrowser1.Document.Invokescript(“SearchNearbyMap“ new object[] { city key });
}
//当前位置定位
private void button4_Click(object sender EventArgs e)
{
webBrowser1.Document.Invokescript(“LocateMyPlcae“ new object[] { });
}
//附近餐馆
pri
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 187 2016-05-15 01:17 [best] MapWinForms\MapWinForms\App.config
文件 9650 2016-05-19 00:08 [best] MapWinForms\MapWinForms\bin\Debug\BaiMapJS.html
文件 1230 2016-05-18 23:14 [best] MapWinForms\MapWinForms\bin\Debug\BaiMapJS2.html
文件 12800 2016-05-19 00:00 [best] MapWinForms\MapWinForms\bin\Debug\MapWinForms.exe
文件 187 2016-05-15 01:17 [best] MapWinForms\MapWinForms\bin\Debug\MapWinForms.exe.config
文件 32256 2016-05-19 00:00 [best] MapWinForms\MapWinForms\bin\Debug\MapWinForms.pdb
文件 22984 2016-05-19 02:01 [best] MapWinForms\MapWinForms\bin\Debug\MapWinForms.vshost.exe
文件 187 2016-05-15 01:17 [best] MapWinForms\MapWinForms\bin\Debug\MapWinForms.vshost.exe.config
文件 490 2013-06-18 20:28 [best] MapWinForms\MapWinForms\bin\Debug\MapWinForms.vshost.exe.manifest
文件 3511 2016-05-19 00:00 [best] MapWinForms\MapWinForms\Form1.cs
文件 10954 2016-05-18 23:16 [best] MapWinForms\MapWinForms\Form1.Designer.cs
文件 5817 2016-05-18 23:16 [best] MapWinForms\MapWinForms\Form1.resx
文件 3801 2016-05-15 01:20 [best] MapWinForms\MapWinForms\MapWinForms.csproj
文件 1308 2016-05-18 13:03 [best] MapWinForms\MapWinForms\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 7015 2016-05-17 02:44 [best] MapWinForms\MapWinForms\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 1416 2016-05-19 02:01 [best] MapWinForms\MapWinForms\obj\Debug\MapWinForms.csproj.FileListAbsolute.txt
文件 975 2016-05-18 23:16 [best] MapWinForms\MapWinForms\obj\Debug\MapWinForms.csproj.GenerateResource.Cache
文件 2209 2016-05-15 01:20 [best] MapWinForms\MapWinForms\obj\Debug\MapWinForms.csprojResolveAssemblyReference.cache
文件 12800 2016-05-19 00:00 [best] MapWinForms\MapWinForms\obj\Debug\MapWinForms.exe
文件 180 2016-05-18 23:16 [best] MapWinForms\MapWinForms\obj\Debug\MapWinForms.Form1.resources
文件 32256 2016-05-19 00:00 [best] MapWinForms\MapWinForms\obj\Debug\MapWinForms.pdb
文件 180 2016-05-15 01:20 [best] MapWinForms\MapWinForms\obj\Debug\MapWinForms.Properties.Resources.resources
文件 0 2016-05-15 01:17 [best] MapWinForms\MapWinForms\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
文件 0 2016-05-15 01:17 [best] MapWinForms\MapWinForms\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
文件 0 2016-05-15 01:17 [best] MapWinForms\MapWinForms\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
文件 523 2016-05-15 01:17 [best] MapWinForms\MapWinForms\Program.cs
文件 1342 2016-05-15 01:17 [best] MapWinForms\MapWinForms\Properties\AssemblyInfo.cs
文件 2874 2016-05-15 01:17 [best] MapWinForms\MapWinForms\Properties\Resources.Designer.cs
文件 5612 2016-05-15 01:17 [best] MapWinForms\MapWinForms\Properties\Resources.resx
文件 1098 2016-05-15 01:17 [best] MapWinForms\MapWinForms\Properties\Settings.Designer.cs
............此处省略15个文件信息
相关资源
- 020ASP.NET车辆综合管理系统.zip
- C# TcpListener 例程(源码)
- C# 内嵌其他exe窗体的完美封装
- PDF文件 阅读控件 (VeryPDF PDFView OCX)
- C#自定义控件案例--美化GroupBox.rar
- BouncyCastle C#源码
- C#高级编程(第10版) 百度网盘资源
- Unity5实战:使用C#和Unity开发多平台游
- zw_ASP.NET通用权限管理系统源代码含文
- 24652561RevitWPFAddin.zip
- ASP.NET网站建设实战--人民邮电出版社
- 传智播客ASP.NET[特供第三季].txt
- Winform通用经典快速开发CS框架-outloo
- C#爬取音乐源码.zip
- Rudin著第一册—阅读密码www.zasp.net_仅
- PracticalWPFChartsandGraphics.rar
- cb-9X-C#winform实现PDF阅读功能.rar
- sU-WV-C#比赛记时软件.rar
- u5-TW-C#打印操作--使用GDI绘图打印学生
- z1_C#打印操作--使用GDI绘图打印学生信
- C#打印操作--使用GDI绘图打印学生信息
- asp.net网上教学系统全站程序.zip
- C#管理学生考勤及作业登记系统
- 2321363LearnWPFMVVM-XAMLCandtheMVVMpattern.pdf
- 商品销售管理系统C#源码
- 松下PLC与C#上位机通讯库含程序.rar
- C#图书管理系统.rar
- C#基于BouncyCastle.Crypto的SM2_3实现导入即
- zw_WPF_开发教程(_中文版).zip
- asp.net进销存系统源码.rar
评论
共有 条评论