mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-10 15:14:55 +00:00
ImageEditor : Add more events to fire off FileWatcher changed event.
This commit is contained in:
parent
3fbd152032
commit
3215f504bd
1 changed files with 12 additions and 6 deletions
|
@ -267,7 +267,14 @@ namespace Toolbox.Library.Forms
|
|||
{
|
||||
FileWatcher = new FileSystemWatcher();
|
||||
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.Changed += new FileSystemEventHandler(OnFileWatcherChanged);
|
||||
FileWatcher.Filter = "";
|
||||
|
@ -1054,15 +1061,14 @@ namespace Toolbox.Library.Forms
|
|||
break;
|
||||
}
|
||||
|
||||
//Start watching for changes
|
||||
FileWatcher.EnableRaisingEvents = true;
|
||||
FileWatcher.Filter = Path.GetFileName(TemporaryName);
|
||||
|
||||
if (UseDefaultEditor)
|
||||
Process.Start(TemporaryName);
|
||||
else
|
||||
ShowOpenWithDialog(TemporaryName);
|
||||
|
||||
FileWatcher.Filter = Path.GetFileName(TemporaryName);
|
||||
|
||||
//Start watching for changes
|
||||
FileWatcher.EnableRaisingEvents = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue