using System; using System.Collections.Generic; using System.Linq; using System.Text; #if WIN32 using MSHTML; #else using mshtml; #endif using sharpknife.Utils; using System.Globalization; using sharpknife.Controls; using System.Drawing; using System.IO; using sharpknife.Data; namespace sharpknife.Strategies { class KingolottoStrategy : Strategy { public override bool CheckLogin(WebBrowserControl browser, PTCSource source) { throw new NotImplementedException(); } public override void Login(WebBrowserControl browser, PTCSource source) { IHTMLElementCollection inputFields = HtmlUtils.GetElementCollection(browser.Document, "input"); IHTMLInputElement button = null; foreach (IHTMLInputElement element in inputFields) { if (element.name == "email") { element.value = source.Username; } else if (element.name == "pass") { element.value = source.Password; } else if (((IHTMLElement)element).className == "btnLogin") { button = element; } } button.form.submit(); } 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(); } } }