示例#1
0
        public Service1()
        {
            InitializeComponent();
            lomf = ListOfManipulatedFiles.UniqueInstance;
            string p = FileSaverWorker.GetFolderWatcherPath();

            if (!string.IsNullOrEmpty(p))
            {
                fileSystemWatcher.Path = p;
            }
            System.IO.File.AppendAllText(FileSaverWorker.logFilePath, "[Info] Current MainFolder: " + fileSystemWatcher.Path + Environment.NewLine);
        }
示例#2
0
 protected override void OnStart(string[] args)
 {
     (new Thread(() =>
     {
         if (args.Length > 0)
         {
             if (System.IO.Directory.Exists(args[0]))
             {
                 fileSystemWatcher.Path = args[0];
                 FileSaverWorker.WriteFolderWatcherPath(args[0]);
                 lomf.ResetList();
             }
         }
         WCFHost.DoWork();
     })).Start();
 }