update 20241210
This commit is contained in:
@@ -15,13 +15,13 @@ namespace OnDoc.Klassen
|
||||
public static class clsProcessWatch
|
||||
{
|
||||
|
||||
public static System.Timers.Timer watchtimer = new System.Timers.Timer(2000);
|
||||
public static System.Timers.Timer watchtimer = new System.Timers.Timer(Convert.ToInt32(Properties.Settings.Default.OfficeWatchTimerIntervall));
|
||||
|
||||
static List<FileToCheck> FilestoCheck = new List<FileToCheck>();
|
||||
|
||||
public static void AddToList(string dokumentid, string filename, string applicatoin)
|
||||
public static void AddToList(string dokumentid, string filename, string application)
|
||||
{
|
||||
FilestoCheck.Add(new FileToCheck(dokumentid, filename, applicatoin));
|
||||
FilestoCheck.Add(new FileToCheck(dokumentid, filename, application));
|
||||
if (watchtimer.Enabled == false) { watchtimer.Enabled = true; }
|
||||
watchtimer.Elapsed += WatchProcesses;
|
||||
}
|
||||
@@ -122,6 +122,7 @@ namespace OnDoc.Klassen
|
||||
private static bool Check_Modified(FileToCheck fc)
|
||||
{
|
||||
DateTime lwt = System.IO.File.GetLastWriteTime(fc.filename);
|
||||
Logging.DocLog.Debug("Prozesswatch - Check Modified: " + lwt.ToString() + "," + fc.filedatetime.ToString(), "Processwatch", fc.dokumentid, "", fc.filename);
|
||||
if ((lwt- fc.filedatetime).Seconds > 2)
|
||||
{
|
||||
return true;
|
||||
@@ -147,6 +148,8 @@ namespace OnDoc.Klassen
|
||||
this.filename = filename;
|
||||
this.application = application;
|
||||
this.filedatetime = DateTime.Now;
|
||||
Logging.DocLog.Debug("Add Processwatch: " + DateTime.Now.ToString(), "New FileToCheck", dokumentid, "", "Add Processwatch");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user