예제 #1
0
        private void check(string path)
        {
            AVFileFinder     finder  = new AVFileFinder(path);
            AVScanObjFactory factory = new AVScanObjFactory();
            AVScanner        scanner = new AVScanner();

            scanner.addBase(entryList);
            ResultObserver results = new ResultObserver(lbResultCheck);

            factory.Subscribe(finder);
            factory.Subscribe(scanner);
            results.Subscribe(scanner);
            finder.StartSearch();
        }
예제 #2
0
 private void addWatch_Click(object sender, RoutedEventArgs e)
 {
     winforms.FolderBrowserDialog fbd = new winforms.FolderBrowserDialog();
     if (fbd.ShowDialog() == winforms.DialogResult.OK)
     {
         string path = fbd.SelectedPath;
         tbDirNameWatch.Text = path;
         lbDirWatch.Items.Add(path);
         AVFileWatcher    watcher = new AVFileWatcher();
         AVScanObjFactory factory = new AVScanObjFactory();
         AVScanner        scanner = new AVScanner();
         scanner.addBase(entryList);
         ResultObserver results = new ResultObserver(lbResultWatch);
         watcher.Subscribe(factory);
         factory.Subscribe(scanner);
         results.Subscribe(scanner);
         watcher.AddDirectory(path);
     }
 }