For our solution we will offer a staggered approach. First we will separate the incoming processing of files—which entails moving them to the outgoing path—from the processing of the files, the e-mail being sent, and the actual movement into the Processed folder.
Creating a new <FileWorker.ProcessingIncome> method is fairly straightforward. In this case we take the FileWorker class and implement the code shown in Example 5-10 by replacing the FileWorker class <ThreadFunc> method.
Example 5-10. The new <ProcessIncoming> thread method.
Private Sub ProcessIncoming() While Not m_ThreadAction.StopThread If Not m_ThreadAction.Pause Then Try For Each TextFile As String In My.Computer.FileSystem.GetFiles( ...