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);
        }
Ejemplo n.º 2
0
 public AWBProfilesForm(WikiFunctions.Browser.WebControl Browser)
 {
     InitializeComponent();
     loginAsThisAccountToolStripMenuItem.Visible = true;
     loginAsThisAccountToolStripMenuItem.Click  += new System.EventHandler(this.lvAccounts_DoubleClick);
     this.webBrowser = Browser;
 }
Ejemplo n.º 3
0
 public AWBProfilesForm(WikiFunctions.Browser.WebControl Browser)
 {
     InitializeComponent();
     loginAsThisAccountToolStripMenuItem.Visible = true;
     loginAsThisAccountToolStripMenuItem.Click += new System.EventHandler(this.lvAccounts_DoubleClick);
     this.webBrowser = Browser;
 }
Ejemplo n.º 4
0
        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();
        }
Ejemplo n.º 5
0
        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();
        }
Ejemplo n.º 6
0
 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);
     }
 }
Ejemplo n.º 7
0
 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);
     }
 }
Ejemplo n.º 8
0
        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;
        }