public List <Article> MakeList(params string[] searchCriteria)
        {
            Browser.WebControl webbrowser = new 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(Browser.WebControl Browser)
 {
     InitializeComponent();
     loginAsThisAccountToolStripMenuItem.Visible = true;
     loginAsThisAccountToolStripMenuItem.Click += lvAccounts_DoubleClick;
     webBrowser = Browser;
 }
Example #3
0
 public AWBProfilesForm(Browser.WebControl Browser)
 {
     InitializeComponent();
     loginAsThisAccountToolStripMenuItem.Visible = true;
     loginAsThisAccountToolStripMenuItem.Click  += new System.EventHandler(this.lvAccounts_DoubleClick);
     webBrowser = Browser;
 }
 public AWBProfilesForm(Browser.WebControl browser)
 {
     InitializeComponent();
     loginAsThisAccountToolStripMenuItem.Visible = true;
     loginAsThisAccountToolStripMenuItem.Click  += lvAccounts_DoubleClick;
     WebBrowser = browser;
 }
Example #5
0
 private void unwatchToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         Browser.WebControl browser = new 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)
        {
            Browser.WebControl webbrowser = new Browser.WebControl {ScriptErrorsSuppressed = true};
            webbrowser.Navigate(Variables.URLIndex + "?title=Special:Watchlist&action=raw");
            webbrowser.Wait();

            List<Article> list = new List<Article>();

            if (webbrowser.Document == null)
                return list;

            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;
        }
Example #7
0
 private void unwatchToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         Browser.WebControl browser = new 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);
     }
 }