资源简介
[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个文件信息
相关资源
- WinFormsApp.rar
- WebBrowser(C#)DEMO
- c#上位机开发.txt
- yVD^C#实现窗体换肤完整源码.rar
- WPF中用于嵌入其他进程窗口的自定义
- zw_C#人力资源管理系统源代码.zip
- zw_cwinform用鼠标画拉出来的虚线框鼠标
- C#软件注册试用期限代码.zip
- DayLoadSet.csv
- ZY_winform创建不规则窗体和控件源码
- YU_字形轮廓提取显示C#源码.rar
- C#GDI绘图_设置笔刷.rar
- C#GDI绘图_BitMapDemo.rar
- C#GDI绘图_绘制图形.rar
- C#GDI绘图_窗体绘制文字.rar
- C#GDI绘图_Pen的使用合集.rar
- C#批量图片格式转换完整源码-jVox.ra
- Unity5实战使用C#和Unity开发多平台游戏
- AirPassengers.csv
- 刘铁猛《深入浅出WPF》全套真高清视
- C#从入门到精通第4版明日科技2017年
- WPF复制粘贴剪切功能.rar
- sa-C#自定义控件usercontrol--美化单选按
- Lx-C#自定义控件---实现带行数和标尺的
-
Af-C#操作xm
l文件完整源码.rar - NF-C#版本口令加密BAT源码.rar
- 同义词词库.csv
- test5.csv
- Asp.net网络硬盘系统源码.rar
- FitLine.cs
评论
共有 条评论