Guest User

Untitled

a guest
Jan 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. public void OnChanged(object source, FileSystemEventArgs e)
  2. {
  3. i++;
  4. var data = File.ReadAllLines(e.FullPath);
  5. string last = data[data.Length - 1];
  6.  
  7. if (i == 1)
  8. {
  9. tb_art1.Invoke(new Action(() => tb_art1.Text = last));
  10. }
  11. if (i == 2)
  12. {
  13. tb_art2.Invoke(new Action(() => tb_art2.Text = "ART2"));
  14. }
  15. if (i == 3)
  16. {
  17. tb_art3.Invoke(new Action(() => tb_art3.Text = "ART3"));
  18. MessageBox.Show("Com?");
  19. tb_art1.Invoke(new Action(() => tb_art1.Text = ""));
  20. tb_art2.Invoke(new Action(() => tb_art2.Text = ""));
  21. tb_art3.Invoke(new Action(() => tb_art3.Text = ""));
  22. i = 0;
  23. }
Add Comment
Please, Sign In to add comment