More Related Content Similar to CatalogLoader 2014 Belarus Minsk DNUG Similar to CatalogLoader 2014 Belarus Minsk DNUG (20) CatalogLoader 2014 Belarus Minsk DNUG2. О компании
- 6 продуктов
- 30 CMS
- 500 проектов
- 2500 клиентов
Слайд
2 из 22
CatalogLoader.com
5. HtmlAgilityPack
var doc = new HtmlDocument();
doc.Load("file.htm");
var attributes = new List<HtmlAttribute>();
foreach(HtmlNode link in doc.DocumentElement.SelectNodes("//a[@href"])
{
var att = link["href"];
attributes.Add(att);
}
Слайд
5 из 22
6. Проект (настройки)
<GrabberSettings>
<CategoryLevel1 />
<CategoryLevel2 />
<CategoryLevel3 />
<ShopUrl>http://artans.ru</ShopUrl>
<TypeOfHrefForProducts />
<Charset />
<PaginationTemplate>index.php?page={0}</PaginationTempl
ate>
<ProductsOnPage>1</ProductsOnPage>
<MaxProductsInCategory>0</MaxProductsInCategory>
<PaginationStartIndex>1</PaginationStartIndex>
Слайд
6 из 22
8. Скрипты
public override void RunProduct(RunProductScriptParameters p)
{
product = p.Product;
category = p.Category;
_hpl = (p.Process as
OneProductLoader).State.Proxy.GetHtmlPageLoader("http://mail.ru");
product.ID = Helper.GetHashCodeString(product.Name + product.Url);
if (product.Art == "")
product.Art = _HashCod;
if (_imageNameSku)
product.Image = Helper.MakeImgName2Sku(product.ImageFull);
Слайд
8 из 22
13. VisualWebGui
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender,
EventArgs e)
{
MyAspxBox a = new MyAspxBox();
a.Dock = DockStyle.Fill;
Слайд
13 из 22
a.Path = "WebForm2.aspx";
this.Controls.Add(a);
}
}
14. VisualWebGui-2
public class MyAspxBox : AspPageBox
{
protected override void FireEvent(IEvent objEvent)
{
if (objEvent.Type == "message")
{
string s = objEvent["messagetext"];
MessageBox.Show(s);
}
else
{
Слайд
14 из 22
base.FireEvent(objEvent);
}
}
}
15. VisualWebGui-3
function SendMessage() {
var strMessage = document.getElementById("TextBox1").value;
var objEvent = VWG.Events.CreateEvent("<%= PageContext.Guid %>",
"message");
VWG.Events.SetEventAttribute(objEvent, "messagetext", strMessage);
VWG.Events.RaiseEvents();
}
Слайд
15 из 22
21. Работа с БД
- MSSQL, SQL Compact, MySQL
- Http tunnel
Слайд
21 из 22