Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Receive_infile
- {
- public partial class Form1 : Form
- {
- static string InfilePath = @"D:infile.txt";
- static StreamWriter outputFile = new StreamWriter(InfilePath, true, Encoding.ASCII, 131072)
- public Form1()
- {
- InitializeComponent();
- REAL.ReceiveData += Handler_Real; // Handler_Real method is called whenever new data arrives
- }
- private void Handler_Real(string type)
- {
- string data = REAL.GetFieldData();
- outputFile.WriteLine(data); // new data is added to outputFile
- }
- }
- }
Add Comment
Please, Sign In to add comment