private void txtInput_TextChanged(object sender, EventArgs e)
{
try
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
String webURL = txtInput.Text.Trim();
if (!IsValidLink(webURL))
{
lblCurrentURL.Text = "Invalid URL!";
return;
}
string allContent = GetURLContents(webURL);
centerContent = ExtractCenterContent(allContent);
if (string.IsNullOrWhiteSpace(centerContent))
{
lblCurrentURL.Text = "Could not find center content for this URL";
}
else
{
lblCurrentURL.Text = "Loaded URL's center content";
}
txtOutput.Text = lblTime.Text = "";
txtOriginal.Text = centerContent;
}
catch (Exception ex)
{
throw ex;
}
finally
{
}
}