private void Form1_Shown(object sender, EventArgs e) { |
this .fileSystemWatcher1.Path = Environment.CurrentDirectory; |
this .fileSystemWatcher1.Filter = "RunOptions.xml" ; |
this .fileSystemWatcher1.NotifyFilter = System.IO.NotifyFilters.LastWrite; |
this .fileSystemWatcher1.EnableRaisingEvents = true ; |
} |
private void fileSystemWatcher1_Changed(object sender, System.IO.FileSystemEventArgs e) { |
string message = string.Format( "{0} {1}." , e.Name, e.ChangeType); |
this .listBox1.Items.Add(message); |
} |