Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. Form1.cs
  2.  
  3. public string tags;
  4. public List<string> taglist;
  5.  
  6. private void button1_Click(object sender, EventArgs e)
  7. {
  8. openFileDialog1.Filter = "TXT (*.txt)|*.txt|ALL (*.*)|*.*";
  9.  
  10. if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  11. {
  12. //Reads file like fuckin ghetto and remove empty lines
  13. label1.Text = openFileDialog1.FileName;
  14. textBox1.Text = File.ReadAllText(label1.Text);
  15. textBox2.Text = Regex.Replace(textBox1.Text, @"^s+$[rn]*", "", RegexOptions.Multiline);
  16.  
  17. //Save file which empty lines removed
  18. File.WriteAllText(label1.Text +"2", textBox2.Text);
  19.  
  20. //Read file which empty lines removed
  21. string readerline;
  22. StreamReader reader = new StreamReader(label1.Text + "2");
  23.  
  24. //While loop lines untill add all lines to list
  25. while((readerline = reader.ReadLine()) != null)
  26. {
  27. taglist.Add(readerline);
  28. textBox3.AppendText ("Readerline Text:" + (readerline) + "rn");
  29. }
  30.  
  31. tags = textBox2.Text;
  32.  
  33. //remove temp txtfile
  34. reader.Dispose();
  35. File.Delete(label1.Text + "2");
  36. Program.URLadder(taglist); // Fucking error appears at here
  37. }
  38. }
  39.  
  40. public void MainDbgWriter(string text)
  41. {
  42. if (this.InvokeRequired)
  43. {
  44. this.textBox3.Text += text;
  45. }
  46.  
  47. }
  48.  
  49. Program.cs
  50.  
  51. public void URLadder(List <string> taglist)
  52. {
  53. foreach(string tag in taglist)
  54. {
  55. var fixedtags = prefix + tag + suffix;
  56. var fixedtags2 = prefix2 + tag + suffix;
  57. var fixedtags3 = prefix3 + tag + suffix;
  58. ResponseCheck(fixedtags);
  59.  
  60. }
  61.  
  62. }
  63.  
  64. public void MainDbgWriter(string text)
  65. {
  66. fm.textBox3.AppendText(text + Environment.NewLine);
  67. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement