using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using sharpknife.Controls;
using sharpknife.Data;
using sharpknife.Utils;
#if WIN32
using MSHTML;
#else
using mshtml;
#endif
namespace sharpknife.Strategies
{
class NeoBuxStrategy : Strategy
{
public override bool CheckLogin(WebBrowserControl browser, PTCSource source)
{
return (!browser.Search(source.Username));
}
public override void Login(WebBrowserControl browser, PTCSource source)
{
//
//
//
//
//send
IHTMLElementCollection inputFields = HtmlUtils.GetElementCollection(browser.Document, "input");
foreach (IHTMLElement element in inputFields)
{
IHTMLInputElement inputElement = (IHTMLInputElement)element;
if (element.id == "Kf1")
{
inputElement.value = source.Username;
}
else if (element.id == "Kf2")
{
inputElement.value = source.Password;
inputElement.form.submit();
return;
}
}
return;
}
public override decimal GetBalance(WebBrowserControl browser, PTCSource source)
{
throw new NotImplementedException();
}
public override bool SolveCaptcha(WebBrowserControl browser, PTCSource source)
{
throw new NotImplementedException();
}
public override Ad ParseMail(Mail mail)
{
throw new NotImplementedException();
}
public override bool ParseAds(WebBrowserControl browser, PTCSource source)
{
throw new NotImplementedException();
}
public override decimal GetReferrals(WebBrowserControl browser, PTCSource source)
{
throw new NotImplementedException();
}
}
}