Exemple #1
0
        public CFileWatcher(Main_Form mainForm, string winRootPath, string linuRootPath)
        {
            _mainForm        = mainForm;
            _synFiles        = new CSynFiles(mainForm, mainForm._dbFile); // 连接类
            _linux_root_path = linuRootPath;

            _watcher.Path = winRootPath;
            _watcher.EnableRaisingEvents = false;
            // _watcher.Filter = "*.h|*.cpp";
            _watcher.Changed     += new FileSystemEventHandler(Changed);
            _watcher.Created     += new FileSystemEventHandler(Created);
            _watcher.Deleted     += new FileSystemEventHandler(Deleted);
            _watcher.Renamed     += new RenamedEventHandler(Renamed);
            _watcher.NotifyFilter = NotifyFilters.DirectoryName | NotifyFilters.FileName
                                    | NotifyFilters.LastWrite;
            _watcher.IncludeSubdirectories = true;

            // 同步的时候需要排除的目录列表
            _lsExcludeDir.Add(@"trunk\apps\penguin_game\common\jce");
            _lsExcludeDir.Add(@".svn");
            _lsExcludeDir.Add(@".git");
        }
Exemple #2
0
 public CSynFiles(Main_Form mainFrom, CDbFile dbFile)
 {
     _mainForm = mainFrom;
     _dbFile   = dbFile;
 }
Exemple #3
0
 public void Init(Main_Form mainForm, CDbFile dbFile)
 {
     _dbFile   = dbFile;
     _mainForm = mainForm;
 }