コード例 #1
0
        private static void OnMapiCreated(object source, FileSystemEventArgs e, Server server)
        {
            if (!e.FullPath.Contains(server.GetSessionId()))
            {
                return;
            }

            Thread.Sleep(15);
            OutputThread.ProcessFile(server, e.FullPath);
        }
コード例 #2
0
        private static void OnDirectoryChanged(object source, FileSystemEventArgs e, Server server)
        {
            if (!Directory.Exists(e.FullPath))
            {
                return;
            }

            if (!e.FullPath.Contains(server.GetSessionId()))
            {
                return;
            }

            string[] files = Directory.GetFiles(e.FullPath, "sl*.mapi", SearchOption.TopDirectoryOnly).OrderBy(f => f).ToArray <string>();
            foreach (string file in files)
            {
                OutputThread.ProcessFile(server, file);
            }
        }