ImageEditor : Add more events to fire off FileWatcher changed event.
This commit is contained in:
parent
3fbd152032
commit
3215f504bd
@ -267,7 +267,14 @@ namespace Toolbox.Library.Forms
|
|||||||
{
|
{
|
||||||
FileWatcher = new FileSystemWatcher();
|
FileWatcher = new FileSystemWatcher();
|
||||||
FileWatcher.Path = Path.GetTempPath();
|
FileWatcher.Path = Path.GetTempPath();
|
||||||
FileWatcher.NotifyFilter = NotifyFilters.Size | NotifyFilters.LastAccess | NotifyFilters.LastWrite;
|
FileWatcher.NotifyFilter = NotifyFilters.Attributes |
|
||||||
|
NotifyFilters.CreationTime |
|
||||||
|
NotifyFilters.FileName |
|
||||||
|
NotifyFilters.LastAccess |
|
||||||
|
NotifyFilters.LastWrite |
|
||||||
|
NotifyFilters.Size |
|
||||||
|
NotifyFilters.Security;
|
||||||
|
|
||||||
FileWatcher.EnableRaisingEvents = false;
|
FileWatcher.EnableRaisingEvents = false;
|
||||||
FileWatcher.Changed += new FileSystemEventHandler(OnFileWatcherChanged);
|
FileWatcher.Changed += new FileSystemEventHandler(OnFileWatcherChanged);
|
||||||
FileWatcher.Filter = "";
|
FileWatcher.Filter = "";
|
||||||
@ -1054,15 +1061,14 @@ namespace Toolbox.Library.Forms
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Start watching for changes
|
||||||
|
FileWatcher.EnableRaisingEvents = true;
|
||||||
|
FileWatcher.Filter = Path.GetFileName(TemporaryName);
|
||||||
|
|
||||||
if (UseDefaultEditor)
|
if (UseDefaultEditor)
|
||||||
Process.Start(TemporaryName);
|
Process.Start(TemporaryName);
|
||||||
else
|
else
|
||||||
ShowOpenWithDialog(TemporaryName);
|
ShowOpenWithDialog(TemporaryName);
|
||||||
|
|
||||||
FileWatcher.Filter = Path.GetFileName(TemporaryName);
|
|
||||||
|
|
||||||
//Start watching for changes
|
|
||||||
FileWatcher.EnableRaisingEvents = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user