예제 #1
0
        private void DisplaySynopsis_Click(object sender, EventArgs e)
        {
            try
            {
                HtmlParser parser = new HtmlParser();

                string url = parser.AddProtocolIfNeeded(URL.Text);
                URL.Text = url;

                if (parser.ValidUrl(url))
                {
                    DisplaySynopsis.Enabled = false;

                    var           doc         = parser.LoadDocument(new Uri(url));
                    ImageResource imgResource = new ImageResource(parser, UpdateProgressBarMethod);
                    DisplayImageData(imgResource);

                    WordResource wordResource = new WordResource(parser, UpdateProgressBarMethod);
                    DisplayStats(wordResource);
                    progressBarLoad.Value = progressBarLoad.Maximum;//this is to finish out the load bar when there are unloaded svgs :V
                }
                else
                {
                    MessageBox.Show(ConfigurationManager.AppSettings["Error-BadUrl"]);
                }
            }
            catch (Exception ee)
            {
                DisplaySynopsis.Enabled = true;
                Clear();
                MessageBox.Show(ee.StackTrace);
            }
        }