private void Extractions(string htmlFileName, int offLineFileNumber, bool onlineOffline)
{
if (onlineOffline == false)
{
OffLineDownload.offhtmlfiles();
page = OffLineDownload.OffLineFiles[offLineFileNumber];
byte[] bytes1 = File.ReadAllBytes(page);
page = Encoding.GetEncoding(1255).GetString(bytes1);
TextExtractor.GetDateTimeList(page);
StreamWriter w = new StreamWriter(@"C:\Temp\" + htmlFileName);//@"d:\rotterhtml\rotterscoops.html");
w.Write(page);
w.Close();
extractlinks.Links(@"C:\Temp\" + htmlFileName);
TextExtractor.ExtractText(@"C:\Temp\" + htmlFileName, newText);
}
else
{
client.Encoding = System.Text.Encoding.GetEncoding(1255);
page = client.DownloadString("http://rotter.net/scoopscache.html");
TextExtractor.GetDateTimeList(page);
StreamWriter w = new StreamWriter(@"d:\rotterhtml\rotterscoops.html");
w.Write(page);
w.Close();
extractlinks.Links(@"d:\rotterhtml\rotterscoops.html");
TextExtractor.ExtractText(@"d:\rotterhtml\rotterscoops.html", newText);
}
}
If the user calls the method I want him to have two options to call it with all 3 variables:
string htmlFileName, int offLineFileNumber, bool onlineOffline
Or to call it without the variables and if it's () so it will be automatic true.