예제 #1
0
        void InitializeFileService()
        {
            DisposeFileService();

            _fileServer = new FileService(CommandDirectory);
            _fileServer.DataSent += _fileServer_DataSent;
            _fileServer.DataReceived += _fileServer_DataReceived;
        }
예제 #2
0
 void DisposeFileService()
 {
     if (null != _fileServer)
     {
         _fileServer.Stop();
         _fileServer.DataSent -= _fileServer_DataSent;
         _fileServer.DataReceived -= _fileServer_DataReceived;
         _fileServer = null;
     }
 }