├── V5_DataPublish
├── System
│ ├── Encoding.txt
│ └── ReplaceWords.txt
├── orange.ico
├── Images
│ ├── 背景.png
│ ├── 背景1.png
│ ├── 背景2.png
│ ├── pic037.gif
│ ├── pic040.gif
│ ├── pic041.gif
│ ├── pic049.gif
│ └── pic062.gif
├── Properties
│ ├── Settings.settings
│ ├── Settings1.Designer.cs
│ └── AssemblyInfo.cs
├── _Class
│ ├── Model
│ │ └── ModelWebSiteChecked.cs
│ ├── BaiduHelper
│ │ └── Model
│ │ │ └── ModelBaiduNewsHelper.cs
│ ├── WebSiteClassHelper.cs
│ ├── BLL
│ │ └── BLLDeskTopPublish.cs
│ ├── DataSource
│ │ └── PublishTaskSqlServerHelper.cs
│ ├── ModelTreeClass.cs
│ └── Common.cs
├── Forms
│ ├── Update
│ │ └── frmUpdate.cs
│ ├── frmOptionConfig.cs
│ ├── Import
│ │ ├── frmImportHttpWeb.cs
│ │ ├── frmImportXml.cs
│ │ └── frmImportText.cs
│ ├── DiyWeb
│ │ ├── TextFile1.txt
│ │ ├── ModelSiteInfo.cs
│ │ └── ListItem2.cs
│ └── WebSite
│ │ ├── frmWebSiteLogList.cs
│ │ └── frmWebSiteClassEdit.cs
├── MainEventHandler.cs
├── packages.config
├── app.config
├── Config
│ ├── SiteInfo.json
│ └── lognet4.config
├── frmSplash.cs
├── frmOption.cs
├── BaseForm.cs
├── Program.cs
├── frmLoadingDialog.cs
└── MainEvents.cs
├── V5_AULWriter
├── 3.ico
├── App.ico
├── frmAULWriter.cs
├── app.config
├── Properties
│ ├── Settings.settings
│ ├── AssemblyInfo.cs
│ ├── Settings.Designer.cs
│ └── Resources.Designer.cs
├── Program.cs
└── AutoUpdaterList.xml
├── V5_AutoUpdate
├── App.ico
├── IniFiles.cs
├── XmlFiles.cs
├── orange.ico
├── AppUpdater.cs
├── FrmUpdate.cs
├── app.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ └── Resources.Designer.cs
├── UpdateList.xml
└── Program.cs
├── V5_Libs
├── Interop.SHDocVw.dll
├── AxInterop.SHDocVw.dll
└── HTMLEditorControl.dll
├── V5_WinLibs
├── Ftp
│ ├── FTPClient.cs
│ └── FTPOperater.cs
├── Utility
│ ├── IniHelper.cs
│ ├── cPageEncode.cs
│ └── ListItem.cs
├── Controls
│ ├── Pager
│ │ └── Pager.cs
│ ├── DataGrid
│ │ ├── cMyTextLog.cs
│ │ ├── cMyDataGridView.cs
│ │ ├── DataGridViewProgressBarColumn.cs
│ │ ├── cMyDataGridView.designer.cs
│ │ └── cCopyDataGridView.designer.cs
│ ├── RichTextBox
│ │ ├── cRichTextBox.cs
│ │ └── cRichTextBox.Designer.cs
│ └── Contorls
│ │ ├── V5TabControl.cs
│ │ ├── V5LinkLabel.Designer.cs
│ │ ├── V5DataGridView.Designer.cs
│ │ ├── V5ToolTip.Designer.cs
│ │ ├── V5ToolTip.cs
│ │ ├── V5LinkLabel.cs
│ │ └── V5DataGridView.cs
├── DBUtility
│ ├── CommandInfo.cs
│ ├── DESEncrypt.cs
│ ├── DbHelperOra.cs
│ ├── DbHelperSQL.cs
│ ├── OleDbHelper.cs
│ ├── PubConstant.cs
│ ├── DbHelperOleDb.cs
│ ├── DbHelperSQLP.cs
│ └── OracleHelper.cs
├── GetMainContent
│ ├── GetMainContentHelper.cs
│ └── DistanceUtility.cs
├── DBHelper
│ └── DBObject
│ │ └── IDataBase.cs
├── IDE
│ ├── DataBase
│ │ └── Db
│ │ │ ├── MySqlHelper.cs
│ │ │ ├── TestDbHelper.cs
│ │ │ └── DataBase.cd
│ ├── HtmlCssStyle
│ │ └── HtmlCssStyleHelper.cs
│ └── Novel
│ │ └── ModelNovel.cs
├── Core
│ ├── WWWHelper.cs
│ ├── SleepHelper.cs
│ ├── cRegexHelper.cs
│ ├── CsvHelper.cs
│ ├── User32Helper.cs
│ ├── ImageDownHelper.cs
│ └── HardwareInfoHelper.cs
├── app.config
├── Expand
│ ├── cPageEncode.cs
│ └── ListItem.cs
├── packages.config
├── Config
│ └── lognet4.config
├── Html2Article
│ ├── TestHelper.cs
│ └── UrlUtility.cs
├── Properties
│ └── AssemblyInfo.cs
└── XmlConfig
│ ├── DataSourceConfig.cs
│ └── DataSourceConfigItem.cs
├── V5_DataWebBrowser
├── orange.ico
├── frmMainBrowser.cs
├── app.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ └── Resources.Designer.cs
└── Program.cs
├── V5_DataCollection
├── Images
│ ├── 背景.png
│ ├── 背景1.png
│ ├── 背景2.png
│ ├── pic037.gif
│ ├── pic040.gif
│ ├── pic041.gif
│ ├── pic049.gif
│ └── pic062.gif
├── pythonlib.zip
├── Icons
│ └── orange.ico
├── App_Data
│ ├── V5.DataCollection.db
│ └── V5_DataPublishLog.db
├── _Class
│ ├── DAL
│ │ └── DALTaskHelper.cs
│ ├── DbObjects
│ │ ├── MySql
│ │ │ └── DbObject.cs
│ │ ├── Access
│ │ │ └── DbObject.cs
│ │ └── Oracle
│ │ │ └── DbObject.cs
│ ├── BaseConfig.cs
│ ├── Gather
│ │ ├── ModelLinkUrl.cs
│ │ ├── GatherEvents.cs
│ │ └── GatherEventHandler.cs
│ ├── Common
│ │ ├── QueueHelper.cs
│ │ ├── CommonHelper.cs
│ │ └── SerializeHelper.cs
│ ├── Model
│ │ └── ModelTaskClass.cs
│ ├── Plan
│ │ └── JobDetailHelper.cs
│ ├── DataAccessHelper.cs
│ ├── WebPublishModule
│ │ └── cWebPublishModule.cs
│ └── PythonExt
│ │ └── PythonExtHelper.cs
├── App.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ └── AssemblyInfo.cs
├── BaseForm.cs
├── Forms
│ ├── Tools
│ │ ├── frmImportWebPublishModule.cs
│ │ ├── frmSQL.cs
│ │ └── frmImportWebCollectionModule.cs
│ ├── Task
│ │ ├── TaskEventHandler.cs
│ │ ├── ModelTaskIndexRegex.cs
│ │ ├── TaskIndexRegex.cs
│ │ ├── TaskData
│ │ │ ├── frmTaskDataEdit.cs
│ │ │ └── frmTaskDataList.cs
│ │ ├── frmTaskLabelRemove.cs
│ │ ├── frmTaskLabelReplace.cs
│ │ ├── TaskEvents.cs
│ │ └── DataBaseConfig
│ │ │ └── frmDataBaseConfigOracle.cs
│ └── Docking
│ │ ├── frmOutPutBox.cs
│ │ └── frmOutPutFileDown.cs
├── frmSplashForm.cs
├── packages.config
├── Config
│ └── lognet4.config
├── MainEventHandler.cs
├── frmLoadingDialog.cs
├── BaseForm.Designer.cs
└── Program.cs
├── V5_DataPublishModule
├── V5_PublishModule
│ ├── orange.ico
│ ├── Images
│ │ ├── 背景.png
│ │ ├── 背景1.png
│ │ ├── 背景2.png
│ │ ├── pic037.gif
│ │ ├── pic040.gif
│ │ ├── pic041.gif
│ │ ├── pic049.gif
│ │ └── pic062.gif
│ ├── Resources
│ │ ├── 背景.png
│ │ ├── 背景1.png
│ │ ├── 背景2.png
│ │ ├── pic037.gif
│ │ ├── pic040.gif
│ │ ├── pic041.gif
│ │ ├── pic049.gif
│ │ └── pic062.gif
│ ├── app.config
│ ├── Properties
│ │ ├── Settings.settings
│ │ ├── Settings.Designer.cs
│ │ └── AssemblyInfo.cs
│ ├── frmConfig.cs
│ ├── Program.cs
│ ├── frmConfig.Designer.cs
│ ├── frmLoginVerCode.cs
│ └── frmCreateHtml.cs
├── app.config
├── Properties
│ ├── Settings.settings
│ ├── Settings.Designer.cs
│ ├── AssemblyInfo.cs
│ └── Resources.Designer.cs
└── Program.cs
├── V5_DataPlugins
├── packages.config
├── IKeyWord.cs
├── IPublishContent.cs
├── Model
│ ├── ModelClassItem.cs
│ ├── ModelGatherItem.cs
│ ├── ModelCreateHtml.cs
│ ├── ModelPublishItem.cs
│ └── ModelRandom.cs
├── IPlugin.cs
├── IPublishTaskHelper.cs
├── EventHandler
│ └── PluginEventHandler.cs
├── Properties
│ └── AssemblyInfo.cs
└── IPublish.cs
└── README.md
/V5_DataPublish/System/Encoding.txt:
--------------------------------------------------------------------------------
1 | GB2312
2 | UTF-8
3 | ISO-8859-1
4 | BIG5
5 | Shift_JIS
--------------------------------------------------------------------------------
/V5_AULWriter/3.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_AULWriter/3.ico
--------------------------------------------------------------------------------
/V5_AULWriter/App.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_AULWriter/App.ico
--------------------------------------------------------------------------------
/V5_AutoUpdate/App.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_AutoUpdate/App.ico
--------------------------------------------------------------------------------
/V5_AutoUpdate/IniFiles.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_AutoUpdate/IniFiles.cs
--------------------------------------------------------------------------------
/V5_AutoUpdate/XmlFiles.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_AutoUpdate/XmlFiles.cs
--------------------------------------------------------------------------------
/V5_AutoUpdate/orange.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_AutoUpdate/orange.ico
--------------------------------------------------------------------------------
/V5_DataPublish/orange.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/orange.ico
--------------------------------------------------------------------------------
/V5_AutoUpdate/AppUpdater.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_AutoUpdate/AppUpdater.cs
--------------------------------------------------------------------------------
/V5_AutoUpdate/FrmUpdate.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_AutoUpdate/FrmUpdate.cs
--------------------------------------------------------------------------------
/V5_Libs/Interop.SHDocVw.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_Libs/Interop.SHDocVw.dll
--------------------------------------------------------------------------------
/V5_WinLibs/Ftp/FTPClient.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/Ftp/FTPClient.cs
--------------------------------------------------------------------------------
/V5_AULWriter/frmAULWriter.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_AULWriter/frmAULWriter.cs
--------------------------------------------------------------------------------
/V5_DataPublish/Images/背景.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/Images/背景.png
--------------------------------------------------------------------------------
/V5_DataPublish/Images/背景1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/Images/背景1.png
--------------------------------------------------------------------------------
/V5_DataPublish/Images/背景2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/Images/背景2.png
--------------------------------------------------------------------------------
/V5_DataWebBrowser/orange.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataWebBrowser/orange.ico
--------------------------------------------------------------------------------
/V5_Libs/AxInterop.SHDocVw.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_Libs/AxInterop.SHDocVw.dll
--------------------------------------------------------------------------------
/V5_Libs/HTMLEditorControl.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_Libs/HTMLEditorControl.dll
--------------------------------------------------------------------------------
/V5_WinLibs/Ftp/FTPOperater.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/Ftp/FTPOperater.cs
--------------------------------------------------------------------------------
/V5_DataCollection/Images/背景.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/Images/背景.png
--------------------------------------------------------------------------------
/V5_DataCollection/Images/背景1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/Images/背景1.png
--------------------------------------------------------------------------------
/V5_DataCollection/Images/背景2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/Images/背景2.png
--------------------------------------------------------------------------------
/V5_DataCollection/pythonlib.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/pythonlib.zip
--------------------------------------------------------------------------------
/V5_DataPublish/Images/pic037.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/Images/pic037.gif
--------------------------------------------------------------------------------
/V5_DataPublish/Images/pic040.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/Images/pic040.gif
--------------------------------------------------------------------------------
/V5_DataPublish/Images/pic041.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/Images/pic041.gif
--------------------------------------------------------------------------------
/V5_DataPublish/Images/pic049.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/Images/pic049.gif
--------------------------------------------------------------------------------
/V5_DataPublish/Images/pic062.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/Images/pic062.gif
--------------------------------------------------------------------------------
/V5_WinLibs/Utility/IniHelper.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/Utility/IniHelper.cs
--------------------------------------------------------------------------------
/V5_DataCollection/Icons/orange.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/Icons/orange.ico
--------------------------------------------------------------------------------
/V5_DataCollection/Images/pic037.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/Images/pic037.gif
--------------------------------------------------------------------------------
/V5_DataCollection/Images/pic040.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/Images/pic040.gif
--------------------------------------------------------------------------------
/V5_DataCollection/Images/pic041.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/Images/pic041.gif
--------------------------------------------------------------------------------
/V5_DataCollection/Images/pic049.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/Images/pic049.gif
--------------------------------------------------------------------------------
/V5_DataCollection/Images/pic062.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/Images/pic062.gif
--------------------------------------------------------------------------------
/V5_DataWebBrowser/frmMainBrowser.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataWebBrowser/frmMainBrowser.cs
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/Pager/Pager.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/Controls/Pager/Pager.cs
--------------------------------------------------------------------------------
/V5_WinLibs/DBUtility/CommandInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/DBUtility/CommandInfo.cs
--------------------------------------------------------------------------------
/V5_WinLibs/DBUtility/DESEncrypt.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/DBUtility/DESEncrypt.cs
--------------------------------------------------------------------------------
/V5_WinLibs/DBUtility/DbHelperOra.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/DBUtility/DbHelperOra.cs
--------------------------------------------------------------------------------
/V5_WinLibs/DBUtility/DbHelperSQL.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/DBUtility/DbHelperSQL.cs
--------------------------------------------------------------------------------
/V5_WinLibs/DBUtility/OleDbHelper.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/DBUtility/OleDbHelper.cs
--------------------------------------------------------------------------------
/V5_WinLibs/DBUtility/PubConstant.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/DBUtility/PubConstant.cs
--------------------------------------------------------------------------------
/V5_WinLibs/DBUtility/DbHelperOleDb.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/DBUtility/DbHelperOleDb.cs
--------------------------------------------------------------------------------
/V5_WinLibs/DBUtility/DbHelperSQLP.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/DBUtility/DbHelperSQLP.cs
--------------------------------------------------------------------------------
/V5_WinLibs/DBUtility/OracleHelper.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/DBUtility/OracleHelper.cs
--------------------------------------------------------------------------------
/V5_DataPublish/System/ReplaceWords.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublish/System/ReplaceWords.txt
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/DataGrid/cMyTextLog.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/Controls/DataGrid/cMyTextLog.cs
--------------------------------------------------------------------------------
/V5_DataCollection/App_Data/V5.DataCollection.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/App_Data/V5.DataCollection.db
--------------------------------------------------------------------------------
/V5_DataCollection/App_Data/V5_DataPublishLog.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataCollection/App_Data/V5_DataPublishLog.db
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/DataGrid/cMyDataGridView.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/Controls/DataGrid/cMyDataGridView.cs
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/orange.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/orange.ico
--------------------------------------------------------------------------------
/V5_WinLibs/GetMainContent/GetMainContentHelper.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/GetMainContent/GetMainContentHelper.cs
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Images/背景.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Images/背景.png
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Images/背景1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Images/背景1.png
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Images/背景2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Images/背景2.png
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Images/pic037.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Images/pic037.gif
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Images/pic040.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Images/pic040.gif
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Images/pic041.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Images/pic041.gif
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Images/pic049.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Images/pic049.gif
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Images/pic062.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Images/pic062.gif
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Resources/背景.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Resources/背景.png
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Resources/背景1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Resources/背景1.png
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Resources/背景2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Resources/背景2.png
--------------------------------------------------------------------------------
/V5_AutoUpdate/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Resources/pic037.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Resources/pic037.gif
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Resources/pic040.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Resources/pic040.gif
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Resources/pic041.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Resources/pic041.gif
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Resources/pic049.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Resources/pic049.gif
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Resources/pic062.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_DataPublishModule/V5_PublishModule/Resources/pic062.gif
--------------------------------------------------------------------------------
/V5_DataWebBrowser/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/DataGrid/DataGridViewProgressBarColumn.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qiyeyihao/V5_DataCollection/HEAD/V5_WinLibs/Controls/DataGrid/DataGridViewProgressBarColumn.cs
--------------------------------------------------------------------------------
/V5_AULWriter/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/V5_DataPlugins/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # V5数据采集器(V5_DataCollection)
2 | 网站:http://www.v5soft.com/project/collection/index
3 | QQ群:392498279
4 | V5数据采集器是一款面向个人及专业用户提供的一款专业的数据采集软件,即适用于简单化配置操作,也适应针对复杂数据采集的能力,所见即可采。 V5数据采集器独有的代理轮询采集机制,可有效的解决网站屏蔽问题,可用于互联网数据动态监控,绝对是您的首选!
5 |
--------------------------------------------------------------------------------
/V5_WinLibs/DBHelper/DBObject/IDataBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_WinLibs.DBHelper.DBObject {
7 | public interface IDataBase {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/DAL/DALTaskHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataCollection._Class.DAL {
7 | public class DALTaskHelper {
8 |
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/DbObjects/MySql/DbObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataCollection._Class.DbObjects.MySql {
7 | class DbObject {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/V5_DataCollection/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/DbObjects/Access/DbObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataCollection._Class.DbObjects.Access {
7 | class DbObject {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/DbObjects/Oracle/DbObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataCollection._Class.DbObjects.Oracle {
7 | class DbObject {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/V5_WinLibs/IDE/DataBase/Db/MySqlHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace V5_IDE._Class.DataBase.Db {
8 | class MySqlHelper {
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/V5_DataPlugins/IKeyWord.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPlugins {
7 | public interface IKeyWord {
8 | List GetKeywordList(string keyword);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/V5_AULWriter/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/V5_AutoUpdate/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/V5_DataCollection/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/V5_DataPublish/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/V5_DataWebBrowser/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/BaseConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataCollection._Class {
7 | ///
8 | /// 基本配置
9 | ///
10 | public class BaseConfig {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/V5_DataPlugins/IPublishContent.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPlugins {
7 | public interface IPublishContent {
8 | void Run(string WebSiteID, string WebSiteName, ref string Title, ref string Content);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/V5_DataPlugins/Model/ModelClassItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPlugins {
7 | public class ModelClassItem {
8 | public string ClassID { get; set; }
9 | public string ClassName { get; set; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/V5_DataPublish/_Class/Model/ModelWebSiteChecked.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPublish._Class.Model {
7 | public class ModelWebSiteChecked {
8 | public int GroupID { get; set; }
9 | public string Name { get; set; }
10 | public string Value { get; set; }
11 | public bool IsChecked { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/Update/frmUpdate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_DataPublish.Forms.Update {
11 | public partial class frmUpdate : Form {
12 | public frmUpdate() {
13 | InitializeComponent();
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/frmOptionConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace V5_DataPublish.Forms {
10 | public partial class frmOptionConfig : V5_DataPublish.BaseForm {
11 | public frmOptionConfig() {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/frmConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_PublishModule {
11 | public partial class frmConfig : Form {
12 | public frmConfig() {
13 | InitializeComponent();
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/Import/frmImportHttpWeb.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace V5_DataPublish.Forms.Import {
10 | public partial class frmImportHttpWeb : V5_DataPublish.BaseForm {
11 | public frmImportHttpWeb() {
12 | InitializeComponent();
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/V5_DataCollection/BaseForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_DataCollection {
11 | public partial class BaseForm : Form {
12 | public frmLoadingDialog loadingDialog = null;
13 | public BaseForm() {
14 | InitializeComponent();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/Gather/ModelLinkUrl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataCollection._Class.Gather {
7 | public class ModelLinkUrl {
8 | ///
9 | /// 链接
10 | ///
11 | public string Url { get; set; }
12 | ///
13 | /// 标题
14 | ///
15 | public string Title { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/V5_DataPlugins/IPlugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using V5_DataPlugins;
6 | using System.Collections;
7 |
8 | namespace V5_DataPlugins {
9 | public enum PageType {
10 |
11 | }
12 | public interface IPlugin {
13 | string PluginName { get; }
14 | Hashtable Run(PageType pagetype,Hashtable ht, string pageurl, Encoding encoding, System.Net.CookieCollection cookies);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/V5_DataPlugins/Model/ModelGatherItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPlugins {
7 | public class ModelGatherItem {
8 | public string Title { get; set; }
9 | public string Content { get; set; }
10 | public string Keyword { get; set; }
11 | public string Description { get; set; }
12 | public string OtherContent { get; set; }
13 | public string CreateTime { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/V5_AULWriter/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 |
5 | namespace AULWriter
6 | {
7 | static class Program
8 | {
9 | ///
10 | /// 应用程序的主入口点。
11 | ///
12 | [STAThread]
13 | static void Main()
14 | {
15 | Application.EnableVisualStyles();
16 | Application.SetCompatibleTextRenderingDefault(false);
17 | Application.Run(new frmAULWriter());
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/V5_DataPublishModule/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace V5_DataPublishModuleEdit {
7 | static class Program {
8 | ///
9 | /// 应用程序的主入口点。
10 | ///
11 | [STAThread]
12 | static void Main() {
13 | Application.EnableVisualStyles();
14 | Application.SetCompatibleTextRenderingDefault(false);
15 | Application.Run(new frmMain());
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/V5_DataPlugins/IPublishTaskHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using V5_DataPlugins.Model;
6 |
7 | namespace V5_DataPlugins {
8 | public interface IPublishTaskHelper {
9 | ///
10 | /// 获取数据源
11 | ///
12 | List GetDataList(string keyword);
13 | ///
14 | /// 获取数据源
15 | ///
16 | List GetDataList(string keyword, int topNum);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/V5_AutoUpdate/UpdateList.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Application autoUpdate
4 |
5 | http://localhost:8080/V5.DataPublishUpdate/
6 | 2006-2-7
7 |
8 |
9 | V5SoftDataPublish.exe
10 | .
11 | 2.2.0.0
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/V5_WinLibs/Core/WWWHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Text.RegularExpressions;
6 |
7 | namespace V5_WinLibs.Core {
8 | public class WWWHelper {
9 | public static string GetUrlDomainName(string strHtmlPagePath) {
10 | string p = @"http://[^\.]*\.(?[^/]*)";
11 | Regex reg = new Regex(p, RegexOptions.IgnoreCase);
12 | Match m = reg.Match(strHtmlPagePath);
13 | return m.Groups["domain"].Value;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/Common/QueueHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataCollection._Class.Common {
7 | ///
8 | /// 队列列表
9 | ///
10 | public class QueueHelper {
11 | public readonly static object lockObj = new object();
12 | ///
13 | /// 下载图片资源
14 | ///
15 | public static Queue> Q_DownImgResource = new Queue>();
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/V5_DataPublish/MainEventHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | namespace V5_DataPublish {
6 | public class MainEventHandler {
7 | ///
8 | /// 输出窗口
9 | ///
10 | public delegate void OutPutWindowHandler(object sender, MainEvents.OutPutWindowEventArgs e);
11 | ///
12 | /// 日志委托
13 | ///
14 | public delegate void PublishOutPutWindowHandler(object sender, MainEvents.OutPutWindowEventArgs e);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace V5_PublishModule
7 | {
8 | static class Program
9 | {
10 | ///
11 | /// 应用程序的主入口点。
12 | ///
13 | [STAThread]
14 | static void Main()
15 | {
16 | Application.EnableVisualStyles();
17 | Application.SetCompatibleTextRenderingDefault(false);
18 | Application.Run(new frmMain());
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/RichTextBox/cRichTextBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace V5_WinControls {
10 | public partial class cRichTextBox : Panel {
11 | public cRichTextBox() {
12 | InitializeComponent();
13 | }
14 |
15 | public cRichTextBox(IContainer container) {
16 | container.Add(this);
17 |
18 | InitializeComponent();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/V5_DataPublish/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/V5_DataPublish/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/V5_DataPublish/_Class/BaiduHelper/Model/ModelBaiduNewsHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPublish._Class {
7 | public class ModelBaiduNewsHelper {
8 | ///
9 | /// 采集地址
10 | ///
11 | public string Url { get; set; }
12 | ///
13 | /// 采集目录
14 | ///
15 | public string DataDir { get; set; }
16 | ///
17 | /// 分词关键词列表
18 | ///
19 | public string Keywordlist { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/V5_WinLibs/IDE/HtmlCssStyle/HtmlCssStyleHelper.cs:
--------------------------------------------------------------------------------
1 | using ScrapySharp.Extensions;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace V5_IDELibs.HtmlCssStyle {
8 | public class HtmlCssStyleHelper {
9 | public void Test() {
10 | var htmlContent = "";
11 | HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
12 | doc.LoadHtml(htmlContent);
13 | var docNode = doc.DocumentNode;
14 | var node = docNode.CssSelect("table[bx-name='tables']").FirstOrDefault();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/Gather/GatherEvents.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataCollection._Class.Gather {
7 | public class GatherEvents {
8 | ///
9 | /// 采集链接
10 | ///
11 | public class GatherLinkEvents : EventArgs {
12 | public string ID { get; set; }
13 | public string Title { get; set; }
14 | public string Url { get; set; }
15 | public string Message { get; set; }
16 | public bool IsSuccess { get; set; }
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Tools/frmImportWebPublishModule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_DataCollection.Forms.Tools {
11 | public partial class frmImportWebPublishModule : Form {
12 | public frmImportWebPublishModule() {
13 | InitializeComponent();
14 | }
15 |
16 | private void button2_Click(object sender, EventArgs e) {
17 | this.Hide();
18 | this.Close();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/V5_DataPlugins/EventHandler/PluginEventHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPlugins {
7 | public class PluginEventHandler {
8 | ///
9 | /// 回调发送结果
10 | ///
11 | ///
12 | ///
13 | ///
14 | ///
15 | ///
16 | public delegate void OutPutResult(object sender, PublishType pt, bool isLogin, string Msg, object Result);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/V5_DataPublish/Config/SiteInfo.json:
--------------------------------------------------------------------------------
1 | {
2 | "list":[
3 | {
4 | "username":"admin",
5 | "userpwd":"admin888",
6 | "title":"本地测试",
7 | "url":"http://localhost:50353/Post.aspx",
8 | "encode":"utf-8",
9 | "plugin":""
10 | },
11 | {
12 | "username":"34samu",
13 | "userpwd":"821127125",
14 | "title":"V5软件网",
15 | "url":"http://www.v5soft.com/plugins/PostContent/Post.aspx",
16 | "encode":"utf-8",
17 | "plugin":""
18 | },
19 | {
20 | "username":"test02",
21 | "userpwd":"12345789",
22 | "title":"本地测试",
23 | "url":"http://localhost:8080/post.asp",
24 | "encode":"utf-8",
25 | "plugin":""
26 | }
27 | ]
28 | }
--------------------------------------------------------------------------------
/V5_DataPublish/frmSplash.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace V5_DataPublish {
10 | public partial class frmSplash : V5_DataPublish.BaseForm {
11 | public bool IsShow { get; set; }
12 | public frmSplash() {
13 | InitializeComponent();
14 | }
15 |
16 | private void timer_Tick(object sender, EventArgs e) {
17 | this.IsShow = true;
18 | this.Close();
19 | this.Dispose();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/V5_DataCollection/frmSplashForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_DataCollection {
11 | public partial class frmSplashForm : Form {
12 | public bool IsShow { get; set; }
13 | public frmSplashForm() {
14 | InitializeComponent();
15 | }
16 | private void timer_Tick(object sender, EventArgs e) {
17 | this.IsShow = true;
18 | this.Close();
19 | this.Dispose();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/V5_AULWriter/AutoUpdaterList.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | AULWriter autoUpdate
4 |
5 | s
6 | 2007-07-03
7 |
8 |
9 | AULWriter.exe
10 | .
11 | 1.0.0.0
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/Contorls/V5TabControl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 |
7 | namespace V5_WinControls
8 | {
9 | public class V5TabControl : TabControl
10 | {
11 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
12 | {
13 | switch (keyData)
14 | {
15 | case (Keys.Tab | Keys.Control):
16 | return true;
17 | default:
18 | break;
19 | }
20 | return base.ProcessCmdKey(ref msg, keyData);
21 | }
22 |
23 |
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/Gather/GatherEventHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using V5_Model;
6 |
7 | namespace V5_DataCollection._Class.Gather {
8 | public class GatherEventHandler {
9 | ///
10 | /// 采集工作中
11 | ///
12 | ///
13 | ///
14 | public delegate void GatherWorkHandler(object sender, GatherEvents.GatherLinkEvents e);
15 | ///
16 | /// 采集完成
17 | ///
18 | ///
19 | public delegate void GatherComplateHandler(ModelTask model);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/V5_WinLibs/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/V5_WinLibs/Expand/cPageEncode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_WinLibs.Expand {
7 | public class cPageEncode {
8 | ///
9 | /// 网站编码
10 | ///
11 | ///
12 | public static List GetPageEnCode() {
13 | List items = new List();
14 | items = new List();
15 | items.Add(new ListItem("自动编码", "自动编码"));
16 | items.Add(new ListItem("utf-8", "utf-8"));
17 | items.Add(new ListItem("gb2312", "gb2312"));
18 | items.Add(new ListItem("gbk", "gbk"));
19 | return items;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/V5_WinLibs/Utility/cPageEncode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_WinUtility.Expand {
7 | public class cPageEncode {
8 | ///
9 | /// 网站编码
10 | ///
11 | ///
12 | public static List GetPageEnCode() {
13 | List items = new List();
14 | items = new List();
15 | items.Add(new ListItem("自动编码", "自动编码"));
16 | items.Add(new ListItem("utf-8", "utf-8"));
17 | items.Add(new ListItem("gb2312", "gb2312"));
18 | items.Add(new ListItem("gbk", "gbk"));
19 | return items;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/Model/ModelTaskClass.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_Model {
7 | public class ModelTaskClass {
8 | int _ClassID;
9 |
10 | public int ClassID {
11 | get { return _ClassID; }
12 | set { _ClassID = value; }
13 | }
14 | string _TreeClassName;
15 |
16 | public string TreeClassName {
17 | get { return _TreeClassName; }
18 | set { _TreeClassName = value; }
19 | }
20 | string _TreeClassReadMe;
21 |
22 | public string TreeClassReadMe {
23 | get { return _TreeClassReadMe; }
24 | set { _TreeClassReadMe = value; }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Tools/frmSQL.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using V5_DataCollection._Class.Common;
10 | using V5_WinLibs.DBHelper;
11 |
12 | namespace V5_DataCollection.Forms.Tools {
13 | public partial class frmSQL : Form {
14 | public frmSQL() {
15 | InitializeComponent();
16 | }
17 |
18 | private void btnExecute_Click(object sender, EventArgs e) {
19 | DataSet ds = SQLiteHelper.Query1(CommonHelper.SQLiteConnectionString,this.txtSQL.Text);
20 | this.dataGridView1.DataSource = ds.Tables[0].DefaultView;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/V5_WinLibs/Core/SleepHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Runtime.InteropServices;
6 | using System.Windows.Forms;
7 | namespace V5_WinLibs.Core {
8 | ///
9 | /// C#延迟函数 不要使用sleep
10 | ///
11 | public class SleepHelper {
12 | [DllImport("kernel32.dll")]
13 |
14 | static extern uint GetTickCount();
15 | ///
16 | /// 延迟函数
17 | ///
18 | /// 毫秒
19 | public static void Delay(uint ms) {
20 | uint start = GetTickCount();
21 | while (GetTickCount() - start < ms) {
22 | Application.DoEvents();
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_DataWebBrowser/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace V5.DataWebBrowser {
7 | static class Program {
8 | ///
9 | /// 应用程序的主入口点。
10 | ///
11 | [STAThread]
12 | static void Main(string[] args) {
13 | //if (args.Length > 0) {
14 | // string ss = string.Empty;
15 | // foreach (string str in args) {
16 | // ss += str + ",";
17 | // }
18 | // MessageBox.Show(ss);
19 | //}
20 |
21 | Application.EnableVisualStyles();
22 | Application.SetCompatibleTextRenderingDefault(false);
23 | Application.Run(new frmMainBrowser());
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_WinLibs/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Task/TaskEventHandler.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataCollection.Forms.Task
7 | {
8 | public class TaskEventHandler
9 | {
10 | ///
11 | /// 添加链接
12 | ///
13 | public delegate void AddLinkUrl(object sender, TaskEvents.AddLinkUrlEvents e);
14 | ///
15 | /// 添加View连接
16 | ///
17 | ///
18 | ///
19 | public delegate void AddViewLabel(object sender, TaskEvents.AddViewLabelEvents e);
20 | ///
21 | /// 任务操作
22 | ///
23 | ///
24 | ///
25 | public delegate void TaskOpHandler(object sender, TaskEvents.TaskOpEvents e);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/Common/CommonHelper.cs:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | */
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 |
9 | namespace V5_DataCollection._Class.Common {
10 | public class CommonHelper {
11 |
12 | public static frmMain FormMain = null;
13 | public static string SQLiteConnectionStringPublishLog = "System\\V5_DataPublishLog.db";
14 | public static string SQLiteConnectionString = "System\\V5.DataCollection.db";
15 | ///
16 | /// 替换标签内容
17 | ///
18 | ///
19 | public static string ReplaceSystemRegexTag(string regexContent) {
20 | regexContent = regexContent.Replace("\\(\\*)", ".+?");
21 | regexContent = regexContent.Replace("\\[参数]", "([\\S\\s]*?)");//([\\S\\s].*?) 多个一个点
22 | return regexContent;
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Task/ModelTaskIndexRegex.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using V5_Model;
6 |
7 | namespace V5_DataCollection.Forms.Task {
8 | public class ModelTaskIndexRegex {
9 | public string Guid { get; set; }
10 | ///
11 | /// 任务名称
12 | ///
13 | public string TaskName { get; set; }
14 | ///
15 | /// 任务地址
16 | ///
17 | public string TaskUrl { get; set; }
18 | ///
19 | /// 任务编码
20 | ///
21 | public string TaskEncode { get; set; }
22 | ///
23 | /// 任务Cookies
24 | ///
25 | public string TaskCookies { get; set; }
26 | ///
27 | /// 截取标签
28 | ///
29 | public List ListTaskLabel = new List();
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/Contorls/V5LinkLabel.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace V5_WinControls {
2 | partial class V5LinkLabel {
3 | ///
4 | /// 必需的设计器变量。
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// 清理所有正在使用的资源。
10 | ///
11 | /// 如果应释放托管资源,为 true;否则为 false。
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region 组件设计器生成的代码
20 |
21 | ///
22 | /// 设计器支持所需的方法 - 不要
23 | /// 使用代码编辑器修改此方法的内容。
24 | ///
25 | private void InitializeComponent() {
26 | components = new System.ComponentModel.Container();
27 | }
28 |
29 | #endregion
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/Contorls/V5DataGridView.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace V5_WinControls {
2 | partial class V5DataGridView {
3 | ///
4 | /// 必需的设计器变量。
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// 清理所有正在使用的资源。
10 | ///
11 | /// 如果应释放托管资源,为 true;否则为 false。
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region 组件设计器生成的代码
20 |
21 | ///
22 | /// 设计器支持所需的方法 - 不要
23 | /// 使用代码编辑器修改此方法的内容。
24 | ///
25 | private void InitializeComponent() {
26 | components = new System.ComponentModel.Container();
27 | }
28 |
29 | #endregion
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Task/TaskIndexRegex.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.IO;
6 | using System.Xml.Serialization;
7 |
8 | namespace V5_DataCollection.Forms.Task {
9 | public class TaskIndexRegex {
10 | public static void CreateRegexXml(ModelTaskIndexRegex model, string fileNameNotExt) {
11 | try {
12 | string fileName = AppDomain.CurrentDomain.BaseDirectory + "\\IndexFiles\\" + fileNameNotExt + ".Config";
13 | if (!File.Exists(fileName)) {
14 | File.Create(fileName);
15 | }
16 | XmlSerializer serializer = new XmlSerializer(typeof(ModelTaskIndexRegex));
17 | FileStream fs = new FileStream(fileName, FileMode.Create);
18 | serializer.Serialize(fs, model);
19 | fs.Close();
20 | }
21 | catch (Exception) {
22 |
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/Contorls/V5ToolTip.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace V5_WinControls {
2 | partial class V5ToolTip {
3 | ///
4 | /// 必需的设计器变量。
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// 清理所有正在使用的资源。
10 | ///
11 | /// 如果应释放托管资源,为 true;否则为 false。
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region 组件设计器生成的代码
20 |
21 | ///
22 | /// 设计器支持所需的方法 - 不要
23 | /// 使用代码编辑器修改此方法的内容。
24 | ///
25 | private void InitializeComponent() {
26 | this.SuspendLayout();
27 | this.ResumeLayout(false);
28 |
29 | }
30 |
31 | #endregion
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/V5_WinLibs/IDE/Novel/ModelNovel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace V5_IDE._Class.Novel {
8 | public class ModelNovel {
9 |
10 | private string _Id;
11 | ///
12 | /// 索引Id
13 | ///
14 | public string Id {
15 | get { return _Id; }
16 | set { _Id = value; }
17 | }
18 |
19 | private string _Content;
20 | ///
21 | /// 索引内容
22 | ///
23 | public string Content {
24 | get { return _Content; }
25 | set { _Content = value; }
26 | }
27 |
28 | private DateTime _CreateTime;
29 | ///
30 | /// 创建时间
31 | ///
32 | public DateTime CreateTime {
33 | get { return _CreateTime; }
34 | set { _CreateTime = value; }
35 | }
36 |
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/V5_AULWriter/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过下列属性集
6 | // 控制。更改这些属性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("AULWriter")]
9 | [assembly: AssemblyDescription("sh_liuhuashan@163.com")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Liu Hua-shan,2007")]
12 | [assembly: AssemblyProduct("AULWriter")]
13 | [assembly: AssemblyCopyright("")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 属性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("d780aff9-bf6c-40ab-b645-598230151592")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | [assembly: AssemblyVersion("1.0.8.0")]
33 | [assembly: AssemblyFileVersion("1.0.8.0")]
34 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/DataGrid/cMyDataGridView.designer.cs:
--------------------------------------------------------------------------------
1 | namespace V5_WinControls.DataGrid
2 | {
3 | partial class cMyDataGridView
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/V5_DataCollection/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/DataGrid/cCopyDataGridView.designer.cs:
--------------------------------------------------------------------------------
1 | namespace V5_WinControls.DataGrid
2 | {
3 | partial class cCopyDataGridView
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | components = new System.ComponentModel.Container();
32 | }
33 |
34 | #endregion
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/V5_DataPublish/Config/lognet4.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/V5_DataPublish/frmOption.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_DataPublish {
11 | public partial class frmOption : V5_DataPublish.BaseForm {
12 | public frmOption() {
13 | InitializeComponent();
14 | }
15 |
16 | private void btnCancel_Click(object sender, EventArgs e) {
17 | this.Close();
18 | this.Dispose();
19 | }
20 |
21 | private void frmOption_Load(object sender, EventArgs e) {
22 | this.tabControl1.Region = new Region(new RectangleF(this.tabPage1.Left, this.tabPage1.Top, this.tabPage1.Width, this.tabPage1.Height));
23 |
24 | this.tabControl1.Top = this.tabControl1.Top - 20;
25 | }
26 |
27 | private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) {
28 | this.tabControl1.SelectedIndex = int.Parse("0" + e.Node.Tag);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/V5_WinLibs/Config/lognet4.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/V5_DataCollection/Config/lognet4.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/V5_WinLibs/Html2Article/TestHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace V5_WinLibs.Html2Article {
8 | public class TestHelper {
9 |
10 | public void Test1() {
11 |
12 | var html = "";
13 |
14 | Html2Article.AppendMode = false;
15 | Stopwatch sw = new Stopwatch();
16 | sw.Start();
17 | // 将Html解析为Article结构化数据
18 | Article article = Html2Article.GetArticle(html);
19 | sw.Stop();
20 |
21 | StringBuilder sbContent = new StringBuilder();
22 | sbContent.AppendLine("提取耗时:" + Environment.NewLine + sw.ElapsedMilliseconds + "毫秒");
23 | sbContent.AppendLine(article.PublishDate.ToString());
24 | sbContent.AppendLine(article.Title);
25 | sbContent.AppendLine(article.Content);
26 | sbContent.AppendLine("内容:");
27 | sbContent.AppendLine(UrlUtility.FixUrl("#", article.ContentWithTags));
28 |
29 |
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/V5_AULWriter/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_AULWriter.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_AutoUpdate/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_AutoUpdate.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_DataPublish/Properties/Settings1.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.17929
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_DataPublish.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_DataCollection/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_DataCollection.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_DataWebBrowser/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_DataWebBrowser.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_DataPublishModule.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_WinLibs/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("V5_WinLibs")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("V5_WinLibs")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("51e0af47-6c37-4f9f-86ec-fe24543927ca")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("4.0.120.0")]
36 | [assembly: AssemblyFileVersion("4.0.120.0")]
37 |
--------------------------------------------------------------------------------
/V5_AutoUpdate/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("V5.AutoUpdate")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("V5.AutoUpdate")]
13 | [assembly: AssemblyCopyright("Copyright © 2011")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("3e9c0bac-854c-4802-a123-a830de9ee2cb")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.8.0")]
36 | [assembly: AssemblyFileVersion("1.0.8.0")]
37 |
--------------------------------------------------------------------------------
/V5_DataPlugins/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("V5_DataPlugins")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("V5_DataPlugins")]
13 | [assembly: AssemblyCopyright("Copyright © 2011")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("8f73e382-59b3-4675-81e3-1bacdb94e40c")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("4.0.104.0")]
36 | [assembly: AssemblyFileVersion("4.0.104.0")]
37 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_PublishModule.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/V5_DataWebBrowser/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("V5.DataWebBrowser")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("V5.DataWebBrowser")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("8709e42d-422b-4097-b108-2abf3cf2012b")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.8.0")]
36 | [assembly: AssemblyFileVersion("1.0.8.0")]
37 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("V5.DataPublishModuleEdit")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("V5.DataPublishModuleEdit")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("6ebf8dfb-d231-4cf5-95a1-cb9cd910c915")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.8.0")]
36 | [assembly: AssemblyFileVersion("1.0.8.0")]
37 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("V5_PublishModule")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("V5_PublishModule")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("3eb4140b-7ad9-4866-ad04-5a9aefce9c08")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.8.0")]
36 | [assembly: AssemblyFileVersion("1.0.8.0")]
37 |
--------------------------------------------------------------------------------
/V5_DataPublish/BaseForm.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 |
7 | namespace V5_DataPublish {
8 | public class BaseForm : Form {
9 |
10 | public frmLoadingDialog loadingDialog = null;
11 | public BaseForm() {
12 | InitializeComponent();
13 | //skinEngine1.SkinFile = System.Environment.CurrentDirectory + "\\skins\\" + "Emerald.ssk";
14 | }
15 |
16 | private void InitializeComponent() {
17 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BaseForm));
18 | this.SuspendLayout();
19 | //
20 | // BaseForm
21 | //
22 | this.ClientSize = new System.Drawing.Size(457, 295);
23 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
24 | this.Name = "BaseForm";
25 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
26 | this.Text = "V5站群系统";
27 | this.ResumeLayout(false);
28 |
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/V5_DataCollection/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("V5.DataCollection")]
9 | [assembly: AssemblyDescription("V5.DataCollection\r\n版本号:1.01\r\n官方网站:\r\nhttp://www.v5soft.com\r\nQQ讨论群:392498279\r\n邮箱:83112223@qq.com")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("V5.DataCollection")]
13 | [assembly: AssemblyCopyright("Copyright © 2011")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("51a8fbbf-9d7c-4818-815e-d555d0396141")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("4.0.104.0")]
36 | [assembly: AssemblyFileVersion("4.0.104.0")]
--------------------------------------------------------------------------------
/V5_WinLibs/IDE/DataBase/Db/TestDbHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace V5_IDE._Class.DataBase.Db {
8 | public class TestDbHelper {
9 | public void Test1() {
10 | var db = new SqliteHelper(@"D:\a.db");
11 | //IDataBase db = new SqliteHelper(@"Data Source=D:\V5.DataCollection.db;");
12 | //获取版本号
13 | //var ver = db.GetVersion();
14 | //获取所有数据库
15 | var l = db.GetDataBases();
16 | //获取所有表
17 | var tables = db.GetDataTables("V5_CMS");
18 | //获取所有视图
19 | var views = db.GetViews("V5_CMS");
20 | //获取所有存储过程
21 | //var pros = db.GetProcedures("V5_CMS");
22 | //获取指定库指定表的数据库结构
23 | var tbStruct = db.GetTableStruct("V5_CMS", "S_Test");
24 | //获取数据库表的脚本
25 | var sqlScript = db.CreateDataBaseScript("V5_CMS", "S_Test");
26 | //获取存储过程内容
27 | //var procContent = db.SelectProcedure("V5_CMS", "Pro_Article");
28 | //生成存储过程脚本
29 | //var procScript = db.CreateProcedureScript("V5_YiMei");
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/DiyWeb/TextFile1.txt:
--------------------------------------------------------------------------------
1 | 地址格式:http://www.xxx.com/xxx.aspx
2 |
3 |
4 | 1.发送:http://www.xxx.com/xxx?cmd=sendcontent&username=xxx&userpwd=xxx&title=xxx&content=xxxx&classid=xxx&classtitle=xxx&author=xxx&time=xxx&md5key=xxx
5 | cmd:sendcontent
6 | username:
7 | userpwd:
8 | title:
9 | content:
10 | classid:
11 | classtitle:
12 | author:
13 | time:
14 | md5key:
15 | 结果:
16 | {
17 | "code":"0"
18 | }
19 | 2.获取网站分类
20 | http://www.xxx.com/xxx?cmd=getclasslist&username=xxx&userpwd=xxx&time=xxx&md5key=xxx
21 | cmd:getclasslist
22 | username:
23 | userpwd:
24 | time:
25 | md5key:
26 | 结果:
27 | {
28 | "code":"0",
29 | "list":[
30 | {
31 | "classname":"分类1",
32 | "classid":"1",
33 | "createtime":"xxxx"
34 | },
35 | {
36 | "classname":"分类2",
37 | "classid":"2",
38 | "createtime":"xxxx"
39 | }
40 | ]
41 | }
42 | 3.网站列表格式
43 | {
44 | "list":[
45 | {
46 | "username":"test01",
47 | "userpwd":"12345789",
48 | "title":"test01",
49 | "url":"http://www.meirongdaren.com/index.aspx",
50 | "plugin":""
51 | },
52 | {
53 | "username":"test02",
54 | "userpwd":"12345789",
55 | "title":"test02",
56 | "url":"http://www.v5soft.com/index.aspx",
57 | "plugin":""
58 | }
59 | ]
60 | }
61 | 4.网站生成操作
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/DiyWeb/ModelSiteInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPublish.Forms.DiyWeb {
7 | public class ModelSiteInfo {
8 | string _userName = string.Empty;
9 |
10 | public string UserName {
11 | get { return _userName; }
12 | set { _userName = value; }
13 | }
14 | string _userPwd = string.Empty;
15 |
16 | public string UserPwd {
17 | get { return _userPwd; }
18 | set { _userPwd = value; }
19 | }
20 | string _title = string.Empty;
21 |
22 | public string Title {
23 | get { return _title; }
24 | set { _title = value; }
25 | }
26 |
27 | string _url = string.Empty;
28 |
29 | public string Url {
30 | get { return _url; }
31 | set { _url = value; }
32 | }
33 |
34 | string _encode = string.Empty;
35 |
36 | public string Encode {
37 | get { return _encode; }
38 | set { _encode = value; }
39 | }
40 |
41 | string _plugin = string.Empty;
42 |
43 | public string Plugin {
44 | get { return _plugin; }
45 | set { _plugin = value; }
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/Plan/JobDetailHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using Quartz;
6 | using V5_DataCollection._Class.Common;
7 | using V5_DataCollection._Class.DAL;
8 | using V5_DataCollection._Class.Gather;
9 | using V5_Model;
10 |
11 | namespace V5_DataCollection._Class.Plan {
12 | public class JobDetailHelper : IJob {
13 | DALTask dal = new DALTask();
14 | public void Execute(IJobExecutionContext context) {
15 | var k = context.JobDetail.Key;
16 | var j = context.JobDetail.JobDataMap.SingleOrDefault(p => p.Key == k.Name).Value as ModelTask;
17 |
18 | Console.WriteLine(context.JobDetail.Key.Name + "::::" + j.ID + "::::" + j.TaskName);
19 |
20 | var model = dal.GetModelSingleTask(j.ID);
21 | SpiderHelper Spider = new SpiderHelper();
22 | Spider.modelTask = model;
23 | Spider.GatherWorkDelegate = (object sender, GatherEvents.GatherLinkEvents e) => {
24 | CommonHelper.FormMain.OutPutWindowBox(this, new MainEvents.OutPutWindowEventArgs() {
25 | Message = e.Message
26 | });
27 | };
28 | Console.WriteLine("采集任务开始!");
29 | Spider.Start();
30 |
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/DiyWeb/ListItem2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPublish.Forms.DiyWeb {
7 |
8 | public class ListItem2 : System.Object {
9 | private object m_sValue = string.Empty;
10 | private string m_sText = string.Empty;
11 |
12 | ///
13 | /// 值
14 | ///
15 | public object Value {
16 | get { return this.m_sValue; }
17 | }
18 | ///
19 | /// 显示的文本
20 | ///
21 | public string Text {
22 | get { return this.m_sText; }
23 | }
24 |
25 | public ListItem2(object value, string text) {
26 | this.m_sValue = value;
27 | this.m_sText = text;
28 | }
29 | public override string ToString() {
30 | return this.m_sText;
31 | }
32 | public override bool Equals(System.Object obj) {
33 | if (this.GetType().Equals(obj.GetType())) {
34 | ListItem2 that = (ListItem2)obj;
35 | return (this.m_sText.Equals(that.Value));
36 | }
37 | return false;
38 | }
39 | public override int GetHashCode() {
40 | return this.m_sValue.GetHashCode(); ;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/V5_WinLibs/Html2Article/UrlUtility.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Text.RegularExpressions;
6 |
7 | namespace V5_WinLibs.Html2Article {
8 | ///
9 | /// Url处理辅助类
10 | ///
11 | public class UrlUtility {
12 | ///
13 | /// 基于baseUrl,补全html代码中的链接
14 | ///
15 | ///
16 | ///
17 | public static string FixUrl(string baseUrl, string html) {
18 | html = Regex.Replace(html, "(?is)(href|src)=(\"|\')([^(\"|\')]+)(\"|\')", (match) => {
19 | string org = match.Value;
20 | string link = match.Groups[3].Value;
21 | if (link.StartsWith("http")) {
22 | return org;
23 | }
24 |
25 | try {
26 | Uri uri = new Uri(baseUrl);
27 | Uri thisUri = new Uri(uri, link);
28 | string fullUrl = String.Format("{0}=\"{1}\"", match.Groups[1].Value, thisUri.AbsoluteUri);
29 | return fullUrl;
30 | }
31 | catch (Exception) {
32 | return org;
33 | }
34 | });
35 | return html;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/Contorls/V5ToolTip.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace V5_WinControls {
10 | public partial class V5ToolTip : Button {
11 |
12 | private string _Message = string.Empty;
13 |
14 | public string Message {
15 | get { return _Message; }
16 | set { _Message = value; }
17 | }
18 |
19 | private ToolTip _V5ToolTipControl = new ToolTip();
20 |
21 | public ToolTip V5ToolTipControl {
22 | get { return _V5ToolTipControl; }
23 | set { _V5ToolTipControl = value; }
24 | }
25 |
26 | public V5ToolTip() {
27 | InitializeComponent();
28 | }
29 |
30 | public V5ToolTip(IContainer container) {
31 | container.Add(this);
32 | InitializeComponent();
33 | }
34 |
35 | protected override void OnMouseHover(EventArgs e) {
36 | //this.V5ToolTipControl.SetToolTip(this, this.Message);
37 | base.OnMouseHover(e);
38 | }
39 |
40 | protected override void OnMouseClick(MouseEventArgs e) {
41 | this.V5ToolTipControl.SetToolTip(this, this.Message);
42 | base.OnMouseClick(e);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/V5_DataPublish/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("V5网站智能发布系统")]
9 | [assembly: AssemblyDescription("V5网站智能发布系统")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("V5网站智能发布系统")]
13 | [assembly: AssemblyCopyright("Copyright © 2011")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 | /*
17 | [assembly:log4net.Config.DOMConfigurator()]或
18 | [assembly:log4net.Config.XmlConfigurator()]
19 | */
20 | //[assembly: log4net.Config.XmlConfigurator(Watch=true)]
21 | //[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log.config", Watch = true)]
22 | // 将 ComVisible 设置为 false 使此程序集中的类型
23 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
24 | // 则将该类型上的 ComVisible 特性设置为 true。
25 | [assembly: ComVisible(false)]
26 |
27 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
28 | [assembly: Guid("1fd5c361-7bd8-4413-bbea-9feac9e7b12a")]
29 |
30 | // 程序集的版本信息由下面四个值组成:
31 | //
32 | // 主版本
33 | // 次版本
34 | // 内部版本号
35 | // 修订号
36 | //
37 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
38 | // 方法是按如下所示使用“*”:
39 | // [assembly: AssemblyVersion("1.0.*")]
40 | [assembly: AssemblyVersion("1.0.8.0")]
41 | [assembly: AssemblyFileVersion("1.0.8.0")]
42 |
--------------------------------------------------------------------------------
/V5_DataPlugins/Model/ModelCreateHtml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPlugins.Model {
7 | ///
8 | /// 生成静态
9 | ///
10 | [Serializable]
11 | public class ModelCreateHtml {
12 | string _CreateName = string.Empty;
13 | ///
14 | /// 名称
15 | ///
16 | public string CreateName {
17 | get { return _CreateName; }
18 | set { _CreateName = value; }
19 | }
20 | string _CreateHtmlUrl = string.Empty;
21 | ///
22 | /// 生成地址
23 | ///
24 | public string CreateHtmlUrl {
25 | get { return _CreateHtmlUrl; }
26 | set { _CreateHtmlUrl = value; }
27 | }
28 | string _CreateHtmlRefUrl = string.Empty;
29 | ///
30 | /// 生成来源
31 | ///
32 | public string CreateHtmlRefUrl {
33 | get { return _CreateHtmlRefUrl; }
34 | set { _CreateHtmlRefUrl = value; }
35 | }
36 | string _CreateHtmlPostData = string.Empty;
37 | ///
38 | /// 来源地址
39 | ///
40 | public string CreateHtmlPostData {
41 | get { return _CreateHtmlPostData; }
42 | set { _CreateHtmlPostData = value; }
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/V5_WinLibs/Expand/ListItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_WinLibs.Expand
7 | {
8 | public class ListItem : System.Object
9 | {
10 | private string m_sValue = string.Empty;
11 | private string m_sText = string.Empty;
12 |
13 | ///
14 | /// 值
15 | ///
16 | public string Value
17 | {
18 | get { return this.m_sValue; }
19 | }
20 | ///
21 | /// 显示的文本
22 | ///
23 | public string Text
24 | {
25 | get { return this.m_sText; }
26 | }
27 |
28 | public ListItem(string value, string text)
29 | {
30 | this.m_sValue = value;
31 | this.m_sText = text;
32 | }
33 | public override string ToString()
34 | {
35 | return this.m_sText;
36 | }
37 | public override bool Equals(System.Object obj)
38 | {
39 | if (this.GetType().Equals(obj.GetType()))
40 | {
41 | ListItem that = (ListItem)obj;
42 | return (this.m_sText.Equals(that.Value));
43 | }
44 | return false;
45 | }
46 | public override int GetHashCode()
47 | {
48 | return this.m_sValue.GetHashCode(); ;
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/V5_WinLibs/Utility/ListItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_WinUtility.Expand
7 | {
8 | public class ListItem : System.Object
9 | {
10 | private string m_sValue = string.Empty;
11 | private string m_sText = string.Empty;
12 |
13 | ///
14 | /// 值
15 | ///
16 | public string Value
17 | {
18 | get { return this.m_sValue; }
19 | }
20 | ///
21 | /// 显示的文本
22 | ///
23 | public string Text
24 | {
25 | get { return this.m_sText; }
26 | }
27 |
28 | public ListItem(string value, string text)
29 | {
30 | this.m_sValue = value;
31 | this.m_sText = text;
32 | }
33 | public override string ToString()
34 | {
35 | return this.m_sText;
36 | }
37 | public override bool Equals(System.Object obj)
38 | {
39 | if (this.GetType().Equals(obj.GetType()))
40 | {
41 | ListItem that = (ListItem)obj;
42 | return (this.m_sText.Equals(that.Value));
43 | }
44 | return false;
45 | }
46 | public override int GetHashCode()
47 | {
48 | return this.m_sValue.GetHashCode(); ;
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/V5_AutoUpdate/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace V5.AutoUpdate {
7 | static class Program {
8 | ///
9 | /// 应用程序的主入口点。
10 | ///
11 | [STAThread]
12 | static void Main(string[] args) {
13 | //String temp = "";
14 | //string song, singer, path;
15 | //int head, tail;
16 | //// 合并命令行参数
17 | //for (int i = 0; i < args.Length; i++) {
18 | // MessageBox.Show(args[i]);
19 | // temp += args[i];
20 | // temp += " ";
21 | //}
22 | //MessageBox.Show(temp);
23 | //try {
24 | // // 解析合并后的命令行
25 | // head = temp.IndexOf('|', 0);
26 | // song = temp.Substring(0, head);
27 | // MessageBox.Show(song);
28 | // head += 1;
29 | // tail = temp.IndexOf('|', head);
30 | // singer = temp.Substring(head, tail - head);
31 | // MessageBox.Show(singer);
32 | // path = temp.Substring(tail + 1);
33 | // MessageBox.Show(path);
34 | //}
35 | //catch { }
36 |
37 | Application.EnableVisualStyles();
38 | Application.SetCompatibleTextRenderingDefault(false);
39 | Application.Run(new FrmUpdate());
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/V5_DataPublish/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 | using V5_Utility.Core;
6 | using V5_Utility;
7 |
8 | namespace V5_DataPublish {
9 | static class Program {
10 | ///
11 | /// 应用程序的主入口点。
12 | ///
13 | [STAThread]
14 | static void Main() {
15 | //try
16 | {
17 | bool isAppRunning = false;
18 | System.Threading.Mutex mutex = new System.Threading.Mutex(
19 | true,
20 | System.Diagnostics.Process.GetCurrentProcess().ProcessName,
21 | out isAppRunning);
22 | if (!isAppRunning) {
23 | MessageBox.Show("本程序已经在运行了,请不要重复运行!");
24 | Environment.Exit(1);
25 | }
26 | else {
27 | Application.EnableVisualStyles();
28 | Application.SetCompatibleTextRenderingDefault(false);
29 | frmSplash fromSplash = new frmSplash();
30 | Application.Run(fromSplash);
31 | if (fromSplash.IsShow) {
32 | Application.Run(new frmMain());
33 | }
34 | }
35 | }
36 | //catch (Exception ex) {
37 | // MessageBox.Show(ex.Message);
38 | // Log4Helper.Write(LogLevel.Error, ex);
39 | //}
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/V5_DataCollection/MainEventHandler.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace V5_DataCollection {
3 | ///
4 | ///
5 | ///
6 | public class MainEventHandler {
7 | ///
8 | /// 输出窗口
9 | ///
10 | ///
11 | ///
12 | public delegate void OutPutWindowHandler(object sender, MainEvents.OutPutWindowEventArgs e);
13 |
14 | ///
15 | /// 任务进度条
16 | ///
17 | ///
18 | ///
19 | public delegate void OutPutTaskProgressBarHandler(object sender, MainEvents.OutPutTaskProgressBarEventArgs e);
20 |
21 | ///
22 | ///任务树委托
23 | ///
24 | ///
25 | ///
26 | public delegate void TreeViewEventHandler(object sender, MainEvents.TreeViewEventArgs e);
27 |
28 | ///
29 | /// 公共委托
30 | ///
31 | ///
32 | ///
33 | public delegate void CommonEventHandler(object sender, MainEvents.CommonEventArgs e);
34 |
35 | ///
36 | /// 数据操作委托
37 | ///
38 | ///
39 | ///
40 | public delegate void DataOperationHandler(object sender, MainEvents.DataOperationArgs e);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/V5_DataPublish/frmLoadingDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_DataPublish {
11 | public partial class frmLoadingDialog : Form {
12 | private static Color borderColor = Color.FromArgb(0, 0, 0);
13 | private static Color headerColor = Color.FromArgb(211, 219, 222);
14 |
15 | public frmLoadingDialog() {
16 | InitializeComponent();
17 | }
18 |
19 | private void SetSelfLocation() {
20 | if (this.OwnedForms == null || this.OwnedForms.Length == 0) return;
21 |
22 | Form owner = this.OwnedForms[0];
23 | if (owner == null) return;
24 |
25 | this.Location = new Point(owner.Location.X + owner.Size.Width / 3, owner.Location.Y + owner.Size.Height / 3);
26 | }
27 |
28 | protected override void OnPaint(PaintEventArgs e) {
29 | base.OnPaint(e);
30 | ControlPaint.DrawBorder(e.Graphics, ClientRectangle, borderColor, ButtonBorderStyle.Solid);
31 | e.Graphics.FillRectangle(new SolidBrush(headerColor), 1, 1, this.Size.Width - 2, 26);
32 | }
33 |
34 | public int Percentage {
35 | set {
36 | this.lblPercentage.Text = value + "%";
37 | }
38 | }
39 |
40 | private void LoadingDialog_Load(object sender, EventArgs e) {
41 | SetSelfLocation();
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/V5_DataCollection/frmLoadingDialog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_DataCollection {
11 | public partial class frmLoadingDialog : Form {
12 | private static Color borderColor = Color.FromArgb(0, 0, 0);
13 | private static Color headerColor = Color.FromArgb(211, 219, 222);
14 |
15 | public frmLoadingDialog() {
16 | InitializeComponent();
17 | }
18 |
19 | private void SetSelfLocation() {
20 | if (this.OwnedForms == null || this.OwnedForms.Length == 0) return;
21 |
22 | Form owner = this.OwnedForms[0];
23 | if (owner == null) return;
24 |
25 | this.Location = new Point(owner.Location.X + owner.Size.Width / 3, owner.Location.Y + owner.Size.Height / 3);
26 | }
27 |
28 | protected override void OnPaint(PaintEventArgs e) {
29 | base.OnPaint(e);
30 | ControlPaint.DrawBorder(e.Graphics, ClientRectangle, borderColor, ButtonBorderStyle.Solid);
31 | e.Graphics.FillRectangle(new SolidBrush(headerColor), 1, 1, this.Size.Width - 2, 26);
32 | }
33 |
34 | public int Percentage {
35 | set {
36 | this.lblPercentage.Text = value + "%";
37 | }
38 | }
39 |
40 | private void LoadingDialog_Load(object sender, EventArgs e) {
41 | SetSelfLocation();
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/V5_WinLibs/XmlConfig/DataSourceConfig.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Xml.Serialization;
6 | using System.IO;
7 |
8 | namespace V5_WinLibs.XmlConfig {
9 | public class DataSourceConfig {
10 | static string dataSourceXmlConfigUrl = AppDomain.CurrentDomain.BaseDirectory + "/Config/DataSourceConfig.config";
11 |
12 |
13 | public static void SaveXmlConfig(DataSourceConfigItem model) {
14 | if (!File.Exists(dataSourceXmlConfigUrl)) {
15 | File.Create(dataSourceXmlConfigUrl).Close();
16 | }
17 | XmlSerializer serializer = new XmlSerializer(typeof(DataSourceConfigItem));
18 | FileStream fs = new FileStream(dataSourceXmlConfigUrl, FileMode.Create);
19 | serializer.Serialize(fs, model);
20 | fs.Close();
21 | }
22 |
23 | public static DataSourceConfigItem GetXmlConfig() {
24 | DataSourceConfigItem model = new DataSourceConfigItem();
25 | if (!File.Exists(dataSourceXmlConfigUrl)) {
26 | return model;
27 | }
28 | XmlSerializer serializer = new XmlSerializer(typeof(DataSourceConfigItem));
29 | try {
30 | string fileName = dataSourceXmlConfigUrl;
31 | FileStream fs = new FileStream(fileName, FileMode.Open);
32 | model = (DataSourceConfigItem)serializer.Deserialize(fs);
33 | fs.Close();
34 | }
35 | catch { }
36 | return model;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Docking/frmOutPutBox.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using WeifenLuo.WinFormsUI.Docking;
10 |
11 | namespace V5_DataCollection.Forms.Docking {
12 | public partial class frmOutPutBox : DockContent {
13 |
14 | public frmOutPutBox() {
15 | InitializeComponent();
16 |
17 | this.txtOutWindowString.Dock = DockStyle.Fill;
18 | }
19 | ///
20 | /// 日志输出
21 | ///
22 | ///
23 | ///
24 | public void OutPutWindow(object sender, MainEvents.OutPutWindowEventArgs e) {
25 | if (this.txtOutWindowString.InvokeRequired) {
26 | this.txtOutWindowString.BeginInvoke(new MethodInvoker(delegate() {
27 | this.txtOutWindowString.AppendText("【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "】 " + e.Message);
28 | this.txtOutWindowString.AppendText("\r\n");
29 | }));
30 | }
31 | else {
32 | this.txtOutWindowString.AppendText("【" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "】 " + e.Message);
33 | this.txtOutWindowString.AppendText("\r\n");
34 | }
35 | }
36 |
37 | private void toolStripButton_ContentClear_Click(object sender, EventArgs e) {
38 | this.txtOutWindowString.Clear();
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/V5_WinLibs/IDE/DataBase/Db/DataBase.cd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | _Class\DataBase\Db\SqlServerHelper.cs
12 |
13 |
14 |
15 |
16 |
17 | _Class\DataBase\Db\SqlServerHelper.cs
18 |
19 |
20 |
21 |
22 |
23 | AIgAAAAECAAAooQANAmQQAQAAQEAAAgJAEAKACAAAIA=
24 | _Class\DataBase\Db\SqlServerHelper.cs
25 |
26 |
27 |
28 |
29 |
30 |
31 | AIgAAAAECAAAIgQANAGQQAQAAQAAAAgBAEAIACAAAIA=
32 | _Class\DataBase\Db\IDataBase.cs
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/V5_DataCollection/BaseForm.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace V5_DataCollection {
2 | partial class BaseForm {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Windows Form Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.SuspendLayout();
27 | //
28 | // BaseForm
29 | //
30 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
31 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
32 | this.ClientSize = new System.Drawing.Size(503, 250);
33 | this.Name = "BaseForm";
34 | this.ShowInTaskbar = false;
35 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
36 | this.Text = "V5软件采集系统";
37 | this.ResumeLayout(false);
38 |
39 | }
40 |
41 | #endregion
42 | }
43 | }
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/frmConfig.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace V5_PublishModule {
2 | partial class frmConfig {
3 | ///
4 | /// Required designer variable.
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// Clean up any resources being used.
10 | ///
11 | /// true if managed resources should be disposed; otherwise, false.
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region Windows Form Designer generated code
20 |
21 | ///
22 | /// Required method for Designer support - do not modify
23 | /// the contents of this method with the code editor.
24 | ///
25 | private void InitializeComponent() {
26 | this.SuspendLayout();
27 | //
28 | // frmPublishModuleConfig
29 | //
30 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
31 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
32 | this.ClientSize = new System.Drawing.Size(575, 277);
33 | this.Name = "frmPublishModuleConfig";
34 | this.ShowIcon = false;
35 | this.ShowInTaskbar = false;
36 | this.Text = "frmPublishModuleConfig";
37 | this.ResumeLayout(false);
38 |
39 | }
40 |
41 | #endregion
42 | }
43 | }
--------------------------------------------------------------------------------
/V5_DataPublish/MainEvents.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPublish {
7 | ///
8 | /// 系统事件
9 | ///
10 | public class MainEvents {
11 | ///
12 | /// 委托操作类型
13 | ///
14 | public enum OutPutWindowType {
15 | Option,
16 | Collecton,
17 | Publish
18 | }
19 | ///
20 | /// 输入出委托参数
21 | ///
22 | public class OutPutWindowEventArgs : EventArgs {
23 | private string _Message = string.Empty;
24 | private OutPutWindowType _OutPutWindowType;
25 | private object oData;
26 | #region Model
27 | ///
28 | /// 信息
29 | ///
30 | public string Message {
31 | get { return _Message; }
32 | set {
33 | if (!string.IsNullOrEmpty(value))
34 | _Message = "【" + DateTime.Now + "】 " + value;
35 | }
36 | }
37 | ///
38 | /// 委托类型
39 | ///
40 | public OutPutWindowType OutPutWindowType {
41 | get { return _OutPutWindowType; }
42 | set { _OutPutWindowType = value; }
43 | }
44 | ///
45 | /// 返回数据
46 | ///
47 | public object OData {
48 | get { return oData; }
49 | set { oData = value; }
50 | }
51 | #endregion
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/V5_WinLibs/GetMainContent/DistanceUtility.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace V5_WinLibs.GetMainContent {
4 | // Levenshtein Distance Algorithm: C# Implementation
5 | //by Lasse Johansen
6 |
7 | #region Nested type: Distance
8 |
9 | public class DistanceUtility {
10 | ///
11 | /// Compute Levenshtein distance
12 | ///
13 | /// String 1
14 | /// String 2
15 | /// Distance between the two strings.
16 | /// The larger the number, the bigger the difference.
17 | ///
18 | public static int LD(string s, string t) {
19 | int n = s.Length; //length of s
20 | int m = t.Length; //length of t
21 | int[,] d = new int[n + 1, m + 1]; // matrix
22 | int cost; // cost
23 |
24 | // Step 1
25 | if (n == 0) return m;
26 | if (m == 0) return n;
27 |
28 | // Step 2
29 | for (int i = 0; i <= n; d[i, 0] = i++) ;
30 | for (int j = 0; j <= m; d[0, j] = j++) ;
31 |
32 | // Step 3
33 | for (int i = 1; i <= n; i++) {
34 | //Step 4
35 | for (int j = 1; j <= m; j++) {
36 | // Step 5
37 | cost = (t.Substring(j - 1, 1) == s.Substring(i - 1, 1) ? 0 : 1);
38 | // Step 6
39 | d[i, j] = Math.Min(Math.Min(d[i - 1, j] + 1, d[i, j - 1] + 1),
40 | d[i - 1, j - 1] + cost);
41 | }
42 | }
43 |
44 | // Step 7
45 | return d[n, m];
46 | }
47 | }
48 | #endregion
49 | }
50 |
--------------------------------------------------------------------------------
/V5_DataPublish/_Class/WebSiteClassHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPublish._Class {
7 | public class WebSiteClassHelper {
8 |
9 | #region Model
10 | private int _id;
11 | private int? _websiteid;
12 | private int? _classid;
13 | private string _classname;
14 | private string _keywordlist;
15 | private string _adddatetime;
16 | ///
17 | ///
18 | ///
19 | public int ID {
20 | set { _id = value; }
21 | get { return _id; }
22 | }
23 | ///
24 | ///
25 | ///
26 | public int? WebSiteID {
27 | set { _websiteid = value; }
28 | get { return _websiteid; }
29 | }
30 | ///
31 | ///
32 | ///
33 | public int? ClassID {
34 | set { _classid = value; }
35 | get { return _classid; }
36 | }
37 | ///
38 | ///
39 | ///
40 | public string ClassName {
41 | set { _classname = value; }
42 | get { return _classname; }
43 | }
44 | ///
45 | ///
46 | ///
47 | public string KeywordList {
48 | set { _keywordlist = value; }
49 | get { return _keywordlist; }
50 | }
51 | ///
52 | ///
53 | ///
54 | public string AddDateTime {
55 | set { _adddatetime = value; }
56 | get { return _adddatetime; }
57 | }
58 | #endregion Model
59 |
60 |
61 |
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Docking/frmOutPutFileDown.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Net;
8 | using System.Text;
9 | using System.Threading;
10 | using System.Windows.Forms;
11 | using V5_DataCollection._Class.Common;
12 | using V5_WinLibs.Utility;
13 | using WeifenLuo.WinFormsUI.Docking;
14 |
15 | namespace V5_DataCollection.Forms.Docking {
16 | public partial class frmOutPutFileDown : DockContent {
17 |
18 | public frmOutPutFileDown() {
19 | InitializeComponent();
20 | }
21 |
22 | private void frmOutPutFileDown_Load(object sender, EventArgs e) {
23 | var th = new ThreadMultiHelper(1, 1);
24 | th.WorkMethod += th_WorkMethod;
25 | th.CompleteEvent += th_CompleteEvent;
26 | th.Start();
27 | }
28 |
29 | void th_CompleteEvent() {
30 |
31 | }
32 |
33 | void th_WorkMethod(int taskindex, int threadindex) {
34 | while (true) {
35 | Dictionary d = null;
36 | lock (QueueHelper.lockObj) {
37 | if (QueueHelper.Q_DownImgResource.Count > 0) {
38 | d = QueueHelper.Q_DownImgResource.Dequeue();
39 | }
40 | }
41 | if (d != null) {
42 | OutDownload(d.ToString());
43 | }
44 | Thread.Sleep(100);
45 | }
46 | }
47 |
48 |
49 | private void OutDownload(string msg) {
50 | this.Invoke(new MethodInvoker(() => {
51 | this.txtLogView.AppendText(msg);
52 | this.txtLogView.AppendText("\r\n");
53 | }));
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/Common/SerializeHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Xml.Serialization;
7 |
8 | namespace V5_DataCollection._Class.Common {
9 | public class SerializeHelper {
10 | ///
11 | /// 获取未处理完的队列
12 | ///
13 | private T DeserializeObject() {
14 | T t = default(T);
15 | XmlSerializer serializer = new XmlSerializer(typeof(T));
16 | try {
17 | string apppath = AppDomain.CurrentDomain.BaseDirectory;
18 | string fileName = apppath + "Config\\MtBuf.config";
19 | FileStream fs = new FileStream(fileName, FileMode.Open);
20 | t = (T)serializer.Deserialize(fs);
21 | fs.Close();
22 | }
23 | catch {
24 | }
25 | return t;
26 | }
27 | ///
28 | /// 保存未处理完的队列
29 | ///
30 | private bool SerializeObject(T ListBuf) {
31 | try {
32 | string apppath = AppDomain.CurrentDomain.BaseDirectory;
33 | string fileName = apppath + "Config\\MtBuf.config";
34 | if (!File.Exists(fileName)) {
35 | File.Create(fileName).Close();
36 | }
37 | lock (this) {
38 | XmlSerializer serializer = new XmlSerializer(typeof(T));
39 | FileStream fs = new FileStream(fileName, FileMode.Create);
40 | serializer.Serialize(fs, ListBuf);
41 | fs.Close();
42 | }
43 | return true;
44 | }
45 | catch {
46 | }
47 | return false;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/V5_DataPlugins/Model/ModelPublishItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | namespace V5_DataPlugins.Model {
6 | [Serializable]
7 | public class ModelPublishItem {
8 | private String m_Url;
9 | private String m_Title;
10 | private String m_Content;
11 | private String m_Abstract;
12 | private DateTime m_Time;
13 | ///
14 | /// 链接
15 | ///
16 | public String Url {
17 | get {
18 | return m_Url;
19 | }
20 | set {
21 | m_Url = value;
22 | }
23 | }
24 |
25 | ///
26 | /// 标题
27 | ///
28 | public String Title {
29 | get {
30 | return m_Title;
31 | }
32 | set {
33 | m_Title = value;
34 | }
35 | }
36 |
37 | ///
38 | /// 正文
39 | ///
40 | public String Content {
41 | get {
42 | return m_Content;
43 | }
44 | set {
45 | m_Content = value;
46 | }
47 | }
48 |
49 | ///
50 | /// 搜索摘要
51 | ///
52 | public String Abstract {
53 | get {
54 | return m_Abstract;
55 | }
56 | set {
57 | m_Abstract = value;
58 | }
59 | }
60 |
61 |
62 | ///
63 | /// 发布时间
64 | ///
65 | public DateTime Time {
66 | get {
67 | return m_Time;
68 | }
69 | set {
70 | m_Time = value;
71 | }
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/RichTextBox/cRichTextBox.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace V5_WinControls {
2 | partial class cRichTextBox {
3 | ///
4 | /// 必需的设计器变量。
5 | ///
6 | private System.ComponentModel.IContainer components = null;
7 |
8 | ///
9 | /// 清理所有正在使用的资源。
10 | ///
11 | /// 如果应释放托管资源,为 true;否则为 false。
12 | protected override void Dispose(bool disposing) {
13 | if (disposing && (components != null)) {
14 | components.Dispose();
15 | }
16 | base.Dispose(disposing);
17 | }
18 |
19 | #region 组件设计器生成的代码
20 |
21 | ///
22 | /// 设计器支持所需的方法 - 不要
23 | /// 使用代码编辑器修改此方法的内容。
24 | ///
25 | private void InitializeComponent() {
26 | this.richTextBox1 = new System.Windows.Forms.RichTextBox();
27 | this.SuspendLayout();
28 | //
29 | // richTextBox1
30 | //
31 | this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
32 | this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
33 | this.richTextBox1.Location = new System.Drawing.Point(0, 0);
34 | this.richTextBox1.Name = "richTextBox1";
35 | this.richTextBox1.Size = new System.Drawing.Size(100, 96);
36 | this.richTextBox1.TabIndex = 0;
37 | this.richTextBox1.Text = "";
38 | //
39 | // cRichTextBox
40 | //
41 | this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
42 | this.ResumeLayout(false);
43 |
44 | }
45 |
46 | #endregion
47 |
48 | private System.Windows.Forms.RichTextBox richTextBox1;
49 |
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/Contorls/V5LinkLabel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace V5_WinControls {
10 | public partial class V5LinkLabel : LinkLabel {
11 |
12 | V5RichTextBox _RichTextBox = new V5RichTextBox();
13 |
14 | public V5RichTextBox RichTextBox {
15 | get { return _RichTextBox; }
16 | set { _RichTextBox = value; }
17 | }
18 |
19 |
20 | string _LabelValue = string.Empty;
21 |
22 | public string LabelValue {
23 | get { return _LabelValue; }
24 | set { _LabelValue = value; }
25 | }
26 | public V5LinkLabel() {
27 | InitializeComponent();
28 | }
29 |
30 | public V5LinkLabel(IContainer container) {
31 | container.Add(this);
32 |
33 | InitializeComponent();
34 | }
35 | private ToolTip _V5ToolTipControl = new ToolTip();
36 | protected override void OnMouseClick(MouseEventArgs e) {
37 | string s = LabelValue;
38 | int startPos = this.RichTextBox.SelectionStart;
39 | int l = this.RichTextBox.SelectionLength;
40 |
41 | this.RichTextBox.Text = this.RichTextBox.Text.Substring(0, startPos) + s + this.RichTextBox.Text.Substring(startPos + l, this.RichTextBox.Text.Length - startPos - l);
42 |
43 | this.RichTextBox.SelectionStart = startPos + s.Length;
44 | this.RichTextBox.ScrollToCaret();
45 | //
46 |
47 | base.OnMouseClick(e);
48 | }
49 |
50 | protected override void OnMouseHover(EventArgs e) {
51 | this._V5ToolTipControl.SetToolTip(this, "注意两边空格!");
52 | base.OnMouseHover(e);
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/V5_WinLibs/XmlConfig/DataSourceConfigItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_WinLibs.XmlConfig {
7 | [Serializable]
8 | public class DataSourceConfigItem {
9 | int _DataSourceType = 0;
10 | ///
11 | /// 数据源类型
12 | ///
13 | public int DataSourceType {
14 | get { return _DataSourceType; }
15 | set { _DataSourceType = value; }
16 | }
17 |
18 | int _DataBaseType = 0;
19 | ///
20 | /// 自定义数据保存类型
21 | ///
22 | public int DataBaseType {
23 | get { return _DataBaseType; }
24 | set { _DataBaseType = value; }
25 | }
26 |
27 | string _DataBaseUrl = string.Empty;
28 | ///
29 | /// 自定义数据库连接地址
30 | ///
31 | public string DataBaseUrl {
32 | get { return _DataBaseUrl; }
33 | set { _DataBaseUrl = value; }
34 | }
35 | string _SelectSql = string.Empty;
36 | ///
37 | /// 查询语句
38 | ///
39 | public string SelectSql {
40 | get { return _SelectSql; }
41 | set { _SelectSql = value; }
42 | }
43 |
44 | string _IndexDataDir = string.Empty;
45 | ///
46 | /// 索引库目录
47 | ///
48 | public string IndexDataDir {
49 | get { return _IndexDataDir; }
50 | set { _IndexDataDir = value; }
51 | }
52 |
53 | string _RemoteDataUrl = string.Empty;
54 | ///
55 | /// 网络数据库地址
56 | ///
57 | public string RemoteDataUrl {
58 | get { return _RemoteDataUrl; }
59 | set { _RemoteDataUrl = value; }
60 | }
61 |
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/DataAccessHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Reflection;
6 | using System.Configuration;
7 | using V5_WinLibs.Core;
8 |
9 | namespace V5_DataCollection._Class {
10 | ///
11 | /// 数据IOC注入
12 | ///
13 | public static class DataAccessHelper {
14 | public static readonly string AssemblyPath = "V5_DAL." + ConfigurationManager.AppSettings["dbType"];
15 | public static readonly string DbType = ConfigurationManager.AppSettings["dbType"];
16 | static CacheManageHelper cache = CacheManageHelper.Instance;
17 | ///
18 | /// 创建对象或从缓存获取
19 | ///
20 | public static object CreateObject(string AssemblyPath, string ClassNamespace) {
21 | object objType = cache.Get(ClassNamespace);//从缓存读取
22 | if (objType == null) {
23 | try {
24 | objType = Assembly.Load(AssemblyPath).CreateInstance(ClassNamespace);//反射创建
25 | cache.Add(ClassNamespace, objType);// 写入缓存
26 | }
27 | catch { }
28 | }
29 | return objType;
30 | }
31 | private static object GetIDAL(object obj1, object obj2, object obj3, string DALName) {
32 | object objType;
33 | if (DbType == "OleDb") {
34 | objType = obj1;
35 | }
36 | else if (DbType == "SqlServer") {
37 | objType = obj2;
38 | }
39 | else if (DbType == "SQLite") {
40 | objType = obj2;
41 | }
42 | else {
43 | string ClassNamespace = AssemblyPath + "." + DALName;
44 | objType = CreateObject(AssemblyPath, ClassNamespace);
45 | }
46 | return objType;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/WebSite/frmWebSiteLogList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using V5_DataPublish._Class;
9 | using System.IO;
10 | using V5_WinLibs.DBHelper;
11 |
12 | namespace V5_DataPublish.Forms.WebSite {
13 | public partial class frmWebSiteLogList : BaseForm {
14 |
15 | public delegate void OptionOk(object sender, string message, Common.Option o);
16 | public OptionOk OO;
17 |
18 | WebSiteHelper _modelSite = null;
19 |
20 | public WebSiteHelper ModelSite {
21 | get { return _modelSite; }
22 | set { _modelSite = value; }
23 | }
24 |
25 | public frmWebSiteLogList() {
26 | InitializeComponent();
27 | }
28 |
29 | private void frmWebSiteLogList_Load(object sender, EventArgs e) {
30 | if (this.ModelSite != null) {
31 | Bind_DataList();
32 | }
33 | }
34 |
35 | private void Bind_DataList() {
36 | int sWebSiteID = ModelSite.ID;
37 | string baseDir = AppDomain.CurrentDomain.BaseDirectory + "\\Data\\Spider\\";
38 | string SQLiteName = baseDir + sWebSiteID + "\\SpiderResult.db";
39 | string LocalSQLiteName = "Data\\Spider\\" + sWebSiteID + "\\SpiderResult.db";
40 | if (File.Exists(SQLiteName)) {
41 | string SQL = string.Empty;//And Content='{1}
42 | SQL = "Select * from Content Order by ID Desc";
43 | DataSet ds = SQLiteHelper.Query1(LocalSQLiteName, SQL);
44 | this.dataGridView_LogList.DataSource = ds.Tables[0].DefaultView;
45 | }
46 | }
47 |
48 | private void toolStripButton4_Click(object sender, EventArgs e) {
49 | this.Close();
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/V5_DataPublish/_Class/BLL/BLLDeskTopPublish.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using V5_DataPublish._Class.Model;
6 | using System.IO;
7 | using System.Xml.Serialization;
8 |
9 | namespace V5_DataPublish._Class.BLL {
10 | public class BLLDeskTopPublish {
11 |
12 | #region Web站点配置操作
13 | private string dataSourceXmlConfigUrl = AppDomain.CurrentDomain.BaseDirectory + "/Config/DeskTop_WebSite.config";
14 |
15 | ///
16 | /// 保存网站列表
17 | ///
18 | ///
19 | public void SaveXmlConfig(List list) {
20 | if (!File.Exists(dataSourceXmlConfigUrl)) {
21 | File.Create(dataSourceXmlConfigUrl).Close();
22 | }
23 | XmlSerializer serializer = new XmlSerializer(typeof(List));
24 | FileStream fs = new FileStream(dataSourceXmlConfigUrl, FileMode.Create);
25 | serializer.Serialize(fs, list);
26 | fs.Close();
27 | }
28 | ///
29 | /// 获取网站列表配置
30 | ///
31 | ///
32 | public List GetXmlConfig() {
33 | List list = new List();
34 | if (!File.Exists(dataSourceXmlConfigUrl)) {
35 | return list;
36 | }
37 | XmlSerializer serializer = new XmlSerializer(typeof(List));
38 | try {
39 | string fileName = dataSourceXmlConfigUrl;
40 | FileStream fs = new FileStream(fileName, FileMode.Open);
41 | list = (List)serializer.Deserialize(fs);
42 | fs.Close();
43 | }
44 | catch { }
45 | return list;
46 | }
47 | #endregion
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/V5_DataPlugins/Model/ModelRandom.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace V5_DataPlugins.Model {
7 | ///
8 | /// 随机值
9 | ///
10 | [Serializable]
11 | public class ModelRandom {
12 | string _LabelName = string.Empty;
13 | ///
14 | /// 标签名称
15 | ///
16 | public string LabelName {
17 | get { return _LabelName; }
18 | set { _LabelName = value; }
19 | }
20 | string _RandomLabelType = string.Empty;
21 | ///
22 | /// 是否登录 0 为未登录 1为登录
23 | ///
24 | public string RandomLabelType {
25 | get { return _RandomLabelType; }
26 | set { _RandomLabelType = value; }
27 | }
28 | string _RandomUrl = string.Empty;
29 | ///
30 | /// 访问地址
31 | ///
32 | public string RandomUrl {
33 | get { return _RandomUrl; }
34 | set { _RandomUrl = value; }
35 | }
36 | string _RandomRefUrl = string.Empty;
37 | ///
38 | /// 访问来源
39 | ///
40 | public string RandomRefUrl {
41 | get { return _RandomRefUrl; }
42 | set { _RandomRefUrl = value; }
43 | }
44 | string _RandomPostData = string.Empty;
45 | ///
46 | /// 访问Post数据
47 | ///
48 | public string RandomPostData {
49 | get { return _RandomPostData; }
50 | set { _RandomPostData = value; }
51 | }
52 |
53 | string _RandomCutRegex = string.Empty;
54 | ///
55 | /// 截取表达式
56 | ///
57 | public string RandomCutRegex {
58 | get { return _RandomCutRegex; }
59 | set { _RandomCutRegex = value; }
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Tools/frmImportWebCollectionModule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using V5_DataCollection._Class.DAL;
10 |
11 | namespace V5_DataCollection.Forms.Tools {
12 | public partial class frmImportWebCollectionModule : Form {
13 | public frmImportWebCollectionModule() {
14 | InitializeComponent();
15 | }
16 |
17 | private void btnSubmit_Click(object sender, EventArgs e) {
18 |
19 | string WebCollectionModule = this.txtWebCollectionModule.Text;
20 | if (string.IsNullOrEmpty(WebCollectionModule)) {
21 | MessageBox.Show("采集模块不能为空!");
22 | return;
23 | }
24 | this.Hide();
25 | this.Close();
26 | }
27 |
28 | private void btnCancel_Click(object sender, EventArgs e) {
29 | this.Hide();
30 | this.Close();
31 | }
32 |
33 | private void frmImportWebCollectionModule_Load(object sender, EventArgs e) {
34 | DALTaskClass dal = new DALTaskClass();
35 | DataTable dt = dal.GetList(string.Empty).Tables[0];
36 | this.cmbSiteClass.Items.Clear();
37 | foreach (DataRow dr in dt.Rows) {
38 | this.cmbSiteClass.Items.Add(dr["TreeClassName"].ToString() + "||" + dr["ClassId"].ToString());
39 | }
40 | this.cmbSiteClass.SelectedIndex = 0;
41 | }
42 |
43 | private void btnBroswer_Click(object sender, EventArgs e) {
44 | OpenFileDialog openFileDialog1 = new OpenFileDialog();
45 | if (openFileDialog1.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) {
46 | this.txtWebCollectionModule.Text = openFileDialog1.FileName;
47 | }
48 | }
49 |
50 |
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/WebPublishModule/cWebPublishModule.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Net;
6 |
7 | namespace V5_DataCollection._Class.WebPublishModule {
8 | ///
9 | /// 网站发布模块
10 | ///
11 | public class cWebPublishModule {
12 | private ModelWebPublishModule model = new ModelWebPublishModule();
13 | private string _LoginCookies = string.Empty;
14 | ///
15 | /// Cookies
16 | ///
17 | public string LoginCookies {
18 | get { return _LoginCookies; }
19 | set { _LoginCookies = value; }
20 | }
21 |
22 | public cWebPublishModule(ModelWebPublishModule _model) {
23 | model = _model;
24 | }
25 |
26 | ~cWebPublishModule() {
27 | model = null;
28 | }
29 | ///
30 | /// 获取最基本的Cookies
31 | ///
32 | public void GetBaseCookie(string url) {
33 | try {
34 | Uri myUri = new Uri(url);
35 | WebRequest webRequest = WebRequest.Create(myUri);
36 | WebResponse webResponse = webRequest.GetResponse();
37 | LoginCookies = webResponse.Headers["Set-Cookie"];
38 | }
39 | catch (Exception) {
40 |
41 | }
42 | }
43 | ///
44 | /// 验证码窗口
45 | ///
46 | public void LoginVerCodeWindow() {
47 |
48 | }
49 | ///
50 | /// 登录网站
51 | ///
52 | public void LoginCMS() {
53 |
54 | }
55 | ///
56 | /// 分类列表
57 | ///
58 | public void GetClassList() {
59 | }
60 | ///
61 | /// 发送内容
62 | ///
63 | public void GetView() {
64 |
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/V5_DataPublish/_Class/DataSource/PublishTaskSqlServerHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Data.SqlClient;
6 | using System.Data;
7 | using V5_DataPlugins;
8 | using V5_DataPlugins.Model;
9 | using V5_WinLibs.DBUtility;
10 |
11 | namespace V5_DataPublish._Class.DataSource {
12 | //使用SqlServer数据源发布数据
13 | public class PublishTaskSqlServerHelper : IPublishTaskHelper {
14 |
15 | public List GetDataList(string keyword) {
16 | return GetDataList(keyword, 0);
17 | }
18 |
19 | public List GetDataList(string keyword, int topNum) {
20 | List LItem = new List();
21 | string SQLKeyword = string.Empty;
22 | //拼凑SQL语句
23 | SqlParameter[] parameter = {
24 | new SqlParameter("@SQLKeyword",SqlDbType.VarChar,500),
25 | new SqlParameter("@TopNum",SqlDbType.Int,4),
26 | };
27 | parameter[0].Value = SQLKeyword;
28 | parameter[1].Value = topNum;
29 | DataSet ds = DbHelperSQL.RunProcedure("[dbo].[Pro_GetArtileList]", parameter, "ds");
30 | if (ds != null && ds.Tables[0].Rows.Count > 0) {
31 | foreach (DataRow dr in ds.Tables[0].Rows) {
32 | ModelPublishItem model = new ModelPublishItem();
33 | model.Title = dr["Title"].ToString();
34 | model.Content = dr["Content"].ToString();
35 | model.Abstract = dr["Abstract"].ToString();
36 | model.Url = dr["Url"].ToString();
37 | model.Time = Convert.ToDateTime(dr["AddDateTime"].ToString());
38 | LItem.Add(model);
39 | }
40 | }
41 | return LItem;
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Task/TaskData/frmTaskDataEdit.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using V5_DataCollection._Class.DAL;
10 |
11 | namespace V5_DataCollection.Forms.Task.TaskData {
12 | public partial class frmTaskDataEdit : Form {
13 |
14 | public delegate void OutDataEdit(DataGridViewCell cell, string result);
15 |
16 | public OutDataEdit OutEdit;
17 |
18 | public string TaskName = string.Empty;
19 |
20 | public string Id;
21 |
22 | public string HeaderText;
23 |
24 | public DataGridViewCell Cell;
25 |
26 | public frmTaskDataEdit() {
27 | InitializeComponent();
28 |
29 | }
30 |
31 | private bool isHtml = true;
32 |
33 | private void frmTaskDataEdit_Load(object sender, EventArgs e) {
34 |
35 | if (!string.IsNullOrEmpty(Id)) {
36 |
37 | object oo = DALContentHelper.GetContent(this.TaskName, this.Id, this.HeaderText);
38 |
39 | if (oo.ToString().IndexOf("/>") == -1) {
40 | isHtml = false;
41 | }
42 |
43 | this.htmlEditor.InnerHtml = oo.ToString();
44 | }
45 |
46 | }
47 |
48 | private void btnSubmit_Click(object sender, EventArgs e) {
49 |
50 | string ss = isHtml ? this.htmlEditor.InnerHtml : this.htmlEditor.InnerText;
51 |
52 | DALContentHelper.UpdateContent(this.TaskName, this.Id, this.HeaderText, ss);
53 |
54 | if (OutEdit != null) {
55 | OutEdit(this.Cell, ss);
56 | }
57 |
58 | this.Hide();
59 | this.Close();
60 | }
61 |
62 | private void btnCancel_Click(object sender, EventArgs e) {
63 | this.Hide();
64 | this.Close();
65 | }
66 |
67 |
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Task/frmTaskLabelRemove.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_DataCollection.Forms.Task
11 | {
12 | public partial class frmTaskLabelRemove : Form
13 | {
14 | public delegate void TaskLabelRemove(int ItemIndex, string RemoveStr, string OpType);
15 | public TaskLabelRemove TLR;
16 |
17 | private int _ItemIndex = -1;
18 |
19 | public int ItemIndex
20 | {
21 | get { return _ItemIndex; }
22 | set { _ItemIndex = value; }
23 | }
24 |
25 | private string _OldName = string.Empty;
26 |
27 | public string OldName
28 | {
29 | get { return _OldName; }
30 | set { _OldName = value; }
31 | }
32 |
33 | public frmTaskLabelRemove()
34 | {
35 | InitializeComponent();
36 | }
37 |
38 | private void btnCancel_Click(object sender, EventArgs e)
39 | {
40 | this.Hide();
41 | this.Close();
42 | }
43 |
44 | private void btnSubmit_Click(object sender, EventArgs e)
45 | {
46 | string OpType = "add";
47 | if (this.OldName.Trim() != "")
48 | OpType = "edit";
49 | if (this.txtRemoveStr.Text.Trim() != "")
50 | {
51 | if (TLR != null)
52 | {
53 | TLR(this.ItemIndex, this.txtRemoveStr.Text, OpType);
54 | }
55 | }
56 | this.Hide();
57 | this.Close();
58 | }
59 |
60 | private void frmTaskLabelRemove_Load(object sender, EventArgs e)
61 | {
62 | if (this.OldName.Trim() != "")
63 | {
64 | this.txtRemoveStr.Text = this.OldName;
65 | }
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/V5_DataCollection/_Class/PythonExt/PythonExtHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using IronPython.Hosting;
7 | using Microsoft.Scripting.Hosting;
8 |
9 | namespace V5_DataCollection._Class.PythonExt {
10 | ///
11 | /// 执行python脚本
12 | ///
13 | public class PythonExtHelper {
14 |
15 | ///
16 | /// 运行Python脚本
17 | ///
18 | ///
19 | ///
20 | public static string RunPython(string pythonFile, string inputUrl, object inputObj) {
21 |
22 | ScriptEngine _engine = Python.CreateEngine();
23 |
24 | string fileName = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, pythonFile);
25 |
26 | #region 字符串
27 | //加载必须的类库
28 | var code = @"import sys" + "\n" +
29 | @"from System.IO import Path" + "\n" +
30 | @"sys.path.append("".\pythonlib.zip"")" + "\n" +
31 | @"import clr" + "\n" +
32 | @"clr.AddReferenceToFileAndPath(Path.GetFullPath(r'System\pythonlibs\V5_PythonLibs.dll'))" + "\n" +
33 | @"execfile(Path.GetFullPath(r'" + pythonFile + @"'))";
34 | var source = _engine.CreateScriptSourceFromString(code);
35 |
36 | var scope = _engine.CreateScope();
37 | source.Execute(scope);
38 | #endregion
39 |
40 | #region 文件
41 | //var source = _engine.CreateScriptSourceFromFile(fileName, Encoding.Default, SourceCodeKind.Statements);
42 |
43 | //CompiledCode _code = source.Compile();
44 |
45 | //var scope = _engine.CreateScope();
46 |
47 | //_code.Execute(scope);
48 | #endregion
49 |
50 | var main = scope.GetVariable>("main");
51 |
52 | return main(inputUrl, inputObj);
53 |
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/V5_WinLibs/Core/cRegexHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Text.RegularExpressions;
6 |
7 | namespace V5_WinLibs.Core {
8 | ///
9 | ///
10 | ///
11 | public class cRegexHelper {
12 | ///
13 | /// href链接
14 | ///
15 | public static string RegexATag = @"]*?hrefs*=s*[,""s]([^"",]*)[,""][^<>]*?>(.*?)";
16 |
17 | ///
18 | /// 匹配移动手机号
19 | ///
20 | public const string PATTERN_CMCMOBILENUM = @"^1(3[4-9]|5[012789]|8[78])\d{8}$";
21 | ///
22 | /// 匹配电信手机号
23 | ///
24 | public const string PATTERN_CTCMOBILENUM = @"^18[09]\d{8}$";
25 | ///
26 | /// 匹配联通手机号
27 | ///
28 | public const string PATTERN_CUTMOBILENUM = @"^1(3[0-2]|5[56]|8[56])\d{8}$";
29 | ///
30 | /// 是否为手机号
31 | ///
32 | ///
33 | ///
34 | public static bool IsMobile(string val) {
35 | return Regex.IsMatch(val, @"^1[358]\d{9}$", RegexOptions.IgnoreCase);
36 | }
37 | ///
38 | /// 判断手机类型 0未知1移动2联通3电信
39 | ///
40 | ///
41 | ///
42 | public static int CheckMobileType(string val) {
43 | int type = 0;
44 | if (Regex.IsMatch(val, PATTERN_CMCMOBILENUM, RegexOptions.IgnoreCase))
45 | return 1;
46 | if (Regex.IsMatch(val, PATTERN_CUTMOBILENUM, RegexOptions.IgnoreCase))
47 | return 2;
48 | if (Regex.IsMatch(val, PATTERN_CTCMOBILENUM, RegexOptions.IgnoreCase))
49 | return 3;
50 | return type;
51 | }
52 |
53 |
54 |
55 | public static string ParseTags(string HTMLStr) {
56 | return Regex.Replace(HTMLStr, "<[^>]*>", "");
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Task/frmTaskLabelReplace.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_DataCollection.Forms.Task {
11 | public partial class frmTaskLabelReplace : Form {
12 | public delegate void TaskLabelReplace(int ItemIndex, string oldStr, string newStr, string OpType);
13 | public TaskLabelReplace TLR;
14 | private string m_OpType = "add";
15 | private int _itemIndex = -1;
16 |
17 | public int ItemIndex {
18 | get { return _itemIndex; }
19 | set { _itemIndex = value; }
20 | }
21 | private string _oldStr = string.Empty;
22 |
23 | public string OldStr {
24 | get { return _oldStr; }
25 | set { _oldStr = value; }
26 | }
27 | private string _newStr = string.Empty;
28 |
29 | public string NewStr {
30 | get { return _newStr; }
31 | set { _newStr = value; }
32 | }
33 | public frmTaskLabelReplace() {
34 | InitializeComponent();
35 | }
36 |
37 | private void btnCancel_Click(object sender, EventArgs e) {
38 | this.Hide();
39 | this.Close();
40 | }
41 |
42 | private void btnSubmit_Click(object sender, EventArgs e) {
43 | if (this.txtOldReplaceStr.Text.Trim() != "") {
44 | if (TLR != null) {
45 | TLR(this.ItemIndex, this.txtOldReplaceStr.Text, this.txtNewReplaceStr.Text, m_OpType);
46 | }
47 | }
48 | this.Hide();
49 | this.Close();
50 | }
51 |
52 | private void frmTaskLabelReplace_Load(object sender, EventArgs e) {
53 | if (this.OldStr.Trim() != "") {
54 | this.txtOldReplaceStr.Text = this.OldStr;
55 | this.txtNewReplaceStr.Text = this.NewStr;
56 | m_OpType = "edit";
57 | }
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/frmLoginVerCode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using V5_Utility.Core;
10 | using V5_Utility.Utility;
11 |
12 | namespace V5_PublishModule {
13 | public partial class frmLoginVerCode : Form {
14 | public delegate void OutVerCodeHandler(string VerCode, string userName, string userPwd);
15 | public OutVerCodeHandler OutVerCode;
16 | public delegate void OutCookieHandler(string Cookie);
17 | public OutCookieHandler OutCookie;
18 |
19 | private string _LoginVerCodeUrl = string.Empty;
20 |
21 | public string LoginVerCodeUrl {
22 | get { return _LoginVerCodeUrl; }
23 | set { _LoginVerCodeUrl = value; }
24 | }
25 | public frmLoginVerCode() {
26 | InitializeComponent();
27 | }
28 |
29 | private void btnCancel_Click(object sender, EventArgs e) {
30 | this.Close();
31 | this.Dispose();
32 | }
33 |
34 | private void btnSubmit_Click(object sender, EventArgs e) {
35 | if (OutVerCode != null) {
36 | OutVerCode(this.txtLoginVerCode.Text, this.txtLoginUserName.Text, this.txtLoginPassWord.Text);
37 | }
38 | this.Close();
39 | this.Dispose();
40 | }
41 | ThreadMultiHelper th = new ThreadMultiHelper(1);
42 | private void frmLoginVerCode_Load(object sender, EventArgs e) {
43 | th.WorkMethod += new ThreadMultiHelper.DelegateWork(work);
44 | th.Start();
45 | }
46 |
47 | private void work(int index, int sfsdf) {
48 | string cookies = string.Empty, cookies1 = string.Empty;
49 | this.pbVerCode.Image = SimulationHelper.PostImage(LoginVerCodeUrl, ref cookies);
50 | if (OutCookie != null) {
51 | OutCookie(cookies);
52 | }
53 | th.Stop();
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/V5_DataPublish/_Class/ModelTreeClass.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using XmlDatabase.Core;
6 |
7 | namespace V5_DataPublish._Class {
8 |
9 | public class ModelTreeClass {
10 |
11 | private string _Guid = Guid.NewGuid().ToString();
12 |
13 | public string Uuid {
14 | get { return _Guid; }
15 | set { _Guid = value; }
16 | }
17 |
18 |
19 | #region Model
20 | private int _classid;
21 | private string _classname;
22 | private int? _parentid;
23 | private string _classcode;
24 | private string _readme;
25 | private string _adddatetime;
26 | private string _updatetime;
27 | ///
28 | ///
29 | ///
30 | public int ClassID {
31 | set { _classid = value; }
32 | get { return _classid; }
33 | }
34 | ///
35 | ///
36 | ///
37 | public string ClassName {
38 | set { _classname = value; }
39 | get { return _classname; }
40 | }
41 | ///
42 | ///
43 | ///
44 | public int? ParentID {
45 | set { _parentid = value; }
46 | get { return _parentid; }
47 | }
48 | ///
49 | ///
50 | ///
51 | public string ClassCode {
52 | set { _classcode = value; }
53 | get { return _classcode; }
54 | }
55 | ///
56 | ///
57 | ///
58 | public string ReadMe {
59 | set { _readme = value; }
60 | get { return _readme; }
61 | }
62 | ///
63 | ///
64 | ///
65 | public string AddDateTime {
66 | set { _adddatetime = value; }
67 | get { return _adddatetime; }
68 | }
69 | ///
70 | ///
71 | ///
72 | public string UpdateTime {
73 | set { _updatetime = value; }
74 | get { return _updatetime; }
75 | }
76 | #endregion Model
77 |
78 |
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Task/TaskEvents.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 | using V5_Model;
7 |
8 | namespace V5_DataCollection.Forms.Task {
9 | public class TaskEvents {
10 | ///
11 | /// 添加ListUrl
12 | ///
13 | public class AddLinkUrlEvents : EventArgs {
14 | ///
15 | /// 链接类型
16 | ///
17 | public int LinkType { set; get; }
18 | ///
19 | /// 链接列表
20 | ///
21 | public ListBox.ObjectCollection LinkObject { set; get; }
22 | }
23 | ///
24 | /// 添加LabelName
25 | ///
26 | public class AddViewLabelEvents : EventArgs {
27 | ///
28 | /// 操作类型
29 | ///
30 | public string OPType { set; get; }
31 | ///
32 | /// 标签索引
33 | ///
34 | public int LabelIndex { set; get; }
35 | private ModelTaskLabel _LabelModel = new ModelTaskLabel();
36 | ///
37 | /// 标签模型
38 | ///
39 | public ModelTaskLabel LabelModel {
40 | get { return _LabelModel; }
41 | set { _LabelModel = value; }
42 | }
43 | private ModelTaskLabel _LabelModelOld = new ModelTaskLabel();
44 | ///
45 | /// 标签Old模型
46 | ///
47 | public ModelTaskLabel LabelModelOld {
48 | get { return _LabelModelOld; }
49 | set { _LabelModelOld = value; }
50 | }
51 | }
52 | ///
53 | /// 任务操作
54 | ///
55 | public class TaskOpEvents : EventArgs {
56 | ///
57 | /// 任务索引
58 | ///
59 | public int TaskIndex { get; set; }
60 |
61 | private int _OpType = 0;
62 | ///
63 | /// 操作类型 0 添加 1为修改
64 | ///
65 | public int OpType {
66 | get { return _OpType; }
67 | set { _OpType = value; }
68 | }
69 |
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/Import/frmImportXml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Xml;
9 |
10 | namespace V5_DataPublish.Forms.Import {
11 | public partial class frmImportXml : V5_DataPublish.BaseForm {
12 | public frmImportXml() {
13 | InitializeComponent();
14 | }
15 |
16 | private void btnOpenFile_Click(object sender, EventArgs e) {
17 | if (openFileDialog1.ShowDialog() == DialogResult.OK) {
18 | this.txtXmlFile.Text = openFileDialog1.FileName;
19 | }
20 | }
21 |
22 | private void btnCancel_Click(object sender, EventArgs e) {
23 | if (this.backgroundWorker.IsBusy) {
24 | this.backgroundWorker.CancelAsync();
25 | }
26 | this.Close();
27 | this.Dispose();
28 | }
29 |
30 | private void btnSubmit_Click(object sender, EventArgs e) {
31 | this.btnCancel.Enabled = false;
32 | this.btnSubmit.Enabled = false;
33 | if (!this.backgroundWorker.IsBusy) {
34 | this.backgroundWorker.RunWorkerAsync();
35 | }
36 | }
37 |
38 | private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) {
39 | try {
40 | }
41 | catch (Exception ex) {
42 | MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
43 | }
44 | }
45 |
46 | private void ShowProgressBar(int pValue) {
47 | this.progressBar.Invoke(new MethodInvoker(delegate() {
48 | progressBar.Value = pValue;
49 | }));
50 | this.labelProgress.Invoke(new MethodInvoker(delegate() {
51 | labelProgress.Text = progressBar.Value + "%";
52 | }));
53 | }
54 | private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
55 | this.btnCancel.Enabled = true;
56 | this.btnSubmit.Enabled = true;
57 | MessageBox.Show("导入完毕!");
58 | }
59 |
60 | private void frmImportXml_FormClosing(object sender, FormClosingEventArgs e) {
61 | if (this.backgroundWorker.IsBusy) {
62 | return;
63 | }
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/V5_WinLibs/Core/CsvHelper.cs:
--------------------------------------------------------------------------------
1 | using System.Data;
2 | using System.IO;
3 | namespace V5_WinLibs.Core {
4 | public static class CsvHelper {
5 | ///
6 | /// 导出报表为Csv
7 | ///
8 | /// DataTable
9 | /// 物理路径
10 | /// 表头
11 | /// 字段标题,逗号分隔
12 | public static bool dt2csv(DataTable dt, string strFilePath, string tableheader, string columname) {
13 | try {
14 | string strBufferLine = "";
15 | StreamWriter strmWriterObj = new StreamWriter(strFilePath, false, System.Text.Encoding.UTF8);
16 | strmWriterObj.WriteLine(tableheader);
17 | strmWriterObj.WriteLine(columname);
18 | for (int i = 0; i < dt.Rows.Count; i++) {
19 | strBufferLine = "";
20 | for (int j = 0; j < dt.Columns.Count; j++) {
21 | if (j > 0)
22 | strBufferLine += ",";
23 | strBufferLine += dt.Rows[i][j].ToString();
24 | }
25 | strmWriterObj.WriteLine(strBufferLine);
26 | }
27 | strmWriterObj.Close();
28 | return true;
29 | }
30 | catch {
31 | return false;
32 | }
33 | }
34 |
35 | ///
36 | /// 将Csv读入DataTable
37 | ///
38 | /// csv文件路径
39 | /// 表示第n行是字段title,第n+1行是记录开始
40 | public static DataTable csv2dt(string filePath, int n, DataTable dt) {
41 | StreamReader reader = new StreamReader(filePath, System.Text.Encoding.UTF8, false);
42 | int i = 0, m = 0;
43 | reader.Peek();
44 | while (reader.Peek() > 0) {
45 | m = m + 1;
46 | string str = reader.ReadLine();
47 | if (m >= n + 1) {
48 | string[] split = str.Split(',');
49 |
50 | System.Data.DataRow dr = dt.NewRow();
51 | for (i = 0; i < split.Length; i++) {
52 | dr[i] = split[i];
53 | }
54 | dt.Rows.Add(dr);
55 | }
56 | }
57 | return dt;
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Task/DataBaseConfig/frmDataBaseConfigOracle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Data.OracleClient;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Windows.Forms;
10 |
11 | namespace V5_DataCollection.Forms.Task.DataBaseConfig {
12 | public partial class frmDataBaseConfigOracle : Form {
13 |
14 | public delegate void OutDataBaseConfig(string strDataBase);
15 |
16 | public OutDataBaseConfig OutDBConfig;
17 |
18 | public frmDataBaseConfigOracle() {
19 | InitializeComponent();
20 | }
21 |
22 | private void btnSubmit_Click(object sender, EventArgs e) {
23 |
24 |
25 | try {
26 | string user = this.txtUser.Text.Trim();
27 | string pass = this.txtPass.Text.Trim();
28 | string server = this.txtServer.Text.Trim();
29 |
30 | if ((user.Trim() == "") || (server.Trim() == "")) {
31 | MessageBox.Show(this, "用户名或密码不能为空!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Information);
32 | return;
33 | }
34 |
35 | string constr = "Data Source=" + server + "; user id=" + user + ";password=" + pass;
36 |
37 | OracleConnection myCn = new OracleConnection(constr);
38 | try {
39 | this.Text = "正在连接服务器,请稍候...";
40 | myCn.Open();
41 | }
42 | catch {
43 | this.Text = "连接服务器失败!";
44 | myCn.Close();
45 | MessageBox.Show(this, "连接服务器失败!请检查服务器地址或用户名密码是否正确!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
46 | return;
47 | }
48 | myCn.Close();
49 | this.Text = "连接服务器成功!";
50 |
51 | if (OutDBConfig != null) {
52 | OutDBConfig(constr);
53 | }
54 |
55 | this.Hide();
56 | this.Close();
57 | }
58 | catch (System.Exception ex) {
59 | MessageBox.Show(this, ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Warning);
60 | }
61 |
62 |
63 |
64 | }
65 |
66 | private void btnCancel_Click(object sender, EventArgs e) {
67 | this.Hide();
68 | this.Close();
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/Import/frmImportText.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.IO;
9 |
10 | namespace V5_DataPublish.Forms.Import {
11 | public partial class frmImportText : BaseForm {
12 | public frmImportText() {
13 | InitializeComponent();
14 | }
15 |
16 | private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e) {
17 | StreamReader fileStream = new StreamReader(this.txtTextFile.Text, Encoding.Default);
18 | String strContent = fileStream.ReadToEnd();
19 | fileStream.Close();
20 |
21 | string[] splitStringArr = strContent.Split(new string[] { "标题:" }, StringSplitOptions.RemoveEmptyEntries);
22 | int count = 0;
23 | int MaxCount = Math.Min(40000, splitStringArr.Length);
24 | }
25 |
26 | private void ShowProgressBar(int pValue) {
27 | this.progressBar.Invoke(new MethodInvoker(delegate() {
28 | progressBar.Value = pValue;
29 | }));
30 | this.labelProgress.Invoke(new MethodInvoker(delegate() {
31 | labelProgress.Text = progressBar.Value + "%";
32 | }));
33 | }
34 |
35 | private void backgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) {
36 | this.btnCancel.Enabled = true;
37 | this.btnSubmit.Enabled = true;
38 | MessageBox.Show("导入完毕!");
39 | }
40 |
41 | private void btnCancel_Click(object sender, EventArgs e) {
42 | if (this.backgroundWorker.IsBusy) {
43 | this.backgroundWorker.CancelAsync();
44 | }
45 | this.Close();
46 | this.Dispose();
47 | }
48 |
49 | private void btnSubmit_Click(object sender, EventArgs e) {
50 | this.btnCancel.Enabled = false;
51 | this.btnSubmit.Enabled = false;
52 | if (!this.backgroundWorker.IsBusy) {
53 | this.backgroundWorker.RunWorkerAsync();
54 | }
55 | }
56 |
57 | private void btnOpenFile_Click(object sender, EventArgs e) {
58 | if (openFileDialog1.ShowDialog() == DialogResult.OK) {
59 | this.txtTextFile.Text = openFileDialog1.FileName;
60 | }
61 | }
62 |
63 | private void btnIndexTest_Click(object sender, EventArgs e) {
64 |
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/V5_WinLibs/Controls/Contorls/V5DataGridView.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Diagnostics;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using System.Drawing;
9 |
10 | namespace V5_WinControls {
11 | public partial class V5DataGridView : DataGridView {
12 | public V5DataGridView() {
13 | InitializeComponent();
14 | }
15 |
16 | public V5DataGridView(IContainer container) {
17 | container.Add(this);
18 |
19 | InitializeComponent();
20 | }
21 |
22 | protected override void OnPaint(PaintEventArgs e) {
23 | base.OnPaint(e);
24 | //int NewRowHeight = this.RowTemplate.Height;
25 | ////新建的行高
26 | //int AllHeight = this.ColumnHeadersHeight + NewRowHeight * this.RowCount;
27 | ////总高度 包括行高
28 | //int TableAllWidth = this.Width - 2;
29 | ////表格总宽
30 | //Rectangle rFrame = new Rectangle(0, 0, TableAllWidth, NewRowHeight);
31 | //// 存储四组数字位置及高度
32 | //Rectangle rFill = new Rectangle(1, 1, TableAllWidth - 2, NewRowHeight);
33 | //// 存储四组数字位置及高度
34 | //Rectangle rowHeader = new Rectangle(2, 2, this.RowHeadersWidth - 3, NewRowHeight);
35 | //// 存储四组数字位置及高度
36 | //Pen line = new Pen(this.GridColor, 1);
37 | ////线
38 | //Bitmap photo = new Bitmap(TableAllWidth, NewRowHeight);
39 | //Graphics fengPhoto = Graphics.FromImage(photo);
40 | //fengPhoto.DrawRectangle(line, rFrame);
41 | ////绘制框
42 | //fengPhoto.FillRectangle(new SolidBrush(this.DefaultCellStyle.BackColor), rFill);
43 | ////填充颜色
44 | //// 封装图.FillRectangle(New SolidBrush(Me.RowHeadersDefaultCellStyle.BackColor), rowHeader
45 | //int TitleColumnWidth = this.RowHeadersWidth - this.RowHeadersWidth;
46 | //int j = 0;
47 | //for (j = 0; j <= this.ColumnCount - 1; j += j + 1) {
48 | // fengPhoto.DrawLine(line, new Point(TitleColumnWidth, -0), new Point(TitleColumnWidth, NewRowHeight));
49 | // TitleColumnWidth += this.Columns[j].Width;
50 | //}
51 | //int dd = (this.Height - AllHeight) / NewRowHeight;
52 | //int CC = 0;
53 | //for (CC = 0; CC <= dd + 1 - 1; CC += CC + 1) {
54 | // e.Graphics.DrawImage(photo, 1, AllHeight + CC * NewRowHeight);
55 | //}
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/V5_PublishModule/frmCreateHtml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace V5_PublishModule {
11 | public partial class frmCreateHtml : Form {
12 |
13 | public delegate void OutListViewItem(ListViewItem item, bool EditFlag);
14 | public OutListViewItem OutLVICreateHtml;
15 | Object _EditObject;
16 | ///
17 | /// 编辑对象
18 | ///
19 | public Object EditObject {
20 | get { return _EditObject; }
21 | set { _EditObject = value; }
22 | }
23 |
24 | public frmCreateHtml() {
25 | InitializeComponent();
26 | }
27 |
28 | private void btnSubmit_Click(object sender, EventArgs e) {
29 | if (EditObject != null) {
30 | ListViewItem li = (ListViewItem)EditObject;
31 | li.SubItems[0].Text = this.txtCreateName.Text;
32 | li.SubItems[1].Text = this.txtCreateHtmlUrl.Text;
33 | li.SubItems[2].Text = this.txtCreateHtmlRefUrl.Text;
34 | li.SubItems[3].Text = this.txtCreateHtmlPostData.Text;
35 | if (OutLVICreateHtml != null) {
36 | OutLVICreateHtml(li, true);
37 | }
38 | }
39 | else {
40 | ListViewItem li = new ListViewItem(this.txtCreateName.Text);
41 | li.SubItems.Add(this.txtCreateHtmlUrl.Text);
42 | li.SubItems.Add(this.txtCreateHtmlRefUrl.Text);
43 | li.SubItems.Add(this.txtCreateHtmlPostData.Text);
44 | if (OutLVICreateHtml != null) {
45 | OutLVICreateHtml(li, false);
46 | }
47 | }
48 | this.Close();
49 | }
50 |
51 | private void btnCancel_Click(object sender, EventArgs e) {
52 | this.Close();
53 | this.Dispose();
54 | }
55 |
56 | private void frmCreateHtml_Load(object sender, EventArgs e) {
57 | if (EditObject != null) {
58 | ListViewItem li = (ListViewItem)EditObject;
59 | this.txtCreateName.Text = li.SubItems[0].Text;
60 | this.txtCreateHtmlUrl.Text = li.SubItems[1].Text;
61 | this.txtCreateHtmlRefUrl.Text = li.SubItems[2].Text;
62 | this.txtCreateHtmlPostData.Text = li.SubItems[3].Text;
63 | }
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/V5_DataPlugins/IPublish.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 | using V5_DataPlugins.Model;
7 |
8 | namespace V5_DataPlugins {
9 | ///
10 | /// 发布类型
11 | ///
12 | public enum PublishType {
13 | Login,
14 | GetClassList,
15 | CreateClass,
16 | PostData,
17 | UploadFile,
18 | CreateHtml,
19 | LoginOver,
20 | GetClassListOver,
21 | CreateClassOver,
22 | PostDataOver,
23 | UploadFileOver,
24 | CreateHtmlOver
25 | }
26 | ///
27 | /// 生成静态类型
28 | ///
29 | public enum CreateHtmlType {
30 | Index,
31 | ClassList,
32 | View
33 | }
34 | ///
35 | /// 发布接口
36 | ///
37 | public interface IPublish {
38 | ///
39 | /// 操作类型
40 | ///
41 | PublishType Publish_Type { set; get; }
42 | ///
43 | /// 网站编码
44 | ///
45 | string Publish_Encode { set; get; }
46 | ///
47 | /// 回发对象
48 | ///
49 | PluginEventHandler.OutPutResult Publish_OutResult { set; }
50 | ///
51 | /// WebBrowser对象
52 | ///
53 | WebBrowser Publish_WebBrowser { set; }
54 | ///
55 | /// 插件名称说明
56 | ///
57 | string Publish_Name { set; get; }
58 | ///
59 | /// 网站对象
60 | ///
61 | ModelPublishModuleItem Publish_Model { get; set; }
62 | ///
63 | /// 初始化信息
64 | ///
65 | void Publish_Init(string strSiteUrl, string strLoginDir, string strUserName, string strUserPwd, int isCookie, string strCookie);
66 | ///
67 | /// 后台登陆地址
68 | ///
69 | string Publish_GetLoginAdminUrl(string strSiteUrl, string strLoginDir);
70 | ///
71 | /// 网站后台登录
72 | ///
73 | void Publish_Login();
74 | ///
75 | /// 网站后台创建分类
76 | ///
77 | void Publish_CreateClass(string strClassName);
78 | ///
79 | /// 网站后台获取分类列表
80 | ///
81 | void Publish_GetClassList();
82 | ///
83 | /// 网站后台发布数据
84 | ///
85 | void Publish_PostData(ModelGatherItem mlistPost, ModelClassItem mClassList);
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/V5_DataCollection/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using System.Windows.Forms;
4 | using V5_DataCollection._Class.Plan;
5 |
6 | namespace V5_DataCollection {
7 | static class Program {
8 |
9 | ///
10 | /// 应用程序的主入口点。
11 | ///
12 | [STAThread]
13 | static void Main() {
14 |
15 |
16 | bool isAppRunning = false;
17 | System.Threading.Mutex mutex = new System.Threading.Mutex(
18 | true,
19 | System.Diagnostics.Process.GetCurrentProcess().ProcessName,
20 | out isAppRunning);
21 | if (!isAppRunning) {
22 | MessageBox.Show("本程序已经在运行了,请不要重复运行!");
23 | Environment.Exit(1);
24 | }
25 | else {
26 | try {
27 | Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
28 | Application.EnableVisualStyles();
29 | Application.SetCompatibleTextRenderingDefault(false);
30 | frmSplashForm fromSplash = new frmSplashForm();
31 | Application.Run(fromSplash);
32 | if (fromSplash.IsShow) {
33 |
34 | #region 执行计划任务
35 | PlanTaskHelper.InitScheduler();
36 | PlanTaskHelper.LoadAllJobs();
37 | #endregion
38 |
39 | Application.Run(new frmMain());
40 | }
41 | }
42 | catch (Exception ex) {
43 | MessageBox.Show(ex.Message + "::" + ex.InnerException + "::" + ex.StackTrace + "::" + ex.Source + "::" + ex.HelpLink);
44 | }
45 |
46 | }
47 | }
48 |
49 |
50 | static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) {
51 | try {
52 | string errorMsg = "程序运行过程中发生错误,错误信息如下:\n";
53 | errorMsg += e.Exception.Message;
54 | errorMsg += "\n发生错误的程序集为:";
55 | errorMsg += e.Exception.Source;
56 | errorMsg += "\n发生错误的具体位置为:\n";
57 | errorMsg += e.Exception.StackTrace;
58 | errorMsg += "\n\n 请抓取此错误屏幕,并和V5软件联系!";
59 | MessageBox.Show(errorMsg, "运行时错误--V5软件", MessageBoxButtons.OK, MessageBoxIcon.Information);
60 |
61 | }
62 | catch {
63 | MessageBox.Show("系统运行时发生致命错误!\n请保存好相关数据,重启系统。", "致命错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
64 | Application.Exit();
65 | }
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/V5_DataPublish/Forms/WebSite/frmWebSiteClassEdit.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 | using V5_DataPublish._Class;
9 | using V5_DAL;
10 | using V5_Utility;
11 | using V5_Utility.Core;
12 | using V5_WinLibs.Core;
13 |
14 | namespace V5_DataPublish.Forms.WebSite {
15 | public partial class frmWebSiteClassEdit : V5_DataPublish.BaseForm {
16 |
17 | public delegate void OptionOk(object sender, string message, Common.Option o);
18 | public OptionOk OO;
19 |
20 | public string OldValue { get; set; }
21 |
22 | public frmWebSiteClassEdit() {
23 | InitializeComponent();
24 | }
25 |
26 | private void btnSubmit_Click(object sender, EventArgs e) {
27 | if (string.IsNullOrEmpty(this.txtKeywordList.Text)) {
28 | MessageBox.Show("关键词列表不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
29 | return;
30 | }
31 | DALWebSiteClassList model = new DALWebSiteClassList();
32 | int ID = StringHelper.Instance.SetNumber(this.txtID.Text);
33 | string KeywordList = this.txtKeywordList.Text;
34 |
35 | model.ID = ID;
36 | model.KeywordList = KeywordList;
37 | if (ID == 0) {
38 | model.Add();
39 | if (OO != null) {
40 | OO(this, "添加成功!", Common.Option.add);
41 | }
42 | }
43 | else if (ID > 0) {
44 | model.Update();
45 | if (OO != null) {
46 | OO(this, "修改成功!", Common.Option.edit);
47 | }
48 | }
49 | this.Close();
50 | this.Dispose();
51 | }
52 |
53 | private void btnCancel_Click(object sender, EventArgs e) {
54 | this.Close();
55 | this.Dispose();
56 | }
57 |
58 | private void frmWebSiteClassEdit_Load(object sender, EventArgs e) {
59 | if (!string.IsNullOrEmpty(this.OldValue)
60 | && this.OldValue != "0") {
61 | DALWebSiteClassList model = new DALWebSiteClassList().GetModel(StringHelper.Instance.SetNumber(
62 | this.OldValue
63 | ));
64 | if (model != null) {
65 | this.txtID.Text = model.ID.ToString();
66 | this.txtClassName.Text = model.ClassName;
67 | this.txtKeywordList.Text = model.KeywordList;
68 | }
69 | }
70 | }
71 |
72 |
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/V5_AULWriter/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_AULWriter.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("V5_AULWriter.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/V5_AutoUpdate/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_AutoUpdate.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("V5_AutoUpdate.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/V5_DataWebBrowser/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_DataWebBrowser.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("V5_DataWebBrowser.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/V5_DataPublishModule/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace V5_DataPublishModule.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// 一个强类型的资源类,用于查找本地化的字符串等。
17 | ///
18 | // 此类是由 StronglyTypedResourceBuilder
19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
21 | // (以 /str 作为命令选项),或重新生成 VS 项目。
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// 返回此类使用的缓存的 ResourceManager 实例。
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("V5_DataPublishModule.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// 使用此强类型资源类,为所有资源查找
51 | /// 重写当前线程的 CurrentUICulture 属性。
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/V5_WinLibs/Core/User32Helper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Runtime.InteropServices;
6 | using System.Drawing;
7 |
8 | namespace V5_WinLibs.Core {
9 | public class User32Helper {
10 | ///
11 | /// 获取窗口标题
12 | ///
13 | ///
14 | ///
15 | ///
16 | ///
17 | [DllImport("user32", SetLastError = true)]
18 | public static extern int GetWindowText(
19 | IntPtr hWnd, //窗口句柄
20 | StringBuilder lpString, //标题
21 | int nMaxCount //最大值
22 | );
23 | ///
24 | /// 获取类的名字
25 | ///
26 | ///
27 | ///
28 | ///
29 | ///
30 | [DllImport("user32.dll")]
31 | private static extern int GetClassName(
32 | IntPtr hWnd, //句柄
33 | StringBuilder lpString, //类名
34 | int nMaxCount //最大值
35 | );
36 | ///
37 | /// 根据坐标获取窗口句柄
38 | ///
39 | ///
40 | ///
41 | [DllImport("user32")]
42 | private static extern IntPtr WindowFromPoint(
43 | Point Point //坐标
44 | );
45 | ///
46 | /// 获取窗口句柄
47 | ///
48 | /// 类名
49 | /// 窗口名称
50 | ///
51 | [DllImport("user32.dll")]
52 | public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
53 | ///
54 | /// 获取控件句柄
55 | ///
56 | ///
57 | ///
58 | ///
59 | ///
60 | ///
61 | [DllImport("user32.dll")]
62 | public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);
63 | ///
64 | /// 发送消息
65 | ///
66 | ///
67 | ///
68 | ///
69 | ///
70 | ///
71 | [DllImport("user32.dll", CharSet = CharSet.Unicode)]
72 | public static extern IntPtr PostMessage(IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam);
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/V5_DataCollection/Forms/Task/TaskData/frmTaskDataList.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.ConsultingServices.HtmlEditor;
2 | using System;
3 | using System.Collections.Generic;
4 | using System.ComponentModel;
5 | using System.Data;
6 | using System.Drawing;
7 | using System.Linq;
8 | using System.Text;
9 | using System.Windows.Forms;
10 | using V5_WinControls.Pager;
11 | using V5_DataCollection._Class.DAL;
12 |
13 | namespace V5_DataCollection.Forms.Task.TaskData {
14 | public partial class frmTaskDataList : Form {
15 | #region 访问器
16 | ///
17 | /// 任务名称
18 | ///
19 | public string TaskName { get; set; }
20 | #endregion
21 |
22 |
23 | public frmTaskDataList() {
24 | InitializeComponent();
25 | }
26 |
27 | private void frmTaskDataList_Load(object sender, EventArgs e) {
28 |
29 |
30 | this.Pager.PageCurrent = 1;
31 | this.Pager.Bind();
32 |
33 | this.Bind_DataList();
34 | }
35 |
36 |
37 | private int Bind_DataList() {
38 |
39 | if (!string.IsNullOrEmpty(this.TaskName)) {
40 |
41 | int oCount = 0;
42 | int startIndex = (this.Pager.PageCurrent - 1) * this.Pager.PageSize;
43 | int pageSize = this.Pager.PageSize;
44 |
45 | DataTable dt = DALContentHelper.GetContentList(this.TaskName, startIndex, pageSize, ref oCount);
46 |
47 | this.Pager.bindingSource.DataSource = dt;
48 | this.Pager.bindingNavigator.BindingSource = Pager.bindingSource;
49 |
50 | this.dataGridView_DataList.DataSource = this.Pager.bindingSource;
51 |
52 | return oCount;
53 | }
54 | return 0;
55 | }
56 |
57 | private int Pager_EventPaging(EventPagingArg e) {
58 | return this.Bind_DataList();
59 | }
60 |
61 | private void dataGridView_DataList_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) {
62 | var id = dataGridView_DataList.Rows[e.RowIndex].Cells[0];
63 | var cell = dataGridView_DataList.Rows[e.RowIndex].Cells[e.ColumnIndex];
64 | var headerName = cell.OwningColumn.HeaderText;
65 | frmTaskDataEdit FormTaskDataEdit = new frmTaskDataEdit();
66 | FormTaskDataEdit.TaskName = this.TaskName;
67 | FormTaskDataEdit.HeaderText = headerName;
68 | FormTaskDataEdit.Id = id.Value.ToString();
69 | FormTaskDataEdit.Cell = cell;
70 | FormTaskDataEdit.OutEdit = EditContentReturn;
71 | FormTaskDataEdit.ShowDialog(this);
72 | }
73 |
74 |
75 | private void EditContentReturn(DataGridViewCell cell, string result) {
76 | cell.Value = result;
77 | }
78 |
79 |
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/V5_WinLibs/Core/ImageDownHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Net;
4 | using System.Text.RegularExpressions;
5 |
6 | namespace V5_WinLibs.Core {
7 | ///
8 | /// 图片下载
9 | ///
10 | public class ImageDownHelper {
11 | public ImageDownHelper() { }
12 |
13 | #region 私有方法
14 | ///
15 | /// 获取图片标志
16 | ///
17 | private static string[] GetImgTag(string htmlStr) {
18 | Regex regObj = new Regex("", RegexOptions.Compiled | RegexOptions.IgnoreCase);
19 | string[] strAry = new string[regObj.Matches(htmlStr).Count];
20 | int i = 0;
21 | foreach (Match matchItem in regObj.Matches(htmlStr)) {
22 | strAry[i] = GetImgUrl(matchItem.Value);
23 | i++;
24 | }
25 | return strAry;
26 | }
27 |
28 | ///
29 | /// 获取图片URL地址
30 | ///
31 | private static string GetImgUrl(string imgTagStr) {
32 | string str = "";
33 | Regex regObj = new Regex("http://.+.(?:jpg|gif|bmp|png)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
34 | foreach (Match matchItem in regObj.Matches(imgTagStr)) {
35 | str = matchItem.Value;
36 | }
37 | return str;
38 | }
39 | #endregion
40 |
41 | ///
42 | /// 下载图片到本地
43 | ///
44 | /// HTML
45 | /// 路径
46 | /// 年月
47 | /// 日
48 | public static string SaveUrlPics(string strHTML, string path) {
49 | string nowym = DateTime.Now.ToString("yyyy-MM"); //当前年月
50 | string nowdd = DateTime.Now.ToString("dd"); //当天号数
51 | path = path + nowym + "/" + nowdd;
52 | if (!Directory.Exists(path)) Directory.CreateDirectory(path);
53 |
54 | string[] imgurlAry = GetImgTag(strHTML);
55 | try {
56 | for (int i = 0; i < imgurlAry.Length; i++) {
57 | string preStr = System.DateTime.Now.ToString() + "_";
58 | preStr = preStr.Replace("-", "");
59 | preStr = preStr.Replace(":", "");
60 | preStr = preStr.Replace(" ", "");
61 | WebClient wc = new WebClient();
62 | wc.DownloadFile(imgurlAry[i], path + "/" + preStr + imgurlAry[i].Substring(imgurlAry[i].LastIndexOf("/") + 1));
63 | }
64 | }
65 | catch (Exception ex) {
66 | return ex.Message;
67 | }
68 | return strHTML;
69 | }
70 | }
71 | }
--------------------------------------------------------------------------------
/V5_WinLibs/Core/HardwareInfoHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Management;
6 |
7 | namespace V5_WinLibs.Core {
8 | public class HardwareInfoHelper {
9 | //取机器名
10 | public string GetHostName() {
11 | return System.Net.Dns.GetHostName();
12 | }
13 | //取CPU编号
14 | public String GetCpuID() {
15 | try {
16 | ManagementClass mc = new ManagementClass("Win32_Processor");
17 | ManagementObjectCollection moc = mc.GetInstances();
18 | String strCpuID = null;
19 | foreach (ManagementObject mo in moc) {
20 | strCpuID = mo.Properties["ProcessorId"].Value.ToString();
21 | break;
22 | }
23 | return strCpuID;
24 | }
25 | catch {
26 | return "";
27 | }
28 | }
29 | //取第一块硬盘编号
30 | public String GetHardDiskID() {
31 | try {
32 | ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_PhysicalMedia");
33 | String strHardDiskID = null;
34 | foreach (ManagementObject mo in searcher.Get()) {
35 | strHardDiskID = mo["SerialNumber"].ToString().Trim();
36 | break;
37 | }
38 | return strHardDiskID;
39 | }
40 | catch {
41 | return "";
42 | }
43 | }
44 | ///
45 | /// 获取主板序列号
46 | ///
47 | ///
48 | public string GetBordSerial() {
49 | try {
50 | SelectQuery query = new SelectQuery("SELECT * FROM Win32_BaseBoard");
51 | ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
52 | ManagementObjectCollection.ManagementObjectEnumerator enumerator = searcher.Get().GetEnumerator();
53 | enumerator.MoveNext();
54 | return enumerator.Current.GetPropertyValue("SerialNumber").ToString();
55 | }
56 | catch {
57 | return "";
58 | }
59 | }
60 | ///
61 | /// 获取内存序列号
62 | ///
63 | ///
64 | public string GetProcessorId() {
65 | string str = string.Empty;
66 | ManagementObjectSearcher searcher = new ManagementObjectSearcher("select * from Win32_Processor");
67 | foreach (ManagementObject obj2 in searcher.Get()) {
68 | return obj2.Properties["ProcessorId"].Value.ToString();
69 | }
70 | return str;
71 | }
72 |
73 |
74 |
75 |
76 |
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/V5_DataPublish/_Class/Common.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using XmlDatabase.Core;
6 |
7 | namespace V5_DataPublish._Class {
8 | public class Common {
9 |
10 | private static string baseDir = AppDomain.CurrentDomain.BaseDirectory + "System\\DB\\";
11 |
12 | public enum Option {
13 | add = 1,
14 | edit = 2,
15 | del = 3
16 | }
17 | ///
18 | /// 数据库链接字符串
19 | ///
20 | public static string DbString = "System\\V5.DataPublish.db3";
21 | public static string SettingsFile = "System\\V5.DataPublish.Settings.ini";
22 | public static string V5DataPublish = "System\\V5.DataPublish.ini";
23 |
24 | ///
25 | /// 更新 添加
26 | ///
27 | public static bool Update(TSource t) {
28 | using (XDatabase db = XDatabase.Open(baseDir)) {
29 | db.Store(t);
30 | return true;
31 | //var query = db.Query();
32 | //if (query != null) {
33 | // db.Store(t);
34 | // return true;
35 | //}
36 | }
37 | return false;
38 | }
39 | ///
40 | /// 数据获取
41 | ///
42 | ///
43 | ///
44 | ///
45 | public static List GetList(Func predicate) {
46 | List list = new List();
47 | using (XDatabase db = XDatabase.Open(baseDir)) {
48 | var query = db.Query();
49 | if (query != null) {
50 | list = query.Where(predicate).ToList();
51 | }
52 | }
53 | return list;
54 | }
55 |
56 | public static bool Delete(TSource t) {
57 | using (XDatabase db = XDatabase.Open(baseDir)) {
58 | var query = db.Query();
59 | if (query != null) {
60 | db.Delete(t);
61 | return true;
62 | }
63 | }
64 | return false;
65 | }
66 |
67 | public static bool Delete(Func predicate) {
68 | using (XDatabase db = XDatabase.Open(baseDir)) {
69 | var query = db.Query();
70 | if (query != null) {
71 | var model = query.Where(predicate).SingleOrDefault();
72 | db.Delete(model);
73 | return true;
74 | }
75 | }
76 | return false;
77 | }
78 | }
79 | }
80 |
--------------------------------------------------------------------------------