Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void OnChanged(object source, FileSystemEventArgs e)
- {
- i++;
- var data = File.ReadAllLines(e.FullPath);
- string last = data[data.Length - 1];
- if (i == 1)
- {
- tb_art1.Invoke(new Action(() => tb_art1.Text = last));
- }
- if (i == 2)
- {
- tb_art2.Invoke(new Action(() => tb_art2.Text = "ART2"));
- }
- if (i == 3)
- {
- tb_art3.Invoke(new Action(() => tb_art3.Text = "ART3"));
- MessageBox.Show("Com?");
- tb_art1.Invoke(new Action(() => tb_art1.Text = ""));
- tb_art2.Invoke(new Action(() => tb_art2.Text = ""));
- tb_art3.Invoke(new Action(() => tb_art3.Text = ""));
- i = 0;
- }
Add Comment
Please, Sign In to add comment