1
0
mirror of https://e.coding.net/circlecloud/SEOKeywordSearch.git synced 2024-10-31 22:38:49 +00:00

首次修改提交...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092 2015-07-30 13:27:36 +08:00
commit be29882c7d
17 changed files with 2019 additions and 0 deletions

63
.gitattributes vendored Normal file
View File

@ -0,0 +1,63 @@
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# behavior for image files
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.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

156
.gitignore vendored Normal file
View File

@ -0,0 +1,156 @@
## 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/
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/
# 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
# 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
#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml
# =========================
# Windows detritus
# =========================
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Mac desktop service store files
.DS_Store

54
Config.cs Normal file
View File

@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace AliKeywordSearch
{
class Config
{
protected string fileName;
public Config(string fileName)
{
this.fileName = fileName;
}
//将List转换为TXT文件
public void WriteListToTextFile(List<string> list)
{
//创建一个文件流用以写入或者创建一个StreamWriter
FileStream fs = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs);
sw.Flush();
// 使用StreamWriter来往文件中写入内容
sw.BaseStream.Seek(0, SeekOrigin.Begin);
for (int i = 0; i < list.Count; i++) sw.WriteLine(list[i]);
//关闭此文件t
sw.Flush();
sw.Close();
fs.Close();
}
//读取文本文件转换为List
public List<string> ReadTextFileToList()
{
FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
List<string> list = new List<string>();
StreamReader sr = new StreamReader(fs);
//使用StreamReader类来读取文件
sr.BaseStream.Seek(0, SeekOrigin.Begin);
// 从数据流中读取每一行,直到文件的最后一行
string tmp = sr.ReadLine();
while (tmp != null)
{
list.Add(tmp);
tmp = sr.ReadLine();
}
//关闭此StreamReader对象
sr.Close();
fs.Close();
return list;
}
}
}

309
Frm_Main.Designer.cs generated Normal file
View File

@ -0,0 +1,309 @@
namespace EnAliKeywordSearch
{
partial class Frm_Main
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Frm_Main));
this.SearchView = new System.Windows.Forms.DataGridView();
this.ResultView = new System.Windows.Forms.DataGridView();
this.search = new System.Windows.Forms.Button();
this.max = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.state = new System.Windows.Forms.Label();
this.saveout = new System.Windows.Forms.Button();
this.readin = new System.Windows.Forms.Button();
this.openFile = new System.Windows.Forms.OpenFileDialog();
this.saveFile = new System.Windows.Forms.SaveFileDialog();
this.clearresult = new System.Windows.Forms.Button();
this.clearsearch = new System.Windows.Forms.Button();
this.company = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.s = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.s = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.s = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.keyword = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.r = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.r = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.r = new System.Windows.Forms.DataGridViewTextBoxColumn();
this. = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.SearchView)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.ResultView)).BeginInit();
this.SuspendLayout();
//
// SearchView
//
this.SearchView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.SearchView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.company,
this.s,
this.s,
this.s,
this.keyword});
this.SearchView.Location = new System.Drawing.Point(11, 58);
this.SearchView.Name = "SearchView";
this.SearchView.RowTemplate.Height = 23;
this.SearchView.Size = new System.Drawing.Size(850, 200);
this.SearchView.TabIndex = 0;
//
// ResultView
//
this.ResultView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.ResultView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.,
this.,
this.r,
this.r,
this.r,
this.});
this.ResultView.Location = new System.Drawing.Point(11, 293);
this.ResultView.Name = "ResultView";
this.ResultView.RowTemplate.Height = 23;
this.ResultView.Size = new System.Drawing.Size(850, 300);
this.ResultView.TabIndex = 1;
//
// search
//
this.search.Location = new System.Drawing.Point(360, 10);
this.search.Name = "search";
this.search.Size = new System.Drawing.Size(152, 36);
this.search.TabIndex = 2;
this.search.Text = "查 询 关 键 词";
this.search.UseVisualStyleBackColor = true;
this.search.Click += new System.EventHandler(this.search_Click);
//
// max
//
this.max.Location = new System.Drawing.Point(663, 10);
this.max.Name = "max";
this.max.Size = new System.Drawing.Size(83, 21);
this.max.TabIndex = 3;
this.max.Text = "20";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(592, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 7;
this.label1.Text = "查询页数: ";
//
// state
//
this.state.AutoSize = true;
this.state.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.state.ForeColor = System.Drawing.SystemColors.ControlText;
this.state.Location = new System.Drawing.Point(98, 267);
this.state.Name = "state";
this.state.Size = new System.Drawing.Size(37, 14);
this.state.TabIndex = 8;
this.state.Text = "状态";
this.state.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// saveout
//
this.saveout.Location = new System.Drawing.Point(181, 29);
this.saveout.Name = "saveout";
this.saveout.Size = new System.Drawing.Size(73, 23);
this.saveout.TabIndex = 9;
this.saveout.Text = "导出关键词";
this.saveout.UseVisualStyleBackColor = true;
this.saveout.Click += new System.EventHandler(this.saveout_Click);
//
// readin
//
this.readin.Location = new System.Drawing.Point(19, 29);
this.readin.Name = "readin";
this.readin.Size = new System.Drawing.Size(73, 23);
this.readin.TabIndex = 10;
this.readin.Text = "导入关键词";
this.readin.UseVisualStyleBackColor = true;
this.readin.Click += new System.EventHandler(this.readin_Click);
//
// openFile
//
this.openFile.FileName = "openFileDialog1";
//
// clearresult
//
this.clearresult.Location = new System.Drawing.Point(19, 264);
this.clearresult.Name = "clearresult";
this.clearresult.Size = new System.Drawing.Size(73, 23);
this.clearresult.TabIndex = 11;
this.clearresult.Text = "清除结果";
this.clearresult.UseVisualStyleBackColor = true;
this.clearresult.Click += new System.EventHandler(this.clearresult_Click);
//
// clearsearch
//
this.clearsearch.Location = new System.Drawing.Point(100, 29);
this.clearsearch.Name = "clearsearch";
this.clearsearch.Size = new System.Drawing.Size(73, 23);
this.clearsearch.TabIndex = 12;
this.clearsearch.Text = "清除关键词";
this.clearsearch.UseVisualStyleBackColor = true;
this.clearsearch.Click += new System.EventHandler(this.clearsearch_Click);
//
// company
//
this.company.HeaderText = "公司网址";
this.company.Name = "company";
this.company.Width = 150;
//
// 百度s
//
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.s.DefaultCellStyle = dataGridViewCellStyle1;
this.s.HeaderText = "百度第一页";
this.s.Name = "百度s";
this.s.Width = 90;
//
// 必应s
//
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.s.DefaultCellStyle = dataGridViewCellStyle2;
this.s.HeaderText = "必应第一页";
this.s.Name = "必应s";
this.s.Width = 90;
//
// 搜狗s
//
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.s.DefaultCellStyle = dataGridViewCellStyle3;
this.s.HeaderText = "搜狗第一页";
this.s.Name = "搜狗s";
this.s.Width = 90;
//
// keyword
//
this.keyword.HeaderText = "关键词(用英文逗号隔开)";
this.keyword.Name = "keyword";
this.keyword.Width = 350;
//
// 公司名称
//
this..HeaderText = "公司网站";
this..Name = "公司名称";
this..Width = 150;
//
// 关键词
//
this..HeaderText = "关键词";
this..Name = "关键词";
this..Width = 200;
//
// 百度r
//
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.r.DefaultCellStyle = dataGridViewCellStyle4;
this.r.HeaderText = "百度";
this.r.Name = "百度r";
//
// 必应r
//
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.r.DefaultCellStyle = dataGridViewCellStyle5;
this.r.HeaderText = "必应";
this.r.Name = "必应r";
//
// 搜狗r
//
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.r.DefaultCellStyle = dataGridViewCellStyle6;
this.r.HeaderText = "搜狗";
this.r.Name = "搜狗r";
//
// 查询时间
//
this..HeaderText = "查询时间";
this..Name = "查询时间";
this..Width = 130;
//
// Frm_Main
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(872, 603);
this.Controls.Add(this.clearsearch);
this.Controls.Add(this.clearresult);
this.Controls.Add(this.readin);
this.Controls.Add(this.saveout);
this.Controls.Add(this.state);
this.Controls.Add(this.label1);
this.Controls.Add(this.max);
this.Controls.Add(this.search);
this.Controls.Add(this.ResultView);
this.Controls.Add(this.SearchView);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Frm_Main";
this.Text = "SEO排名查询软件 2015-7-30";
this.Load += new System.EventHandler(this.Frm_Main_Load);
((System.ComponentModel.ISupportInitialize)(this.SearchView)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ResultView)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataGridView SearchView;
private System.Windows.Forms.DataGridView ResultView;
private System.Windows.Forms.Button search;
private System.Windows.Forms.TextBox max;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label state;
private System.Windows.Forms.Button saveout;
private System.Windows.Forms.Button readin;
private System.Windows.Forms.OpenFileDialog openFile;
private System.Windows.Forms.SaveFileDialog saveFile;
private System.Windows.Forms.Button clearresult;
private System.Windows.Forms.Button clearsearch;
private System.Windows.Forms.DataGridViewTextBoxColumn company;
private System.Windows.Forms.DataGridViewTextBoxColumn s;
private System.Windows.Forms.DataGridViewTextBoxColumn s;
private System.Windows.Forms.DataGridViewTextBoxColumn s;
private System.Windows.Forms.DataGridViewTextBoxColumn keyword;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
private System.Windows.Forms.DataGridViewTextBoxColumn r;
private System.Windows.Forms.DataGridViewTextBoxColumn r;
private System.Windows.Forms.DataGridViewTextBoxColumn r;
private System.Windows.Forms.DataGridViewTextBoxColumn ;
}
}

212
Frm_Main.cs Normal file
View File

@ -0,0 +1,212 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using AliKeywordSearch;
using System.Web;
using System.Reflection;
namespace EnAliKeywordSearch
{
public partial class Frm_Main : Form
{
public Frm_Main()
{
InitializeComponent();
}
enum SearchType
{
[UrlValue("https://www.baidu.com/s?wd={0}&pn={1}0&ie=utf-8")]
,
[UrlValue("http://cn.bing.com/search?q={0}&first={1}1&FORM=PERE1")]
,
[UrlValue("http://www.sogou.com/web?query={0}&page={1}&ie=utf8")]
}
//360 Can'tUse url = String.Format("http://www.haosou.com/s?q={0}&pn={1}&client=aff-360daohang&ie=utf-8", HttpUtility.UrlEncode(key), i);
//BINGurl = String.Format("http://cn.bing.com/search?q={0}&first={1}1&FORM=PERE1", HttpUtility.UrlEncode(key), i - 1);
//搜狗url = String.Format("http://www.sogou.com/web?query={0}&page={1}&ie=utf8", HttpUtility.UrlEncode(key), i);
//百度url = String.Format("https://www.baidu.com/s?wd={0}&pn={1}0&ie=utf-8", HttpUtility.UrlEncode(key), i - 1);
public class UrlValue : System.Attribute
{
private string _value;
public UrlValue(string value)
{
_value = value;
}
public string Value
{
get { return _value; }
}
}
public static class UrlEnum
{
public static string GetUrl(Enum value)
{
string output = null;
Type type = value.GetType();
FieldInfo fi = type.GetField(value.ToString());
UrlValue[] attrs =
fi.GetCustomAttributes(typeof(UrlValue),
false) as UrlValue[];
if (attrs.Length > 0)
{
output = attrs[0].Value;
}
return output;
}
}
private void search_Click(object sender, EventArgs e)
{
search.Enabled = false;
state.ForeColor = Color.Black;
state.ForeColor = Color.Red;
HttpHelper httpHelper = new HttpHelper();
foreach (DataGridViewRow item in this.SearchView.Rows)
{
string cpy = item.Cells["company"].Value == null ? "" : item.Cells["company"].Value.ToString();
string keys = item.Cells["keyword"].Value == null ? "" : item.Cells["keyword"].Value.ToString();
if (cpy != "" && keys != "")
{
foreach (string key in keys.Split(','))
{
if (String.IsNullOrEmpty(key))
continue;
bool maybe = false;
int maxpage = this.ToInt(max.Text);
int index = this.ResultView.Rows.Add();
this.ResultView.FirstDisplayedScrollingRowIndex = index;
this.ResultView.Rows[index].Cells["公司名称"].Value = cpy;
this.ResultView.Rows[index].Cells["关键词"].Value = key;
state.ForeColor = Color.Black;
Application.DoEvents();
string pageinfo = string.Empty;
foreach (SearchType s in Enum.GetValues(typeof(SearchType)))
{
if (item.Cells[s.ToString() + "s"].Value == null)
item.Cells[s.ToString() + "s"].Value = 0;
state.Text = "正在 " + s.ToString() + " 查询 " + cpy + " 的关键词 " + key;
for (int i = 1; i <= maxpage; i++)
{
string url = String.Format(UrlEnum.GetUrl(s), HttpUtility.UrlEncode(key), (s.ToString() == "搜狗" ? i : i - 1));
this.ResultView.Rows[index].Cells[s.ToString() + "r"].Value = "查询第" + i + "页...";
Application.DoEvents();
string htmldoc = httpHelper.Get(url);
if (string.IsNullOrEmpty(htmldoc))
{
state.ForeColor = Color.Red;
state.Text = "关键词 " + key + " 在 " + s.ToString() + " 第 " + i + " 页 网页抓取失败 错误:" + HttpHelper.ErrMsg;
maybe = true;
continue;
}
string encodecpy = HttpUtility.HtmlEncode(cpy);
if (htmldoc.Contains(encodecpy))
{
pageinfo = "第" + i + "页";
if (i == 1)
item.Cells[s.ToString() + "s"].Value = int.Parse(item.Cells[s.ToString() + "s"].Value.ToString()) + 1;
this.ResultView.Rows[index].Cells[s.ToString() + "r"].Style.ForeColor = (i == 1 ? Color.Magenta : Color.Black);
break;
}
if (i == maxpage)
{
pageinfo = maxpage + "页以后";
break;
}
Application.DoEvents();
}
this.ResultView.Rows[index].Cells[s.ToString() + "r"].Value = pageinfo + (maybe ? "(可能不准确)" : "");
this.ResultView.Rows[index].Cells[s.ToString() + "r"].Style.ForeColor = maybe ? Color.Red : this.ResultView.Rows[index].Cells[s.ToString() + "r"].Style.ForeColor;
this.ResultView.Rows[index].Cells["查询时间"].Value = DateTime.Now.ToString();
Application.DoEvents();
}
}
}
Application.DoEvents();
}
state.ForeColor = Color.Green;
state.Text = "所有关键词查询完成!";
search.Enabled = true;
}
private int ToInt(String str)
{
int s = 0;
int.TryParse(str, out s);
return s;
}
private void Frm_Main_Load(object sender, EventArgs e)
{
}
#region
private void saveout_Click(object sender, EventArgs e)
{
SaveFileDialog cpm = new SaveFileDialog();
cpm.Filter = "查排名数据|*.cpm";
if (cpm.ShowDialog() == DialogResult.OK)
{
List<string> data = new List<string>();
foreach (DataGridViewRow item in this.SearchView.Rows)
{
string cpy = item.Cells["company"].Value == null ? "" : item.Cells["company"].Value.ToString();
string keys = item.Cells["keyword"].Value == null ? "" : item.Cells["keyword"].Value.ToString();
if (cpy != "" && keys != "")
data.Add(cpy + "|" + keys);
}
Config cfg = new Config(cpm.FileName);
cfg.WriteListToTextFile(data);
}
}
private void readin_Click(object sender, EventArgs e)
{
OpenFileDialog cpm = new OpenFileDialog();
cpm.Filter = "查排名数据|*.cpm";
if (cpm.ShowDialog() == DialogResult.OK)
{
Config cfg = new Config(cpm.FileName);
List<string> data = cfg.ReadTextFileToList();
string cpy = string.Empty;
string keys = string.Empty;
foreach (string item in data)
{
string[] str = item.Split('|');
if (str.Length == 2)
{
cpy = str[0];
keys = str[1];
int index = this.SearchView.Rows.Add();
this.SearchView.Rows[index].Cells["company"].Value = cpy;
this.SearchView.Rows[index].Cells["keyword"].Value = keys;
}
}
}
}
private void clearresult_Click(object sender, EventArgs e)
{
ResultView.Rows.Clear();
}
private void clearsearch_Click(object sender, EventArgs e)
{
SearchView.Rows.Clear();
}
#endregion
}
}

461
Frm_Main.resx Normal file
View File

@ -0,0 +1,461 @@
<?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=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>
<metadata name="company.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="百度s.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="必应s.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="搜狗s.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="keyword.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="公司名称.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="关键词.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="百度r.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="必应r.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="搜狗r.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="查询时间.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="openFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="saveFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>161, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAQAEBAAAAEACABoBQAARgAAADAwAAABACAAqCUAAK4FAAAgIAAAAQAgAKgQAABWKwAAGBgAAAEA
IACICQAA/jsAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAAAAAAAAAA////AI1Q
CwDFdBsAxHARAMRxEQDDbg4AxHYeANSvhgASo/MAEaH0ABKi8wANofQ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A0KyCAf//9gAAAAAA/enlAFmn3gJYp90AAJbx/wGW
8f4BlvH+AZbx/gGW8f4BlvH+AZbx/gCW8f+5ahP/uGQG/7dkBf+4ZAb/uWQG/7hlBv+1XQL/vGQA/+jx
9jHu+/4B1sGnA8OFOgHCgjcBwYZKAQiV8AQGlPAAAJbx/geV8f8FlfH/BpTx/waV8f8GlfH/A5Lx/wKX
8f+6Zwz8uWIA/LtjAPy6YwD8umMA/LtjAPq4WwD7vGQA/+34/yru+v8A2cKpAQAAAAAAAAAAAAAAAACX
8gMAlvIAAJby/QCV8/0AlfT3AJb0+wCV9PwAlfT8AJT2/AGW8f+9ag7/u2MA/7tkAP+7YwD/u2MA/7pk
AP24XAD+vGQA/+v1/izy//8A2cGpAgAAAAAAAAAAAAAAAAGY8wQAmPMAAJby/QGX8/8AlvL6AJfy/gCV
8v8AlvL/AJT0/wKX8f++ag3+vWQA/r1kAP68ZAD+vWUA/rxlAPy6XgD9vGQA/+v3/yvx/v8A2cOpAgAA
AAAAAAAAAAAAAAGY8gQAmPIAAJby/QCX8v8AmPP5AJfz/QCX8v4AmPL+AJb0/gGW8f/Aaw7/v2YC/79m
Af+/ZwH/v2cB/79nAv28YAD+vGQA/+r2/yzv//8A2cKoAgAAAAAAAAAAAAAAAAOa8wQDmvMAAJby/QKa
8/8BmvP6Apny/gGZ8/8CmvP/AJj1/wKX8f/FeST/xHIX/8RzFv/Ecxb/xXMW/8RzF/3BbA/+vGQA/+30
/izx//8A3catAgAAAAAAAAAAAAAAABmk8gQYpPIAAJbx/QGX8v8AlvL/AJby/wGX8v8Bl/P/AZfz/wGX
8f8A/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAMAAAADAAAAAwAAAAAAAAAAAAAAAAAAAAAMAAAAD
AAAAAwAA////AAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAA=
</value>
</data>
</root>

364
HttpHelper.cs Normal file
View File

@ -0,0 +1,364 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
namespace EnAliKeywordSearch
{
public class HttpArgs
{
public enum HttpMethod
{
GET,
POST
}
public string Url { get; set; }
public string Host { get; set; }
public int Port { get; set; }
public string Accept { get; set; }
public string Referer { get; set; }
public string Cookie { get; set; }
public string Data { get; set; }
public string UA { get; set; }
public HttpMethod Method { get; set; }
}
public class HttpHelper
{
public static int State = 0;
public static string ErrMsg = string.Empty;
/// <summary>
/// 提交方法
/// </summary>
#region HttpWebRequest & HttpWebResponse
/// <summary>
/// Get方法
/// </summary>
/// <param name="geturl">请求地址</param>
/// <param name="cookieser">Cookies存储器</param>
/// <returns>请求返回的Stream</returns>
public string Get(string url)
{
HttpArgs args = ParseURL(url);
args.Method = HttpArgs.HttpMethod.GET;
string strhtml = InternalSocketHttp(args);
return strhtml;
}
/// <summary>
/// Post方法
/// </summary>
/// <param name="posturl">请求地址</param>
/// <param name="bytes">Post数据</param>
/// <param name="cookieser">Cllkies存储器</param>
/// <returns>请求返回的流</returns>
public string Post(string url,
byte[] bytes,
CookieContainer cookies,
Encoding encoding)
{
return null;
}
/// <summary>
/// 根据Url得到host
/// </summary>
/// <param name="strUrl">url字符串</param>
/// <returns>host字符串</returns>
private HttpArgs ParseURL(string strUrl)
{
HttpArgs args = new HttpArgs();
args.Host = "";
args.Port = 80;
args.Referer = "";
args.Cookie = "";
args.Url = "";
args.Accept = "text/html";//,application/xhtml+xml,application/xml,application/json;";
args.UA = "Mozilla/5.0+(Compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)";
//http://www.alibaba.com/products/Egg_Laying_Block_Machine/1.html
int iIndex = strUrl.IndexOf(@"//");
if (iIndex <= 0)
return null;
//www.alibaba.com:80/products/Egg_Laying_Block_Machine/1.html
string nohttpurl = strUrl.Substring(iIndex + 2);
string address = nohttpurl;
iIndex = nohttpurl.IndexOf(@"/");
if (iIndex > 0)
{
//www.alibaba.com:80
address = nohttpurl.Substring(0, iIndex);
args.Url = nohttpurl.Substring(iIndex);
}
iIndex = nohttpurl.IndexOf(@":");
if (iIndex > 0)
{
string[] tempargs = nohttpurl.Trim().Split(char.Parse(":"));
args.Host = tempargs[0];
args.Port = int.Parse(tempargs[1]);
}
else
{
//www.alibaba.com:80
args.Host = address;
args.Port = 80;
}
return args;
}
#endregion
#region Socket
string InternalSocketHttp(HttpArgs args)
{
using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
{
try
{
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout, 1000);
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, 5000);
socket.Connect(args.Host, args.Port);
if (socket.Connected)
{
byte[] buff = ParseHttpArgs(args);
if (socket.Send(buff) > 0)
{
List<byte> responseBytes = new List<byte>();
byte[] buffer = new byte[1024];
int iNumber = socket.Receive(buffer, buffer.Length, SocketFlags.None);
while (iNumber > 0)//使用了Connection: Close 所以判断长度为0 时停止接受
{
responseBytes.AddRange(new List<byte>(buffer));//添加数据到List
iNumber = socket.Receive(buffer, buffer.Length, SocketFlags.None);//继续接收数据
}
return ParseResponse(responseBytes.ToArray()/*转换List为数组*/, args);
}
}
}
catch (Exception e)
{
ErrMsg = e.Message;
}
return string.Empty;
}
}
private string ParseResponse(byte[] responseBytes, HttpArgs args)
{
string responseStr = Encoding.UTF8.GetString(responseBytes);
int splitindex = responseStr.IndexOf("\r\n\r\n");
if (splitindex > 0)
{
string responseHeader = responseStr.Substring(0, splitindex);
string responseBody = responseStr.Substring(splitindex + 4);
if (responseHeader.StartsWith("HTTP/1.1 400 Bad Request"))
{
State = 400;
return string.Empty;
}
else if (responseHeader.StartsWith("HTTP/1.1 404"))
{
State = 404;
return string.Empty;
}
else if (responseHeader.StartsWith("HTTP/1.1 302") || responseHeader.StartsWith("HTTP/1.1 301"))
{
State = 302;
int start = responseHeader.ToUpper().IndexOf("LOCATION");
if (start > 0)
{
string temp = responseHeader.Substring(start, responseHeader.Length - start);
string[] sArry = Regex.Split(temp, "\r\n");
args.Url = sArry[0].Remove(0, 10);
if (args.Url == "")
return string.Empty;
return InternalSocketHttp(args); //注意302协议需要重定向
}
}
else if (responseHeader.StartsWith("HTTP/1.1 200")) //读取内容
{
State = 200;
DecompressWebPage(ref responseBytes, responseHeader);
//转码
responseBody = DecodeWebStringByHttpHeader(responseBytes, responseHeader);
responseBody = DecodeWebStringByHtmlPageInfo(responseBytes, responseBody);
}
splitindex = responseBody.IndexOf("\r\n\r\n");
if (splitindex > 0)
responseBody = responseBody.Substring(splitindex + 4);
else
responseBody = string.Empty;
return responseBody;
}
return string.Empty;
}
#endregion
#region Helper
/// <summary>
/// 解压网页
/// </summary>
/// <param name="responseBytes">网页字节数组含http头</param>
/// <param name="iTotalCount">数组长度</param>
/// <param name="strHeader">Http头字符串</param>
/// <param name="iStart">网页正文开始位置</param>
private void DecompressWebPage(ref byte[] responseBytes, string strHeader)
{
Regex regZip = new Regex(@"Content-Encoding:\s+gzip[^\n]*\r\n", RegexOptions.IgnoreCase);
if (regZip.IsMatch(strHeader))
{
responseBytes = Decompress(responseBytes);
}
}
/// <summary>
/// 解压gzip网页
/// </summary>
/// <param name="szSource">压缩过的字符串字节数组</param>
/// <returns>解压后的字节数组</returns>
private byte[] Decompress(byte[] szSource)
{
MemoryStream msSource = new MemoryStream(szSource);
//DeflateStream 也可以这儿
GZipStream stream = new GZipStream(msSource, CompressionMode.Decompress);
byte[] szTotal = new byte[40 * 1024];
long lTotal = 0;
byte[] buffer = new byte[8];
int iCount = 0;
do
{
iCount = stream.Read(buffer, 0, 8);
if (szTotal.Length <= lTotal + iCount) //放大数组
{
byte[] temp = new byte[szTotal.Length * 10];
szTotal.CopyTo(temp, 0);
szTotal = temp;
}
buffer.CopyTo(szTotal, lTotal);
lTotal += iCount;
} while (iCount != 0);
byte[] szDest = new byte[lTotal];
Array.Copy(szTotal, 0, szDest, 0, lTotal);
return szDest;
}
/// <summary>
/// 根据Http头标记里面的字符编码解析字符串
/// </summary>
/// <param name="responseBytes">网页内容字节数组(除http头以外的内容)</param>
/// <param name="iTotalCount">网页内容字节数组长度</param>
/// <param name="strHeader">http头的字符串</param>
/// <returns>转好的字符串</returns>
private string DecodeWebStringByHttpHeader(byte[] responseBytes, string strHeader)
{
string strResponse = "";
if (strHeader.Contains("charset=GBK") || strHeader.Contains("charset=gb2312"))
{
strResponse = Encoding.GetEncoding("GBK").GetString(responseBytes);
}
else
strResponse = Encoding.UTF8.GetString(responseBytes);
return strResponse;
}
/// <summary>
/// 根据网页meta标记里面的字符编码解析字符串
/// </summary>
/// <param name="responseBytes">网页内容字节数组(除http头以外的内容)</param>
/// <param name="iTotalCount">网页内容字节数组长度</param>
/// <param name="strResponse">网页内容字符串, 可能已经根据其它转码要求转换过的字符串</param>
/// <returns>转好的字符串</returns>
private string DecodeWebStringByHtmlPageInfo(byte[] responseBytes, string strResponse)
{
Regex regGB2312 = new Regex(@"<meta[^>]+Content-Type[^>]+gb2312[^>]*>", RegexOptions.IgnoreCase);
Regex regGBK = new Regex(@"<meta[^>]+Content-Type[^>]+gbk[^>]*>", RegexOptions.IgnoreCase);
Regex regBig5 = new Regex(@"<meta[^>]+Content-Type[^>]+Big5[^>]*>", RegexOptions.IgnoreCase);
if (regGB2312.IsMatch(strResponse) || regGBK.IsMatch(strResponse))
strResponse = Encoding.GetEncoding("GBK").GetString(responseBytes);
if (regBig5.IsMatch(strResponse))
strResponse = Encoding.GetEncoding("Big5").GetString(responseBytes);
return strResponse;
}
private byte[] ParseHttpArgs(HttpArgs args)
{
StringBuilder bulider = new StringBuilder();
if (args.Method == HttpArgs.HttpMethod.POST)
{
bulider.AppendLine(string.Format("POST {0} HTTP/1.1", args.Url));
bulider.AppendLine("Content-Type: application/x-www-form-urlencoded");
}
else
{
bulider.AppendLine(string.Format("GET {0} HTTP/1.1", args.Url));
}
bulider.AppendLine(string.Format("Host: {0}:{1}", args.Host, args.Port));
bulider.AppendLine("User-Agent: " + args.UA);
//"User-Agent: Mozilla/5.0+(Compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)";Mozilla/5.0 (Windows NT 6.1; IE 9.0)
if (!string.IsNullOrEmpty(args.Referer))
bulider.AppendLine(string.Format("Referer: {0}", args.Referer));
//bulider.AppendLine("Connection: close");
bulider.AppendLine("Connection: Close");
if (!string.IsNullOrEmpty(args.Accept))
bulider.AppendLine(string.Format("Accept: {0}", args.Accept));
if (!string.IsNullOrEmpty(args.Cookie))
bulider.AppendLine(string.Format("Cookie: {0}", args.Cookie));
if (args.Method == HttpArgs.HttpMethod.POST)
{
bulider.AppendLine(string.Format("Content-Length: {0}\r\n", Encoding.Default.GetBytes(args.Data).Length));
bulider.Append(args.Data);
}
else
{
bulider.Append("\r\n");
}
string header = bulider.ToString();
return Encoding.Default.GetBytes(header);
}
#endregion
}
public class MilliTimer
{
private static double times { get; set; }
public static void start()
{
times = getTotalMilliseconds();
}
public static double getTimes()
{
return getTotalMilliseconds() - times;
}
public static double getTotalMilliseconds()
{
return DateTime.Now.Subtract(DateTime.Parse("1970-1-1")).TotalMilliseconds;
}
}
}

20
Program.cs Normal file
View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace EnAliKeywordSearch
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Frm_Main());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("EnAliKeywordSearch")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("EnAliKeywordSearch")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("d436c66a-3341-44b8-8ef1-c2307ea6cbd8")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

63
Properties/Resources.Designer.cs generated Normal file
View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18444
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace SEOKeywordSearch.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("SEOKeywordSearch.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;
}
}
}
}

117
Properties/Resources.resx Normal file
View File

@ -0,0 +1,117 @@
<?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>

26
Properties/Settings.Designer.cs generated Normal file
View File

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.18444
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace SEOKeywordSearch.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.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;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?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>

32
SEOCPM.sln Normal file
View File

@ -0,0 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SEOKeywordSearch", "SEOKeywordSearch.csproj", "{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Debug|x86.ActiveCfg = Debug|Any CPU
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Release|Any CPU.Build.0 = Release|Any CPU
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

96
SEOKeywordSearch.csproj Normal file
View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{118BA2B4-EB09-4A14-A7AA-6C4350B63DC2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SEOKeywordSearch</RootNamespace>
<AssemblyName>SEOKeywordSearch</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</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|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Web" />
<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="Config.cs" />
<Compile Include="Frm_Main.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Frm_Main.Designer.cs">
<DependentUpon>Frm_Main.cs</DependentUpon>
</Compile>
<Compile Include="HttpHelper.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Frm_Main.resx">
<DependentUpon>Frm_Main.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>
<Content Include="icon.ico" />
</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>

3
app.config Normal file
View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>

BIN
icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB