Beispiel #1
0
        public void EnableWatcher(string FileName)
        {
            string            s   = FileName.ToLower();
            FileChangeWatcher fcw = null;

            if (watchers.TryGetValue(s, out fcw))
            {
                fcw.Enabled = true;
            }
        }
        public void AddWatcher(string FileName)
        {
            try
            {
                string s = FileName.ToLower();
                if (!watchers.ContainsKey(s))
                    watchers[s] = new FileChangeWatcher(FileName);
            }
            catch
            {

            }
        }
Beispiel #3
0
 public void AddWatcher(string FileName)
 {
     try
     {
         string s = FileName.ToLower();
         if (!watchers.ContainsKey(s))
         {
             watchers[s] = new FileChangeWatcher(FileName);
         }
     }
     catch
     {
     }
 }
Beispiel #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
     {
     }
 }