private void button3_Click(object sender, EventArgs e) { isListenerStarted = true; toolStripStatusLabel4.Text = "Started"; button3.Enabled = false; button4.Enabled = true; msmq = new MSMQWrapper(MessageQueueName); readThread = new Thread(timer); readThread.Start(); timer1.Enabled = true; }
public FileWatcher(string inRootPath, string qName) { sourcePath = inRootPath; queueName = qName; //workThread = new Thread(WorkProcedure); fileWatcher = new FileSystemWatcher(sourcePath); fileWatcher.EnableRaisingEvents = false; fileWatcher.Changed += SourceDirectoryChanged; fileWatcher.Created += SourceDirectoryChanged; fileWatcher.Renamed += SourceDirectoryChanged; msmq = new MSMQWrapper(queueName); }