Пример #1
0
        public void EnableWatcher(string FileName)
        {
            string            s   = FileName.ToLower();
            FileChangeWatcher fcw = null;

            if (watchers.TryGetValue(s, out fcw))
            {
                fcw.Enabled = true;
            }
        }
Пример #2
0
        public void AddWatcher(string FileName)
        {
            try
            {
                string s = FileName.ToLower();
                if (!watchers.ContainsKey(s))
                    watchers[s] = new FileChangeWatcher(FileName);
            }
            catch
            {

            }
        }
Пример #3
0
 public void AddWatcher(string FileName)
 {
     try
     {
         string s = FileName.ToLower();
         if (!watchers.ContainsKey(s))
         {
             watchers[s] = new FileChangeWatcher(FileName);
         }
     }
     catch
     {
     }
 }
Пример #4
0
 public void RemoveWatcher(string FileName)
 {
     try
     {
         string            s   = FileName.ToLower();
         FileChangeWatcher fcw = null;
         if (watchers.TryGetValue(s, out fcw))
         {
             fcw.Dispose();
             watchers.Remove(s);
         }
     }
     catch
     {
     }
 }