public List <Article> MakeList(params string[] searchCriteria) { WikiFunctions.Browser.WebControl webbrowser = new WikiFunctions.Browser.WebControl(); webbrowser.ScriptErrorsSuppressed = true; webbrowser.Navigate(Variables.URLLong + "index.php?title=Special:Watchlist&action=raw"); webbrowser.Wait(); List <Article> list = new List <Article>(); HtmlElement textarea = webbrowser.Document.GetElementById("titles"); string html; if (textarea == null || (html = textarea.InnerText) == null) { return(list); } try { string[] splitter = { "\r\n" }; foreach (string entry in html.Split(splitter, StringSplitOptions.RemoveEmptyEntries)) { if (entry.Length > 0) { list.Add(new Article(entry)); } } } catch (Exception ex) { ErrorHandler.Handle(ex); } return(list); }
public AWBProfilesForm(WikiFunctions.Browser.WebControl Browser) { InitializeComponent(); loginAsThisAccountToolStripMenuItem.Visible = true; loginAsThisAccountToolStripMenuItem.Click += new System.EventHandler(this.lvAccounts_DoubleClick); this.webBrowser = Browser; }
public AWBProfilesForm(WikiFunctions.Browser.WebControl Browser) { InitializeComponent(); loginAsThisAccountToolStripMenuItem.Visible = true; loginAsThisAccountToolStripMenuItem.Click += new System.EventHandler(this.lvAccounts_DoubleClick); this.webBrowser = Browser; }
private void browserLogin(string Username, string Password) { if (webBrowser == null) webBrowser = new WikiFunctions.Browser.WebControl(); webBrowser.Login(Username, Password); LoadProfile(null, null); Variables.User.UpdateWikiStatus(); }
private void browserLogin(string Username, string Password) { if (webBrowser == null) { webBrowser = new WikiFunctions.Browser.WebControl(); } webBrowser.Login(Username, Password); LoadProfile(null, null); Variables.User.UpdateWikiStatus(); }
private void unwatchToolStripMenuItem_Click(object sender, EventArgs e) { try { WikiFunctions.Browser.WebControl browser = new WikiFunctions.Browser.WebControl(); browser.Navigate(Variables.URLLong + "index.php?title=" + Tools.WikiEncode(ArticleTitle) + "&action=unwatch"); browser.Wait(); MessageBox.Show("Article successfully removed from your watchlist"); } catch (Exception ex) { ErrorHandler.Handle(ex); } }
private void unwatchToolStripMenuItem_Click(object sender, EventArgs e) { try { WikiFunctions.Browser.WebControl browser = new WikiFunctions.Browser.WebControl(); browser.Navigate(Variables.URLLong + "index.php?title=" + Tools.WikiEncode(ArticleTitle) + "&action=unwatch"); browser.Wait(); MessageBox.Show("Page successfully removed from your watchlist"); } catch (Exception ex) { ErrorHandler.Handle(ex); } }
public List<Article> MakeList(params string[] searchCriteria) { WikiFunctions.Browser.WebControl webbrowser = new WikiFunctions.Browser.WebControl(); webbrowser.ScriptErrorsSuppressed = true; webbrowser.Navigate(Variables.URLLong + "index.php?title=Special:Watchlist&action=raw"); webbrowser.Wait(); List<Article> list = new List<Article>(); HtmlElement textarea = webbrowser.Document.GetElementById("titles"); string html; if (textarea == null || (html = textarea.InnerText) == null) return list; try { string[] splitter = { "\r\n" }; foreach (string entry in html.Split(splitter, StringSplitOptions.RemoveEmptyEntries)) { if (entry.Length > 0) list.Add(new Article(entry)); } } catch (Exception ex) { ErrorHandler.Handle(ex); } return list; }